Commit graph

85 commits

Author SHA1 Message Date
Oliver Jowett 9fd0c822f6 Extract NUCp from message type; needed for #16. 2015-02-09 14:14:12 +00:00
Oliver Jowett e7e7f9e7c2 Only display altitude when dumping position messages if it is valid. 2015-02-09 14:11:04 +00:00
Oliver Jowett f1201a0069 Third time lucky? 2015-02-08 18:17:33 +00:00
Oliver Jowett b31709a278 Whoops, remove stray debugging that was left in. 2015-02-08 18:16:49 +00:00
Oliver Jowett 4ecd6958a1 If we squelch the first message from an aircraft, emit it when we see a second message.
This is possible now that the SBS output doesn't rely on the global block timestamp;
the output will look like this:

MSG,8,111,11111,4AC954,111111,2015/02/08,17:57:53.917,2015/02/08,17:57:53.936,,,,,,,,,,,,0
MSG,7,111,11111,392AEB,111111,2015/02/08,17:57:53.744,2015/02/08,17:57:53.936,,15375,,,,,,,,,,0
MSG,8,111,11111,392AEB,111111,2015/02/08,17:57:53.917,2015/02/08,17:57:53.936,,,,,,,,,,,,0
MSG,6,111,11111,800387,111111,2015/02/08,17:57:53.919,2015/02/08,17:57:53.936,,,,,,,,4745,0,0,0,0

where the "receive timestamp" (first time column) goes backwards to reflect the original reception
time of the delayed message, but the "forwarded timestamp" (second time column) reflects the actual
forwarding time.
2015-02-08 18:00:18 +00:00
Oliver Jowett 899c51ce85 Only emit network messages once we have seen two of them
(except in --net-verbatim mode, where we emit them all)

Move aircraft tracking into track.[ch].

Clean up references to "interactive mode" when tracking
aircraft - we always track aircraft, even in non-interactive
mode.
2015-02-08 14:27:03 +00:00
Oliver Jowett 9381a20198 Support more DF18 message formats. Test for the IMF bit where appropriate.
Fixes #4.
2015-01-29 23:08:33 +00:00
Oliver Jowett 26feb1d078 Add some testing code that looks for ambiguous syndromes that
could confuse the partial correction used in DF11.

That code shows that yes, there are ambiguous syndromes in the
2-bit correction case only, so disable corrections of more than
1 bit in DF11.
2015-01-23 21:59:31 +00:00
Oliver Jowett 5020d75b9e Move setting of CF earlier so we can use its value while decoding AA.
(Needed to notice non-ICAO addresses in TIS-B)
2015-01-22 22:19:38 +00:00
Oliver Jowett 008ae926e7 Add --net-verbatim, which forwards the original uncorrected message to net clients,
not the corrected version. Then the client can make its own policy decisions about
whether to accept and correct the damaged messages.
2015-01-22 19:56:38 +00:00
Oliver Jowett a59077a370 Stats overhaul. 2015-01-22 19:49:19 +00:00
Oliver Jowett ada188a1c8 Changed my mind, put the non-ICAO flag bit in the address itself
since we have 8 bits spare, so there's no chance of confusing it
with an ICAO address, and we can safely use the filter table to match
future messages without also matching equivalent ICAO addresses.
2015-01-22 12:30:12 +00:00
Oliver Jowett 9a91507583 Flag non-ICAO addresses, display them differently in interactive mode. 2015-01-22 11:14:22 +00:00
Oliver Jowett 34ae2c7349 Make sure to clear address. 2015-01-22 11:13:54 +00:00
Oliver Jowett 04eff1778f Use the right field for CF in DF 18 2015-01-22 10:59:11 +00:00
Oliver Jowett 19082d92ea Measure signal power / noise power (at least in 2.4MHz mode).
Switch signalLevel back to a power measurement, don't put SNR in there.
But make it a 0.0 - 1.0 double so we're not scaling everywhere.

Adjust for the amplitude offset when calculating power.

