Skip to content

acarsdec next? :-) #117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 148 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
0b2440a
added RTLSDR bias tee support
invalid-email-address Feb 9, 2024
730c720
Allow 2.5MHz bandwidth on R2 use without filter optimization if needed.
Mar 22, 2023
029e2d9
Add documentation for recent patches
Mar 20, 2023
30f5b57
Use sendto(2) for udp and retry dns on temporary failure.
murrayma Aug 21, 2023
19fd754
Prevent clobbering the destination hostname and better error reporting
murrayma Sep 21, 2023
f2cc09d
netout: some cleanup & improvements
f00b4r0 Jul 11, 2024
043e4e0
CMakeList: fixes
f00b4r0 Jul 11, 2024
22e022b
rtl: always look for serial if device id is 8-char long
f00b4r0 Jul 11, 2024
cec01f5
quick ugly hack to allow building multiple backends
f00b4r0 Jul 11, 2024
e2c01e4
Revert "add watchDog to detect hanging rtl-sdr"
f00b4r0 Jul 12, 2024
ee34d4b
get rid of pthread in soapy
f00b4r0 Jul 12, 2024
4e90981
Remove some unused includes and global vars
f00b4r0 Jul 12, 2024
55f8320
gitignore: add build/ folder
f00b4r0 Jul 24, 2024
84721cb
code cleanup: regroup all runtime global vars under a single namespace
f00b4r0 Jul 24, 2024
560b270
code cleanup: deduplicate frequencies parsing
f00b4r0 Jul 24, 2024
35d1ef9
code cleanup: deduplicate chooseFc()
f00b4r0 Jul 24, 2024
c906da6
code cleanup
f00b4r0 Jul 25, 2024
b92e5f1
acarsdec: cleanup usage()
f00b4r0 Jul 25, 2024
1e06453
rename R.channel -> R.channels
f00b4r0 Jul 25, 2024
693e143
main(): use errx() where applicable
f00b4r0 Jul 25, 2024
396f895
make number of channels dynamic
f00b4r0 Jul 26, 2024
4d93619
code cleanup: s/sizeof(type)/sizeof(var)/
f00b4r0 Jul 26, 2024
01991c8
code cleanup: use system-provided cJSON
f00b4r0 Jul 27, 2024
6b9632d
code cleanup: improve CMakeLists.txt
f00b4r0 Jul 27, 2024
5131a27
code cleanup: make libcJSON optional
f00b4r0 Jul 27, 2024
4ce37bd
netout: add minimal sanity checks
f00b4r0 Jul 27, 2024
9cecbdd
rtl: fix error message
f00b4r0 Aug 1, 2024
adecc89
treewide: first step for making outputs independent
f00b4r0 Aug 11, 2024
e380549
fileout: make rotation a per-output parameter
f00b4r0 Aug 11, 2024
ba09118
treewide: code reordering
f00b4r0 Aug 11, 2024
ee868c9
fileout: fix logfile suffixing
f00b4r0 Aug 11, 2024
e71b815
allow setting center freq for all but Airspy SDRs
f00b4r0 Aug 11, 2024
70edfc2
treewide: more disentangling of acarsdec.h
f00b4r0 Aug 11, 2024
f3b219d
output: avoid unnecessary zeroing
f00b4r0 Aug 11, 2024
33ef6af
alsa.c remove WITH_ALSA fencing
f00b4r0 Aug 11, 2024
01a8248
acarsdec: move SDRPLAY to "-S"
f00b4r0 Aug 11, 2024
175fb47
Update README and usage()
f00b4r0 Aug 11, 2024
3f0f953
treewide: remove unncessary fencing, fix build with DEBUG=1 and SNDFI…
f00b4r0 Aug 11, 2024
bff1a64
Implement --output help
f00b4r0 Aug 11, 2024
7106133
code cleanup: air/rtl: rename "ch->wf" to "ch->oscillator"
f00b4r0 Aug 12, 2024
f2956c9
code cleanup: {m,c}alloc() error checking and reporting
f00b4r0 Aug 12, 2024
6bdab1b
code cleanup: soapy: remove redundant frequency range check
f00b4r0 Aug 12, 2024
0e09bd1
acarsdec: fix signal handling
f00b4r0 Aug 13, 2024
85c8110
code deduplication: channels_init_sdr()
f00b4r0 Aug 12, 2024
c53b032
code cleanup: make unsigned variables actually unsigned
f00b4r0 Aug 12, 2024
3b42c42
CMakeLists: enable "-Wall" and fix warnings
f00b4r0 Aug 12, 2024
f181c64
code cleanup: remove dead code
f00b4r0 Aug 12, 2024
b607604
check for libasound to enable ALSA support
f00b4r0 Aug 13, 2024
5618cf5
find_centerfreq(): use multiplier instead of samplerate
f00b4r0 Aug 13, 2024
fbb880a
Add behavior documentation in lib/rtl, rewrite rtl callback
f00b4r0 Aug 13, 2024
f2b80dc
soapy: reverse loop order in runSoapySample()
f00b4r0 Aug 13, 2024
21e9f9f
soapy: rewrite runSoapySample() to use local variables
f00b4r0 Aug 13, 2024
be8bf1e
soapy: fix runSoapyClose()
f00b4r0 Aug 14, 2024
365f06b
rtl: fix autogain logic
f00b4r0 Aug 14, 2024
4b0dd43
soapy: reorder code and fail on fatal errors
f00b4r0 Aug 14, 2024
b469664
soapy: switch to native CF32 and use smaller input buffer
f00b4r0 Aug 14, 2024
d077528
make R.inmode an enum
f00b4r0 Aug 14, 2024
1e2f4f1
acarsdec: move input init out of getopt()
f00b4r0 Aug 14, 2024
ab29f0b
code cleanup: rework input initialization
f00b4r0 Aug 14, 2024
00935c9
soapy: code cleanup: move antenna setup to initSoapy()
f00b4r0 Aug 14, 2024
260e1a1
let's stop pretending this is still acarsdec 3.X ;)
f00b4r0 Aug 14, 2024
80e089f
sdrplay: don't use channel-local extra variables
f00b4r0 Aug 14, 2024
7ff45b2
update usage() and README
f00b4r0 Aug 14, 2024
c6b91c3
code cleanup: use a single dm_buffer size
f00b4r0 Aug 17, 2024
96c8547
lib: implement channels_mix_phasors()
f00b4r0 Aug 14, 2024
68831c5
sdrplay: use channels_mix_phasors(), fix scaling [UNTESTED]
f00b4r0 Aug 16, 2024
d869b0f
code cleanup: air: don't pollute global namespace
f00b4r0 Aug 15, 2024
e1bcc74
air: remove usage of channel-local D accumulator
f00b4r0 Aug 15, 2024
4ea997f
channel_t: remove two now-unused variables
f00b4r0 Aug 15, 2024
6aae19b
improve struct packing
f00b4r0 Aug 15, 2024
83d0e50
code cleanup: add msk.h
f00b4r0 Aug 16, 2024
99d46b5
acarsdec: try to improve usage() again
f00b4r0 Aug 16, 2024
669c7b0
CMakeList: don't forcefully set -march=
f00b4r0 Aug 16, 2024
6f47c9b
acars: blk_thread() access blk->chn only once
f00b4r0 Aug 15, 2024
b881734
acarsdec: fix errx() strings
f00b4r0 Aug 15, 2024
0caffc4
Add LICENSE (GPL-2.0)
f00b4r0 Aug 16, 2024
bf738de
rtl: one less static variable
f00b4r0 Aug 16, 2024
d824fd9
move parse_freqs() to acarsdec.c
f00b4r0 Aug 16, 2024
7c831ff
Initial statsd implementation
f00b4r0 Aug 15, 2024
54fc029
acarsdec: hook statsd init
f00b4r0 Aug 15, 2024
f4b7661
acars: add some statsd stats
f00b4r0 Aug 15, 2024
430ee76
update usage() and README about statsd
f00b4r0 Aug 16, 2024
3eb48c5
acarsdec: use long opts for inputs
f00b4r0 Aug 16, 2024
e52b2aa
treewide: error message consistency
f00b4r0 Aug 16, 2024
cc01723
alsa: fix missing channels malloc and error check
f00b4r0 Aug 16, 2024
bf4ac3f
dos2unix soapy.c
f00b4r0 Aug 16, 2024
014a605
remove single-use typedef sample_t
f00b4r0 Aug 16, 2024
887e6ea
lib,rtl,soapy: use un/likely()
f00b4r0 Aug 17, 2024
3a2bfbc
remove #define _GNU_SOURCE
f00b4r0 Aug 17, 2024
e04dc73
Update README
f00b4r0 Aug 17, 2024
f518d8d
treewide: define and use vprerr() for verbose messages
f00b4r0 Aug 18, 2024
daa8176
treewide: do not randomly exit()
f00b4r0 Aug 18, 2024
5504c39
soapy: fix signal handling
f00b4r0 Aug 18, 2024
df2c5a7
soapy: tidyup initSoapy()
f00b4r0 Aug 18, 2024
183e854
rtl: tidyup initRtl()
f00b4r0 Aug 18, 2024
97830b1
soapy: runSoapySample(): cache R.rateMult
f00b4r0 Aug 18, 2024
50ecd9d
runtime_t: reorder for cacheline boundary optimization
f00b4r0 Aug 18, 2024
a91679d
treewide: use a global running flag for exit control
f00b4r0 Aug 18, 2024
06b6fa1
soundfile: error check order
f00b4r0 Aug 18, 2024
19c8286
acarsdec 4.0
f00b4r0 Aug 18, 2024
6f32f05
acars: sync on entire PREKEY
f00b4r0 Aug 23, 2024
e248f29
acars: refactor decodeAcars()
f00b4r0 Sep 26, 2024
2fa4111
msk: rework level estimator
f00b4r0 Aug 24, 2024
0a99216
acars: show level in verbose sync message
f00b4r0 Aug 24, 2024
283ff8b
acars: make init more robust
f00b4r0 Aug 25, 2024
bae1f9c
MskLvl does not require double precision
f00b4r0 Aug 25, 2024
a2cb1a6
acars: use __builtin_parity() when available
f00b4r0 Aug 25, 2024
ff02794
acars: rewrite update_crc() macro to unhide assignment
f00b4r0 Aug 25, 2024
db7ce78
acars: move put block to END state
f00b4r0 Aug 25, 2024
0b0001b
acars: un/likely() - reorder some checks for speed
f00b4r0 Aug 25, 2024
d362a09
acars: simplify blk chain list
f00b4r0 Aug 25, 2024
29b25f8
acars avoid redundant checks, avoid reporting crc errors on parity
f00b4r0 Aug 25, 2024
b69e66b
acars: abort early if parity check fails again
f00b4r0 Aug 25, 2024
ac891ff
acars: blk_thread(): regroup error path
f00b4r0 Aug 25, 2024
849e5da
acars: don't use hardcoded numbers for boundary checks
f00b4r0 Sep 11, 2024
e3bb819
acars: don't check parity during reception
f00b4r0 Aug 25, 2024
ecd1b1d
acars: make parity removal loop vectorizable
f00b4r0 Aug 27, 2024
9855f0a
acars: use stdint types
f00b4r0 Sep 26, 2024
3e35867
acars: use an union to access fixed-size members of TXT segment
f00b4r0 Sep 11, 2024
745853c
output: fix out of bound accesses, avoid duplicating txt
f00b4r0 Aug 30, 2024
62f363d
output: use faster mem*() instead of str*()
f00b4r0 Aug 29, 2024
f23dab8
outputmsg(): remove unnecessary assignments
f00b4r0 Aug 29, 2024
16903c2
output: improve downlink msg parsing logic
f00b4r0 Aug 30, 2024
d79b33f
label: use switch and immediate return
f00b4r0 Aug 30, 2024
52bb44f
DecodeLabel(): do not zero oooi argument
f00b4r0 Aug 30, 2024
c166409
addFlight(): don't use now unnecessary intermediary variable
f00b4r0 Aug 30, 2024
0da8306
fmt_msg(): fix 'Wheels off Tme' typo
f00b4r0 Aug 30, 2024
b0fdfd3
acarsmsg_t: remove unneeded member
f00b4r0 Aug 30, 2024
ca44ce2
move acarsmsg_t from label.h to acarsdec.h
f00b4r0 Aug 30, 2024
30a79af
output: remove unnecessary #ifdefs
f00b4r0 Aug 31, 2024
4d2bc81
acarsmsg_t: remove unneeded member
f00b4r0 Aug 31, 2024
f2a6d73
acarsmsg_t: pack
f00b4r0 Aug 31, 2024
f96c535
soundfile: make inner sample read loop vectorizable
f00b4r0 Aug 31, 2024
d1ea6b0
treewide: add missing catchall error for token parameters
f00b4r0 Sep 1, 2024
a47f8b1
netout: add missing parameter check
f00b4r0 Sep 2, 2024
3f2a61d
treewide: deduplicate token parameter parsing
f00b4r0 Sep 2, 2024
315f240
parse_params(): allow processing of lone tokens
f00b4r0 Sep 2, 2024
ee43207
soundfile: add support for raw audio input
f00b4r0 Sep 2, 2024
c02dfac
soundfile: support sample rates which are multiple of INTRATE
f00b4r0 Sep 2, 2024
8fe41b7
update README
f00b4r0 Sep 2, 2024
5a601e9
output: silence a GCC warning
f00b4r0 Sep 9, 2024
59e61a4
acarsdec 4.1
f00b4r0 Sep 26, 2024
57fc7e3
msk: use ternary op to improve compiler optimization
f00b4r0 Sep 4, 2024
ee6fdd7
treewide: rework usage of debug output WAV
f00b4r0 Sep 4, 2024
ba56fe4
msk: do not divide power by 4
f00b4r0 Sep 4, 2024
a8bc868
acars: report post sync signal level
f00b4r0 Sep 4, 2024
81758de
acars: report loud messages (above 0dB)
f00b4r0 Sep 5, 2024
d389b4b
rtl: set receiver bandwidth
f00b4r0 Sep 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ acarsdec
acarsserv
.*.swp
*.o
build/
111 changes: 66 additions & 45 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,91 +1,112 @@
cmake_minimum_required (VERSION 3.2)
project (acarsdec C)

