Context: I am using a (version of) poly_pkt_forwarder on a PiZeroW with a RAK831 and a MAX-7Q GPS and the AurelGP antenna.
The height (altitude) to specify for a gateway location might be a bit ambiguous.
My GPS gives both:
- Altitude, Meters, above mean sea level
- Height of geoid (mean sea level) above WGS84 ellipsoid
The Semtech GPS utility code used in the poly_pkt_forwarder uses the “Altitude, Meters, above mean sea level”, so it seems that this is the one to use in the config file too.
Before I dug into the code I wanted to specify the antenna height above ground level there. Which is some 4 meter for me. However, height above sea level is some 8 meter.
And to add to the confusion. There are also fields in the TTN console to specify lat/lng/alt. What are they for? How to relate them to the ones configured in (or measured by) the gateway?
If you take a moment to search the forum you’ll find this and this:
- Altitude is based on sea level. (In TTN console as well)
- The TTN console fields should be used in stead of manually specifying the coordinates on the gateway. For gateways without GPS TTN will add these coordinates to the gateway metadata for received packets.
- You should not use fake_gps. See 2. People are using it because long ago there was no console where coordinates could be set and it was custom to use fake_gps to provide coordinates. By now people should have switched but bad habits die very slowly…
Bottom line, only have a gateway send GPS information when there is a GPS connected.
PS. Searching the forum is highly recommended. There is a lot of information because others asked the same questions before. Don’t be surprised if ‘the regulars’ stop answering questions that surface repeatedly because people can’t be bothered to search…
Did look on the forum. But as it seems not good enough .
Also spend hours and hours reading stuff. But, as you say there is a lot .
Challenge with wiki/forums is that information is mostly there but sometimes buried deep.
- If GW has a GPS using this is preferred.
- If GW doesn’t have GPS use the TTN console.
- Do not use fake_gps.
Now regarding stamping out fake_gps. The Zurich version of the forwarder supports fake_gps. Worse, the install script even prompts you to enter lat/lng/alt to enter them in local_conf.json, So why not remove this from the install script and put a deprecation warning in the start-up log. Or even blindly ignore the parameter in the code.
Would it make sense to do this and send them a pull?
Check all messages in the first link in my previous message. The second message is from the person that will have to merge the pull request. Decide for yourself if it is likely the change will be accepted…