flightaware / dump978 Goto Github PK
View Code? Open in Web Editor NEWThis project forked from mutability/dump978
FlightAware's 978MHz UAT demodulator
License: BSD 2-Clause "Simplified" License
This project forked from mutability/dump978
FlightAware's 978MHz UAT demodulator
License: BSD 2-Clause "Simplified" License
Environment notes:
GCC Version: 12.2.0
Linux Kernel: 6.0.0-1-MANJARO
GNU Make 4.3
When running make
, I run into compiler errors regarding the lookup_phase_
, lookup_magsq_
, and lookup_atan_
fields.
Output:
g++ -std=c++11 -Wall -Wno-psabi -Werror -O2 -g -Ilibs -DVERSION=\"6782809\" -c -o dump978_main.o dump978_main.cc
g++ -std=c++11 -Wall -Wno-psabi -Werror -O2 -g -Ilibs -DVERSION=\"6782809\" -c -o socket_output.o socket_output.cc
g++ -std=c++11 -Wall -Wno-psabi -Werror -O2 -g -Ilibs -DVERSION=\"6782809\" -c -o message_dispatch.o message_dispatch.cc
g++ -std=c++11 -Wall -Wno-psabi -Werror -O2 -g -Ilibs -DVERSION=\"6782809\" -c -o fec.o fec.cc
cc -Wall -Werror -O2 -g -Ilibs -DVERSION=\"6782809\" -c -o libs/fec/init_rs_char.o libs/fec/init_rs_char.c
cc -Wall -Werror -O2 -g -Ilibs -DVERSION=\"6782809\" -c -o libs/fec/decode_rs_char.o libs/fec/decode_rs_char.c
g++ -std=c++11 -Wall -Wno-psabi -Werror -O2 -g -Ilibs -DVERSION=\"6782809\" -c -o sample_source.o sample_source.cc
g++ -std=c++11 -Wall -Wno-psabi -Werror -O2 -g -Ilibs -DVERSION=\"6782809\" -c -o soapy_source.o soapy_source.cc
g++ -std=c++11 -Wall -Wno-psabi -Werror -O2 -g -Ilibs -DVERSION=\"6782809\" -c -o convert.o convert.cc
In file included from convert.cc:5:
convert.h:82:42: error: field ‘lookup_phase_’ has incomplete type ‘std::array<short unsigned int, 65536>’
82 | std::array<std::uint16_t, 65536> lookup_phase_;
| ^~~~~~~~~~~~~
In file included from /usr/include/c++/12.2.0/bits/unique_ptr.h:36,
from /usr/include/c++/12.2.0/memory:76,
from convert.h:10:
/usr/include/c++/12.2.0/tuple:1595:45: note: declaration of ‘struct std::array<short unsigned int, 65536>’
1595 | template<typename _Tp, size_t _Nm> struct array;
| ^~~~~
convert.h:83:35: error: field ‘lookup_magsq_’ has incomplete type ‘std::array<double, 65536>’
83 | std::array<double, 65536> lookup_magsq_;
| ^~~~~~~~~~~~~
/usr/include/c++/12.2.0/tuple:1595:45: note: declaration of ‘struct std::array<double, 65536>’
1595 | template<typename _Tp, size_t _Nm> struct array;
| ^~~~~
convert.h:99:42: error: field ‘lookup_phase_’ has incomplete type ‘std::array<short unsigned int, 65536>’
99 | std::array<std::uint16_t, 65536> lookup_phase_;
| ^~~~~~~~~~~~~
/usr/include/c++/12.2.0/tuple:1595:45: note: declaration of ‘struct std::array<short unsigned int, 65536>’
1595 | template<typename _Tp, size_t _Nm> struct array;
| ^~~~~
convert.h:100:35: error: field ‘lookup_magsq_’ has incomplete type ‘std::array<double, 65536>’
100 | std::array<double, 65536> lookup_magsq_;
| ^~~~~~~~~~~~~
/usr/include/c++/12.2.0/tuple:1595:45: note: declaration of ‘struct std::array<double, 65536>’
1595 | template<typename _Tp, size_t _Nm> struct array;
| ^~~~~
convert.h:112:42: error: field ‘lookup_atan_’ has incomplete type ‘std::array<short unsigned int, 65536>’
112 | std::array<std::uint16_t, 65536> lookup_atan_;
| ^~~~~~~~~~~~
/usr/include/c++/12.2.0/tuple:1595:45: note: declaration of ‘struct std::array<short unsigned int, 65536>’
1595 | template<typename _Tp, size_t _Nm> struct array;
| ^~~~~
make: *** [<builtin>: convert.o] Error 1
Right now, it's not possible to compile it for bookworm. Any hints on how to move this forward? Thanks.
$sudo systemctl status dump978-fa
● dump978-fa.service - dump978 ADS-B UAT receiver
Loaded: loaded (/lib/systemd/system/dump978-fa.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: core-dump) since Fri 2022-08-12 17:11:36 EDT; 5s ago
Docs: https://flightaware.com/adsb/piaware/
Process: 5166 ExecStart=/usr/share/dump978-fa/start-dump978-fa (code=dumped, signal=SEGV)
Main PID: 5166 (code=dumped, signal=SEGV)
$ dump978-fa --version
dump978-fa 7.2
$ cat dump978-fa
# dump978-fa configuration
# This is sourced by /usr/share/dump978-fa/start-dump978-fa as a
# shellscript fragment.
# If you are using a PiAware sdcard image, this config file is regenerated
# on boot based on the contents of piaware-config.txt; any changes made to this
# file will be lost.
# dump978-fa won't automatically start unless ENABLED=yes
ENABLED=yes
RECEIVER_OPTIONS="--sdr driver=rtlsdr --format CS8"
DECODER_OPTIONS=""
NET_OPTIONS="--raw-port 30978 --json-port 30979"
$ sudo dump978-fa --sdr driver=rtlsdr --format CS8 --raw-port 30978 --json-port 30979
raw-port: listening for connections on 0.0.0.0:30978
raw-port: listening for connections on [::]:30978
json-port: listening for connections on 0.0.0.0:30979
json-port: listening for connections on [::]:30979
Found Elonics E4000 tuner
Found Elonics E4000 tuner
Segmentation fault
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
dump978-fa is compiled from GitHub source (without error). The same computer/SDR stick works fine with dump1090-fa without problems.
Additional debugging, SegFault happens at soapy_source.cc
line 166 when setting the Sample Rate to 2083333.0
device_->setSampleRate(SOAPY_SDR_RX, 0, 2083333.0);
However, rtl_test was able to set sample rate at 2083333.0...
$ sudo rtl_test -s 2083333.0
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN:
Using device 0: Generic RTL2832U OEM
Found Elonics E4000 tuner
Supported gain values (14): -1.0 1.5 4.0 6.5 9.0 11.5 14.0 16.5 19.0 21.5 24.0 29.0 34.0 42.0
Exact sample rate is: 2083333.135571 Hz
Sampling at 2083333 S/s.
Info: This tool will continuously read from the device, and report if
samples get lost. If you observe no further output, everything is fine.
Reading samples in async mode...
GCC 12 (used in the upcoming Fedora 36) changes a few header dependencies, see https://gcc.gnu.org/gcc-12/porting_to.html#cxx for details. Any use of std::array
now needs to #include <array>
to compile.
This seems to be enough to make it compile, but I did not go through the code in detail to see if there's a more optimized solution.
diff -uNr a/dump978-7.2/convert.h b/dump978-7.2/convert.h
--- a/dump978-7.2/convert.h 2022-03-10 03:55:16.000000000 +0100
+++ b/dump978-7.2/convert.h 2022-05-09 21:48:52.027753121 +0200
@@ -8,6 +8,7 @@
#define DUMP978_CONVERT_H
#include <memory>
+#include <array>
#include "common.h"
diff -uNr a/dump978-7.2/stratux_serial.h b/dump978-7.2/stratux_serial.h
--- a/dump978-7.2/stratux_serial.h 2022-03-10 03:55:16.000000000 +0100
+++ b/dump978-7.2/stratux_serial.h 2022-05-09 21:50:10.231208525 +0200
@@ -11,6 +11,7 @@
#include <fstream>
#include <functional>
#include <memory>
+#include <array>
#include <boost/asio/io_service.hpp>
#include <boost/asio/posix/stream_descriptor.hpp>
diff -uNr a/dump978-7.2/track.h b/dump978-7.2/track.h
--- a/dump978-7.2/track.h 2022-03-10 03:55:16.000000000 +0100
+++ b/dump978-7.2/track.h 2022-05-09 21:52:30.723026651 +0200
@@ -10,6 +10,7 @@
#include <chrono>
#include <memory>
#include <numeric>
+#include <array>
#include <boost/asio/io_service.hpp>
#include <boost/asio/steady_timer.hpp>
diff -uNr a/dump978-7.2/uat_message.cc b/dump978-7.2/uat_message.cc
--- a/dump978-7.2/uat_message.cc 2022-03-10 03:55:16.000000000 +0100
+++ b/dump978-7.2/uat_message.cc 2022-05-09 21:53:23.683335049 +0200
@@ -8,6 +8,7 @@
#include <iomanip>
#include <iostream>
#include <sstream>
+#include <array>
#include <boost/io/ios_state.hpp>
In areas with low UAT traffic, the data stream dump978 (raw) -> uat2esnt -> readsb
will disconnect when there's no traffic after a while. This is causing a lot of connects / disconnects that are visible in the logs.
Would it be possible to add a heartbeat option that keeps the data connection open? Ideally, this would be exposed through a command line option like --net-heartbeat <secs>
, where the heartbeat is off if this is not included on the command line.
Tnx!
In skyaware for dump978, the Github link in the sidebar points to the dump1090 repository instead of the dump978 repository.
convert.cc: In static member function ‘static flightaware::uat::SampleConverter::Pointer flightaware::uat::SampleConverter::Create(flightaware::uat::SampleFormat)’:
convert.cc:45:20: error: ‘runtime_error’ is not a member of ‘std’
45 | throw std::runtime_error("format not implemented yet");
| ^~~~~~~~~~~~~
convert.cc:44:5: error: control reaches end of non-void function [-Werror=return-type]
44 | default:
| ^~~~~~~
adding #include <stdexcept>
seems to fix it.
Greetings, friends. I was able to get dump1090-fa and piaware and all of the goodies set up and working on my Ubuntu 20.04 machine, but dump978 is giving me a hassle. I have a feeling it has something to do with soapy, because at some point I probably installed soapy while playing with another SDR. The problem is, I can't find the exact problem. I appreciate your patience with someone who is newish to coding. Thank you!
uname -a
Linux hamdell 5.8.0-48-generic #54~20.04.1-Ubuntu SMP Sat Mar 20 13:40:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
sfixphdi@hamdell:$ sudo systemctl start dump978-fa$ sudo systemctl status dump978-fa
sfixphdi@hamdell:
● dump978-fa.service - dump978 ADS-B UAT receiver
Loaded: loaded (/lib/systemd/system/dump978-fa.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: core-dump) since Tue 2021-03-30 18:46:05 PDT; 5s ago
Docs: https://flightaware.com/adsb/piaware/
Process: 5703 ExecStart=/usr/share/dump978-fa/start-dump978-fa (code=dumped, signal=SEGV)
Main PID: 5703 (code=dumped, signal=SEGV)
From /var/log/syslog:
Mar 30 18:46:35 hamdell systemd[1]: dump978-fa.service: Scheduled restart job, restart counter is at 24.
Mar 30 18:46:35 hamdell systemd[1]: Stopped dump978 ADS-B UAT receiver.
Mar 30 18:46:35 hamdell systemd[1]: Started dump978 ADS-B UAT receiver.
Mar 30 18:46:35 hamdell dump978-fa[5786]: raw-port: listening for connections on 0.0.0.0:30978
Mar 30 18:46:35 hamdell dump978-fa[5786]: raw-port: listening for connections on [::]:30978
Mar 30 18:46:35 hamdell dump978-fa[5786]: json-port: listening for connections on 0.0.0.0:30979
Mar 30 18:46:35 hamdell dump978-fa[5786]: json-port: listening for connections on [::]:30979
Mar 30 18:46:35 hamdell dump978-fa[5786]: usb_claim_interface error -6
Mar 30 18:46:36 hamdell dump978-fa[5786]: Found Rafael Micro R820T tuner
Mar 30 18:46:36 hamdell dump978-fa[5786]: Detached kernel driver
Mar 30 18:46:36 hamdell dump978-fa[5786]: Found Rafael Micro R820T tuner
Mar 30 18:46:37 hamdell dump978-fa[5786]: Reattached kernel driver
Mar 30 18:46:37 hamdell dump978-fa[5786]: Detached kernel driver
Mar 30 18:46:37 hamdell dump978-fa[5786]: Found Rafael Micro R820T tuner
Mar 30 18:46:37 hamdell dump978-fa[5786]: Reattached kernel driver
Mar 30 18:46:37 hamdell dump978-fa[5786]: Detached kernel driver
Mar 30 18:46:37 hamdell dump978-fa[5786]: Found Rafael Micro R820T tuner
Mar 30 18:46:38 hamdell dump978-fa[5786]: Reattached kernel driver
Mar 30 18:46:38 hamdell dump978-fa[5786]: Detached kernel driver
Mar 30 18:46:38 hamdell dump978-fa[5786]: Found Rafael Micro R820T tuner
Mar 30 18:46:38 hamdell dump978-fa[5786]: Reattached kernel driver
Mar 30 18:46:38 hamdell dump978-fa[5786]: Detached kernel driver
Mar 30 18:46:39 hamdell dump978-fa[5786]: Found Rafael Micro R820T tuner
Mar 30 18:46:39 hamdell dump978-fa[5786]: Reattached kernel driver
Mar 30 18:46:39 hamdell dump978-fa[5786]: Found Rafael Micro R820T tuner
Mar 30 18:46:39 hamdell kernel: [ 829.175093] dump978-fa[5786]: segfault at 1 ip 00007f3c92862891 sp 00007ffdea9e8080 error 4 in libSoapySDR.so.0.7.2[7f3c92857000+38000]
Mar 30 18:46:39 hamdell systemd[1]: dump978-fa.service: Main process exited, code=dumped, status=11/SEGV
Mar 30 18:46:39 hamdell systemd[1]: dump978-fa.service: Failed with result 'core-dump'.
Thank you very much for your assistance!
Run:
./dump978-fa --sdr driver=rtlsdr
./skyaware978 --connect localhost:80 --json-dir test
And then? What should be done? I see absolutely nothing. Be more precise!!
Similar to the one that dump1090 outputs?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.