Commit graph

808 commits

Author SHA1 Message Date
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
Oliver Jowett 0367429b9d Merge branch 'm30164-Unit_settings' (closes: #27) 2015-02-22 01:23:26 +00:00
Oliver Jowett 5c1cf53316 Simplify settings down to just Metric / ShowOtherUnit.
Factor out some common code.
2015-02-22 01:22:05 +00:00
Oliver Jowett 082e973990 Merge branch 'Unit_settings' of git://github.com/m30164/dump1090 into m30164-Unit_settings 2015-02-22 00:55:46 +00:00
Oliver Jowett e7d7fd549c Fix off-by-one error in Beast-format input.
This would mangle messages if the first byte of a message ended up
as the last byte returned by a read() call - it would read beyond
the end of the buffer, decide the message was damaged, and then run
off into the message data looking for a new delimiter. Sometimes
that would work (only dropping one message), but sometimes it would
run into data that happened to look like a message start but
actually wasn't, and then try to interpret that, leading to completely
bogus message data being read.

Fixes #29.
2015-02-21 23:50:35 +00:00
Oliver Jowett 8e9220e330 Quick prototype of color-by-altitude. 2015-02-21 18:41:59 +00:00
m30164 297d3b0125 Number of planes and messages in title
Simple addition to display the current number of planes and messages in
the title.
2015-02-20 11:42:29 +01:00
m30164 a531327533 Added extended unit settings
Added some code to enable the user to configure unit selection in a more
detailed fashion. you can now select either metric or imperial, or both,
and even set which one of those should be displayed first.
2015-02-20 00:09:03 +01:00
Oliver Jowett ab8c4db85b Fix edge cases when specifying the user to run as.
* check the username fits the format expected by adduser;
 * don't allow root;
 * if the user exists, don't try to create it; usually, this is
   harmless, but it fails if the user exists with a UID outside the
   normal range for system users.

Fixes #24.
2015-02-19 22:41:39 +00:00