Commit graph

152 commits

Author SHA1 Message Date
Oliver Jowett
278448179d Factor out net services so they're not tied to a static array.
This lets different things dynamically create the services they need,
and sorts out the horrible hacks that view1090 used to make outgoing
connections. Now you can explicitly create a service and tell it to make
an outgoing connection.

This means that view1090 can now just set all the ports to zero (to disable
the listeners), do a normal net init, then explicitly construct the beast
input service without a listener and tell it to make a connection as needed.
2015-06-26 17:50:51 +01:00
Oliver Jowett
656df98a76 Add --stats-range 2015-06-19 17:29:14 +01:00
Oliver Jowett
e7e9cecc1a Add --throttle option.
This gives access to the existing throttling behaviour when reading
from a file with --interactive, without needing to actually have
--interactive.

This is useful when testing, as without --throttle samples will be
processsed much faster than real-time, which can produce different
results with e.g. aircraft/filter expiry times and position/speed checks.
2015-06-18 11:24:01 +01:00
Oliver Jowett
21bdc45bf0 Tweaks to noise measurements. 2015-06-16 10:13:25 +01:00
Oliver Jowett
03b53c2d29 Factor out the sample -> magnitude conversion code and make everything a little less sample-rate-dependent.
Add optional noise measurement (cheaper than the old version)
Add optional DC filter (expensive, not really needed with rtlsdr input)
2015-06-15 22:14:37 +01:00
Oliver Jowett
079de99eec Add --iformat option that controls the format of the data read from --ifile.
This currently understands:

UC8 (original rtl_sdr format, 8-bit unsigned complex);
SC16 (16-bit signed complex, full width);
SC16Q11 (bladeRF native format: 16-bit signed complex with 11 bits of magnitude)
2015-05-29 18:22:41 +01:00
Oliver Jowett
15ea5ba3da Rearrangements to the receive thread.
Magnitude conversion now happens immediately when sample data is
received, so there is no risk of newly received data clobbering old
data under CPU overload.
2015-04-09 18:51:31 +01:00
Oliver Jowett
e1d262d992 Add --show-only for extracting messages from a single plane. 2015-02-22 23:01:54 +00:00
Oliver Jowett
8f3be2cd79 Decode aircraft category, export in aircraft.json.
Closes #2.
2015-02-22 12:15:26 +00:00
Oliver Jowett
af382ac79c Fix max flush interval to be in milliseconds. 2015-02-10 23:43:48 +00:00
Oliver Jowett
f9ed7e4a97 More time_t -> milliseconds conversions.
This lets us support fractional net flush times among other things, which is handy.
2015-02-10 22:24:22 +00:00
Oliver Jowett
7053ad02da Make aircraft tracking use milliseconds everywhere. 2015-02-10 21:49:37 +00:00
Oliver Jowett
9fd0c822f6 Extract NUCp from message type; needed for #16. 2015-02-09 14:14:12 +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
4e177c2d64 Store computed reception time in the message struct so we don't rely on
the message being emitted immediately.

Fix computation of reception time so it's more sensible (the block timestamp
is some time after reception of the _end_ of the block, not the start) - this
means that message-emission times are always later than message-reception
times in SBS output, which is a bit more sensible.

Use clock_gettime in preference to ftime.
2015-02-08 17:46:01 +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
5b40377b98 Measure CPU for demodulator, read thread, and background tasks individually. 2015-01-23 01:22:22 +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
af3eb3df2b Move to a simpler versioning scheme (the one derived from upstream
is going to break the ordering that Debian expects very soon).

When building from source not via debian/rules, derive a version from
git describe.
2015-01-22 13:19:15 +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
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
7c64f27c22 Remove unused user latitude/longitude defines. 2015-01-21 11:53:45 +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
07df054590 Move CRC code to a separate file. 2015-01-19 23:41:26 +00:00
Oliver Jowett
870233977c Less aggressive history settings.
(cherry picked from commit d41090c57cb37352b7689e36af55cdb89486c230)
2015-01-16 20:33:23 +00:00
Oliver Jowett
1db63ebc65 Add generation of history JSON.
Add support for URL handlers that match a path prefix.

(cherry picked from commit 38faa510cb881cbf9d2a0a85bbde61130b5259e7)
2015-01-16 20:31:59 +00:00
Oliver Jowett
b1bfb4d520 Rationalization of JSON output. Pass actual URL path to URL handler.
(cherry picked from commit becce8d69a6e6cee38d4fdb78b5a4e25d570baea)
2015-01-16 20:30:41 +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
f72fc3dbee Fix a couple of problems found by valgrind. 2015-01-12 00:56:51 +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
07bc762055 Notice if we lose the RTLSDR device and reconnect.
Fix some of the more glaring pthread bugs.
2015-01-02 22:29:29 +00:00
Oliver Jowett
58dfbdcb6b Add support for controlling the accuracy of the receiver location
written in the JSON metadata used by the webmap.
2014-12-27 20:52:56 +00:00
Oliver Jowett
48986c48cc Remove half-implemented --no-decode option. 2014-12-27 20:11:10 +00:00
Oliver Jowett
9fa09e0e92 receiver.json support, internal webserver cleanup.
Add data/receiver.json (generated once) and support for it in script.js.

Internal webserver rearrangement to support multiple json files.
2014-12-10 17:05:22 +00:00
Oliver Jowett
f707f2cdce More version reporting tweaks. 2014-12-10 12:44:00 +00:00
Oliver Jowett
c6077b1e6c Use the package version as the version number compiled into the binary. 2014-12-10 12:25:43 +00:00
Oliver Jowett
2dcc8e3524 Add direct support for FATSV-format output.
This is adapted from the FlightAware fork, with some cleanup and
modifications needed to work with the net-cleanup changes.

Inclusion of "verbatim" TSV data read from an AVR-format input
connection is not supported.
2014-12-08 19:56:45 +00:00