[hamradio-commits] [dump1090] 330/373: Don't output message reception time in SBS format for remote messages.

Matthew Ernisse mernisse-guest at moszumanska.debian.org
Thu Oct 23 14:58:33 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 3eb39ab788254488a0bb91dc74216f4977e3bbdb
Author: Oliver Jowett <oliver at mutability.co.uk>
Date:   Thu Sep 25 21:45:46 2014 +0100

    Don't output message reception time in SBS format for remote messages.
    
    For remotely received messages that have a mlat timestamp, we have no
    useful way of turning that timestamp into a wallclock timestamp, so
    don't try, or we'll just produce wildly wrong results (_days_ in error)
---
 net_io.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net_io.c b/net_io.c
index 25abb88..2b0ed9a 100644
--- a/net_io.c
+++ b/net_io.c
@@ -336,8 +336,8 @@ void modesSendSBSOutput(struct modesMessage *mm) {
     // Fields 1 to 6 : SBS message type and ICAO address of the aircraft and some other stuff
     p += sprintf(p, "MSG,%d,111,11111,%06X,111111,", msgType, mm->addr); 
 
-    // Fields 7 & 8 are the current time and date
-    if (mm->timestampMsg) {                                       // Make sure the records' timestamp is valid before outputing it
+    // Fields 7 & 8 are the message reception time and date
+    if (mm->timestampMsg && !mm->remote) {                        // Make sure the records' timestamp is valid before outputing it
         epocTime = Modes.stSystemTimeBlk;                         // This is the time of the start of the Block we're processing
         offset   = (int) (mm->timestampMsg - Modes.timestampBlk); // This is the time (in 12Mhz ticks) into the Block
         offset   = offset / 12000;                                // convert to milliseconds

-- 
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