kopia lustrzana https://github.com/projecthorus/radiosonde_auto_rx
Handle IMET1RS as IMET-4, pass rs41_mainboard into to sondehub
rodzic
4fa095a8b0
commit
4e8176b041
|
@ -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.7.0"
|
||||
__version__ = "1.7.1-beta1"
|
||||
|
||||
|
||||
# Global Variables
|
||||
|
|
|
@ -533,11 +533,13 @@ def detect_sonde(
|
|||
)
|
||||
_sonde_type = "IMET"
|
||||
elif "IMET1" in _type:
|
||||
# This could actually be a wideband iMet sonde. We treat this as a IMET4.
|
||||
logging.debug(
|
||||
"Scanner (%s) - Detected a iMet Sonde! (Type %s - Unsupported) (Score: %.2f)"
|
||||
"Scanner (%s) - Possible detection of a Wideband iMet Sonde! (Type %s) (Score: %.2f)"
|
||||
% (_sdr_name, _type, _score)
|
||||
)
|
||||
_sonde_type = "IMET1"
|
||||
# Override the type to IMET4.
|
||||
_sonde_type = "IMET"
|
||||
elif "IMETafsk" in _type:
|
||||
logging.debug(
|
||||
"Scanner (%s) - Detected a iMet Sonde! (Type %s - Unsupported) (Score: %.2f)"
|
||||
|
|
|
@ -291,6 +291,12 @@ class SondehubUploader(object):
|
|||
if "ref_datetime" in telemetry:
|
||||
_output["ref_datetime"] = telemetry["ref_datetime"]
|
||||
|
||||
if "rs41_mainboard" in telemetry:
|
||||
_output["rs41_mainboard"] = telemetry["rs41_mainboard"]
|
||||
|
||||
if "rs41_mainboard_fw" in telemetry:
|
||||
_output["rs41_mainboard_fw"] = str(telemetry["rs41_mainboard_fw"])
|
||||
|
||||
# Handle the additional SNR and frequency estimation if we have it
|
||||
if "snr" in telemetry:
|
||||
_output["snr"] = telemetry["snr"]
|
||||
|
|
|
@ -139,6 +139,7 @@ typedef struct {
|
|||
ui16_t conf_cd; // kill countdown (sec) (kt or bt)
|
||||
ui8_t conf_bk; // burst kill
|
||||
char rstyp[9]; // RS41-SG, RS41-SGP
|
||||
char rsm[10]; // RSM421
|
||||
int aux;
|
||||
char xdata[XDATA_LEN+16]; // xdata: aux_str1#aux_str2 ...
|
||||
option_t option;
|
||||
|
@ -330,7 +331,8 @@ GPS chip: ublox UBX-G6010-ST
|
|||
#define pos_Calburst 0x05E // 1 byte, calfr 0x02
|
||||
// ? #define pos_Caltimer 0x05A // 2 byte, calfr 0x02 ?
|
||||
#define pos_CalRSTyp 0x05B // 8 byte, calfr 0x21 (+2 byte in 0x22?)
|
||||
// weitere chars in calfr 0x22/0x23; weitere ID
|
||||
// weitere chars in calfr 0x22/0x23; weitere ID (RSM)
|
||||
#define pos_CalRSM 0x055 // 6 byte, calfr 0x22
|
||||
|
||||
#define crc_PTU (1<<1)
|
||||
#define xor_PTU 0xE388 // ^0x99A2=0x0x7A2A
|
||||
|
@ -448,6 +450,7 @@ static int get_SondeID(gpx_t *gpx, int crc, int ofs) {
|
|||
memset(gpx->calfrchk, 0, 51); // 0x00..0x32
|
||||
// reset conf data
|
||||
memset(gpx->rstyp, 0, 9);
|
||||
memset(gpx->rsm, 0, 10);
|
||||
gpx->freq = 0;
|
||||
gpx->conf_fw = 0;
|
||||
gpx->conf_bt = 0;
|
||||
|
@ -1366,6 +1369,7 @@ static int get_Calconf(gpx_t *gpx, int out, int ofs) {
|
|||
ui16_t fw = 0;
|
||||
int freq = 0, f0 = 0, f1 = 0;
|
||||
char sondetyp[9];
|
||||
char rsmtyp[10];
|
||||
int err = 0;
|
||||
|
||||
byte = gpx->frame[pos_CalData+ofs];
|
||||
|
@ -1451,6 +1455,17 @@ static int get_Calconf(gpx_t *gpx, int out, int ofs) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (calfr == 0x22) {
|
||||
for (i = 0; i < 10; i++) rsmtyp[i] = 0;
|
||||
for (i = 0; i < 8; i++) {
|
||||
byte = gpx->frame[pos_CalRSM+ofs + i];
|
||||
if ((byte >= 0x20) && (byte < 0x7F)) rsmtyp[i] = byte;
|
||||
else /*if (byte == 0x00)*/ rsmtyp[i] = '\0';
|
||||
}
|
||||
if (out && gpx->option.vbs) fprintf(stdout, ": %s ", rsmtyp);
|
||||
strcpy(gpx->rsm, rsmtyp);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -2088,6 +2103,12 @@ static int print_position(gpx_t *gpx, int ec) {
|
|||
if (gpx->freq > 0) fq_kHz = gpx->freq;
|
||||
fprintf(stdout, ", \"freq\": %d", fq_kHz);
|
||||
}
|
||||
if (*gpx->rsm) { // RSM type
|
||||
fprintf(stdout, ", \"rs41_mainboard\": \"%s\"", gpx->rsm);
|
||||
}
|
||||
if (gpx->conf_fw) { // firmware
|
||||
fprintf(stdout, ", \"rs41_mainboard_fw\": %d", gpx->conf_fw);
|
||||
}
|
||||
|
||||
// Include frequency derived from subframe information if available.
|
||||
if (gpx->freq > 0) {
|
||||
|
|
Ładowanie…
Reference in New Issue