Commit Graph

222 Commits

Author SHA1 Message Date
Oliver Jowett 7356676c5b Don't need conditional output on the stratux port, that's done in prepareWrite() 2020-09-08 23:30:24 +08:00
Oliver Jowett da3e9766de Harden the stratux output a bit: use safe_snprintf, jsonEscapeString 2020-09-08 23:22:53 +08:00
Oliver Jowett ec90edcd8d Simpify stratux service init 2020-09-08 23:21:34 +08:00
Oliver Jowett bc9336e0be Revert "forward mlat messages to Stratux"
This reverts commit c89930b4b9.
2020-09-08 23:10:18 +08:00
Oliver Jowett 917aa6a0e2 Merge branch 'stratux' of https://github.com/Determinant/dump1090-fa-stratux into Determinant-stratux 2020-09-08 23:08:37 +08:00
Determinant c89930b4b9
forward mlat messages to Stratux 2020-09-07 15:36:34 -04:00
Determinant d25103361a
make change according to the suggestions 2020-08-30 21:21:49 -04:00
Oliver Jowett 1dbb8ab234 Expose modea_hit / modec_hit in aircraft.json 2020-08-24 15:03:17 +08:00
Rosen Penev 0df937e9c6
fix -Wmissing-declaration warnings
This should result in a smaller size.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-06-29 16:42:21 -07:00
Determinant 258e3f9d65 turn off stratux support by default 2020-03-30 12:34:11 -04:00
Determinant 8ba24e8c3b put the timestamp at last 2020-03-28 22:51:31 -04:00
Determinant eb1d42e47a ... 2020-03-28 15:27:22 -04:00
Determinant 2f9c3fe0e1 clean up 2020-03-28 15:25:31 -04:00
Determinant 52338202d1 ... 2020-03-28 15:25:31 -04:00
Determinant b6f007a104 WIP: support stratux protocol 2020-03-28 15:25:31 -04:00
Oliver Jowett 886b0d3f81 Treat ADS-R as a separate source type (higher priority than TIS-B, lower priority than direct ADS-B) 2019-12-11 12:43:19 -06:00
Oliver Jowett 105ec2098c "unreliable_tracks" -> "unreliable" in stats json as suggested in #56 2019-12-03 14:15:54 +08:00
Dan McGee 21743b03b7
Fix invalid JSON after addition of unreliable_tracks
When `unreliable_tracks` was added to the JSON output, the trailing `}` after `single_message` should likely have been removed.

Side note: should this just be `unreliable` since it is nested inside `tracks`? `all` and `single_message` don't have the `tracks` suffix.
2019-12-02 20:49:33 -06:00
Oliver Jowett f868e4c010 Bump TSV_VERSION for verbatim mode / track reliability changes 2019-12-02 13:01:43 +08:00
Oliver Jowett 19327926f1 Cooked vs verbatim was reversed, fix it 2019-11-27 22:28:09 +08:00
Oliver Jowett b2e9153653 Add stats for unreliable tracks 2019-11-27 21:41:33 +08:00
Oliver Jowett 8ffa43b65c Add a v/V Beast-format setting to control verbatim mode.
Make --net-verbatim just control the default setting.

0x1A '1' 'v' disables verbatim mode (send "cooked" output);
0x1A '1' 'V' enables verbatim mode

Support clients with different settings by switching them between output
writers depending on what setting they want, so clients with different
settings can co-exist (unlike the Mode A/C setting)

In cooked mode, FEC corrections are applied to messages before they are send
and only trustworthy messages are forwarded; this is the default case for
downstream clients that don't want to apply their own rules and are happy with
the decisions that dump1090 makes.

In verbatim mode, all messages are forwarded, but no FEC corrections are applied;
the downstream client needs to make its own FEC / noise filtering decisions.

Usually the default for new connections is cooked mode. --net-verbatim changes the
default to be verbatim mode.
2019-11-27 21:04:27 +08:00
Oliver Jowett 54409b4836 Split beast output into two separate writers for verbatim vs. non-verbatim
in preparation for supporting both types of connection in parallel
2019-11-27 21:01:46 +08:00
Oliver Jowett dfc588335a Move output filtering down a level into the individual output functions. 2019-11-27 20:57:01 +08:00
Oliver Jowett 54f2c54d8f Include only reliable tracks in aircraft.json, faup1090 output 2019-11-27 20:51:23 +08:00
Oliver Jowett ef125bd5f0 Bump TSV_VERSION for TAH sense fix. 2019-06-06 14:17:27 +08:00
Oliver Jowett 61f483c3e7 Bump TSV_VERSION to reflect extensive comm-b changes 2019-05-02 18:30:32 +08:00
Matthias Wirth 82c5ff6724 Fix possible missing \n termination of TSV messages
If the \n termination of TSV messages is missing, faup1090 encounters
the following error:
Caught background error: list must have an even number of elements
    while executing
"array set row [split $line "\t"]"
    (object "::faup1090" method "::FaupConnection::data_available" body line 28)

This missing termination with \n can happen when p == end is true in the
overrun check. vsnprintf will always terminate the string with \0, so if
the vsnprintf is called to write the to the last position in the buffer
(end-1), it will write \0 instead to terminate the string as not to
overflow the buffer.
To catch that possibility the overrun check is changed to p < end as
then vsnprintf is assured to have had enough room to write the \0
termination to end-1.
2019-04-08 20:29:56 +02:00
Matthias Wirth b281ceee7b Increase maximum TSV packet size
Due to commit 45886edc40
faup1090: write _v on every line, bump TSV_VERSION
and maybe other changes the TSV packets are bigger and some users have
reported the following error:
piaware[9040]: faup1090(27427): fatsv: output too large (max 600, overran by 20)

Fix this error by increasing TSV_MAX_PACKET_SIZE to 800
2019-04-08 20:03:57 +02:00
Oliver Jowett f46640a5c2 Track and report autopilot FMS/MCP separately; also report autopilot altitude source. 2019-03-19 18:44:09 +00:00
Oliver Jowett 45886edc40 faup1090: write _v on every line, bump TSV_VERSION 2019-03-19 18:10:38 +00:00
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