kopia lustrzana https://github.com/projecthorus/radiosonde_auto_rx
readd aux
rodzic
8e5ad7fd17
commit
32ea50a8ce
|
@ -789,7 +789,7 @@ int get_GPS3() {
|
|||
return err;
|
||||
}
|
||||
|
||||
int get_Aux() {
|
||||
int get_Aux(char* aux_data) {
|
||||
//
|
||||
// "Ozone Sounding with Vaisala Radiosonde RS41" user's guide
|
||||
//
|
||||
|
@ -1103,12 +1103,16 @@ int print_position(int ec) {
|
|||
|
||||
get_Calconf(output);
|
||||
|
||||
if (option_verbose > 1) get_Aux();
|
||||
char aux_data[FRAME_LEN] = "";
|
||||
if (option_verbose > 1 || option_json) get_Aux(aux_data);
|
||||
|
||||
fprintf(stdout, "\n"); // fflush(stdout);
|
||||
fprintf(stdout, "\n"); // flush(stdout);
|
||||
|
||||
|
||||
if (option_json) {
|
||||
char auxbuffer[FRAME_LEN] = "";
|
||||
fprintf(stdout, "\n"); // flush(stdout) as get_Aux prints to stdout
|
||||
|
||||
// Print JSON output required by auto_rx.
|
||||
if (!err && !err1 && !err3) { // frame-nb/id && gps-time && gps-position (crc-)ok; 3 CRCs, RS not needed
|
||||
if ( strlen(aux_data) > 0 ){
|
||||
|
@ -1117,9 +1121,9 @@ int print_position(int ec) {
|
|||
strcpy( auxbuffer+strlen(aux_data)+9, "\"\0" );
|
||||
}
|
||||
if (option_ptu && !err0 && gpx.T > -273.0) {
|
||||
printf("{ \"frame\": %d, \"id\": \"%s\", \"datetime\": \"%04d-%02d-%02dT%02d:%02d:%06.3fZ\", \"lat\": %.5f, \"lon\": %.5f, \"alt\": %.5f, \"vel_h\": %.5f, \"heading\": %.5f, \"vel_v\": %.5f, \"sats\": %d, \"temp\":%.1f }\n", gpx.frnr, gpx.id, gpx.jahr, gpx.monat, gpx.tag, gpx.std, gpx.min, gpx.sek, gpx.lat, gpx.lon, gpx.alt, gpx.vH, gpx.vD, gpx.vU, gpx.numSV, gpx.T );
|
||||
printf("{ \"frame\": %d, \"id\": \"%s\", \"datetime\": \"%04d-%02d-%02dT%02d:%02d:%06.3fZ\", \"lat\": %.5f, \"lon\": %.5f, \"alt\": %.5f, \"vel_h\": %.5f, \"heading\": %.5f, \"vel_v\": %.5f, \"sats\": %d, \"temp\":%.1f %s}\n", gpx.frnr, gpx.id, gpx.jahr, gpx.monat, gpx.tag, gpx.std, gpx.min, gpx.sek, gpx.lat, gpx.lon, gpx.alt, gpx.vH, gpx.vD, gpx.vU, gpx.numSV, gpx.T, auxbuffer);
|
||||
} else {
|
||||
printf("{ \"frame\": %d, \"id\": \"%s\", \"datetime\": \"%04d-%02d-%02dT%02d:%02d:%06.3fZ\", \"lat\": %.5f, \"lon\": %.5f, \"alt\": %.5f, \"vel_h\": %.5f, \"heading\": %.5f, \"vel_v\": %.5f, \"sats\": %d }\n", gpx.frnr, gpx.id, gpx.jahr, gpx.monat, gpx.tag, gpx.std, gpx.min, gpx.sek, gpx.lat, gpx.lon, gpx.alt, gpx.vH, gpx.vD, gpx.vU, gpx.numSV );
|
||||
printf("{ \"frame\": %d, \"id\": \"%s\", \"datetime\": \"%04d-%02d-%02dT%02d:%02d:%06.3fZ\", \"lat\": %.5f, \"lon\": %.5f, \"alt\": %.5f, \"vel_h\": %.5f, \"heading\": %.5f, \"vel_v\": %.5f, \"sats\": %d %s}\n", gpx.frnr, gpx.id, gpx.jahr, gpx.monat, gpx.tag, gpx.std, gpx.min, gpx.sek, gpx.lat, gpx.lon, gpx.alt, gpx.vH, gpx.vD, gpx.vU, gpx.numSV, auxbuffer);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
@ -1412,5 +1416,4 @@ int main(int argc, char *argv[]) {
|
|||
fclose(fp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
Ładowanie…
Reference in New Issue