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.
This commit is contained in:
parent
f1b85ec5e7
commit
90fa1dac81
16
net_io.c
16
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);}
|
||||
|
|
Loading…
Reference in a new issue