tleconte / acarsdec Goto Github PK
View Code? Open in Web Editor NEWACARS SDR decoder
ACARS SDR decoder
Two problems here:
2.4 MS/s
(USB 2.0) # ./acarsdec -v -o 2 -p 1 -r 0 131.525 131.550 131.725 131.850 136.750 136.900
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001
Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Tuner gain : 49.600000
Frequencies too far apart
Set center freq. to -1Hz
[R82XX] PLL not locked!
Exact sample rate is: 2500000.107620 Hz
[R82XX] PLL not locked!
Decoding 6 channels
Would it be possible for acarserv to use mysql backend instead of sqlite?
Thanks
Hello,
I just installed the current version of acarsdec from this repository, and can't find a way to make it work.
Actually, regardless what parameters I choose, the program only returns the help menu.
I am using an RTL-SDR Antenna with needed libraries installed, on Debian 10 Buster (x64 intel).
Can you help me on this ? Thanks a lot
Here's what is happening:
(base) mathis@debian:~/Linux-version$ acarsdec -o1 -v -p -22 -g 400 -r 0 131.725
Acarsdec/acarsserv 3.5 Copyright (c) 2017 Thierry Leconte
(libacars 2.0.0)
Usage: acarsdec [-v] [-o lv] [-t time] [-A] [-n ipaddr:port] [-l logfile [-H|-D]]
-v : verbose
-A : don't display uplink messages (ie : only aircraft messages)
-o lv : output format : 0 : no log, 1 : one line by msg, 2 : full (default) , 3 : monitor , 4 : msg JSON, 5 : route JSON
-t time : set forget time (TTL) in seconds for monitor mode (default=600s)
-l logfile : append log messages to logfile (Default : stdout).
-H : rotate log file once every hour
-D : rotate log file once every day
-n ipaddr:port : send acars messages to addr:port on UDP in planeplotter compatible format
-N ipaddr:port : send acars messages to addr:port on UDP in acarsdec native format
-j ipaddr:port : send acars messages to addr:port on UDP in acarsdec json format
-i stationid : station id used in acarsdec network format.
-b filter : filter output by label (ex: -b "H1:Q0" : only output messages with label H1 or Q0)
Up to 8 channels may be simultaneously decoded
Hi. This might be a feature request if currently is not supported.
I'm using a remote RPI3 and I'd like to be able to receive the input from rtl_tcp or from GQRX UDP raw audio stream. Can acarsdec receive the input from rtl_tcp of from GQRX ?
Thanks in advance!
Not really an issue per se, but, is there a setting or way to change the speed at which the messages scroll by?
I've got at least 4 frequencies that are very active during the day, some messages contain text that I can readily understand but, because they scroll by fast, it makes it hard to read.
I can stretch the window to buy time, but again, messages during the day come by at a fast rate.
An adjustable delay, would help.
Just came here from the sourceforge page and it says works with alsa sound cards. Is this still the case or has that functionality been removed?
Looking to see if I can use my vhf radio to pull in ACARS messages without an SDR.
The 'sdrplay ' link in the following line of the readme under Features:
input via rtl_sdr, or airspy or sdrplay software defined radios (SDR)
is dead/wrong.
Cheers,
Dick
I have been running your excellent decoder for a while now and have run in to an issue where the json network output appears to cut off part of the message and never sends all of data. The best that I can tell, any json message of more than 1400 characters will do this.
After testing, I believe I have narrowed the issue down to this line of code, where the buffer that is wrote to the network socket is 1400, while the rest of the output.c appears to use 3600 characters. When I compile the decoder with:
void outjson()
{
char pkt[3600];
snprintf(pkt, sizeof(pkt), "%s\n", jsonbuf);
write(sockfd, pkt, strlen(pkt));
}
To match the convention used elsewhere in the file everything in my testing appears to work and messages are not cut off.
On my Raspberry (Raspberry Pi OS buster both armhf and arm64) acarsdec was not able to receive messages. No error was shown. Now I found the problem: the compile options.
add_compile_options(-O2)
does not work! It works after changing to add_compile_options(-Ofast -march=native )
.
After the program is compiled and installed, run “acarsdec -o 2 -a plughw:1,0”.Then terminal display "Alsa cannot get number of channels",I don't know where the problem is.
Having issues compiling on macOS Mojave.
The libraries appear to be installed in /usr/local/include/libacars. How do I tell the compiler to look there?
$ cmake -Drtl=ON ..
-- The C compiler identification is AppleClang 10.0.1.10010046
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Using libacars
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/steven/Downloads/acarsdec/build
macmini:build steven$ make
Scanning dependencies of target acarsdec
[ 12%] Building C object CMakeFiles/acarsdec.dir/acars.c.o
[ 25%] Building C object CMakeFiles/acarsdec.dir/acarsdec.c.o
/Users/steven/Downloads/acarsdec/acarsdec.c:28:10: fatal error:
'libacars/version.h' file not found
#include <libacars/version.h>
^~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/acarsdec.dir/acarsdec.c.o] Error 1
make[1]: *** [CMakeFiles/acarsdec.dir/all] Error 2
make: *** [all] Error 2
Lines 5 to 6 in d11c586
Currently the makefiles support only in-source builds. It would be nice to get out-of-source build support like
$ mkdir build
$ cd build
$ make -f ../Makefile.rtl
BIG EDIT
Oops.
Sorry, my mistake.
Stuart
Tried latest version (from git) using latest version of libairspy, no success.
pi@raspberrypi:~/acarsdec/build $ airspy_info
airspy_lib_version: 1.0.9
Found AirSpy board 1
Board ID Number: 0 (AIRSPY)
Firmware Version: AirSpy MINI v1.0.0-rc9-0-ga56adfd 2016-06-12
Part ID Number: 0x6906002B 0x00000030
Serial Number: 0x04A464C83488940B
Supported sample rates:
6.000000 MSPS
3.000000 MSPS
Close board 1
pi@raspberrypi:~/acarsdec/build $ ./acarsdec -v -s 131.523
did not find needed sampling rate
Unable to init input
Line 289 in d11c586
from Open Group Base Specifications Issue 6:
The memset() function is preferred over this function.
For maximum portability, it is recommended to replace the function call to bzero() as follows:
#define bzero(b,len) (memset((b), '\0', (len)), (void) 0)
Moving the discussion here from 058eb01#diff-3bf2ef42cf6b8f3ece930bed9bcb1f99
As an experiment, I increased my RTLMULT to 204 so I could get 2.56Ms/s and will see if this has an effect on my reception quality. I'm only using 30% of 1 core on a Pi3.
Hello Thierry,
First let me thank you for this great piece of software. It does an amazing job indeed.
I would like to request you to please document the exact algorithm you have implemented to correct errors. I have figured out most of it but the syndrome part still throws me off as I am not super good with CRC maths.
My final goal is to improve the algorithm to ensure the corrected messages are well formed e.g. the aircraft reg. number doesn't contain oddball characters. Ideally I'd appreciate a callback function inserted into the error correction code which I could then modify. I'd also need to ensure the algorithm actually completes. :-)
Since the RTL-SDR cannot fetch more than 2 MHz bandwidth, the frequencies provided in the list may not be separated by more than this. However, the binary happily accepts anything, and continues execution with unknown consequences.
I propose to implement a stop for this.
Similar to #48, I'd like a method to stream samples in over the network. SoapySDR has an rtl_tcp driver as well as drivers for many other devices. My use case is sharing a dongle between programs which are using frequencies in a single 2 MHz band. I have already gotten this working with rtl_tcp and rtlmuxer (https://github.com/rpatel3001/docker-rtlmuxer) feeding both rtlsdr-airband and dumpvdl2, I'd like to add acarsdec to the mix as well.
While decoding from the RTL-SDR, the first 10 messages are read reliably. After this point, I see more and more "too many parity errors" until eventually all messages are parity errors. Restarting acarsdec fixes the issue for another ~10 messages. This issue does not seem to exist in the 3.2 version. I have not been able to find the issue in the source.
Jan & Thierry,
For an interesting amount of time I`ve been studying both of your implementations
in order to learn ACARS and the ACARS decoding. While not yet close to the developments
you both achieved with your softwares, these project of mine has been an interesting
knowledge-gaining ride. Thank you both for making your code public and acessible.
In the following link you will find yet another ACARS decoder, now in rust:
https://github.com/manoeldesouza/acarsrx
Also did a basic one sometime ago in GO - Just for the func:
https://github.com/manoeldesouza/acarsGO
And some attempt in C:
https://github.com/manoeldesouza/rtl_acars
Placing the -D parameter between the -r parameter and the frequency list causes a warning.
Moving it to just before the -r parameter sloves this.
Not sure how 'specific' the position of this -D parameter (or others) is.
See these two examples:
Found Rafael Micro R820T tuner
WARNING: Invalid frequency 0
Exact sample rate is: 2000000.052982 Hz
Found Rafael Micro R820T tuner
Exact sample rate is: 2000000.052982 Hz
But maybe the example in the README is the required sequence of parameters.
acarsdec [-v] [-o lv] [-t time] [-A] [-n|N|j ipaddr:port] [-i stationid] [-l logfile [-H|-D]] -r rtldevicenumber f1 [f2] [... fN] | -s f1 [f2] [... fN]
Cheers,
Dick
Line 73 in d11c586
Hi! I need to parse a wav file after long time recording. But the -f doesn't work anytime.
This line will produce messeges:
acarsdec -v -o 4 -g 500 -i TJ-MCI1-ACARS -j feed.acars.io:5550 -r 111 130.025
This line will NOT produce messages:
acarsdec -v -o 4 -g 500 -i TJ-MCI1-ACARS -j feed.acars.io:5550 -r 111 130.025 130.450 130.825 131.125 131.425 131.550 131.725 131.850
n.b. 130.025 is included in both commands.
pi@acars:~ $ cat ./acars.sh
acarsdec -v -o 4 -g 500 -i TJ-MCI1-ACARS -j feed.acars.io:5550 -r 111 130.025 130.450 130.825 131.125 131.425 131.550 131.725 131.850
pi@acars:~ $ ./acars.sh
Found 2 device(s):
0: Realtek, RTL2838UHIDIR, SN: 222
1: Realtek, RTL2838UHIDIR, SN: 111
Using device 1: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Tuner gain : 49.600000
Set center freq. to 131000000Hz
Exact sample rate is: 2000000.052982 Hz
Decoding 8 channels
Allocating 4 zero-copy buffers
No messages after 12 hours
pi@acars:~ $ acarsdec -v -o 4 -g 500 -i TJ-MCI1-ACARS -j feed.acars.io:5550 -r 111 130.025
Found 2 device(s):
0: Realtek, RTL2838UHIDIR, SN: 222
1: Realtek, RTL2838UHIDIR, SN: 111
Using device 1: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Tuner gain : 49.600000
Set center freq. to 130050000Hz
Exact sample rate is: 2000000.052982 Hz
Decoding 1 channels
Allocating 4 zero-copy buffers
Produces a dozen messages over a few hours.
After seemingly receiving a message, instead of having any messages decoded instead seems to show several errors following a format of #(number here) too many parity errors. I had just installed today and I was somewhat successful until now, I haven't done anything different however.
I notice that, after a while, the program stops working. I’m using VNC viewer mainly, to connect to the RPi, but this also happens with PuTTy.
On VNC, after the program stops working, I can relaunch it, I don’t even have to log in to the RPi, it just starts running right away.
Program stops working after long unattended period, meaning, I’m not hovering my cursor over the open terminal window or interacting with it.
When the -l logfile parameter is used then
-n ipaddr:port
as well as
-j ipaddr:port
seem to fail sending data.
This does not result in data to Planeplotter:
/usr/local/bin/acarsdec -l "/home/pi/acarsdec/logs/$(date +"%Y%m%d")-5.log" -n 10.0.0.2:9742 -p 70 -D -r 00000005 131.525 131.725 131.825
This works fine:
/usr/local/bin/acarsdec -n 10.0.0.2:9742 -p 70 -D -r 00000005 131.525 131.725 131.825
Cheers,
Dick
I pulled the latest version.
Did a make -f Makefile.rtl which compiled error free.
Did a make -f Makefile.sdrplay which failed with an error.
Did a make -f Makefile.sdrplay clean
Did a make -f Makefile.sdrplay whcih now compiled erro free.
Not sure how to indicate that I want to run it using my RSP1.
The Usage section mentions:
for the SDRplay device -s f1 [f2] ... [fN] :
(whihc is the same as for the AIRspy.
But
./acarsdec -s 131.525 131.725 131.825
results in the help text being displayed..
The -s option is not mentioned in the help text the program produces.
What am I doing wrong?
Cheers,
Dick
Hi Thierry,
The current -j UDP output generates JSON output of the basic acars messages as well as the additional 'acarsdec' decoded data of departure and destination - JSON "depa" and "dsta".
With the adiition of libacars would it be possible to include the additional 'libacars' decoded data in the UDP output; maybe a 'libacars' JSON field with the data.
Stuart
While the ACARS messages may not all continue possition information, would it be possible to export at least those that do into dump1090 via the BEAST binary format?
Since I do not have your email address, I'll address you this way. In order to add the SDRplay device for functioning with your excellent acarsdec software, I rewrote (and reorganized) large parts of your software and rewrote it in C++. It is still incomplete, it works fine though with the SDRplay device(s) (and with Airspy and rtlsdr).
The major structural change is that I separated the device handling, so I could use the device handlers I had for other projects. I retained the possibility of having more input frequencies by defining a channel handler for each frequency. The channel handler will do the frequency shifting and will call upon a channel decoder which was basically the functionality of msk.c. In the channel decoder I added the data interpretation (from acars.c) and I made a very simple spooler for the print function (which is basically your output.c file).
Those parts that are directly derived from acarsdec are obviously marked with your copyrights.
You can have a look at the software at "https://github.com/JvanKatwijk/acars-sdrplay
Hi
I am interested in using 2 instances of acarsdec with two different rtl dongles. Reason being that the dongles have a bandwidth of 2.4MHz which is too narrow to cover both 131 and 136MHz acars channels.
What should be the best method? Call the program twice with different parameters and run in background?
Second question: Is it possible to have a web preview?
Third question: Can the logs be written realtime to a csv? I would love to show them on my custom webpage and possibly link them to the basestation.sqb from VRS like they did with acarsdeco2.
Kind regards
Hello there, Thierry!
First of all, thank you VERY much for acarsdec!
I am trying to use the acarsdec
output and parse it with python module json.tool
. However, it is not accepted at all: It always fail with a formatting complaint.
Let the snippet that you have provided in readme.md:
{"timestamp":1516206744.1849549,"channel":2,"freq":130.025,"level":-22,"error":0,"mode":"2","label":"H1","block_id":"6","ack":false,"tail":".N842UA","flight":"UA1412","msgno":"D04G","text":"#DFB9102,0043,188/9S101,0039,181/S0101,0043,188/0S100,0039,182/T1100,0043,188/1T099,0039,182/T2099,0043,189/2T098,0039,182/T3098,0043,189/3T097,0039,182/T4098,0043,189/4T097,0039,183/T5098,0043,189/5T097,0039,1","end":true,"station_id":"sigint"}
{"timestamp":1516206745.249615,"channel":2,"freq":130.025,"level":-24,"error":2,"mode":"2","label":"RA","block_id":"R","ack":false,"tail":".N842UA","flight":"","msgno":"","text":"QUHDQWDUA?1HOWGOZIT\r\n ** PART 01 OF 01 **\r\nHOWGOZIT 1412-17 SJC\r\nCI: 17 RLS: 01 \r\nSJC 1615/1625 171A\r\nBMRNG 1630 37 159-\r\nTIPRE 1638 37 145\r\nINSLO 1701 37 125\r\nGAROT 1726 37 106\r\nEKR 1800 ","end":true,"station_id":"sigint"}
{"timestamp":1516206747.0520389,"channel":2,"freq":130.025,"level":-24,"error":0,"mode":"2","label":"H1","block_id":"6","ack":"R","tail":".N842UA","flight":"UA1412","msgno":"D04G","text":"#DFB9102,0043,188/9S101,0039,181/S0101,0043,188/0S100,0039,182/T1100,0043,188/1T099,0039,182/T2099,0043,189/2T098,0039,182/T3098,0043,189/3T097,0039,182/T4098,0043,189/4T097,0039,183/T5098,0043,189/5T097,0039,1","end":true,"station_id":"sigint"}
{"timestamp":1516206752.622808,"channel":2,"freq":130.025,"level":-23,"error":0,"mode":"2","label":"RA","block_id":"S","ack":"6","tail":".N842UA","flight":"","msgno":"","text":"37 80\r\nDEN 1829/1837 67\r\n--SCHEDULED ARRIVAL--\r\n 1842/1850 (00.13E)\r\n** END OF PART 01 **\r\n","station_id":"sigint"}
And then saving it to a file and trying to parse it using json.tool
:
[root@radar acars]# python -mjson.tool tleconte.json
Extra data: line 2 column 1 - line 5 column 1 (char 436 - 1636)
Now, some data that I have saved here:
{"timestamp":1534695523.8791251,"channel":0,"freq":131.550,"level":-18,"error":0,"mode":"2","label":"RA","block_id":"L","ack":false,"tail":"PR-YRF","flight":"","msgno":"","text":"QUASRV1AD~1RA-1\r\nSA 19/16:00 RTD \r\nMETAR SBGR 191600Z 32003KT 9999 FEW030 24/14 Q1023=\r\nSA 19/16:00 \r\nSBRP 191600Z VRB03KT 9999 BKN035 28/09 Q1021=\r\nSA 19/16:00 \r\nSBKP 191600Z 35007KT 300V020 9999 SCT040 25/10 Q1","end":true,"station_id":"radar.vl"}
{"timestamp":1534695528.8761849,"channel":0,"freq":131.550,"level":-18,"error":0,"mode":"2","label":"RA","block_id":"M","ack":false,"tail":"PR-YRF","flight":"","msgno":"","text":"022=\r\n","station_id":"radar.vl"}
{"timestamp":1534696425.332144,"channel":0,"freq":131.550,"level":-18,"error":0,"mode":"2","label":"RA","block_id":"A","ack":false,"tail":"PR-ONC","flight":"","msgno":"","text":"QUSAOASO6~1LOADSHEET FINAL 1333 EDNO1\r\nO66020/19 19AUG18\r\nCGH SDU PR-ONC 2/4\r\nZFW 48707 MAX 54500 \r\nTOF 5300\r\nTOW 54007 MAX 64800 \r\nTIF 1816\r\nLAW 52191 MAX 57500 L\r\nUNDLD 5309\r\nPAX/105 TTL 106\r\nMACZFW 24.3\r\n","end":true,"station_id":"radar.vl"}
{"timestamp":1534696430.32501,"channel":0,"freq":131.550,"level":-17,"error":0,"mode":"2","label":"RA","block_id":"B","ack":false,"tail":"PR-ONC","flight":"","msgno":"","text":"MACTOW 24.1\r\nMACLAW 24.9\r\nSTAB:STANDARD 1.6 UP\r\nA105 \r\nSEATROW TRIM\r\nSI A318\r\nDOW 40260\r\nSERRA 679142\r\nPAX WEIGHTS USED A80 C40 I10\r\nPREPARED BY MEIRELES DUARTE/MICHAEL 55 \r\n11 990180136\r\nNOTOC: NO\r\nFUEL IN","end":true,"station_id":"radar.vl"}
{"timestamp":1534696435.322489,"channel":0,"freq":131.550,"level":-17,"error":0,"mode":"2","label":"RA","block_id":"C","ack":false,"tail":"PR-ONC","flight":"","msgno":"","text":" TANKS 5500\r\nLOAD IN CPTS 0/0 1/0 4/157 5/0 \r\nISSUANCE DATE AND TIME: 19AUG 16:33 UTC\r\nDOV LEANDRO 130026\r\n","station_id":"radar.vl"}
acarsdec
CLI parameters:
./acarsdec -r 1 131.550 -o 4
Results:
[root@radar acars]# python -mjson.tool ra.txt
Extra data: line 2 column 1 - line 6 column 1 (char 449 - 1900)
Expected results. See the snippet:
Obtaining a Raw json content:
[rfreire@tambot qpackage-1.0]$ curl -s --insecure https://api.iextrading.com/1.0/stock/AAPL/quote
{"symbol":"AAPL","companyName":"Apple Inc.","primaryExchange":"Nasdaq Global Select","sector":"Technology","calculationPrice":"close","open":213.47,"openTime":1534512600588,"close":217.58,"closeTime":1534536000445,"high":217.95,"low":213.16,"latestPrice":217.58,"latestSource":"Close","latestTime":"August 17, 2018","latestUpdate":1534536000445,"latestVolume":34998882,"iexRealtimePrice":null,"iexRealtimeSize":null,"iexLastUpdated":null,"delayedPrice":217.58,"delayedPriceTime":1534536000445,"extendedPrice":217.55,"extendedChange":-0.03,"extendedChangePercent":-0.00014,"extendedPriceTime":1534539553278,"previousClose":213.32,"change":4.26,"changePercent":0.01997,"iexMarketPercent":null,"iexVolume":null,"avgTotalVolume":25095709,"iexBidPrice":null,"iexBidSize":null,"iexAskPrice":null,"iexAskSize":null,"marketCap":1050895299080,"peRatio":21,"week52High":217.95,"week52Low":149.16,"ytdChange":0.29756620725736654}[rfreire@tambot qpackage-1.0]$
And then parsing it with json.tool
:
[rfreire@tambot qpackage-1.0]$ curl -s --insecure https://api.iextrading.com/1.0/stock/AAPL/quote | python -mjson.tool
{
"avgTotalVolume": 25095709,
"calculationPrice": "close",
"change": 4.2599999999999998,
"changePercent": 0.019970000000000002,
"close": 217.58000000000001,
"closeTime": 1534536000445,
"companyName": "Apple Inc.",
"delayedPrice": 217.58000000000001,
"delayedPriceTime": 1534536000445,
"extendedChange": -0.029999999999999999,
"extendedChangePercent": -0.00013999999999999999,
"extendedPrice": 217.55000000000001,
"extendedPriceTime": 1534539553278,
"high": 217.94999999999999,
"iexAskPrice": null,
"iexAskSize": null,
"iexBidPrice": null,
"iexBidSize": null,
"iexLastUpdated": null,
"iexMarketPercent": null,
"iexRealtimePrice": null,
"iexRealtimeSize": null,
"iexVolume": null,
"latestPrice": 217.58000000000001,
"latestSource": "Close",
"latestTime": "August 17, 2018",
"latestUpdate": 1534536000445,
"latestVolume": 34998882,
"low": 213.16,
"marketCap": 1050895299080,
"open": 213.47,
"openTime": 1534512600588,
"peRatio": 21,
"previousClose": 213.31999999999999,
"primaryExchange": "Nasdaq Global Select",
"sector": "Technology",
"symbol": "AAPL",
"week52High": 217.94999999999999,
"week52Low": 149.16,
"ytdChange": 0.29756620725736654
}
Can you please check it?
I appreciate it a lot.
After doing an update, I noticed no messages were getting decoded. Looking into it a little further I also noticed acarsdec was using 100% of a 32bit Intel atom CPU "core".
I've gone through the commits to try and find a culprit. 2ae8e8e seems to be the latest version that is working. From 2af3b86 onwards it's 100% CPU usage and nothing gets decoded.
Undoing commit 2af3b86 in current master (092989e) also seems to fix the problem. I guess the old intel atom Does not like "portable" binary?
Other info: I'm using RTL-SDR as input device, and decoding 5 channels. OS is Debian Buster.
Lines 150 to 156 in d11c586
from Open Group Base Specifications Issue 6:
The index() function shall be equivalent to strchr()... The strchr() function is preferred over this function.
For maximum portability, it is recommended to replace the function call to index() as follows:
#define index(a,b) strchr((a),(b))
Besides the output to a logfile only one of the 3 (n, N and J) sockets outputs seems to be supported.
If both -n and -j are selected only one output seems to be generated. No error message is shown.
If only -n or -j is selected it works fine.
The switch code in acarsdec.c seems to fill 'netout' with only the last of the 3 possible parameters that appear in the parameter list.
My request is to support multiple concurrent socket output feeds so I can feed the data in both PP and in JSON format.
Cheers,
Dick
I am getting the error listed below on the final entry and I would appreciate if someone can point me in the right direction. BTW I am only copy add paste able in programming.
Thank you
pi@acars:/acars $ cd acarsdec/acars/acarsdec $ make -f Makefile.rtl
pi@acars:
make: Makefile.rtl: No such file or directory
make: *** No rule to make target 'Makefile.rtl'. Stop.
Thank you for keeping this hobby active Thierry.
please find below a quick feedback from Washington.
pi@raspberrypi:~/acars-dec $ acarsdec -v -o4 -r 0 130.825 131.125 131.425 131.550 131.725
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001
Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Tuner gain : 49.600000
Set center freq. to 131750000Hz
Exact sample rate is: 2000000.052982 Hz
Decoding 5 channels
{"timestamp":1555400604.623349,"station_id":"raspberr","channel":3,"freq":131.550,"level":-12,"error":0,"mode":"2","label":"4T","block_id":"2","ack":"G","tail":"C-FDST","flight":"AC0979","msgno":"M76A","text":"AGFSR AC0979/15/16/SJDYVR/0743Z/207/4713.9N12200.6W/360/ /0033/0112/M51/305031/0465/ /---/0401/0412/----/----"}
{"timestamp":1555400611.095185,"station_id":"raspberr","channel":3,"freq":131.550,"level":-12,"error":0,"mode":"2","label":"_d","block_id":"3","ack":"H","tail":"C-FDST","flight":"AC0979","msgno":"S65A"}
{"timestamp":1555400712.5158141,"station_id":"raspberr","channel":4,"freq":131.725,"level":-18,"error":0,"mode":"2","label":"12","block_id":"4","ack":false,"tail":"C-FONK","flight":"WO0118","msgno":"M66A","text":"N 49.131,W120.428,29755,074510, 232,.C-FONK,1114"}
#1 too many parity errors
#5 too many parity errors
{"timestamp":1555400842.02856,"station_id":"raspberr","channel":3,"freq":131.550,"level":-6,"error":0,"mode":"2","label":"Q0","block_id":"6","ack":false,"tail":"C-FDST","flight":"AC0979","msgno":"S67A"}
{"timestamp":1555400849.729044,"station_id":"raspberr","channel":3,"freq":131.550,"level":-10,"error":0,"mode":"2","label":"4s","block_id":"7","ack":false,"tail":"C-FDST","flight":"AC0979","msgno":"M79A","text":"DFR AC0979/15"}
{"timestamp":1555400855.873071,"station_id":"raspberr","channel":3,"freq":131.550,"level":-13,"error":0,"mode":"2","label":"_d","block_id":"8","ack":"L","tail":"C-FDST","flight":"AC0979","msgno":"S68A"}
{"timestamp":1555400861.11618,"station_id":"raspberr","channel":3,"freq":131.550,"level":-13,"error":0,"mode":"2","label":"_d","block_id":"9","ack":"M","tail":"C-FDST","flight":"AC0979","msgno":"S69A"}
{"timestamp":1555400904.2060759,"station_id":"raspberr","channel":3,"freq":131.550,"level":-11,"error":0,"mode":"2","label":"Q0","block_id":"2","ack":false,"tail":"C-FDST","flight":"AC0979","msgno":"S72A"}
#5 miss txt end
#5 parity error(s): 2
#5 crc error
#5 errors fixed
{"timestamp":1555400918.3817041,"station_id":"raspberr","channel":4,"freq":131.725,"level":-21,"error":2,"mode":"2","label":"_d","block_id":"0","ack":"B","tail":"N640VA","flight":"VX1010","msgno":"S18A"}
{"timestamp":1555400930.17842,"station_id":"raspberr","channel":4,"freq":131.725,"level":-18,"error":0,"mode":"2","label":"_d","block_id":"3","ack":"E","tail":"N640VA","flight":"VX1010","msgno":"S21A"}
#5 miss txt end
#5 parity error(s): 3
#5 crc error
#5 errors fixed
{"timestamp":1555400941.649678,"station_id":"raspberr","channel":4,"freq":131.725,"level":-22,"error":3,"mode":"2","label":"_d","block_id":"6","ack":"H","tail":"N640VA","flight":"VX=\u00165:","msgno":"S24P"}
#5 too many parity errors
#5 parity error(s): 3
#5 crc error
#5 not able to fix errors
#5 too many parity errors
Hello Thierry,
I wonder if could spare some of your time to go over some doubts in regards to MSK demodulation and ACARS decoding. Have been experimenting with very streamlined draft of an ACARS decoder, but have faced some pitfalls along the way. If possible would like to arrange for a quick chat to go over the challenges faced. You'll find where I stuck in the following URL:
Hi Thierry,
As the make process creates device specific executables depending on the -f parameter, all references to just 'acarsdec' as the program name are incorrect.
See:
https://github.com/TLeconte/acarsdec#usage
https://github.com/TLeconte/acarsdec#examples
Also under
https://github.com/TLeconte/acarsdec#compilation
The 'make -f Makefile.sdrplay' is missing.
And maybe you could mention here that the name of the executable that is created also depends on the device..
Cheers,
Dick
I am getting the following:
I am using this imple command line:
cmd /c acarsdeco2.exe --device-serial 1 --freq-correction 0 --freq 131725000 --freq 131525000 --freq 131814000 --http-port 8082 --vrs-url http://127.0.0.1:83
I am getting this response:
AcarSDeco2 v.20181201
Using device: 0 mnf: Realtek prod: RTL2838UHIDIR serial: 00000001
Sampling rate: 1400000.018544 sps
SDR Device Not found
Press any key to continue . . .
Evidently identifies the dongle and then says Device not found? Uh?
The UDP -N output allows the data to be sent to a remote machine. That machine may not know the acarsdec command line parameters used and will not know how to associate channel number to a specific frequency. Is it possible to change the UDP -N feed to include the frequency in place of the channel number e.g.
change
(null) 2 27/10/2016 08:56:52 0 -17 X .N223UA L _d 8 S59A UA0932
to
(null) 131.725 27/10/2016 08:56:52 0 -17 X .N223UA L _d 8 S59A UA0932
I'm not a C developer, so if anyone is willing to create a Pull Request I would appreciate it and hopefully it will be eventually included in the official released version of this excellent program.
Thanks
Stuart
Hello
I recently installed acarsdec on a raspberry pi 3b+ with bullseye (raspbian 11) 64 bit.
I have the RTL-SDR blog V3 with good reception, However, until now I did not succeed in displaying decoded messages.
As you can see, it keeps displaying that there are parity errors, crc errors and that the errors cannot be fixed. This is in verbose mode.
Am I missing something? I expected the decoded acars to be visible in the terminal with the -o 2 argument. How can I access the decoded data otherwise?
Many thanks!
When I run 2 instances of acarsdec (3.4) the second instance issues this error message:
Failed to submit transfer 30!
Read async -5
and aborts.
A similar error occurs when I run Dumpvdl2 and Acarsdec in that sequence.
After I changed rtl.c
from
r = rtlsdr_read_async(dev, in_callback, NULL, 32, RTLINBUFSZ);
to
r = rtlsdr_read_async(dev, in_callback, NULL, 10, RTLINBUFSZ);
all works fine.
Hi Thierry,
Trying to make the latest version with libacars.
libacars installed OK.
When I 'make -f Makefile.rtl' I get
cc -Wall -Ofast -pthread -D WITH_RTL -I. pkg-config --cflags librtlsdr
-I/usr/local/include -DHAVE_LIBACARS -c -o acarsdec.o acarsdec.c
cc -Wall -Ofast -pthread -D WITH_RTL -I. pkg-config --cflags librtlsdr
-I/usr/local/include -DHAVE_LIBACARS -c -o acars.o acars.c
cc -Wall -Ofast -pthread -D WITH_RTL -I. pkg-config --cflags librtlsdr
-I/usr/local/include -DHAVE_LIBACARS -c -o msk.o msk.c
cc -Wall -Ofast -pthread -D WITH_RTL -I. pkg-config --cflags librtlsdr
-I/usr/local/include -DHAVE_LIBACARS -c -o rtl.o rtl.c
cc -Wall -Ofast -pthread -D WITH_RTL -I. pkg-config --cflags librtlsdr
-I/usr/local/include -DHAVE_LIBACARS -c -o air.o air.c
cc -Wall -Ofast -pthread -D WITH_RTL -I. pkg-config --cflags librtlsdr
-I/usr/local/include -DHAVE_LIBACARS -c -o output.o output.c
output.c:27:20: error: static declaration of ‘cls’ follows non-static declaration
static inline void cls(void)
^~~
In file included from output.c:15:0:
acarsdec.h:163:13: note: previous declaration of ‘cls’ was here
extern void cls(void);
^~~
output.c: In function ‘initOutput’:
output.c:109:44: error: ‘OUTTYPE_ROUTEJSON’ undeclared (first use in this function)
if (outtype == OUTTYPE_JSON || outtype == OUTTYPE_ROUTEJSON || (sockfd && netout==NETLOG_JSON)) {
^~~~~~~~~~~~~~~~~
output.c:109:44: note: each undeclared identifier is reported only once for each function it appears in
output.c: In function ‘outputmsg’:
output.c:564:17: error: ‘OUTTYPE_ROUTEJSON’ undeclared (first use in this function)
if(outtype == OUTTYPE_ROUTEJSON )
^~~~~~~~~~~~~~~~~
: recipe for target 'output.o' failed
make: *** [output.o] Error 1
Stuart
Hi Thierry!
Taking the opportunity to file a request for enhancement.
== RFE ==
What is the nature and description of the request?
Add a command line switch to specify the desired label messages to be printed.
How would the customer like to achieve this? (List the functional requirements here)
i.e.: Let someone interested in RA, H1 and 2U messages. A user would specify a command line switch that would specify ra,h1,2u and only these messages would be printed.
Thanks a lot! o/
Add a space between the last #
and the text, to get your markdown working.
So this is an issue I have seen quite often on my setup: the receiver goes deaf after running for random period of time, no messages are decoded even though the signal strength has not changed. It seems hard to provide a reproducer though. :-/
After some staring at the code I seem to have managed to come up with a patch that, when applied, appears to mitigate the issue; at least, my systems now do not exhibit deafness any more.
Please let me know if I should make a pull request for you to integrate the changes.
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.