zs6buj / mav2pt

Mavlink to FrSky Passthrough protocol telemetry
GNU General Public License v3.0
120 stars 47 forks source link

Negative value of GPS altitude is ignored #51

Closed rotorman closed 3 years ago

rotorman commented 3 years ago

https://github.com/zs6buj/MavlinkToPassthru/blob/0f469ce22c8c3f8d7d224751a2ccf244df9069f8/MavToPass_v2.63.11/FrSky_Ports.h#L1819-L1820

Altitude can be negative (below sea-level), all the variables are correctly int32_t, but the sign is capped at line 1820 and a constant 0 is output wrongly here (bit 31 for 0x5002 FrSky msg).

zs6buj commented 3 years ago

Like for the submarine type Ok. Done.

rotorman commented 3 years ago

Well, also there are grounds that are below sea level, think e.g. of Death Valley or Holland. Cheers, Risto

zs6buj commented 3 years ago

This is true