From 75f60562afb5c4ca1031f5503c50db08b0f86111 Mon Sep 17 00:00:00 2001 From: Christopher Young Date: Wed, 23 Sep 2015 23:12:48 -0400 Subject: [PATCH] Pressure alt fix from @AvSquirrel. --- main/gen_gdl90.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/gen_gdl90.go b/main/gen_gdl90.go index d047181a4..243e72a44 100644 --- a/main/gen_gdl90.go +++ b/main/gen_gdl90.go @@ -179,8 +179,8 @@ func makeOwnshipReport() bool { if isTempPressValid() { alt = uint16(mySituation.pressure_alt) + alt = (alt + 1000) / 25 } - alt = (alt + 1000) / 25 alt = alt & 0xFFF // Should fit in 12 bits. msg[11] = byte((alt & 0xFF0) >> 4) // Altitude.