You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.
On the NOC you see: {"id":"eui-xxx","status":{"time":"xxx","gps":{"latitude":0.0000012673606,"longitude":0.000002682209,"altitude":10}
What went wrong or what is missing?
Because I sent "0.00000" rather than "0" as the lat and lon, it gets rounded off and not interpreted as "Null".
The coordinates are then not replaced by the values from the Console.
After we forced the gateway to send coordinates as "0" and not "0.00000" (what sprintf gives out), it worked fine.
Can you fix this yourself and submit a pull request?
In this specific case it was fixed on the gateway side, but because it is an issue that can happen in other software too, it will be better to also fix this in the bridge/router.
Recommendation
I think it would be a good idea to filter all invalid coordinates, or coordinates that are likely incorrect and replace them by the coordinates from the console. The following are incorrect coordinates:
The backend sees this as a "set" location because the GPS location is actually set by the gateway (the altitude is not 0). I agree that it might be good to check for invalid coordinates, so I will add that. Furthermore, I will separate the lat/long from the altitude. This will be done in TheThingsNetwork/gateway-connector-bridge
- If gateway sends valid GPS location, use that
- If gateway sends invalid GPS location, unset location
- If location set in AS (through console), use that
ResolvesTheThingsArchive/ttn#604
This is a bug report for the backend.
On some gateways you can not disable "fake gps", and the workaround is to set the coordinates to lat=0 and lon=0.
Using the packet forwarder from: https://github.com/tftelkamp/single_chan_pkt_fwd
Set the coordinates to zero:
Run the packet forwarder and the packets that are sent out looks like this:
On the NOC you see:
{"id":"eui-xxx","status":{"time":"xxx","gps":{"latitude":0.0000012673606,"longitude":0.000002682209,"altitude":10}
Because I sent "0.00000" rather than "0" as the lat and lon, it gets rounded off and not interpreted as "Null".
The coordinates are then not replaced by the values from the Console.
After we forced the gateway to send coordinates as "0" and not "0.00000" (what sprintf gives out), it worked fine.
In this specific case it was fixed on the gateway side, but because it is an issue that can happen in other software too, it will be better to also fix this in the bridge/router.
I think it would be a good idea to filter all invalid coordinates, or coordinates that are likely incorrect and replace them by the coordinates from the console. The following are incorrect coordinates:
For another description of this issue see:
tftelkamp/single_chan_pkt_fwd#17
The text was updated successfully, but these errors were encountered: