Commit graph

232 commits

Author SHA1 Message Date
Oliver Jowett 43ec58c78e Remove dead tracking code related to the removed PlanePlotter feed. 2015-01-04 20:09:38 +00:00
Oliver Jowett 76474f58ab Fix warnings. Add -Werror so they break the build in future. 2015-01-04 20:08:33 +00:00
Oliver Jowett 85eee61358 Oops, one unsaved file. 2015-01-02 22:34:35 +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 2db9d62c1c Warn if --modeac is used together with --oversample. 2014-12-27 21:25:32 +00:00
Oliver Jowett 727a59e8eb Oversampling is now less scary. 2014-12-27 21:22:43 +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 fc45eded0b Removing COAA/PlanePlotter stuff (+ binary-only object file) that I can't support or test. 2014-12-27 20:16: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
Oliver Jowett 9e72eb64be Merge branch 'write-json-files' into oversampling 2014-11-23 17:22:58 +00:00
Oliver Jowett 2abc386895 Off-by-one error in the json interval calculation. 2014-11-23 17:22:34 +00:00
Oliver Jowett e0bc89e542 Merge branch 'write-json-files' into oversampling 2014-11-23 16:34:18 +00:00
Oliver Jowett d0174994cb Fix path buffer size 2014-11-23 16:32:22 +00:00
Oliver Jowett 7bd2ee5510 Merge branch 'write-json-files' into oversampling
Conflicts:
	dump1090.c
	dump1090.h
2014-11-23 16:03:35 +00:00
Oliver Jowett 6910a4bf4d Experimental json changes 2014-11-23 16:02:11 +00:00
Oliver Jowett 8246df8b2d Merge branch 'master' into oversampling 2014-10-31 19:42:15 +00:00
Oliver Jowett bbd5a13030 Merge branch 'net-cleanups' 2014-10-31 19:38:06 +00:00
Oliver Jowett 29d1e53f9f Merge remote-tracking branch 'upstream/master' into net-cleanups 2014-10-31 17:58:03 +00:00
Malcolm Robb a9cd75ded1 More Updates to Pull #54
Pull #54 breaks the Windows version of dump1090 due to a bug in the
inet_aton() windows function.

1) Fix the bug in the windows inet_aton()
2) Modify the command line code to strdup() the command line string.
3) Leave the Modes.net_bind_address pointer NULL if no command line
specified
2014-10-30 12:06:03 +00:00
demonx 5b4d811c7d Ability to assign bind address for services 2014-10-25 21:33:45 +02:00
Oliver Jowett cd3efe2d63 Merge branch 'net-cleanups'
Conflicts:
	dump1090.c
2014-10-03 23:15:06 +01: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
Oliver Jowett 8d4f1a396c Merge branch 'fix-net-list-corruption' into net-cleanups 2014-10-03 20:58:52 +01:00
Oliver Jowett 4a4fed2b37 Merge branch 'fix-net-list-corruption' into oversampling 2014-10-02 21:18:50 +01:00
Oliver Jowett 1cf0097dac Merge branch 'fix-net-list-corruption' 2014-10-02 21:18:35 +01:00
Oliver Jowett a2f49f2bb8 Fix a crash when an outbound client is closed in response to reading a remote message.
When we read from some client A, we may end up forwarding a message to other
clients. If we forward to some client B and there is a write error, then
we close B and remove it from the client list. However, if before this happened
A->next == B, then the read loop will still be holding on to a pointer to B,
and we crash.

As it's unpredictable what clients could be closed at what point, the simplest
approach is to retain closed clients in the list until we are at a point where
we know there are no stray pointers on stack, and only then modify the list.
This also simplifies anything that has to loop over clients, as it doesn't need
to worry about the current client being freed under it.
2014-10-02 21:06:10 +01:00
MalcolmRobb bc496fbcad Merge pull request #43 from mutability/more-stats
Add --stats-every option, add sample block counters
2014-10-02 20:51:13 +01:00
Oliver Jowett e008f0fc3f Resync with master. 2014-10-01 12:44:07 +01:00
Oliver Jowett 622b158367 Merge branches 'fix-obinary', 'net-client-eof-handling' and 'report-bind-errors' 2014-10-01 12:41:28 +01:00
Oliver Jowett 98c7c73d06 Only use O_BINARY on Win32 2014-10-01 12:17:51 +01:00
Oliver Jowett 9691e7bf79 Merge upstream. 2014-10-01 12:05:04 +01:00
Oliver Jowett 864660bf27 Use uint64_t in load stats to avoid overflow with large intervals. 2014-10-01 01:43:37 +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
Malcolm Robb e3bbf7b266 Read Files are binary
When replaying recordings, the read files are binary, so the file open
needs to reflect this so that spurious end of file characters aren't
misinterpreted.
2014-09-30 16:36:56 +01:00
Oliver Jowett dcae71faa8 Move CPU instrumentation up into the main loop. 2014-09-29 23:11:36 +01:00
Oliver Jowett 7a0ca85a90 Measure CPU used by the sample processing thread. 2014-09-29 23:04:58 +01:00
Oliver Jowett c3409302ce Fix mlat inter-block timestamp accounting in oversampling mode.
Add calculated phase into the per-message timestamp (it is already exactly a 12MHz offset)
2014-09-27 16:44:26 +01:00
Oliver Jowett 69a30535d4 Oversampling, round two.
This now seems to be at the point where it will decode more messages
than when using 2MHz with --phase-enhance.
2014-09-27 13:07:23 +01:00
Oliver Jowett 5c8e6198b7 First cut for sampling at 2.4MHz + phase detection. 2014-09-26 22:42:38 +01:00
Oliver Jowett 9fad408f57 Merge branch 'more-stats' 2014-09-25 22:03:57 +01:00
Oliver Jowett b98c6856b3 Move the stats reset strictly after stats display, so the total message count is shown correctly. 2014-09-25 22:02:52 +01:00
Oliver Jowett b58ae5a17e Merge branch 'more-stats' 2014-09-25 20:36:42 +01:00
Oliver Jowett 4fc2697555 Add stats for number of sample blocks processed and dropped. 2014-09-25 20:35:54 +01:00
Oliver Jowett 10061675de Add --stats-every <secs> option.
Periodically displays and resets stats.
Useful for unattended operation.
2014-09-25 20:33:50 +01:00
Oliver Jowett 3f9c859800 Merge branch 'fractional-gain' 2014-09-24 20:02:00 +01:00