From eea517e956b91df8377689c6ce4109150035746d Mon Sep 17 00:00:00 2001 From: Skip Tavakkolian Date: Wed, 5 Jun 2013 12:35:17 -0700 Subject: [PATCH] fixed an bug in bitmask of movement --- dump1090.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dump1090.c b/dump1090.c index e5e78b1..f54bf75 100644 --- a/dump1090.c +++ b/dump1090.c @@ -1065,7 +1065,7 @@ void decodeModesMessage(struct modesMessage *mm, unsigned char *msg) { mm->flight[8] = '\0'; } else if (mm->metype >= 5 && mm->metype <= 8) { /* Surface Position Message */ - int mvt = ((msg[0] & 3) << 4) | (msg[1] >> 4) ; + int mvt = ((msg[0] & 7) << 4) | (msg[1] >> 4) ; if (mvt == 0) { mm->velocity = 0; /* unknown */ } else if (mvt == 1) {