Closed nicolasff closed 1 year ago
Hi Nicolas (@nicolasff ),
I think an elevation of -91 (and an azimuth of 0) simply means the values are "unknown". The module is aware of that satellite but it is not currently in view (from your position). When in view, the elevation should always be positive.
Background:
NAV SAT contains the same azimuth and elevation as the NMEA GnGSV message:
I think the correct term for the coordinate system is "Topocentric-Horizon".
The elevation +/- 90 comment in the code comes straight from the u-blox interface description:
elev; deg; Elevation (range: +/-90), unknown if out of range
The comment in the GSV description makes more sense:
elv; numeric; deg; Elevation (<= 90)
Discard any SVs with an elevation of -91 and away you go...!
Best wishes, Paul
Actually... Thinking about this a bit more. I think the SV elevation could be (slightly) negative - particularly if you're airborne. But -91 is clearly not right and must - I think - be the value for "unknown".
Best wishes, Paul
Thanks Paul!
I hadn't thought about an airborne observer, it does explain how negative values could be seen. The comment saying "unknown if out of range" is pretty explicit, and the value -91 being the first that's out of the stated range does seem to indicate that it was specifically chosen to represent this "unknown" case. I had been discarding those, but it's good to have confirmation.
Best, Nicolas
Subject of the issue
Hello,
I'm using this library with a SparkFun NEO-M9N GPS breakout, and while it's been working well so far there's still something I don't understand about the NAVSAT data.
I'm using
setAutoNAVSATcallbackPtr
to get callbacks containing aUBX_NAV_SAT_data_t *
value, from which I can get an array ofUBX_NAV_SAT_block_t
structs. The first few fields give some info about the vehicle, including its elevation and azimuth: https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library/blob/8a33fb93e92a6ab152097f143bcbc84c7ad05504/src/u-blox_structs.h#L1127-L1134Azimuth being in degrees from 0 to 360 makes sense to me, but the range for elevation does not: it goes from -90 to +90. How can a satellite have negative elevation? This would mean it's below the horizon.
In addition, I am actually seeing negative values in the NAVSAT callback, but with
elev
= -91, even outside of the stated range. Here are some values from a recent read:Note the two towards the end with
azim: 0
andelev: -91
. I don't think I've seen this -91 elevation without the azimuth also being zero.So my questions are:
-91
values for elevation? What should I do about them?Your workbench
Steps to reproduce
Expected behavior
Satellites should be above the horizon.
Actual behavior
Some satellites appear to be almost exactly on the opposite side of the Earth.