add_compile_options(-Ofast -march=native)
add_compile_options(-Ofast)

add_executable(acarsdec acars.c acarsdec.c cJSON.c label.c msk.c output.c netout.c fileout.c )
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")

add_executable(acarsdec acars.c acarsdec.c label.c msk.c output.c netout.c fileout.c lib.c statsd.c)

find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
if(NOT PKG_CONFIG_FOUND)
message ( FATAL_ERROR "pkg-config NOT FOUND")
endif()

pkg_check_modules(LIBCJSON libcjson)
if(LIBCJSON_FOUND)
add_definitions(-DHAVE_CJSON )
target_link_libraries(acarsdec ${LIBCJSON_LIBRARIES})
target_include_directories(acarsdec PUBLIC ${LIBCJSON_INCLUDE_DIRS})
target_link_directories(acarsdec PUBLIC ${LIBCJSON_LIBRARY_DIRS})

SET(WITH_MQTT NO)
find_library(MQTT paho-mqtt3a)
if(MQTT)
add_definitions(-DWITH_MQTT )
target_sources( acarsdec PRIVATE mqttout.c)
find_path(MQTT_INCPATH MQTTAsync.h)
target_include_directories(acarsdec PUBLIC ${MQTT_INCPATH})
target_link_libraries(acarsdec ${MQTT})
SET(WITH_MQTT YES)
endif()
message ( STATUS "Using paho-mqtt3a: ${WITH_MQTT}")

