From 793da49174dbd81883b8d16aec466f6a1998d07c Mon Sep 17 00:00:00 2001 From: Mark Jessop Date: Sat, 17 Dec 2022 20:00:47 +1030 Subject: [PATCH] Rebase dfm09mod, bump version --- README.md | 7 ++++--- auto_rx/autorx/__init__.py | 2 +- demod/mod/dfm09mod.c | 29 +++++++++++++++++++++-------- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index d223a8a..c930e25 100644 --- a/README.md +++ b/README.md @@ -18,13 +18,14 @@ Manufacturer | Model | Position | Temperature | Humidity | Pressure | XDATA -------------|-------|----------|-------------|----------|----------|------ Vaisala | RS92-SGP/NGP | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: Vaisala | RS41-SG/SGP/SGM | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: (for -SGP) | :heavy_check_mark: -Graw | DFM06/09/17 | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :x: +Graw | DFM06/09/17 | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :heavy_check_mark: Meteomodem | M10 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Not Sent | :x: Meteomodem | M20 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: (For some models) | :x: -Intermet Systems | iMet-4 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Not Sent | :x: +Intermet Systems | iMet-4 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: Intermet Systems | iMet-54 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Not Sent | :x: Lockheed Martin | LMS6-400/1680 | :heavy_check_mark: | :x: | :x: | :x: | Not Sent -Meisei | iMS-100 | :heavy_check_mark: | :x: | :x: | :x: | Not Sent +Meisei | iMS-100 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | Not Sent +Meisei | RS11G | :heavy_check_mark: | :x: | :x: | :x: | Not Sent Meteo-Radiy | MRZ-H1 (400 MHz) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | Not Sent Meteosis | MTS01 | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | Not Sent diff --git a/auto_rx/autorx/__init__.py b/auto_rx/autorx/__init__.py index 4555196..f486f54 100644 --- a/auto_rx/autorx/__init__.py +++ b/auto_rx/autorx/__init__.py @@ -12,7 +12,7 @@ from queue import Queue # 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.6.0-beta21" +__version__ = "1.6.0-beta22" # Global Variables diff --git a/demod/mod/dfm09mod.c b/demod/mod/dfm09mod.c index ce208de..ea5e52e 100644 --- a/demod/mod/dfm09mod.c +++ b/demod/mod/dfm09mod.c @@ -110,7 +110,7 @@ typedef struct { double dir; double horiV; double vertV; double lat2; double lon2; double alt2; double dir2; double horiV2; double vertV2; - //float T; + float T; float Rf; float _frmcnt; float meas24[9]; @@ -691,6 +691,7 @@ static int reset_cfgchk(gpx_t *gpx) { gpx->ptu_out = 0; //gpx->gps.dMSL = 0; *gpx->SN_out = '\0'; + gpx->T = -273.15f; return 0; } @@ -946,6 +947,18 @@ static void print_gpx(gpx_t *gpx) { gpx->prev_cntsec_diff = cntsec_diff; gpx->prev_manpol = gpx->option.inv; } + + gpx->T = -273.15f; + if (gpx->cfgchk && gpx->ptu_out) + { + gpx->T = get_Temp(gpx); + if (gpx->T < -270.0f && gpx->dfmtyp != DFM_types[UNDEF]) { + if ((gpx->sonde_typ & 0xF) == 0x8 || (gpx->sonde_typ & 0xF) == 0xC) + { + gpx->dfmtyp = DFM_types[UNKNW]; + } + } + } } if (output & 0xF000) { @@ -977,16 +990,16 @@ static void print_gpx(gpx_t *gpx) { if (gpx->cfgchk) { if (gpx->option.ptu && gpx->ptu_out) { - float t = get_Temp(gpx); - if (t > -270.0) { - printf(" T=%.1fC ", t); // 0xC:P+ DFM-09P , 0xC:T- DFM-17TU , 0xD:P- DFM-17P ? + //float t = get_Temp(gpx); + if (gpx->T > -270.0f) { + printf(" T=%.1fC ", gpx->T); // 0xC:P+ DFM-09P , 0xC:T- DFM-17TU , 0xD:P- DFM-17P ? if (gpx->option.vbs == 3) printf(" (0x%X:%c%c) ", gpx->sonde_typ & 0xF, gpx->sensortyp, gpx->option.inv?'-':'+'); } if (gpx->option.dbg) { float t2 = get_Temp2(gpx); float t4 = get_Temp4(gpx); - if (t2 > -270.0) printf(" T2=%.1fC ", t2); - if (t4 > -270.0) printf(" T4=%.1fC ", t4); + if (t2 > -270.0f) printf(" T2=%.1fC ", t2); + if (t4 > -270.0f) printf(" T4=%.1fC ", t4); } } if (gpx->option.vbs == 3 && gpx->ptu_out >= 0xA) { @@ -1089,8 +1102,8 @@ static void print_gpx(gpx_t *gpx) { printf(", \"batt\": %.2f", gpx->status[0]); } if (gpx->ptu_out) { // get temperature - float t = get_Temp(gpx); // ecc-valid temperature? - if (t > -270.0) printf(", \"temp\": %.1f", t); + //float t = get_Temp(gpx); // ecc-valid temperature? + if (gpx->T > -270.0f) printf(", \"temp\": %.1f", gpx->T); } if (gpx->posmode == 4 && contaux && gpx->xdata[0]) { char xdata_str[2*XDATA_LEN+1];