Commit graph

964 commits

Author SHA1 Message Date
Malcolm Robb 408c8468e5 Merge remote-tracking branch 'origin/master' into Debug 2013-04-09 01:00:11 +01:00
Malcolm Robb ed80552ca1 Speed up the I/Q to magnitude calculation
Increase the speed of the I/Q to magnitude calculation lookup by
expanding the table to 65536 entries (256*256*2 bytes). At runtime, this
allows us to pick up raw I/Q bytes as a 16 bit value and index into the
magnitude table to get a 16 bit result. This removes the need for
subtracting 127, and then correcting for -ve numbers, so should be
faster, at the expense of a larger data table.

Change the maglut lookup table from 129*129 to 256*256
Initialise the maglut buffer accordingly
Change the data->maglut lookup to use the new maglut buffer
Change the I/Q data buffer pointet to a uint16_t *
2013-04-09 00:58:32 +01:00
Malcolm Robb bbe96b6afd Merge remote-tracking branch 'origin/master' into Debug 2013-04-08 23:53:08 +01:00
Malcolm Robb 3113223029 One bug fix, and some changes to the --interactive output format
I messed up merging the Squawk display in interactive mode into my
master.

However, the original source posted by terribl causes a print line
length greater than 80 characters. This in turn causes the lines to
spill over on a terminal display. I have therefore re-formatted some of
the output so that it fits within 80 characters.
2013-04-08 23:19:48 +01:00
Malcolm Robb 8ba18ebcdb Type Conversion required when using --file 2013-04-08 18:25:11 +01:00
Malcolm Robb 192cb80c08 Speed up the I/Q to magnitude calculation
Increase the speed of the I/Q to magnitude calculation lookup by
expanding the table to 65536 entries (256*256*2 bytes). At runtime, this
allows us to pick up raw I/Q bytes as a 16 bit value and index into the
magnitude table to get a 16 bit result. This removes the need for
subtracting 127, and then correcting for -ve numbers, so should be
faster, at the expense of a larger data table.

Change the maglut lookup table from 129*129 to 256*256
Initialise the maglut buffer accordingly
Change the data->maglut lookup to use the new maglut buffer
2013-04-08 17:55:17 +01:00
Malcolm Robb 43c648448f Added some other peoples commit modificatons
Added dtiller's --quiet and --ppm modifications
Added terribl's squawk on interactive modifications

Removed up some unused or un-needed variables
2013-04-08 16:42:27 +01:00
Malcolm Robb d3662bba80 Implemented Beast Binary output 2013-04-07 16:22:02 +01:00
antirez ff0fe38722 Two typos fixed in gmap.html. 2013-02-04 23:09:21 +01:00
antirez c991d658c6 gmap.html: update plane flight field when new data is received. 2013-02-03 23:20:29 +01:00
antirez acc702d9ac Fake version info removed from gmap.html. 2013-02-02 16:32:42 +01:00
antirez 9d55d5edd7 gmap.html: no rotation jumps when selecting / deselecting planes. 2013-02-02 16:32:00 +01:00
antirez 3307261546 CPR decoding: southern hemisphere coords are now handled correctly. 2013-02-02 14:40:58 +01:00
antirez 13596ba3dd A few bugs fixed in debug.html. 2013-01-27 21:42:40 +01:00
antirez e9e07e0778 Improved Google map interace: select planes and see details. 2013-01-27 01:37:05 +01:00
antirez 27e3743d87 Remove stale aircrafts when --interactive is not enabled. 2013-01-27 01:25:22 +01:00
antirez 977493cf63 Strong preamble detection even with --aggressive.
To try to decode messages with a fundamentally flawed preamble is mostly
a useless waste of CPU time.

The new aggressive mode still detects a sensible percentage of
additional messages because of the error tolerance and two-bits fixes
but does not waste your CPU time.
2013-01-26 13:03:24 +01:00
antirez 184953ff92 Phase correction fixed, code reshaped to apply more corrections.
The phase correction was applied only to a subset of bits! Because of an
offset error.

The detection code layout was modified a bit to make it simpler to
implement more corrections in the future. However only phase correction
is performed currently. Slope correction, or to compensate for the cycloid
effect are two possible improvements.
2013-01-26 12:58:08 +01:00
antirez 11d8db0d38 Properly initialize ICAO cached addresses hash table. 2013-01-26 01:15:24 +01:00
antirez c2e79d4555 Many small improvements (see full commit message).
* Better preamble detection to skip most of the messages we'll likely
  not be able to decode.

* A Phase correction algorithm that improves the recognition compared
  to the previous algorithm used.

* Javascript output in debug mode, and a debug.html file that can be
  used in order to see graphically undecoded samples.

* Ability to detect cross-read messages, that are, messages that happen
  to start and end across two different reads from the device or file.

* A few bugx fixed.

