Commit Graph

1926 Commits

Author SHA1 Message Date
Oliver Jowett 265055106b
Merge pull request #123 from VasiliyTurchenko/hackrf_ant_power
add "--enable-antenna-power" command line option for HackRF config
2021-03-22 18:52:18 +08:00
Турченко Василий Владимирович 80acb91dbc add "--enable-antenna-power" command line option for HackRF configuration
to be able to feed antenna's connector with +3.3v HackRF's internal DC
voltage.
2021-03-22 00:31:47 +03:00
Oliver Jowett 3d013c4251 Note that build profiles only work with buster 2021-03-22 00:36:11 +08:00
Oliver Jowett 86bb40a31c Update install docs to mention use of prepare-build.sh for package builds.
Soft removal of jessie support (just remove the build docs)
2021-03-22 00:33:03 +08:00
Oliver Jowett 8dd83d2e7e Don't hang on exit if rtlsdr hardware stops sending samples.
Give up and exit after 30 seconds of no sample data, rather than just warning and continuing.

background & discussion: https://discussions.flightaware.com/t/cpu-hikes-crash-dump1090-fa/74759

The scenario this addresses is:

 * Hardware wedges, USB bulk endpoint stops providing data
 * librtlsdr remains in rtlsdr_read_async() waiting for either USB data which never arrives,
   or a cancellation via _a different thread_ calling rtlsdr_cancel_async().
 * main thread notices the lack of SDR data and complains
 * something external e.g. piaware tries a restart and sends SIGTERM
 * the signal handler sets Modes.exit = 1; the main thread starts waiting for receive thread termination
 * because we're never getting callbacks from rtlsdr_read_async(), we never call rtlsdr_cancel_async
 * dump1090 hangs waiting on receive thread termination

To fix this, add a sdrStop() handler function where the general contract is "make the receive thread terminate".
In the rtlsdr case, this calls rtlsdr_cancel_async directly, which will make rtlsdr_read_async() return even
if the hardware is stuck.

The main thread then calls sdrStop() before waiting for receive thread termination.

Also, as discussed in the thread above, there's not really much point in continuing to run if the SDR
has wedged, so bail out after 30 seconds of no sample data.

Also, if pthread_timedjoin_np is available, use it in preference to pthread_join so that we do not wait
indefinitely for the receive thread on shutdown. If the join times out, give up and abort() as we can't
safely continue a clean shutdown while the receive thread is running.
2021-03-21 02:03:08 +08:00
Oliver Jowett c433463392 Reduce CPU further in --no-fix-df mode. Add --enable-df24 option.
This reinstates the fastpath in the 2.4MHz demodulator that
aborts message demodulation early if the DF bits don't match a message
type that we know how to decode, or stops early if the DF bits can
only correspond to a short 56-bit message.

Do this in a more general form where we test against a set of valid
DF values, rather than a switch/case. Then populate the sets based on
the current error-correction settings (e.g. if we are allowed to repair
DF damage with 1 bit error correction, then a DF17 message could appear
with any of DF=17, DF=16, DF=19, DF=21, DF=25, or DF=1 and still be
correctable to a valid DF17 message)

In the default case this produces a small CPU improvement as short
messages might be able to stop earlier and a few DF values can be ignored
early. With --no-fix-df it produces a larger improvement as relatively few
DF values are valid in that mode.

To further reduce CPU, the default behaviour has changed to _not_
decode DF24 messages (Comm-D ELM messages). These are rarely seen in
the wild and dump1090 can't do anything useful with them. Disabling
them allows us to further reduce the set of valid DF values as they
effectively use all DF values from 24..31, 25% of all possible values.
To re-enable DF24 decoding, use the new `--enable-df24` option.

