Merge pull request #23 from flightaware/ignore_altitude_onGround

Ignore altitude if an airborne position message indicates it's on ground
This commit is contained in:
Oliver Jowett 2018-08-28 20:28:05 +01:00 committed by GitHub
commit 8829b65ab2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {