Commit graph

1516 commits

Author SHA1 Message Date
Oliver Jowett f6ff1c853b Show synthetic MLAT messages as such. 2015-06-29 12:42:50 +01:00
Oliver Jowett 1a3f65eaab Add --no-interactive, --show-only options to view1090
This turns it into a handy debug tool for looking at raw messages
from an existing running dump1090 without having to mess around with
a separate copy of dump1090 and netcat tunnels etc.
2015-06-29 12:41:55 +01:00
Oliver Jowett bd96d40e4e Display aircraft with mlat-derived positions with a different row color. 2015-06-29 10:47:29 +01:00
Oliver Jowett 51b5f4af24 Include mlatFlags in aircraft.json.
This requires expanding the line-buffer margin too as we can produce lines >256 chars now.
2015-06-29 10:46:37 +01:00
Oliver Jowett b793f83a29 Rewrite and fix heartbeat code.
The old logic had a number of problems, including:

 * sending heartbeats on all service types if any type needed
   a heartbeat
 * sending a heartbeat multiple times a second if there was a
   service type that was idle but didn't generate traffic when
   an empty message was sent (e.g. FATSV)

Rewrite it all so that heartbeats are explicitly tracked and handled
per service type, rather than by sending a dummy message.

Also switch to mode A/C messages for the beast/raw heartbeat, as
it's a bit more compact and less likely to mess with Mode S state
(an all-zeros Mode S message actually looks valid)
2015-06-29 10:06:13 +01:00
Oliver Jowett 803760ca80 Treat an all-zeros message as bad. 2015-06-29 00:50:19 +01:00
Oliver Jowett 75851778c0 Fix up filter population so it's not completely insane.
The logic for DF11 was completely broken and inverted. How did this ever work??

Actually, the broken version kinda works because the only types of message that
can yield an address that's not already in the ICAO filter are DF11/17/18.
So DF=17; DF=18; and DF=11 with IID=0 would pass the broken logic and populate the
filter. All other DFs would pass the broken test, too, but they can only ever
re-add entries that were already there.
2015-06-29 00:46:34 +01:00
Oliver Jowett 934dfee6a4 Change the mlat timestamp to something that doesn't need escaping. 2015-06-29 00:31:42 +01:00
Oliver Jowett 12a7d45e75 Mlat synthetic message detection.
Notice synthetic mlat messages by looking for messages with a magic
timestamp value. If they arrive, tag the derived data as mlat-derived.

Don't include mlat-derived output in FATSV output to avoid loops.
2015-06-28 20:04:09 +01:00
Oliver Jowett 8f08c1b87f Make faup1090 write to stdout, not listen on port 10001. 2015-06-28 19:59:49 +01:00
Oliver Jowett c7722f2b97 Guard against closing clients in a couple of places.
In particular, not guarding in flushWrites() meant that we
could end up trying to write to an uninitialized writer
(where writer->service == c->service == NULL) and crashing.
2015-06-26 21:29:54 +01:00
Oliver Jowett 8d1df036ae Don't use DF0/4/16/20 altitudes when DF17/18 altitudes are available.
The DF17/18 values are generally more trustworthy as they have full
CRC coverage. Errors in the CRC bits of a DF0/4/16/20 message can
result in the contained altitude being attributed to the wrong aircraft.
2015-06-26 20:43:46 +01:00
Oliver Jowett 5c2ec7106e Clean up dependencies.
Move ModeA/C demodulator to demod_2000 (decoding stays in mode_ac.c)
Remove dependency on interactive.c in stats.c
faup1090 then doesn't need interactive.c at all.
2015-06-26 18:36:14 +01:00
Oliver Jowett 99dd290352 Rebuild a basic faup1090 using the reworked network services bits.
This is a from-scratch reimplementation that should be functionally
equivalent to the Flightaware version that was based on dump1090_mr
and had its fingers deep in the network code. This version should be
a little less invasive / fragile..
2015-06-26 17:54:23 +01:00
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 5fa039a2d4 Only require librtlsdr headers while we're compiling dump1090,
not the other helpers that don't use the dongle.
2015-06-26 17:49:21 +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 7d4eaf6a48 Don't emit stale alt/speed/track/pos (more than 30s old) even if
they were updated since we last emitted a message.
2015-06-16 01:38:44 +01:00
Oliver Jowett 4f861f653a Track age of heading/speed/altitude; use this when deciding what to emit in FATSV format. 2015-06-15 23:13:04 +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 f58ff14d7c Fix queueing/resending very old Mode A/C messages.
Fixes #47.
2015-06-07 23:00:24 +01:00
Oliver Jowett 03ba828f8d Rearrange position cleanup to be a bit more obvious.
Previously it forgot to advance to the next aircraft and only
happened to work because it cleared the position bitflags and so
the next iteration (on the same aircraft) would advance.
2015-06-07 12:07:08 +01:00
Oliver Jowett a60270e20e Don't hang if the ICAO hashtable fills up. 2015-05-30 01:09:41 +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
Saikrishna Arcot 05469fbff8
Add curl as recommends. 2015-05-04 11:11:06 -05:00
Oliver Jowett 0bd897cad1 Fix --mlat --raw stdout formatting on big-endian systems. 2015-04-19 00:57:24 +01:00
Oliver Jowett 4d697ac61d Emit capitalized hex in avrmlat output. 2015-04-18 11:21:09 +01:00
Oliver Jowett e9378fb1c5 Fix endian issues in timestamp input/output.
This affected Beast input/output, and AVR output in --mlat mode.

