Oliver Jowett
9c124b3f2b
When generating aircraft.json, leave space for the final line.
...
Otherwise if there are only a few bytes free at the end of the loop
there's no space for the final line and it won't get appended.
Should fix mutability/dump1090#240
2018-12-31 11:17:28 +00:00
Oliver Jowett
01a4477c92
Fix mangled msec part in port 30003 timestamps
2018-07-31 23:49:05 +01:00
Oliver Jowett
fffd3c9913
Bump TSV_VERSION due to 7x00 handling change
2018-07-10 23:38:47 +01:00
Oliver Jowett
d267d2257a
Fix tisb/mlat json flag formatting
2018-03-08 21:15:41 +00:00
Oliver Jowett
213d769bf9
Tweaks to json output / webmap handling of new fields (untested)
2018-03-08 17:34:34 +00:00
Oliver Jowett
d8f568e0ce
Switch everything over to safe_snprintf
...
Rework the aircraft json overflow/resize case
Add more fields to the json, reorder to match header ordering
2018-03-07 20:10:50 +00:00
Oliver Jowett
0608e31965
Move some static functions earlier
2018-03-07 20:09:23 +00:00
Oliver Jowett
abfb88b124
Separate sil / sil_type to make compression a bit simpler
2018-02-22 07:45:32 +00:00
Oliver Jowett
f1036702ce
Use the time we last saw a message for data validity checks / data age info,
...
rather than the time we eventually decide to emit it.
2018-02-22 07:42:22 +00:00
Oliver Jowett
a256833e17
Increase the max tsv output size
2018-02-22 07:42:04 +00:00
Oliver Jowett
7059c0f64a
adsbVer -> adsb_version
2018-02-20 00:26:16 +13:00
Oliver Jowett
aa78020410
Emit changed emergency/priority status immediately
2018-02-20 00:25:49 +13:00
Oliver Jowett
286d8e7a10
tsvVersion -> tsv_version
2018-02-20 00:25:15 +13:00
Oliver Jowett
d6c0612767
Remove doubled-up banner/header code
2018-02-20 00:24:39 +13:00
Oliver Jowett
44e8913c2d
Whitespace cleanups
2018-01-09 17:13:34 +00:00
Oliver Jowett
daebc372a9
Write a version header on faup1090 startup
2018-01-09 17:12:33 +00:00
Oliver Jowett
571ea7ac41
Emit integrity info, when it changes.
2018-01-09 14:46:33 +00:00
Oliver Jowett
63d1b4b553
Consistency in *_enum_string naming
2018-01-09 14:45:18 +00:00
Oliver Jowett
ea1e9c336b
Decode/emit emergency/priority status
2018-01-09 14:43:58 +00:00
Oliver Jowett
161d2d8ded
More WIP
2017-12-07 10:34:08 -06:00
Oliver Jowett
6986b3847f
WIP on new faup1090 output, data aging, refactoring
2017-12-02 17:38:33 +00:00
Oliver Jowett
382554a250
Tweak tracking of AP modes, emit in json & faup1090 output
2017-06-16 10:39:01 +01:00
Oliver Jowett
e3c8c91852
Emit adsb version in json & faup1090. Show it in skyview.
2017-06-15 23:42:05 +01:00
Oliver Jowett
c7855c5ab6
Feed more data to skyview, basic display updates.
2017-06-15 22:36:23 +01:00
Oliver Jowett
1ec32903ba
Rework heading/track to include HRD/TAH.
...
Clean up TIS-B flag output.
2017-06-15 21:07:53 +01:00
Oliver Jowett
05e9601903
Fix compilation. Emit some changes immediately in faup1090.
2017-06-15 18:30:12 +01:00
Oliver Jowett
2142d2edf5
Whitespace changes only: cleaning up trailing whitespace at EOL
2017-06-15 18:17:07 +01:00
Oliver Jowett
98d64483d6
WIP: More Comm-B & ADS-B decoding.
2017-06-15 18:07:40 +01:00
Oliver Jowett
0d7177fe9a
Squawk/callsign might not be seen regularly from Mode S transponders
...
as it relies on SSR interrogation. Increase the FATSV validity
timeout so that any message we do see stays valid long enough to
get reported.
2017-04-21 22:25:41 +01:00
Oliver Jowett
52464b97c1
Remove internal webserver code entirely.
2016-12-29 18:35:35 +00:00
Oliver Jowett
64fd61cffc
Don't process Beast mode A/C messages if mode A/C is disabled.
2016-12-29 17:57:53 +00:00
Oliver Jowett
6336611bc7
Turn on mode A/C if a Beast connection asks for it.
...
Add a --no-modeac-auto option to disable this.
2016-12-29 17:56:32 +00:00
Oliver Jowett
cbdfd9dc5d
Read Beast commands on Beast output clients, interpret the Mode A/C setting command.
2016-12-29 17:55:56 +00:00
Oliver Jowett
34aeb29347
Refactor the network input parser to make it easier to extend for new formats.
2016-12-29 17:54:53 +00:00
Oliver Jowett
0526388bdc
Factor out sendBeastSettings(), use it in view1090.
2016-12-29 17:53:04 +00:00
Oliver Jowett
11b6cdba06
Rearrange fatsv location update message.
2016-12-27 19:15:56 +00:00
Oliver Jowett
4517055320
One less magic constant.
2016-12-27 19:14:20 +00:00
Oliver Jowett
4bb070be50
Add support for radarcape type 5 (receiver position) messages.
2016-12-27 19:07:10 +00:00
Oliver Jowett
14748b1e8f
Emit heading_magnetic correctly.
2016-10-25 21:05:03 +01:00
Oliver Jowett
25ea6d398b
Overhaul mode A/C matching to be much cheaper.
...
The old matching process which tracked mode A values as pseudo-aircraft
got very, very expensive with a large number of mode A/C messages (and
with lots of single-bit errors, which seems common with a Beast doing
the reception)
Instead just count A/C messages directly into a 4096-entry array (which
is very fast) and periodically scan the mode S aircraft list to see if
we can match anything up (which is fixed overhead + cost proportional
to the number of mode S aircraft)
2016-10-11 18:00:11 +01:00
Oliver Jowett
812e4486a4
Merge remote-tracking branch 'upstream/master' into dev
2016-10-01 15:18:26 +01:00
Oliver Jowett
6f2e4fa891
Fix a stray extra comma in port 30003 output if only GNSS altitude was available.
2016-10-01 13:11:14 +01:00
Oliver Jowett
0c71b3db27
Fix up unsigned subtractions & use of abs.
...
Also fix heading difference which was just wrong, signed or not.
Should fix #150
2016-09-26 22:00:52 +01:00
Oliver Jowett
14a003710e
faup1090: Track Comm-B ACAS RA separately to ES ACAS RA as it's useful to see both reported.
...
Fix repeated reporting of ES ACAS RA reports.
2016-09-24 16:09:38 +01:00
Oliver Jowett
abc30ff656
Increase the TSV packet size to accomodate all the extra data recently added.
2016-09-22 15:33:21 +01:00
Oliver Jowett
32c8358bc1
faup1090: Reinstate TIS-B reporting as just the address type is
...
not sufficient if there is both TIS-B and Mode S for the same
aircraft.
2016-09-22 13:53:40 +01:00
Oliver Jowett
df9648911e
faup1090: Don't bother with the tisb field now that we have addrtype.
2016-09-16 11:19:26 +01:00
Oliver Jowett
729d91c1ab
Fix up address type categorization to match the spec.
2016-09-15 15:30:34 +01:00
Oliver Jowett
7c1fed98d2
faup1090: entirely blank (all spaces) idents are not interesting
2016-09-15 15:09:35 +01:00
Oliver Jowett
7e003097a0
faup1090: apply the same update rules to squawks/idents as to other data.
2016-09-15 15:09:22 +01:00
Oliver Jowett
fb454c0a10
faup1090: accept squawks, idents as "useful" things.
2016-09-15 15:08:50 +01:00
Oliver Jowett
92136f3807
faup1090: only report airGround if we got a message confirming it since the last update.
2016-09-15 15:00:44 +01:00
Oliver Jowett
001f4956ea
faup1090: report non-A-class categories.
2016-09-15 15:00:10 +01:00
Oliver Jowett
9653d365db
faup1090: emit events from DF18 as well as DF17
2016-09-15 14:59:04 +01:00
Oliver Jowett
4dacb291ab
Fix tabs in faup1090 output.
2016-09-14 17:19:36 +01:00
Oliver Jowett
8441cf7d90
Emit non-icao addresses, address types from faup1090
2016-09-14 17:02:23 +01:00
Oliver Jowett
0ae2c5efc8
Emit addrtype in json output.
2016-09-14 17:01:07 +01:00
Oliver Jowett
1958b23a93
Tweak the on-the-ground conditions a little.
2016-09-02 18:46:48 +01:00
Oliver Jowett
303d3c3fef
Make faup1090 emit iSource to say where the ident came from.
2016-09-01 19:11:33 +01:00
Oliver Jowett
08887642ea
Rename the ACAS stuff a bit, emit ES target state.
2016-08-28 12:51:03 +01:00
Oliver Jowett
954034855a
Make faup1090 emit some interesting messages when they occur.
2016-08-28 01:29:37 +01:00
Oliver Jowett
54ca2c7fb2
WIP big rewrite of message decoding / aircraft tracking.
2016-08-27 14:34:14 +01:00
Oliver Jowett
36a5c16dd2
Initialize from static "zero" messages rather than using memset.
2016-08-26 21:39:39 +01:00
Oliver Jowett
e4ceea33da
Disable the internal webserver at build time.
2016-07-10 11:56:31 +01:00
Oliver Jowett
da437b3295
Set the socket buffer to the size of a HTTP response.
...
This gives us a better chance of the response fitting in a single
write() call (if it doesn't, it's going to get truncated, because
the internal webserver is really simple)
2016-07-02 10:51:23 +01:00
Oliver Jowett
22c90415be
Check we got a full read when serving local files over HTTP.
2016-07-02 10:50:55 +01:00
Jon Williams
94706763e5
fix compilation on OpenBSD
2016-03-31 13:25:32 -04:00
Oliver Jowett
85aa200947
Extra paranoia for --aggressive mode: only forward 2-bit-corrected messages
...
via paths that allow the recipient to see that they are 2-bit-corrected
i.e. raw or beast output in --net-verbatim mode only.
2016-03-03 12:39:01 +00:00
Oliver Jowett
214bc0e587
Treat zero-or-missing signal levels as "no information" and don't include them in RSSI.
2016-02-24 11:55:01 +00:00
Oliver Jowett
eb16ac2028
Fix some termination issues.
2016-02-16 13:05:03 +00:00
Oliver Jowett
a2eb71d49a
IPv6 support (in theory).
...
Fixes #87 .
2016-02-16 13:00:55 +00:00
Oliver Jowett
2b466535de
Support multiple listening ports per listener type.
...
Beast input defaults to listening on both 30004 and 30104.
Drop the FATSV listener entirely (use faup1090 for that)
Ignore --net-beast.
2016-01-24 18:47:58 +00:00
Oliver Jowett
c4e162287d
Oops, sprintf -> snprintf
2016-01-21 20:22:18 +00:00
Oliver Jowett
d9eec668cf
Track what data we got via TIS-B, report it as such.
2016-01-21 19:42:37 +00:00
Oliver Jowett
ecbdbf23d6
Never forward mlat via SBS or raw output; it is no longer identifiable
...
as mlat when forwarded on those paths.
2016-01-21 17:48:06 +00:00
Oliver Jowett
9479a5c9be
If --hae is passed, report altitudes as HAE where available, with a H suffix.
...
This affects interactive mode and SBS output.
2016-01-01 15:15:28 +00:00
maxried
90adaf22f7
Update net_io.c
2015-09-14 20:03:19 +02:00
maxried
267e5d6909
Update net_io.c
2015-09-14 19:59:50 +02:00
Oliver Jowett
45d645a864
Default to not forwarding mlat messages. Add --forward-mlat option to enable it.
2015-07-03 21:56:23 +01:00
Oliver Jowett
51b5f4af24
Include mlatFlags in aircraft.json.
...
This requires expanding the line-buffer margin too as we can produce lines >256 chars now.
2015-06-29 10:46:37 +01:00
Oliver Jowett
b793f83a29
Rewrite and fix heartbeat code.
...
The old logic had a number of problems, including:
* sending heartbeats on all service types if any type needed
a heartbeat
* sending a heartbeat multiple times a second if there was a
service type that was idle but didn't generate traffic when
an empty message was sent (e.g. FATSV)
Rewrite it all so that heartbeats are explicitly tracked and handled
per service type, rather than by sending a dummy message.
Also switch to mode A/C messages for the beast/raw heartbeat, as
it's a bit more compact and less likely to mess with Mode S state
(an all-zeros Mode S message actually looks valid)
2015-06-29 10:06:13 +01:00
Oliver Jowett
12a7d45e75
Mlat synthetic message detection.
...
Notice synthetic mlat messages by looking for messages with a magic
timestamp value. If they arrive, tag the derived data as mlat-derived.
Don't include mlat-derived output in FATSV output to avoid loops.
2015-06-28 20:04:09 +01:00
Oliver Jowett
8f08c1b87f
Make faup1090 write to stdout, not listen on port 10001.
2015-06-28 19:59:49 +01:00
Oliver Jowett
c7722f2b97
Guard against closing clients in a couple of places.
...
In particular, not guarding in flushWrites() meant that we
could end up trying to write to an uninitialized writer
(where writer->service == c->service == NULL) and crashing.
2015-06-26 21:29:54 +01:00
Oliver Jowett
8d1df036ae
Don't use DF0/4/16/20 altitudes when DF17/18 altitudes are available.
...
The DF17/18 values are generally more trustworthy as they have full
CRC coverage. Errors in the CRC bits of a DF0/4/16/20 message can
result in the contained altitude being attributed to the wrong aircraft.
2015-06-26 20:43:46 +01:00
Oliver Jowett
278448179d
Factor out net services so they're not tied to a static array.
...
This lets different things dynamically create the services they need,
and sorts out the horrible hacks that view1090 used to make outgoing
connections. Now you can explicitly create a service and tell it to make
an outgoing connection.
This means that view1090 can now just set all the ports to zero (to disable
the listeners), do a normal net init, then explicitly construct the beast
input service without a listener and tell it to make a connection as needed.
2015-06-26 17:50:51 +01:00
Oliver Jowett
21bdc45bf0
Tweaks to noise measurements.
2015-06-16 10:13:25 +01:00
Oliver Jowett
7d4eaf6a48
Don't emit stale alt/speed/track/pos (more than 30s old) even if
...
they were updated since we last emitted a message.
2015-06-16 01:38:44 +01:00
Oliver Jowett
4f861f653a
Track age of heading/speed/altitude; use this when deciding what to emit in FATSV format.
2015-06-15 23:13:04 +01:00
Oliver Jowett
4d697ac61d
Emit capitalized hex in avrmlat output.
2015-04-18 11:21:09 +01:00
Oliver Jowett
e9378fb1c5
Fix endian issues in timestamp input/output.
...
This affected Beast input/output, and AVR output in --mlat mode.
Works on a little-endian host, should work on a big-endian host but
I don't have one to test with.
Probably fixes #44 .
2015-04-18 11:05:12 +01:00
Oliver Jowett
15ea5ba3da
Rearrangements to the receive thread.
...
Magnitude conversion now happens immediately when sample data is
received, so there is no risk of newly received data clobbering old
data under CPU overload.
2015-04-09 18:51:31 +01:00
Oliver Jowett
d7c5047fd3
Fix crash when requesting nonexistent extensionless files
...
(but only if HTMLPATH does not contain a '.')
Clean up overuse of strstr.
(based on 259ce08f81eaaaa087b6b1994fce7dde81820c52)
2015-02-23 00:11:55 +00:00
Oliver Jowett
8f3be2cd79
Decode aircraft category, export in aircraft.json.
...
Closes #2 .
2015-02-22 12:15:26 +00:00
Oliver Jowett
e7d7fd549c
Fix off-by-one error in Beast-format input.
...
This would mangle messages if the first byte of a message ended up
as the last byte returned by a read() call - it would read beyond
the end of the buffer, decide the message was damaged, and then run
off into the message data looking for a new delimiter. Sometimes
that would work (only dropping one message), but sometimes it would
run into data that happened to look like a message start but
actually wasn't, and then try to interpret that, leading to completely
bogus message data being read.
Fixes #29 .
2015-02-21 23:50:35 +00:00
Oliver Jowett
e0f167b703
Fix json syntax error.
2015-02-19 19:12:06 +00:00
Oliver Jowett
f6d2f3dfff
More CPR stats.
2015-02-19 18:53:11 +00:00
Oliver Jowett
bfe2cb0336
NUCp tracking and CPR position sanity checks.
...
Track NUCp when we compute positions.
Do speed checks when we have an updated position with the same or worse NUCp
before accepting the new position. Don't do speed checks on new postions if
they improve NUCp - assume that the new position is better.
Include NUCp in aircraft.json
Gather stats on reasons for rejecting CPR data due to range/speed check failures.
Expire old positions if we have had no updates for 60 seconds.
Closes #16 , closes #17 .
2015-02-18 00:12:35 +00:00
Oliver Jowett
849697f84c
Fix integer overflow in stats output.
2015-02-11 00:14:28 +00:00
Oliver Jowett
f9ed7e4a97
More time_t -> milliseconds conversions.
...
This lets us support fractional net flush times among other things, which is handy.
2015-02-10 22:24:22 +00:00