mod json: time/position reference

pull/47/head
Zilog80 2022-02-13 22:43:20 +01:00
rodzic 1913dfb5a5
commit dff33856eb
11 zmienionych plików z 67 dodań i 7 usunięć

Wyświetl plik

@ -557,7 +557,7 @@ static float get_Temp4(gpx_t *gpx) { // meas[0..4]
// [ 30.0 , 0.82845 , 3.7 ]
// [ 35.0 , 0.68991 , 3.6 ]
// [ 40.0 , 0.57742 , 3.5 ]
// -> SteinhartHart coefficients (polyfit):
// -> Steinhart-Hart coefficients (polyfit):
float p0 = 1.09698417e-03,
p1 = 2.39564629e-04,
p2 = 2.48821437e-06,
@ -941,6 +941,12 @@ static void print_gpx(gpx_t *gpx) {
if (gpx->jsn_freq > 0) {
printf(", \"freq\": %d", gpx->jsn_freq);
}
// Reference time/position
printf(", \"ref_datetime\": \"%s\"", "UTC" ); // {"GPS", "UTC"} GPS-UTC=leap_sec
printf(", \"ref_position\": \"%s\"", "GPS" ); // {"GPS", "MSL"} GPS=ellipsoid , MSL=geoid
printf(", \"diff_GPS_MSL\": %+.2f", -gpx->gps.dMSL ); // MSL = GPS + gps.dMSL
#ifdef VER_JSN_STR
ver_jsn = VER_JSN_STR;
#endif

Wyświetl plik

@ -552,8 +552,13 @@ static int print_position(gpx_t *gpx, int len, int ecc_frm, int ecc_gps) {
}
fprintf(stdout, ", \"subtype\": \"%s\"", subtype); // "IMET54"/"IMET50"
if (gpx->jsn_freq > 0) {
fprintf(stdout, ", \"freq\": %d", gpx->jsn_freq);
fprintf(stdout, ", \"freq\": %d", gpx->jsn_freq );
}
// Reference time/position
fprintf(stdout, ", \"ref_datetime\": \"%s\"", "UTC" ); // {"GPS", "UTC"} GPS-UTC=leap_sec
fprintf(stdout, ", \"ref_position\": \"%s\"", "MSL" ); // {"GPS", "MSL"} GPS=ellipsoid , MSL=geoid
#ifdef VER_JSN_STR
ver_jsn = VER_JSN_STR;
#endif

Wyświetl plik

@ -778,6 +778,11 @@ static void print_frame(gpx_t *gpx, int crc_err, int len) {
if (gpx->jsn_freq > 0) {
printf(", \"freq\": %d", gpx->jsn_freq);
}
// Reference time/position
printf(", \"ref_datetime\": \"%s\"", "GPS" ); // {"GPS", "UTC"} GPS-UTC=leap_sec
printf(", \"ref_position\": \"%s\"", "GPS" ); // {"GPS", "MSL"} GPS=ellipsoid , MSL=geoid
#ifdef VER_JSN_STR
ver_jsn = VER_JSN_STR;
#endif

Wyświetl plik

@ -657,7 +657,7 @@ static float get_Temp(gpx_t *gpx) {
// [ 30.0 , 4.448 ]
// [ 35.0 , 3.704 ]
// [ 40.0 , 3.100 ]
// -> SteinhartHart coefficients (polyfit):
// -> Steinhart-Hart coefficients (polyfit):
float p0 = 1.07303516e-03,
p1 = 2.41296733e-04,
p2 = 2.26744154e-06,
@ -753,7 +753,7 @@ static float get_Tntc2(gpx_t *gpx) {
// float R25 = 2.2e3;
// float b = 3650.0; // B/Kelvin
// float T25 = 25.0 + 273.15; // T0=25C, R0=R25=5k
// -> SteinhartHart coefficients (polyfit):
// -> Steinhart-Hart coefficients (polyfit):
float p0 = 4.42606809e-03,
p1 = -6.58184309e-04,
p2 = 8.95735557e-05,
@ -1026,6 +1026,12 @@ static int print_pos(gpx_t *gpx, int csOK) {
if (gpx->jsn_freq > 0) {
fprintf(stdout, ", \"freq\": %d", gpx->jsn_freq);
}
// Reference time/position (M10 time ref UTC only for json)
fprintf(stdout, ", \"ref_datetime\": \"%s\"", "UTC" ); // {"GPS", "UTC"} GPS-UTC=leap_sec
fprintf(stdout, ", \"ref_position\": \"%s\"", "GPS" ); // {"GPS", "MSL"} GPS=ellipsoid , MSL=geoid
fprintf(stdout, ", \"gpsutc_leapsec\": %d", gpx->utc_ofs); // GPS-UTC offset, utc_s = gpx->gpssec - gpx->utc_ofs;
#ifdef VER_JSN_STR
ver_jsn = VER_JSN_STR;
#endif

Wyświetl plik

@ -842,6 +842,11 @@ static int print_pos(gpx_t *gpx, int bcOK, int csOK) {
if (gpx->jsn_freq > 0) {
fprintf(stdout, ", \"freq\": %d", gpx->jsn_freq);
}
// Reference time/position
fprintf(stdout, ", \"ref_datetime\": \"%s\"", "GPS" ); // {"GPS", "UTC"} GPS-UTC=leap_sec
fprintf(stdout, ", \"ref_position\": \"%s\"", "GPS" ); // {"GPS", "MSL"} GPS=ellipsoid , MSL=geoid
#ifdef VER_JSN_STR
ver_jsn = VER_JSN_STR;
#endif

Wyświetl plik

@ -736,6 +736,11 @@ int main(int argc, char **argv) {
if (gpx.fq > 0) { // include frequency derived from subframe information if available
fprintf(stdout, ", \"tx_frequency\": %.0f", gpx.fq );
}
// Reference time/position
printf(", \"ref_datetime\": \"%s\"", "UTC" ); // {"GPS", "UTC"} GPS-UTC=leap_sec
printf(", \"ref_position\": \"%s\"", "MSL" ); // {"GPS", "MSL"} GPS=ellipsoid , MSL=geoid
#ifdef VER_JSN_STR
ver_jsn = VER_JSN_STR;
#endif
@ -965,6 +970,11 @@ int main(int argc, char **argv) {
if (gpx.fq > 0) { // include frequency derived from subframe information if available
fprintf(stdout, ", \"tx_frequency\": %.0f", gpx.fq );
}
// Reference time/position
printf(", \"ref_datetime\": \"%s\"", "UTC" ); // {"GPS", "UTC"} GPS-UTC=leap_sec
printf(", \"ref_position\": \"%s\"", "MSL" ); // {"GPS", "MSL"} GPS=ellipsoid , MSL=geoid
#ifdef VER_JSN_STR
ver_jsn = VER_JSN_STR;
#endif

Wyświetl plik

@ -677,6 +677,11 @@ static void print_gpx(gpx_t *gpx, int crcOK) {
if (gpx->jsn_freq > 0) {
printf(", \"freq\": %d", gpx->jsn_freq);
}
// Reference time/position
printf(", \"ref_datetime\": \"%s\"", "UTC" ); // {"GPS", "UTC"} GPS-UTC=leap_sec
printf(", \"ref_position\": \"%s\"", "GPS" ); // {"GPS", "MSL"} GPS=ellipsoid , MSL=geoid
#ifdef VER_JSN_STR
ver_jsn = VER_JSN_STR;
#endif

Wyświetl plik

@ -2088,6 +2088,10 @@ static int print_position(gpx_t *gpx, int ec) {
fprintf(stdout, ", \"tx_frequency\": %d", gpx->freq );
}
// Reference time/position
fprintf(stdout, ", \"ref_datetime\": \"%s\"", "GPS" ); // {"GPS", "UTC"} GPS-UTC=leap_sec
fprintf(stdout, ", \"ref_position\": \"%s\"", "GPS" ); // {"GPS", "MSL"} GPS=ellipsoid , MSL=geoid
#ifdef VER_JSN_STR
ver_jsn = VER_JSN_STR;
#endif

Wyświetl plik

@ -1516,14 +1516,18 @@ static int print_position(gpx_t *gpx, int ec) { // GPS-Hoehe ueber Ellipsoid
if (gpx->jsn_freq > 0) { // rs92-frequency: gpx->freq
int fq_kHz = gpx->jsn_freq;
//if (gpx->freq > 0) fq_kHz = gpx->freq; // L-band: option.ngp ?
fprintf(stdout, ", \"freq\": %d", fq_kHz);
fprintf(stdout, ", \"freq\": %d", fq_kHz );
}
// Include frequency derived from subframe information if available.
if (gpx->freq > 0) {
fprintf(stdout, ", \"tx_frequency\": %d", gpx->freq);
fprintf(stdout, ", \"tx_frequency\": %d", gpx->freq );
}
// Reference time/position
fprintf(stdout, ", \"ref_datetime\": \"%s\"", "GPS" ); // {"GPS", "UTC"} GPS-UTC=leap_sec
fprintf(stdout, ", \"ref_position\": \"%s\"", "GPS" ); // {"GPS", "MSL"} GPS=ellipsoid , MSL=geoid
#ifdef VER_JSN_STR
ver_jsn = VER_JSN_STR;
#endif

Wyświetl plik

@ -619,8 +619,13 @@ int print_frame(int len) {
fprintf(stdout, ", \"aux\": \"%s\"", gpx.xdata );
}
if (gpx.jsn_freq > 0) {
fprintf(stdout, ", \"freq\": %d", gpx.jsn_freq);
fprintf(stdout, ", \"freq\": %d", gpx.jsn_freq );
}
// Reference time/position
fprintf(stdout, ", \"ref_datetime\": \"%s\"", "GPS" ); // {"GPS", "UTC"} GPS-UTC=leap_sec
fprintf(stdout, ", \"ref_position\": \"%s\"", "MSL" ); // {"GPS", "MSL"} GPS=ellipsoid , MSL=geoid
#ifdef VER_JSN_STR
ver_jsn = VER_JSN_STR;
#endif

Wyświetl plik

@ -2012,6 +2012,11 @@ static void print_frame(gpx_t *gpx, int len, dsp_t *dsp) {
if (gpx->jsn_freq > 0) {
printf(", \"freq\": %d", gpx->jsn_freq);
}
// Reference time/position
printf(", \"ref_datetime\": \"%s\"", "GPS" ); // {"GPS", "UTC"} GPS-UTC=leap_sec
printf(", \"ref_position\": \"%s\"", "GPS" ); // {"GPS", "MSL"} GPS=ellipsoid , MSL=geoid
#ifdef VER_JSN_STR
ver_jsn = VER_JSN_STR;
#endif