From f4692a378403c743678c4e7911e949c39d57643a Mon Sep 17 00:00:00 2001 From: Eric Tran Date: Tue, 28 Aug 2018 17:08:14 +0000 Subject: [PATCH] Ignore altitude reporting when part of airborne position message with air/ground=ground --- mode_s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mode_s.c b/mode_s.c index 5c35962..606ddf7 100644 --- a/mode_s.c +++ b/mode_s.c @@ -974,7 +974,7 @@ static void decodeESAirbornePosition(struct modesMessage *mm, int check_imf) } } - if (AC12Field) {// Only attempt to decode if a valid (non zero) altitude is present + if (AC12Field && mm->airground != AG_GROUND) {// Only attempt to decode if a valid (non zero) altitude is present and not on ground altitude_unit_t unit; int alt = decodeAC12Field(AC12Field, &unit); if (alt != INVALID_ALTITUDE) {