sparkfunX / Artemis_Global_Tracker

A global satellite tracker utilising the SparkFun Artemis module, Iridium 9603N satellite transceiver and u-blox ZOE-M8Q GNSS
Other
14 stars 10 forks source link

Default measurement values should be outside the physically valid range #42

Closed a-schneider-fmi closed 2 years ago

a-schneider-fmi commented 2 years ago

The default values of the measured quantities (like pressure, temperature, humidity, latitude, longitude, altitude) basically act as a fill value if the measurement has failed and thus should be outside the range of a valid measurement. That way an invalid measurement can immediately be distinguished from a real one. For example, if the GPS measurement fails the message currently contains the position 0°N, 0°E, 0m which is a valid position, but using, e.g., INT32_MIN would indicate an invalid position. Similarly, UINT16_MAX can signal an invalid humidity and INT16_MAX an invalid temperature.

PaulZC commented 2 years ago

Hi Andreas, I agree! If you'd like to submit a pull request, I will happily merge it. Best wishes, Paul