From f6ff1c853b902be3d56ed07c979f9e8489f206fa Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Mon, 29 Jun 2015 12:42:50 +0100 Subject: [PATCH] Show synthetic MLAT messages as such. --- mode_s.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mode_s.c b/mode_s.c index 6510c25..b81913d 100644 --- a/mode_s.c +++ b/mode_s.c @@ -1107,8 +1107,12 @@ void displayModesMessage(struct modesMessage *mm) { if (mm->score) printf("Score: %d\n", mm->score); - if (mm->timestampMsg) - printf("Time: %.2fus (phase: %d)\n", mm->timestampMsg / 12.0, (unsigned int) (360 * (mm->timestampMsg % 6) / 6)); + if (mm->timestampMsg) { + if (mm->timestampMsg == MAGIC_MLAT_TIMESTAMP) + printf("This is a synthetic MLAT message.\n"); + else + printf("Time: %.2fus (phase: %d)\n", mm->timestampMsg / 12.0, (unsigned int) (360 * (mm->timestampMsg % 6) / 6)); + } if (mm->msgtype == 0) { // DF 0 printf("DF 0: Short Air-Air Surveillance.\n");