Home > Forum > "-0" degrees on the telemetry?

"-0" degrees on the telemetry?

  • pipedream
  • [pipedream]
  • pipedream's Avatar
  • Offline
  • Premium Member
  • Premium Member
More
03 Jan 2017 12:36 #228098 by pipedream
"-0" degrees on the telemetry? was created by pipedream
While making my routine morning check of the NWAC telemetry, I noticed that the temperature at the telemetry site at the top of Tye Mill @ Stevens Pass had reported both a "0" and "-0" temperature reading. It since has flipped back and forth until finally warming above 0F at 0900 PST. Anybody have a good explanation for how this can be? I'm guessing a rounding issue, but is it possible the telemetry isn't using two's complement like it should be?

Please Log in or Create an account to join the conversation.

More
03 Jan 2017 13:14 #228101 by mfonda
I know nothing about how these systems actually work, but my guess would be the raw data is stored as floats, then rounded when displayed. This would then indicate that it's very near but slightly below zero. For example, it might look something like the following:
mfonda@dev-mfonda:~$ cat example.c
#include <stdio.h>

int main() {
    float n = -1 / 1e10;
    printf("%.0f", n);
    return 0;
}
mfonda@dev-mfonda:~$ gcc example.c && ./a.out
-0

Please Log in or Create an account to join the conversation.

  • runningclouds
  • [runningclouds]
  • runningclouds's Avatar
  • Offline
  • Junior Member
  • Junior Member
More
03 Jan 2017 14:06 - 03 Jan 2017 14:09 #228102 by runningclouds
Replied by runningclouds on topic Re: "-0" degrees on the telemetry?
The problem might be in the raw data...

www.nwac.us/data-portal/location/stevens-pass/
Attachments:

Please Log in or Create an account to join the conversation.

  • pipedream
  • [pipedream]
  • pipedream's Avatar
  • Offline
  • Premium Member
  • Premium Member
More
03 Jan 2017 16:14 #228104 by pipedream
Replied by pipedream on topic Re: "-0" degrees on the telemetry?
I feel like I've asked this question before, but I can't find anything about it in my post history.

I do believe the issue is with rounding the float but retaining the '-' sign, like the example in mfonda's reply. Either way, it's entertaining to a programmer like me ;D

Please Log in or Create an account to join the conversation.