[hamradio-commits] [dump1090] 318/389: net_io port 30003 bug
Matthew Ernisse
mernisse-guest at moszumanska.debian.org
Wed Nov 5 00:20:09 UTC 2014
This is an automated email from the git hooks/post-receive script.
mernisse-guest pushed a commit to branch master
in repository dump1090.
commit 90fa1dac8185eade5e73c34228c84cd14b86d637
Author: Malcolm Robb <Support at ATTAvionics.com>
Date: Wed Aug 6 15:21:50 2014 +0100
net_io port 30003 bug
Thanks to "Harrie" for this one.
Fix the SBS port 30003 stream to always include speed and/or heading
when available.
---
net_io.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/net_io.c b/net_io.c
index df6c842..25abb88 100644
--- a/net_io.c
+++ b/net_io.c
@@ -370,9 +370,19 @@ void modesSendSBSOutput(struct modesMessage *mm) {
p += sprintf(p, ",");
}
- // Field 13 and 14 are the ground Speed and Heading (if we have them)
- if (mm->bFlags & MODES_ACFLAGS_NSEWSPD_VALID) {p += sprintf(p, ",%d,%d", mm->velocity, mm->heading);}
- else {p += sprintf(p, ",,");}
+ // Field 13 is the ground Speed (if we have it)
+ if (mm->bFlags & MODES_ACFLAGS_SPEED_VALID) {
+ p += sprintf(p, ",%d", mm->velocity);
+ } else {
+ p += sprintf(p, ",");
+ }
+
+ // Field 14 is the ground Heading (if we have it)
+ if (mm->bFlags & MODES_ACFLAGS_HEADING_VALID) {
+ p += sprintf(p, ",%d", mm->heading);
+ } else {
+ p += sprintf(p, ",");
+ }
// Fields 15 and 16 are the Lat/Lon (if we have it)
if (mm->bFlags & MODES_ACFLAGS_LATLON_VALID) {p += sprintf(p, ",%1.5f,%1.5f", mm->fLat, mm->fLon);}
--
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