[hamradio-commits] [dump1090] 132/373: Update --interactive with DF20/21 callsigns

Matthew Ernisse mernisse-guest at moszumanska.debian.org
Thu Oct 23 14:58:13 UTC 2014


This is an automated email from the git hooks/post-receive script.

mernisse-guest pushed a commit to branch backport
in repository dump1090.

commit 8870de2b9a9c445810725cacdad0341a1d4f2c0b
Author: Malcolm Robb <Support at ATTAvionics.com>
Date:   Wed May 1 12:54:37 2013 +0100

    Update --interactive with DF20/21 callsigns
---
 dump1090.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/dump1090.c b/dump1090.c
index 4f71111..7bbf9a9 100644
--- a/dump1090.c
+++ b/dump1090.c
@@ -56,7 +56,7 @@
 // MinorVer changes when additional features are added, but not for bug fixes (range 00-99)
 // DayDate & Year changes for all changes, including for bug fixes. It represent the release date of the update
 //
-#define MODES_DUMP1090_VERSION     "1.04.3004.13"
+#define MODES_DUMP1090_VERSION     "1.04.0105.13"
 
 #define MODES_DEFAULT_RATE         2000000
 #define MODES_DEFAULT_FREQ         1090000000
@@ -1617,7 +1617,7 @@ void displayModesMessage(struct modesMessage *mm) {
             printf("  Comm-B BDS     : %x\n", mm->msg[4]);
 
             // Decode the extended squitter message
-            if ( mm->msg[4]       == 0x20) { // Aircraft identification
+            if        ( mm->msg[4]       == 0x20) { // BDS 2,0 Aircraft identification
                 printf("    BDS 2,0 Aircraft Identification : %s\n", mm->flight);
             }        
         }
@@ -1635,7 +1635,7 @@ void displayModesMessage(struct modesMessage *mm) {
             printf("  Comm-B BDS     : %x\n", mm->msg[4]);
 
             // Decode the extended squitter message
-            if ( mm->msg[4]       == 0x20) { // Aircraft identification
+            if        ( mm->msg[4]       == 0x20) { // BDS 2,0 Aircraft identification
                 printf("    BDS 2,0 Aircraft Identification : %s\n", mm->flight);
             }        
         }
@@ -2530,6 +2530,11 @@ struct aircraft *interactiveReceiveData(struct modesMessage *mm) {
             }
         a->altitude =  mm->altitude;
         a->modeC    = (mm->altitude + 49) / 100;
+
+        if ((mm->msgtype == 20) && (mm->msg[4] == 0x20)) {
+            memcpy(a->flight, mm->flight, sizeof(a->flight));
+        }
+
     } else if(mm->msgtype == 5 || mm->msgtype == 21) {
         if (a->modeA != mm->modeA) {
             a->modeAcount   = 0; // Squawk has changed, so zero the hit count
@@ -2537,6 +2542,10 @@ struct aircraft *interactiveReceiveData(struct modesMessage *mm) {
         }
         a->modeA = mm->modeA;
 
+        if ((mm->msgtype == 21) && (mm->msg[4] == 0x20)) {
+            memcpy(a->flight, mm->flight, sizeof(a->flight));
+        }
+
     } else if (mm->msgtype == 17) {
         if (mm->metype >= 1 && mm->metype <= 4) {
             memcpy(a->flight, mm->flight, sizeof(a->flight));
@@ -2574,6 +2583,7 @@ struct aircraft *interactiveReceiveData(struct modesMessage *mm) {
                 a->track = mm->heading;
             }
         }
+
     } else if(mm->msgtype == 32) {
 
         int flags = a->modeACflags;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/dump1090.git



More information about the pkg-hamradio-commits mailing list