endif()

SET(WITH_ALSA NO)
pkg_check_modules(LIBASOUND alsa)
if(LIBASOUND_FOUND)
add_definitions(-DWITH_ALSA )
target_sources( acarsdec PRIVATE alsa.c)
target_link_libraries(acarsdec ${LIBASOUND_LIBRARIES})
target_include_directories(acarsdec PUBLIC ${LIBASOUND_INCLUDE_DIRS})
target_link_directories(acarsdec PUBLIC ${LIBASOUND_LIBRARY_DIRS})
SET(WITH_ALSA YES)
endif()
message ( STATUS "Using alsa: ${WITH_ALSA}")

SET(WITH_LIBACARS NO)
pkg_check_modules(LIBACARS libacars-2>=2.0.0)
if(LIBACARS_FOUND)
message ( STATUS "Using libacars")
add_definitions(-DHAVE_LIBACARS )
target_link_libraries(acarsdec ${LIBACARS_LIBRARIES})
target_include_directories(acarsdec PUBLIC ${LIBACARS_INCLUDE_DIRS})
link_directories(${LIBACARS_LIBRARY_DIRS})
else()
message ( STATUS "Not using libacars")
endif()
endif()

find_library(MQTT paho-mqtt3a)
if(MQTT)
message ( STATUS "Using MQTT")
add_definitions(-DWITH_MQTT )
target_sources( acarsdec PRIVATE mqttout.c)
target_link_libraries(acarsdec ${MQTT})
else()
message ( STATUS "Not using MQTT")
target_link_directories(acarsdec PUBLIC ${LIBACARS_LIBRARY_DIRS})
SET(WITH_LIBACARS YES)
endif()
message ( STATUS "Using libacars: ${WITH_LIBACARS}")

