Commit graph

116 commits

Author SHA1 Message Date
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
Oliver Jowett 0378620445 Merge branch 'improve-phase-enhancement' 2014-09-15 01:58:38 +01:00
Oliver Jowett 31b28b3878 Rearrange phase enhancement so that it handles phase errors in both directions.
This almost doubles the number of messages recovered by phase enhancement.
2014-09-15 01:43:14 +01:00
Oliver Jowett 7fab5b0cb5 Check if bit correction happened before bailing out due to a bad CRC. 2014-09-13 12:11:19 +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
hhm d1b37ad1c5 B"H decoding: use last air position to calculate ground position 2014-07-14 04:03:07 -04:00
hhm 506be6e054 B"H decode more data, etc.
- decodes a bit more information
- misc. small changes
2014-06-22 13:05:39 -04:00
Markus Gräb 583f24299a Fixed: now skipping correct number of values in magnitude buffer
Variable j points to the current location in the magnitude vector.
When decoding a message  (MODES_PREAMBLE_US+msglen)*2 is added to j.
In the loop head j is increased by 1, so one value was skipped.
2014-05-14 19:39:07 +02:00
Malcolm Robb f7843c1691 Implement TCP Heartbeat
Some users have reported issues where the TCP link to dump1090 can be
lost at times of low traffic density - typically in the middle of the
night. One possible reason for this is that some routers drop the link
if there is no traffic for a predetermined period.

To try and resolve this, dump1090 now sends a 'null' packet consisting
of 7 "0x00" bytes approximately once a  minute if there is no real
received traffic during this time. This packet should be discarded by
the application receiving the dump1090 because it will have an invalid
checksum, and ICAO address 0x000000 is also invalid. However, this null
packet should be enough to keep routers alive.
2014-03-11 01:09:49 +00:00
Malcolm Robb 75a4c6ee21 BUGFIX : Missed data causes timestamp slip
The Mutex on the RTL data reader thread does not "force" the data
processing thread to execute. Therefore, if the processor is busy, it is
possible for a second RTL callback to occur before the data from the
first has been processed. This will cause the loss of the first data,
but worse, it will cause a slip in the timestamp. This upsets Beamfinder
and MLAT operation in PlanePlotter.

To solve this, keep a Fifo buffer which is filled by the callback
thread, and emptied by the data processing thread. The fifo is the same
size as the number of buffers requested in the call to
rtlsdr_read_async().

Note - we only put the value of the pointer supplied in the callback
into the fifo. We do not attempt to cache the data in the buffer pointed
to by the pointer.  This would require us to memcopy() 2Mbytes per
second, which we don't want to do if we don't have to because it will
only make the processor loading worse. Instead, we assume that the data
in the buffer will remain valid after the callback returns, at least
until it is overwritten by new data.

It is still possible for us to lose data if we can't process it quickly
enough. However, we can now detect this loss of data when the fifo is
almost full, and correct the timestamp for the lost block/blocks.
2014-02-22 23:11:13 +00:00
Adam Cécile (Le_Vert) b921d80e7f Typo fixes 2013-10-10 00:44:58 +02:00
Malcolm Robb 11502e9ec9 Extra list decoding for DF-0 and DF-16
Extra list decoding for DF-0 and DF-16
Tidy up a few things
Change version number
2013-10-04 18:33:49 +01:00
Malcolm Robb fa004fc38a DF-11 SI/II Detection changes
Don't allow detection of DF-11 SI/II until we have received at least one
DF-11 for the aircraft with an SI/II of zero.

Previous versions would allow an ICAOAddr to be marked as valid if a
DF-11 was received where the crc was less than 80. This is required for
SI/II detection where the SI/II is overlaid on the crc field. However,
this also decreaces the security of the crc. It is possible for a
corrupt message to result in a crc value of between 1 and 79, and this
will lead to an invalid ICAOAddr being marked as received.

To try and prevent this, do not allow detection of DF-11 II/SI fields
until at least one DF-11 crc=0 has been received. Once this happens, we
ca be fairly sure that this aircraft really is within range, and so
II/SI detection can e used.
2013-10-04 10:34:26 +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 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