Commit graph

20 commits

Author SHA1 Message Date
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 70e8579850 Simple filter for spurious messages that make it past checksum:
don't show aircraft until we have seen 2 messages from them.
2015-01-22 13:22:16 +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 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 5e522fe8db Decoder cleanups from experimental branch. 2015-01-21 00:23:48 +00:00
Oliver Jowett ed4d481772 Import CPR changes from experimental branch. 2015-01-20 18:41:44 +00:00
Oliver Jowett e02a2cdd44 GPL. 2015-01-20 16:49:01 +00:00
Oliver Jowett 43ec58c78e Remove dead tracking code related to the removed PlanePlotter feed. 2015-01-04 20:09:38 +00:00
Oliver Jowett d820ae1afc Merge branch 'prefer-global-cpr' 2014-09-25 17:18:08 +01:00
Oliver Jowett 661246d347 Prefer to use global CPR decoding where possible.
There is a danger in always using relative decoding where possible.
If there is an undetected error in the first pair of messages received,
then global CPR decoding will give a bad position, and subsequent
relative decoding will just walk around near that bad position even
though many error-free pairs of odd/even messages may have been received.

The first pair of position messages also tends to be the most error-prone, as
they are usually received at the extreme edge of receiver range.

(I see this happen at least once a day in practice)

So, instead, prefer to use global decoding when we have sufficiently recent data.
With recent data this should always be as good as relative decoding, and it
avoids getting stuck with bad data for long periods of time. If we don't have
enough recent data for a global solution, fall back to relative decoding.
2014-09-25 17:10:55 +01:00
Oliver Jowett 2e45a59986 Make signalLevel represent the SNR in dB, rather than a somewhat arbitrary amplitude value.
Include SNR values when dumping message contents.
2014-09-15 02:49:11 +01:00
Malcolm Robb f1b85ec5e7 Tidy up interactive.c
Remove spaces from the end of line.
2014-08-06 15:29:06 +01:00
Malcolm Robb 845289ad9f Version 1.09.1607.14
Improvements to COAA MLAT functions
Reduce CPU load in PPUP1090 and DUMP1090 during cleanup
2014-08-06 15:29:06 +01:00
Malcolm Robb 8b05286a24 Version 1.09.1007.14
Updates to support COAA Planeplotter Ground Station on an RPi
2014-08-06 15:29:05 +01:00
Malcolm Robb 64b24ebc29 Bugfix in position decoding
If the aircraft lands or takes off, the Lat/Lon valid flags are cleared.
In the original code, this also resulted in any even/odd position
reports in the mm record being discarded  This meant that the code would
require an even and odd position after the change of flight status.

The code had been modified so that any position report in the mm record
is used even if there is a change of flight status. This means there
only needs to be an even or odd after a change of FS, rather than
requiring both even and odd. The result should be earlier decoding of
position.
2013-10-04 11:09:40 +01:00
Malcolm Robb 5b5424df3b View1090 WinXP bugfix
Updated the way socket handles are used in View1090 to maintain
compatibility between UNIX and Windows.

Added the initial attempt at a Planeplotter uploader
2013-09-27 15:01:46 +01:00
Malcolm Robb 7ea2e8fdef Bug Fix in modesReadFromClient()
The modesReadFromClient() funtion is called from modesReadFromClients(),
which in turn is called from backgroundTasks(). backgroundTasks() is
called from within the main processing loop.

However, modesReadFromClient() can and does block. It attempts to read
characters from the input stream, and loops whilst there was no error.
This stalls the main RTL processing loop until an error occurs. In order
to support simultaneous local reception (via our RTL dongle) and remote
forwarding (data received from the interweb) we cannot allow this
internet read to stall.

To fix this, in modesReadFromClient() attempt to read a buffer of data
(currently 0x400 bytes). If we get a full buffer of bytes, then process
them, and attempt to read another full buffer. Keep doing thios untill
we read only a partial buffer (less than 0x400 bytes). Process the
partial buffer bytes and return.

This allows us to occasionally process data that is arriving from the
internet (which is buffered anyway in the TCP stack), without blocking
local RTL dongle decoding.
2013-09-20 16:48:15 +01:00
Malcolm Robb 52ac50b018 Remove some local filtering
Oops - Left some personal ModeA/C filtering in the release code that
only applies if you happen to be within 25 miles of Yeovilton.
2013-08-19 19:04:49 +01:00
Malcolm Robb 6997715fed Split into separate module files
Ok - this is likely to upset some people. Up until now, the vast
majority of the code has been in just one file - dump1090.c. This file
has grown so that it was approaching of 5000 lines long, and it was
becoming unmanagable. So I've split the file into several modules,
hopefully along fairly logical boundaries. The files are :

1) dump1090.c : Basically just the main() entry function, the help
function, the RTL dongle hardware interface, and a few orphan functions
that  don't really fit anywhere else.

2) mode_s.c : This contains all the mode S / ADSB decoding functions.

3) mode_ac.c : This contains all the mode A & C decoding functions

4) interactive.c : This contains all the functions to maintain an
internal list of aircraft seen over the last period, and functions to
print them out to the local console.

5) net_io.c : This contains all the network input/output functions
allowing data to be passed in/out to/from other receivers, in formats
such as SBS-1/3, Beast, AVR and JavaScript.

Hopefully this should provide an easier way forward if/when more
functions are added.
2013-08-19 18:57:03 +01:00