SET(WITH_SNDFILE NO)
find_library(LIBSNDFILE sndfile)
if(LIBSNDFILE)
message ( STATUS "Using libsnd")
add_definitions(-DWITH_SNDFILE )
target_sources( acarsdec PRIVATE soundfile.c)
find_path(LIBSNDFILE_INCPATH sndfile.h)
target_include_directories(acarsdec PUBLIC ${LIBSNDFILE_INCPATH})
target_link_libraries(acarsdec ${LIBSNDFILE})
else()
message ( STATUS "Not using libsndfile")
SET(WITH_SNDFILE YES)
endif()
message ( STATUS "Using libsnd: ${WITH_SNDFILE}")

option(rtl "Compiling for rtl sdr" )
if(rtl)
SET(WITH_RTL NO)
find_library(LIBRTL rtlsdr)
if(NOT LIBRTL)
message (FATAL_ERROR "librtlsdr path not found")
endif()
if(LIBRTL)
add_definitions(-DWITH_RTL )
target_sources( acarsdec PRIVATE rtl.c)
target_link_libraries( acarsdec ${LIBRTL})
SET(WITH_RTL YES)
endif()
message ( STATUS "Using librtlsdr: ${WITH_RTL}")

option(airspy "Compiling for airspy sdr" )
if(airspy)
SET(WITH_AIR NO)
find_library(LIBAIR airspy)
if(NOT LIBAIR)
message ( FATAL_ERROR "libairspy path not found")
endif()
if(LIBAIR)
add_definitions(-DWITH_AIR )
target_sources( acarsdec PRIVATE air.c)
target_link_libraries( acarsdec ${LIBAIR})
SET(WITH_AIR YES)
endif()
message ( STATUS "Using libairspy: ${WITH_AIR}")