Finally, avoid doing some CRC calculations twice. This was only happening
once per valid decoded message, not per demodulation attempt, so it's not
such a large win.
2021-03-19 17:03:15 +08:00
Oliver Jowett 455896e86d Fix broken 32-bit x86 test that broke builds on non-x86 2021-03-17 02:21:18 +08:00
eric1tran 037fe4f37f Remove extra <td> tag 2021-03-15 12:35:12 +00:00
Oliver Jowett c97b83d3ed Maybe fix alignment warnings in arm neon code with recent gcc 2021-03-13 20:24:01 +08:00
Oliver Jowett 462dee56f3 Fix builds on 32-bit x86 2021-03-13 12:49:40 +08:00
Oliver Jowett d3c692f630 5.1~dev for the dev branch 2021-03-13 12:41:21 +08:00
eric1tran f862b530c8 Release 5.0 2021-03-11 13:08:06 +00:00
eric1tran 740d73ac71 Merge branch 'dev' into staging 2021-03-09 21:14:27 +00:00
eric1tran 2a62c514f1 Don't show button to stats page if there's an issue getting the link 2021-03-09 18:47:27 +00:00
eric1tran fe91fbc3a4 Bump css version 2021-03-09 08:30:19 +00:00
eric1tran bd3ec0cbdc Merge branch 'dev' into staging 2021-03-09 05:34:55 +00:00
eric1tran 988489fae1 Fix invalid inline CSS in new SkyAware map 2021-03-09 05:31:32 +00:00
Emilien Klein 63df5a262d
Fix invalid inline CSS (#117) 2021-03-08 23:28:52 -06:00
eric1tran e7f9401722 Fix postinst file 2021-03-08 22:59:09 +00:00
eric1tran f9e252c110 Bannner showing the dump1090-fa link will soon be decpreated 2021-03-08 20:12:29 +00:00
eric1tran e7d39c9abb Enable skyaware module in postinst file 2021-03-08 19:29:41 +00:00
eric1tran 2c47717360 Have separate map url for new merged SkyAware. Set default port 8080 to this map 2021-03-08 18:23:20 +00:00
eric1tran 047c193da6 Hide 1090 labels if dump1090 is not enabled 2021-03-08 15:28:39 +00:00
eric1tran bd43fec71e Bug in last commit 2021-03-08 15:21:37 +00:00
Paul Philippov cb25eb2cb8
Update README.md (#92)
Additionally requires fakeroot on a newly installed Debian.
2021-03-08 16:39:37 +08:00
Oliver Jowett f36a0c6d38 More changelog 2021-03-08 16:37:19 +08:00
VasiliyTurchenko 9c2531a98d
fixed screen (first line) issue when in the interactive mode (#116) 2021-03-08 16:34:56 +08:00
Oliver Jowett db53a09dbf Changelog updates 2021-03-08 16:28:07 +08:00
Oliver Jowett 9c67290562 Fix stray '+' in interactive mode when distance mode isn't enabled 2021-03-08 15:40:11 +08:00
Oliver Jowett 005e3db2ba Fix suggestion for --aggressive replacement 2021-03-08 15:37:42 +08:00
Oliver Jowett 1653ce9ca2 Update json docs for messages_by_df, new interval options. Remove
old references to the internal webserver.
2021-03-08 15:25:31 +08:00
Oliver Jowett a75296ae72 Reduce `make wisdom.local` iterations to match `generate-wisdom` 2021-03-08 15:18:35 +08:00
Oliver Jowett 1c7db21349 Add docs about generating starch wisdom files 2021-03-08 15:06:15 +08:00
Oliver Jowett a135d2b915 Add a --no-fix-df option
Usually, all message candidates are speculatively corrected as if
they were DF11/17/18, even if the DF field has a different value. This
allows correction of messages when there is correctable damage to the
DF field.

However, running every message candidate through a couple of CRC checks
is expensive, CPU-wise, when decoding messages off the air, as there are
a large number of message candidates that are actually just junk data, and
computing CRCs for all of those adds up. The --no-fix-df option allows
disabling this sort of correction. The tradeoff is that messages with
damage to the DF field will not be corrected.
2021-03-08 14:23:35 +08:00
eric1tran 29d6569ee3 Merge branch 'dev' into staging 2021-03-07 05:07:59 +00:00
eric1tran d90426e1ce Bump script cache bust version to 5.0 2021-03-07 04:25:09 +00:00
eric1tran 408a3e617a Bump version to 5 2021-03-05 13:22:02 +00:00
eric1tran a59af7385c Update aircraft db to 20210305 2021-03-05 06:02:35 +00:00
eric1tran 5db6efd62d Ignore messages heard on 1090 when we hear them on 978. We will support multiple datasource display in a later release 2021-03-03 20:15:50 +00:00
eric1tran 77ab9f04ba Hide UAT toggle check box if disabled 2021-02-25 19:06:16 +00:00
eric1tran e8fe48485e Change styling for registration numbers that are used as idents. Hide UAT message rate if UAT is disabled. 2021-02-25 15:42:16 +00:00
eric1tran e23cd7e73b Use /data for 1090 directory to avoid breaking exisiting tools like dump1090exporter that may be looking there 2021-02-25 06:00:43 +00:00
eric1tran 74b1a39aa0 Merge 1090 and UAT aircraft into one map
Squashed commit of the following:

commit ef61cba13698090b85fea3136bc77e320eab3d0d
Author: eric1tran <eric1tran@gmail.com>
Date:   Thu Feb 25 04:39:22 2021 +0000

    Remove unused receiver clock code

commit 809cf656b5a098948fbfc5ce2b5f60f753fb4043
Author: eric1tran <eric1tran@gmail.com>
Date:   Thu Feb 25 04:35:32 2021 +0000

    Avoid calling getDataSource() so many times and cleanup spacing

commit a0000b942bb5aa5f8061db0ca9d405461c6eea07
Author: eric1tran <eric1tran@gmail.com>
Date:   Thu Feb 25 04:19:11 2021 +0000

    Copy paste bug

commit ccc3cd3964bddcd86e8faf45c06e577309cffb02
Author: eric1tran <eric1tran@gmail.com>
Date:   Thu Feb 25 04:17:14 2021 +0000

    Filter UAT logic

commit 34dc860a16e1c57cdc3563ec31c45f9b1b133d4c
Author: eric1tran <eric1tran@gmail.com>
Date:   Thu Feb 25 03:24:56 2021 +0000

    Reorder message rate text

commit 25db80799a2a6dc8e33835cb2ed43c305c87a4d8
Author: eric1tran <eric1tran@gmail.com>
Date:   Thu Feb 25 00:56:43 2021 +0000

    Track 1090 and 978 message rate separately

commit a2031d13e4a447ad0f8de61eada75f0da019d1c2
Author: eric1tran <eric1tran@gmail.com>
Date:   Thu Feb 25 00:27:25 2021 +0000

    UAT classification logic

commit 5482274016eecfbc27f2b5de6779c032803ca177
Author: eric1tran <eric1tran@gmail.com>
Date:   Wed Feb 24 23:13:39 2021 +0000

    Spacing

commit 2fc4408e6437ec5e0db2329d46a68fc6538abc45
Author: eric1tran <eric1tran@gmail.com>
Date:   Wed Feb 24 22:57:05 2021 +0000

    Load UAT history.json files if UAT is enabled

commit 9ccf4eba7590b1f38c78aeb73209b48cb8e0c34f
Author: eric1tran <eric1tran@gmail.com>
Date:   Wed Feb 24 22:24:23 2021 +0000

    ajax calls to fetch UAT aircraft json if enabled

commit d8f0c1c042bdba8ae1348a513df7dcca6ebc23fc
Author: eric1tran <eric1tran@gmail.com>
Date:   Wed Feb 24 21:29:01 2021 +0000

    Read skyaware978 config files on initialization

commit 0245fa7449e92555b7631ab0365e43fb38e1c221
Author: eric1tran <eric1tran@gmail.com>
Date:   Wed Feb 24 20:15:09 2021 +0000

    Change SkyAware url to /skyaware to genericize it for dual mode

commit 9384364b2473f8c73d3f165d7f5192c1995457a5
Author: eric1tran <eric1tran@gmail.com>
Date:   Wed Feb 24 19:46:06 2021 +0000

    Add UAT toggle and description (non-functional)

commit 9b65a55c0ceb7c3da3b3515d26f0d5d42192f658
Author: eric1tran <eric1tran@gmail.com>
Date:   Wed Feb 24 19:32:54 2021 +0000

    Removed unused css
2021-02-25 05:43:10 +00:00
eric1tran 9f07a81dfa Bump faup1090 version to 8E 2021-02-24 19:21:26 +00:00
eric1tran ff7aafe0bb Aircraft label styling 2021-02-24 16:34:57 +00:00
eric1tran c23438a5cf Adjust aircraft label outline width 2021-02-22 22:13:59 +00:00
eric1tran b84f427732 Remove unused class var 2021-02-22 21:59:36 +00:00
eric1tran 3773acf4c0 Null check before setting aircraft icon style 2021-02-22 21:57:32 +00:00
eric1tran e111303b1e Implement toggle checkbox to show/hide aircraft labels 2021-02-22 17:37:00 +00:00
eric1tran 45e13b20ba Add aircraft labels on icons and a non-functional checkbox to toggle the labels 2021-02-22 17:02:20 +00:00