zs6buj / AntTracker

Antenna Tracker for tracking a moving model aircraft or drone with a small high-gain UHF or SHF antenna
GNU General Public License v3.0
155 stars 42 forks source link

INAV: calculating altitude problem with FrSky #48

Closed Razsmithii closed 1 year ago

Razsmithii commented 2 years ago

Hello and sorry for disturbing again,

i found a small bug, which is probably no problem for an IT-expert:

INAV submits the altitude relative to ground after starting up FC. If this altitude varies a little bit, for example to -1m, i get the height of 65535. As i mention, this is a problem by converting data types (some data type) to integer.... After this, because minAltAg is over threshold (for example 4m), tracking begins. And after this, the code crashes after swapping altitude around between 65.535 and 0 meters :-( I tried several things such declaring gpsAlt as u_int16 and so on but i´m not deep enough in IT to understand it correct. EDIT: This problem only appears in INAV, not in Betaflight. Betaflight just seems to ignore altitudes below 0.

Do you have any suggestions? Thanks ins advance......

zs6buj commented 1 year ago

Sorry for the long absence. I assume you solved this issue? If not, please could you open it again.