Works on a little-endian host, should work on a big-endian host but
I don't have one to test with.

Probably fixes #44.
2015-04-18 11:05:12 +01:00
Oliver Jowett ff094519a6 Fix interactive-mode delay timing when using --ifile. 2015-04-09 19:18:49 +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 e6c81251bf Fix timestamp correction when sample blocks are dropped.
(Fixes #43)
2015-04-08 19:13:40 +01:00
Oliver Jowett 6148a05cef Raspbian doesn't do ${python:Depends} 2015-02-25 13:51:47 +00:00
Oliver Jowett e8ad60de6b Making progress output a bit friendlier. 2015-02-25 13:51:28 +00:00
Oliver Jowett 89ac9ad107 Mark this version as ~dev. 2015-02-25 13:17:20 +00:00
Oliver Jowett 60eab2284f Package changes to support the aircraft DB. 2015-02-25 13:16:54 +00:00
Oliver Jowett 8209267301 Avoid creating small child blocks, keep data in the parent where possible.
This reduces the number of blocks from 151 to 61.
2015-02-24 23:04:26 +00:00
Oliver Jowett da2fff8531 Proof of concept for an aircraft metadata DB. 2015-02-24 21:51:30 +00:00
Oliver Jowett d7c5047fd3 Fix crash when requesting nonexistent extensionless files
(but only if HTMLPATH does not contain a '.')

Clean up overuse of strstr.

(based on 259ce08f81eaaaa087b6b1994fce7dde81820c52)
2015-02-23 00:11:55 +00:00
Oliver Jowett e1d262d992 Add --show-only for extracting messages from a single plane. 2015-02-22 23:01:54 +00:00
Oliver Jowett b804359077 Initialize category. 2015-02-22 20:11:11 +00:00
Oliver Jowett 87bd16812a Add formatter.js to conffiles. 2015-02-22 17:03:47 +00:00
Oliver Jowett 7fbdde156a Change map icon based on aircraft category.
This only has different icons for the "rotorcraft" and "light"
categories at the moment - all others are the default plane icon
at different scales.
2015-02-22 17:02:23 +00:00
Oliver Jowett 7bd2bcc0a2 Move color settings into config.js 2015-02-22 12:27:01 +00:00
Oliver Jowett 8f3be2cd79 Decode aircraft category, export in aircraft.json.
Closes #2.
2015-02-22 12:15:26 +00:00
Oliver Jowett 8fabfcb94f Merge branch 'm30164-title_numbers' 2015-02-22 11:53:28 +00:00
Oliver Jowett 268599a211 Tweaks to title mangling:
* use PageName, not literal "DUMP1090"
 * use document.title directly, not a selector
 * include number of positionless aircraft too
 * rename the config options
 * some simplification of the changes
2015-02-22 11:51:58 +00:00
Oliver Jowett 288a8242dd Merge branch 'title_numbers' of https://github.com/m30164/dump1090 into m30164-title_numbers 2015-02-22 11:35:59 +00:00
Oliver Jowett df64abe433 Move special-character definitions to formatter.js. 2015-02-22 01:29:02 +00:00