Commit graph

559 commits

Author SHA1 Message Date
MalcolmRobb e225b5dead Merge pull request #24 from ddeitterick/add_distance_to_table
Add Distance to Table Info
2014-10-28 12:59:08 +00:00
demonx 5b4d811c7d Ability to assign bind address for services 2014-10-25 21:33:45 +02:00
Jeff Lawson 87a88c9798 Merge branch 'master' into faurl 2014-10-12 16:31:35 -05:00
hhm f71bc6c130 Merge branch 'master' of https://www.github.com/MalcolmRobb/dump1090 into http_server_wk 2014-10-04 21:39:15 -04:00
hhm e20e240130 B"H Merge branch 'master' of https://www.github.com/MalcolmRobb/dump1090 into socket_hang
Conflicts:
	net_io.c
2014-10-04 21:36:51 -04: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 f58c21bfc1 Merge branch 'show-stale-planes' 2014-10-02 22:51:32 +01:00
Oliver Jowett 75438d5595 Change the marker color for aircraft with no recent updates. 2014-10-02 22:50:09 +01:00
MalcolmRobb 65751ed6e9 Merge pull request #45 from mutability/net-client-eof-handling
Detect client EOF properly. Handle EWOULDBLOCK.
2014-10-02 21:32:40 +01:00
MalcolmRobb dee6ded673 Merge pull request #35 from mutability/use-repaired-checksums
Check if bit correction happened before bailing out due to a bad CRC.
2014-10-02 21:29:10 +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
Malcolm Robb 4f449a8d44 Make Pull # compatible with Pull #42 2014-10-02 21:08:57 +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 16a900c667 Merge pull request #42 from mutability/prefer-global-cpr
Prefer to use global CPR decoding where possible.
2014-10-02 21:05:26 +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
Malcolm Robb 5a5c52d7a9 Merge remote-tracking branch 'origin/pr/46' 2014-10-02 19:53:43 +01:00
MalcolmRobb 98f510540e Merge pull request #47 from mutability/flightradar-compat-fix
Always emit a message reception time, as otherwise the FR24 uploader is unhappy.
2014-10-02 19:41:18 +01:00
Oliver Jowett 0c61d1b340 Merge branch 'master' into oversampling 2014-10-02 12:22:48 +01:00
Oliver Jowett e4a3bd6c51 Merge branch 'flightradar-compat-fix' 2014-10-02 12:22:32 +01:00
Oliver Jowett 15f3408d8e Always emit a message reception time, as otherwise the FR24 uploader is unhappy.
When we don't have a time available (e.g. remote message) use the system time.
2014-10-02 12:20:37 +01:00
hhm 13fe375437 Merge branch 'master' of https://www.github.com/MalcolmRobb/dump1090 into http_server_wk 2014-10-01 11:10:41 -04:00
hhm 8b4d5b3dca Merge branch 'master' of https://www.github.com/MalcolmRobb/dump1090 into socket_hang 2014-10-01 11:10:19 -04:00
MalcolmRobb bf111360bc Merge pull request #44 from mutability/fix-obinary
Only use O_BINARY on Win32
2014-10-01 13:57:07 +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 186cac5c25 Use the anet-reported error string when reporting bind errors.
errno may have been modified by the time you see it.
2014-10-01 12:37:29 +01:00
Oliver Jowett a513c3677b Detect client EOF properly. Handle EWOULDBLOCK.
Client disconnection appears as a read of 0 bytes.
Without a test for this, dump1090 continues to poll that client forever.

Also, read() may return EWOULDBLOCK as well as EAGAIN
for "no data right now", so handle that.

I don't know if there is an equivalent Win32 bug here as the Win32
interfaces seem subtly different to vanilla POSIX.

The following test/break can probably be removed if Win32 needs
the same fix.
2014-10-01 12:29:16 +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
MalcolmRobb c09c68466c Merge pull request #41 from mutability/skip-remote-timestamps
Don't output message reception time in SBS format for remote messages.
2014-09-30 17:15:46 +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
Malcolm Robb aa063ba89f Undo Parts of Pull request #29
The table sizing doesn't seem to work in M$ IE8 and IE9.
2014-09-30 16:35:15 +01:00
MalcolmRobb 732fe52a10 Merge pull request #28 from ddeitterick/change_plotted_plane_table_bg_color
Change the Background Color for a Plotted Plane
2014-09-30 15:19:42 +01:00
MalcolmRobb 9d3452f424 Merge pull request #27 from ddeitterick/format_track_field
Add Degree Symbol to Track Value
2014-09-30 15:18:35 +01:00
MalcolmRobb 5cdcc22734 Merge pull request #29 from tslocum/bettermap
Improve map display layout and styling
2014-09-30 15:16:25 +01:00
MalcolmRobb bd151e1e54 Merge pull request #40 from mutability/discard-bad-cpr-latitudes
Reject out-of-range latitudes when doing CPR decoding.
2014-09-30 15:10:33 +01:00
MalcolmRobb 8725ba0b6d Merge pull request #39 from mutability/fractional-gain
Fix --gain with fractional gain values.
2014-09-30 15:00:12 +01:00
Oliver Jowett 93e1b9e10d More tweaking to try to get the signal / CPU tradeoff right. 2014-09-30 00:19:05 +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 4732ad3498 Performance tweaking for AGC.
Apparently enabling AGC produces samples with quite different characteristics,
and ends up eating a lot more CPU as the previous heuristics would generate a
lot of false positives. Tweaking the parameters and a bit of optimization
seems to bring this back down to usable levels without losing many potential
messages.
2014-09-29 23:02:42 +01:00
Oliver Jowett ca372ed105 Add SNR calculation in oversample mode. 2014-09-27 16:47:50 +01:00
Oliver Jowett e118668925 Log message time and symbol phase when dumping message info. 2014-09-27 16:45:39 +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