Adapt everything else to the new scheme.
2015-01-22 01:01:39 +00:00
Oliver Jowett 5beecb9f4f Disable overlay control as it seems to cause more problems than it solves
at the moment (aircraft randomly appearing to be on the ground due to
CRC errors, etc)
2015-01-22 00:59:44 +00:00
Oliver Jowett ef098a2461 Import new 2.4MHz demodulator from experimental branch. 2015-01-21 13:32:17 +00:00
Oliver Jowett 0493248425 Minor cleanups / comments. 2015-01-21 12:55:46 +00:00
Oliver Jowett a33e4388c9 Add scoreModesMessage() 2015-01-21 12:55:24 +00:00
Oliver Jowett 8ce92f126a More logging for Comm-B messages. 2015-01-21 01:21:32 +00:00
Oliver Jowett 5e522fe8db Decoder cleanups from experimental branch. 2015-01-21 00:23:48 +00:00
Oliver Jowett 0433ed3f5d icao_filter.[ch] from the experimental branch. 2015-01-20 23:53:26 +00:00
Oliver Jowett 270a22e06a CRC reimplementation to be byte-at-a-time table-driven.
Also be smarter about error correction, avoiding ambiguous cases
when --aggressive is specified.
2015-01-20 23:04:05 +00:00
Oliver Jowett ed4d481772 Import CPR changes from experimental branch. 2015-01-20 18:41:44 +00:00
Oliver Jowett b9b76da02d Stats rearrangement, based on experimental branch changes. 2015-01-20 17:16:35 +00:00
Oliver Jowett e02a2cdd44 GPL. 2015-01-20 16:49:01 +00:00
Oliver Jowett f753c2d9fe Separate 2.4MHz demodulator into its own file. 2015-01-19 23:50:25 +00:00
Oliver Jowett a6542b505b Separate out 2MHz demodulator + support functions to a separate file. 2015-01-19 23:47:51 +00:00
Oliver Jowett 014205324a Remove dead test code. 2015-01-19 23:43:15 +00:00
Oliver Jowett 07df054590 Move CRC code to a separate file. 2015-01-19 23:41:26 +00:00
Oliver Jowett f0fe4663d5 Oops, helps to actually commit the fix too.. 2015-01-17 18:26:36 +00:00
Oliver Jowett 72bfc31458 Display message rate (30 sec average) on the webmap.
(cherry picked from commit 848af78be685c6e2a26d0b30e9f385696201a2c4)
2015-01-13 22:01:53 +00:00
Oliver Jowett fefce7b4bd Add --max-range parameter. Use it for relative position limits, and to discard bad position results.
(cherry picked from commit 0d725508f78cb2fd7759efbb66b45b867d6f7722)
2015-01-13 21:53:12 +00:00
Oliver Jowett 8d0d16c30a When sanity-checking relative CPR results, use the correct relative
location (which may not be the aircraft location).

I suspect this sanity check is, in fact, redundant now that the
rest of the algorithm has had some bugs fixed; it should only
produce results within half a cell by definition.
2015-01-12 16:29:24 +00:00
Oliver Jowett 583984af8a Use floor() not trunc() in relative CPR decoding.
The comment saying to use trunc() is wrong; the original algorithm
is correct.
2015-01-12 16:28:10 +00:00
Oliver Jowett bebc00c257 Fix quadrant selection for global CPR surface position decoding. 2015-01-12 16:26:05 +00:00
Oliver Jowett e1d2af42bb CPR relative decoding: avoid truncation when finding the fractional
position of the reference position within a lat/lng zone.
2015-01-12 16:16:32 +00:00
Oliver Jowett fa4c85eba5 Another bug found by valgrind. 2015-01-12 01:19:25 +00:00
Oliver Jowett 272efcbdc4 Fix thinko in skipping over decoded message samples. 2015-01-12 01:00:05 +00:00
Oliver Jowett f72fc3dbee Fix a couple of problems found by valgrind. 2015-01-12 00:56:51 +00:00
Oliver Jowett 48986c48cc Remove half-implemented --no-decode option. 2014-12-27 20:11:10 +00:00
Oliver Jowett 22f2a8db37 Merge branch 'net-cleanups' into oversampling
Conflicts:
	dump1090.c
	dump1090.h
2014-10-03 23:04:09 +01:00
Oliver Jowett 1769ac9006 Restructuring of network output side.
Mostly refactoring the common code that was duplicated
between the different output types so that there aren't
many copies floating around.

This introduces "struct net_writer" to store the state of a
particular type of output service - buffers, time of last write,
connection count etc. prepareWrite() / completeWrite() give access
to the buffer and handle the actual writes and flushing when needed.

Heartbeat and time-based flushing move into a generic periodic-work
function.

Update the SBS output code to use the new infrastructure. This makes
a big different to CPU use when under load.
2014-10-03 22:55:21 +01:00
MalcolmRobb dee6ded673 Merge pull request #35 from mutability/use-repaired-checksums
Check if bit correction happened before bailing out due to a bad CRC.
2014-10-02 21:29:10 +01:00
Malcolm Robb 4f449a8d44 Make Pull # compatible with Pull #42 2014-10-02 21:08:57 +01:00
MalcolmRobb 16a900c667 Merge pull request #42 from mutability/prefer-global-cpr
Prefer to use global CPR decoding where possible.
2014-10-02 21:05:26 +01:00
Oliver Jowett c11eca44bb Try all phases if --oversample --phase-enhance is on.
If we demodulate a message in 2.4MHz mode and it has a bad, uncorrectable CRC,
and --phase-enhance is on, then retry with the other possible phases until
we get a good CRC or run out of phases to try.

This is very expensive in AGC mode (lots of candidates that are not real
messages) but relatively cheap otherwise. It yields another 10% messages.

Also factor out some common stats code to avoid lots more copy/paste.
2014-09-30 17:02:22 +01:00
Oliver Jowett 93e1b9e10d More tweaking to try to get the signal / CPU tradeoff right. 2014-09-30 00:19:05 +01:00
Oliver Jowett dcae71faa8 Move CPU instrumentation up into the main loop. 2014-09-29 23:11:36 +01:00