* README improved.
2013-01-26 01:08:13 +01:00
antirez 9086290b03 SBS-1: Code style adapted to code base. 2013-01-20 00:17:58 +01:00
Kemal Hadimli 071a021f20 New feature: Output in SBS format 2013-01-19 22:44:11 +01:00
antirez 2fe188286e Do not modify the packet when AP gets decoded. 2013-01-19 18:45:00 +01:00
antirez c9bb48675c Squawk extraction fixed. 2013-01-19 18:44:54 +01:00
antirez b4805ea7d4 Two important fixes to CPR decoding: wrong cast and more precise timing.
This commit address two issues with the implementation of CPR decoding:

Fix #1: The two functions N() and DLon() used to have the latitude
parameter as an integer (!), basically truncating the fractional part
before calling the NL() function to perform the lookup.

This resulted into random strange movements of aircrafts, especially
jumps or shifted positions.

Fix #2: Use milliseconds for CPR odd/even timestamps. Dump1090 already
tried to use the most recent packet received among the odd and even
packets currently available, however to do this correctly millisecond
resolution should be used, otherwise many times the odd and even packet
appear to have the same time in seconds and we don't always use the
latest received.
2013-01-18 23:05:08 +01:00
antirez 03759a3eb0 Google map view enhanced: color by altitude and more. 2013-01-16 20:25:28 +01:00
antirez 21fc9de47a HTTP keep-alive fixed. Network debugging capabilities. 2013-01-16 20:07:35 +01:00
antirez e40e55bfe0 Less buggy network requests parser. 2013-01-16 00:40:47 +01:00
antirez dc91712741 Aggressive mode implemented. 2013-01-15 22:37:47 +01:00
antirez 0bf65d8646 Better error handling for network clients. 2013-01-15 00:35:21 +01:00
antirez e1d3724271 Regression fixed: set client socket non-blocking. 2013-01-15 00:24:19 +01:00
antirez 42eb990685 HTTP: Set clen correctly when serving gmap.html. 2013-01-14 20:25:11 +01:00
antirez a583615b66 Initial HTTP support with planes animated using google map. 2013-01-14 15:13:43 +01:00
antirez 4203b9caf6 Minor README improvements. 2013-01-12 20:28:24 +01:00
antirez b10c8dab35 CPR decoding fixed. 2013-01-12 18:18:23 +01:00
antirez f3a705f57e README -> README.md 2013-01-12 11:58:25 +01:00
antirez ddb1aa2209 README improved with more antennas info. 2013-01-12 11:46:53 +01:00
antirez 0ce746dc5f Ability to receive traffic from network. 2013-01-12 11:46:32 +01:00
antirez b5ff48e5f5 Network server sending raw data to clients. 2013-01-10 20:58:13 +01:00
antirez 539039f037 Set heading to 0 when speed is 0. 2013-01-10 19:03:41 +01:00
antirez af4964d72f With --raw fflush() at every output to avoid delays. 2013-01-10 19:01:28 +01:00
antirez 9c8ad1c6b7 More stuff on .gitignore. 2013-01-10 19:00:07 +01:00
antirez b6907f400a CPR position decoding. Track calculation from velocity components. 2013-01-09 22:51:29 +01:00
antirez ec1f34f572 Fix for --metric 2013-01-08 20:02:58 +01:00
antirez 32fe8d8d69 New --metric option to use meters and km/h in --interactive. 2013-01-08 19:46:50 +01:00
antirez f231c7adb2 Remove idle aircrafts in interactive mode. 2013-01-08 19:25:28 +01:00
antirez 3f47bb6f47 Initialize aircraft speed in interactive mode.
The effect of this bug was random speeds displayed with --interactive.
2013-01-08 19:23:51 +01:00
antirez 1576b61af5 Minor aesthetic change to interactive mode. 2013-01-07 01:50:34 +01:00
antirez 840a005d16 Interactive mode with --ifile: play at natural speed. 2013-01-07 01:47:39 +01:00
antirez 69ae2491a5 New AP brute forcing algorithm.
The old approach was to loop over a small circular buffer of recently
seen addresses recomputing the CRC every time: this prevented the use of
a big cache, and 20 entries was too small in case of high traffic and
big range antennas.

@prog on ##rtlsdr suggested to use an alternative algorithm where
instead we compute the CRC of the message, and xor it to obtain the
address, that is later checked in our list of recently seen addresses.
This is a lot better and allows for bigger tables in O(1) lookup time.

I used this idea to implement a larger 1024 elements table. Instead of
writing a proper hash table I used the fact we are just dealing with a
cache, so I just hash the ICAO addess and overwrite the old entry at
that idex with the address-timestamp pair, not caring about collisions.

The bigger table makes a huge difference:
In a test vector of 113 seconds recording with 76 simultaneous aircrafts
the new algorithm detected around 10k more messages (!).
2013-01-07 01:15:29 +01:00