Rebase imet4 decoder, add version utility, change demod_mod to -Ofast

pull/382/head
Mark Jessop 2021-02-07 11:06:46 +10:30
rodzic 3e66efe0b3
commit 666572d975
4 zmienionych plików z 38 dodań i 21 usunięć

Wyświetl plik

@ -17,7 +17,7 @@ except ImportError:
# MINOR - New sonde type support, other fairly big changes that may result in telemetry or config file incompatability issus.
# PATCH - Small changes, or minor feature additions.
__version__ = "1.4.1-beta7"
__version__ = "1.4.1-beta8"
# Global Variables

Wyświetl plik

@ -0,0 +1,13 @@
#!/usr/bin/env python
#
# radiosonde_auto_rx - Version Grabber
#
# Copyright (C) 2021 Mark Jessop <vk5qi@rfhead.net>
# Released under GNU GPL v3 or later
#
import autorx
import sys
if __name__ == "__main__":
# Simple way to get the current auto_rx version when building the binaries.
sys.stdout.write(autorx.__version__)

Wyświetl plik

@ -6,7 +6,11 @@
# Auto_RX version number - needs to match the contents of autorx/__init__.py
# This can probably be done automatically.
AUTO_RX_VERSION="\"1.4.1-beta7\""
#AUTO_RX_VERSION="\"1.4.1-beta8\""
AUTO_RX_VERSION="\"$(python -m autorx.version)\""
echo "Building for radiosonde_auto_rx version: $AUTO_RX_VERSION"
VERS_FLAG="-DVER_JSN_STR=$AUTO_RX_VERSION"
@ -15,41 +19,38 @@ echo "Building dft_detect"
cd ../scan/
gcc dft_detect.c -lm -o dft_detect -DNOC34C50 -w -Ofast
echo "Building RS92/RS41/DFM/LMS6/iMS/M10/M20/iMet54 Demodulators"
#cd ../demod/
#gcc -c demod.c
#gcc -c demod_dft.c
#gcc dfm09dm_dft.c demod_dft.o -lm -o dfm09ecc
# New demodulators
cd ../demod/mod/
gcc -c demod_mod.c -w -O3
echo "Building shared demod libraries."
gcc -c demod_mod.c -w -Ofast
gcc -c bch_ecc_mod.c -w -O3
echo "Building RS41 demod."
gcc rs41mod.c demod_mod.o bch_ecc_mod.o -lm -O3 -o rs41mod -w $VERS_FLAG
echo "Building DFM demod."
gcc dfm09mod.c demod_mod.o -lm -O3 -o dfm09mod -w $VERS_FLAG
echo "Building RS92 demod."
gcc rs92mod.c demod_mod.o bch_ecc_mod.o -lm -O3 -o rs92mod -w $VERS_FLAG
echo "Building LMS6-400 demod."
gcc lms6mod.c demod_mod.o bch_ecc_mod.o -lm -O3 -o lms6mod -w $VERS_FLAG
gcc lms6Xmod.c demod_mod.o bch_ecc_mod.o -lm -O3 -o lms6Xmod -w $VERS_FLAG
echo "Building Meisei demod."
gcc meisei100mod.c demod_mod.o bch_ecc_mod.o -lm -O3 -o meisei100mod -w $VERS_FLAG
echo "Building M10 demod."
gcc m10mod.c demod_mod.o -lm -O3 -o m10mod -w $VERS_FLAG
echo "Building M20 demod."
gcc mXXmod.c demod_mod.o -lm -O3 -o mXXmod -w $VERS_FLAG
echo "Building iMet-54 demod."
gcc imet54mod.c demod_mod.o -lm -O3 -o imet54mod -w $VERS_FLAG
# Build LMS6-1680 Decoder
echo "Building LMS6-1680 Demodulator."
echo "Building LMS6-1680 demod."
cd ../../mk2a/
gcc mk2a_lms1680.c -lm -O3 -o mk2a_lms1680 $VERS_FLAG
# Build M10 decoder
#echo "Building M10 Demodulator."
#cd ../m10/
#g++ M10.cpp M10Decoder.cpp M10GeneralParser.cpp M10GtopParser.cpp M10TrimbleParser.cpp AudioFile.cpp -lm -o m10 -std=c++11
echo "Building iMet-4 Demodulator."
echo "Building iMet-4 demod."
cd ../imet/
# Note -O3 flag removed from this demodulator until Bus Error bug can be resolved.
gcc imet1rs_dft.c -lm -o imet1rs_dft $VERS_FLAG
gcc imet1rs_dft.c -lm -Ofast -o imet1rs_dft $VERS_FLAG
echo "Building fsk-demod utils from codec2"
cd ../utils/
@ -68,7 +69,6 @@ cp ../scan/dft_detect .
cp ../utils/fsk_demod .
cp ../imet/imet1rs_dft .
cp ../mk2a/mk2a_lms1680 .
cp ../demod/mod/rs41mod .
cp ../demod/mod/dfm09mod .
cp ../demod/mod/m10mod .

Wyświetl plik

@ -285,8 +285,12 @@ int print_GPS(int pos) {
crc_val = ((byteframe+pos)[pos_GPScrc] << 8) | (byteframe+pos)[pos_GPScrc+1];
crc = crc16(byteframe+pos, pos_GPScrc); // len=pos
lat = *(float*)(byteframe+pos+pos_GPSlat);
lon = *(float*)(byteframe+pos+pos_GPSlon);
//lat = *(float*)(byteframe+pos+pos_GPSlat);
//lon = *(float*)(byteframe+pos+pos_GPSlon);
// //raspi: copy into (aligned) float
memcpy(&lat, byteframe+pos+pos_GPSlat, 4);
memcpy(&lon, byteframe+pos+pos_GPSlon, 4);
alt = ((byteframe+pos)[pos_GPSalt+1]<<8)+(byteframe+pos)[pos_GPSalt] - 5000;
sats = (byteframe+pos)[pos_GPSsats];
std = (byteframe+pos)[pos_GPStim+0];