Update precision of data sent (#114)

This commit is contained in:
Luke Prior 2021-07-27 21:27:41 +10:00 committed by GitHub
parent e23d8338a6
commit ea865860e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -3195,11 +3195,11 @@ void sondehub_send_data(WiFiClient *client, SondeInfo *s, struct st_sondehub *co
"\"datetime\": \"%04d-%02d-%02dT%02d:%02d:%02d.000Z\"," "\"datetime\": \"%04d-%02d-%02dT%02d:%02d:%02d.000Z\","
"\"lat\": %.6f," "\"lat\": %.6f,"
"\"lon\": %.6f," "\"lon\": %.6f,"
"\"alt\": %.2f," "\"alt\": %.3f,"
"\"frequency\": %.3f," "\"frequency\": %.3f,"
"\"vel_h\": %.1f," "\"vel_h\": %.3f,"
"\"vel_v\": %.1f," "\"vel_v\": %.3f,"
"\"heading\": %.1f," "\"heading\": %.3f,"
"\"sats\": %d," "\"sats\": %d,"
"\"rssi\": %.1f,", "\"rssi\": %.1f,",
version_name, version_id, conf->callsign, version_name, version_id, conf->callsign,
@ -3240,8 +3240,8 @@ void sondehub_send_data(WiFiClient *client, SondeInfo *s, struct st_sondehub *co
if (((int)s->temperature != 0) && ((int)s->relativeHumidity != 0)) { if (((int)s->temperature != 0) && ((int)s->relativeHumidity != 0)) {
sprintf(w, sprintf(w,
"\"temp\": %.2f," "\"temp\": %.1f,"
"\"humidity\": %.2f,", "\"humidity\": %.1f,",
float(s->temperature), float(s->relativeHumidity) float(s->temperature), float(s->relativeHumidity)
); );
w += strlen(w); w += strlen(w);