Milesight-IoT / SensorDecoders

https://www.milesight.com
GNU General Public License v3.0
133 stars 61 forks source link

How do you handle the negative coordinates (south or west) #37

Closed honfika closed 4 months ago

honfika commented 7 months ago

Hi,

In the specification you wrote the following: "If the device fails toget GNSSdata, the latitude or longitude will show FFFFFFFF."

Then how do you encode the negative coorinates (for example any south 0.000001° or west 0.000001° coordinates)?

It seems that the decoder in the following lines simply ignoring these "error" values and generating valid coordinates for the int -1 (FFFFFFFF) values.

https://github.com/Milesight-IoT/SensorDecoders/blob/5911981c43391536ade46806814729c5ffa38cb3/AT_Series/AT101/AT101_Chirpstack.js#L30-L37

Or simply do not put any device to that 2 (~20 cm width, ~40.000 km long) circles? :)

milesight-sway commented 5 months ago

Handle it with a simple process and disregard this coordinate. In future protocols, we'll report outliers separately to minimize data loss.