option(sdrplay "Compiling for sdrplay sdr" )
if(sdrplay)
SET(WITH_SDRPLAY NO)
find_library(LIBPLAY mirsdrapi-rsp)
if(NOT LIBPLAY)
message ( FATAL_ERROR "libmirsdrapi-rsp path not found")
endif()
if(LIBPLAY)
add_definitions(-DWITH_SDRPLAY )
target_sources( acarsdec PRIVATE sdrplay.c)
target_link_libraries( acarsdec ${LIBPLAY})
SET(WITH_SDRPLAY YES)
endif()
message ( STATUS "Using libmirsdrapi-rsp: ${WITH_SDRPLAY}")

option(soapy "Compiling for soapy sdr" )
if(soapy)
SET(WITH_SOAPY NO)
find_library(LIBSOAPY SoapySDR)
if(NOT LIBSOAPY)
message ( FATAL_ERROR "libSoapySDR path not found")
endif()
if(LIBSOAPY)
add_definitions(-DWITH_SOAPY )
target_sources( acarsdec PRIVATE soapy.c)
target_link_libraries( acarsdec ${LIBSOAPY})
SET(WITH_SOAPY YES)
endif()

if(NOT rtl AND NOT airspy AND NOT sdrplay AND NOT soapy)
message ("No sdr option set ! are you sure ?")
endif()
message ( STATUS "Using libSoapySDR: ${WITH_SOAPY}")

target_link_libraries( acarsdec pthread m )

Expand Down
Loading