Compare commits
65 Commits
Author | SHA1 | Date |
---|---|---|
Jakob Ketterl | 57f55bbdd5 | |
Michael Chen | e8ba61bb81 | |
Jakob Ketterl | cb5b2e64af | |
Jakob Ketterl | 685b9970d2 | |
Jakob Ketterl | c385a8f6b1 | |
Jakob Ketterl | aa60b9d4a7 | |
Jakob Ketterl | bff09e3363 | |
Jakob Ketterl | 774f8bd91a | |
Jakob Ketterl | b1684908a4 | |
Jakob Ketterl | ed76fd7606 | |
Jakob Ketterl | 7b3f212ccb | |
Jakob Ketterl | 216a3db45d | |
Jakob Ketterl | c16de474c6 | |
Jakob Ketterl | afcd8277d1 | |
Jakob Ketterl | 525b70d495 | |
Jakob Ketterl | f58023f3e5 | |
Jakob Ketterl | 252edb7a5a | |
Jakob Ketterl | 2993cc4279 | |
Jakob Ketterl | cc4f3c6c1d | |
Jakob Ketterl | 0de597481c | |
Jakob Ketterl | 2342bb5d29 | |
Jakob Ketterl | b1ac8caf9b | |
Jakob Ketterl | d79a1396a6 | |
Jakob Ketterl | 1e6e7528b5 | |
Jakob Ketterl | f6326f8631 | |
Jakob Ketterl | c61986dbcc | |
Jakob Ketterl | bbc9d9e7a8 | |
Jakob Ketterl | a309af40e9 | |
Jakob Ketterl | f3a3b9243c | |
Jakob Ketterl | edc9009359 | |
Jakob Ketterl | 13e323cdd2 | |
Jakob Ketterl | ab40a2934f | |
Jakob Ketterl | 322b6a0d52 | |
Jakob Ketterl | bba900d8f8 | |
Jakob Ketterl | 64f0510da0 | |
Jakob Ketterl | 4050bd7f96 | |
Jakob Ketterl | 35abd711ca | |
Jakob Ketterl | 258e41669e | |
Jakob Ketterl | 975f5ffdf0 | |
Jakob Ketterl | 90ed47a115 | |
Jakob Ketterl | 271bd723bc | |
Jakob Ketterl | 8a7e91be38 | |
Jakob Ketterl | 9416db5f42 | |
Marat Fayzullin | 0127e32ea1 | |
Jakob Ketterl | e20d94e241 | |
Jakob Ketterl | 6c01d48493 | |
Jakob Ketterl | 94269e211e | |
Jakob Ketterl | 811d95c7bc | |
Jakob Ketterl | c07e33d19d | |
Jakob Ketterl | c150eca75c | |
Marat Fayzullin | 7a61f991ad | |
Marat Fayzullin | 4423c7f13a | |
Jakob Ketterl | 5cd0847362 | |
Jakob Ketterl | 1635cbfa42 | |
Marat Fayzullin | e92b6d657b | |
Jakob Ketterl | d5f7ce9508 | |
Jakob Ketterl | bfd4d5657c | |
Marat Fayzullin | bb625a5f9f | |
Marat Fayzullin | 2ccdc90cc5 | |
Marat Fayzullin | ff43555411 | |
Marat Fayzullin | 339864a572 | |
Jakob Ketterl | 6192978f2f | |
Jakob Ketterl | 66d4d88156 | |
Jakob Ketterl | c87daaabbe | |
Jakob Ketterl | 6f0a209a38 |
|
@ -1,4 +1,10 @@
|
|||
**unreleased**
|
||||
- SDR device log messages are now available in the web configuration to simplify troubleshooting
|
||||
- Added support for the MSK144 digimode
|
||||
|
||||
**1.2.1**
|
||||
- FifiSDR support fixed (pipeline formats now line up correctly)
|
||||
- Added "Device" input for FifiSDR devices for sound card selection
|
||||
|
||||
**1.2.0**
|
||||
- Major rewrite of all demodulation components to make use of the new csdr/pycsdr and digiham/pydigiham demodulator
|
||||
|
|
|
@ -14,7 +14,7 @@ It has the following features:
|
|||
- supports a wide range of [SDR hardware](https://github.com/jketterl/openwebrx/wiki/Supported-Hardware#sdr-devices)
|
||||
- Multiple SDR devices can be used simultaneously
|
||||
- [digiham](https://github.com/jketterl/digiham) based demodularors (DMR, YSF, Pocsag, D-Star, NXDN)
|
||||
- [wsjt-x](https://physics.princeton.edu/pulsar/k1jt/wsjtx.html) based demodulators (FT8, FT4, WSPR, JT65, JT9, FST4,
|
||||
- [wsjt-x](https://wsjt.sourceforge.io/) based demodulators (FT8, FT4, WSPR, JT65, JT9, FST4,
|
||||
FST4W)
|
||||
- [direwolf](https://github.com/wb2osz/direwolf) based demodulation of APRS packets
|
||||
- [JS8Call](http://js8call.com/) support
|
||||
|
|
12
bands.json
12
bands.json
|
@ -177,7 +177,8 @@
|
|||
"jt9": 50312000,
|
||||
"ft4": 50318000,
|
||||
"js8": 50318000,
|
||||
"q65": [50211000, 50275000]
|
||||
"q65": [50211000, 50275000],
|
||||
"msk144": 50260000
|
||||
},
|
||||
"tags": ["hamradio"]
|
||||
},
|
||||
|
@ -186,7 +187,8 @@
|
|||
"lower_bound": 70150000,
|
||||
"upper_bound": 70200000,
|
||||
"frequencies": {
|
||||
"wspr": 70091000
|
||||
"wspr": 70091000,
|
||||
"msk144": 70230000
|
||||
},
|
||||
"tags": ["hamradio"]
|
||||
},
|
||||
|
@ -200,7 +202,8 @@
|
|||
"ft4": 144170000,
|
||||
"jt65": 144120000,
|
||||
"packet": 144800000,
|
||||
"q65": 144116000
|
||||
"q65": 144116000,
|
||||
"msk144": 144360000
|
||||
},
|
||||
"tags": ["hamradio"]
|
||||
},
|
||||
|
@ -210,7 +213,8 @@
|
|||
"upper_bound": 440000000,
|
||||
"frequencies": {
|
||||
"pocsag": 439987500,
|
||||
"q65": 432065000
|
||||
"q65": 432065000,
|
||||
"msk144": 432360000
|
||||
},
|
||||
"tags": ["hamradio"]
|
||||
},
|
||||
|
|
386
config_webrx.py
386
config_webrx.py
|
@ -1,386 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
config_webrx: configuration options for OpenWebRX
|
||||
|
||||
This file is part of OpenWebRX,
|
||||
an open-source SDR receiver software with a web UI.
|
||||
Copyright (c) 2013-2015 by Andras Retzler <randras@sdr.hu>
|
||||
Copyright (c) 2019-2021 by Jakob Ketterl <dd5jfk@darc.de>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
In addition, as a special exception, the copyright holders
|
||||
state that config_rtl.py and config_webrx.py are not part of the
|
||||
Corresponding Source defined in GNU AGPL version 3 section 1.
|
||||
|
||||
(It means that you do not have to redistribute config_rtl.py and
|
||||
config_webrx.py if you make any changes to these two configuration files,
|
||||
and use them for running your web service with OpenWebRX.)
|
||||
"""
|
||||
|
||||
"""
|
||||
DEPRECATION notice
|
||||
|
||||
As of OpenWebRX 0.21, the configuration system has been completely overhauled.
|
||||
The configuration of OpenWebRX should now be done in the new web-based
|
||||
configuration interface exclusively.
|
||||
|
||||
Existing configurations can still be used, but their values will be migrated
|
||||
to the new storage infrastructure as soon as the web configuration is used to
|
||||
edit them.
|
||||
|
||||
The new configuration storage is not intended to be edited manually.
|
||||
"""
|
||||
|
||||
# configuration version. please only modify if you're able to perform the associated migration steps.
|
||||
version = 7
|
||||
|
||||
# NOTE: you can find additional information about configuring OpenWebRX in the Wiki:
|
||||
# https://github.com/jketterl/openwebrx/wiki/Configuration-guide
|
||||
|
||||
# ==== Server settings ====
|
||||
#max_clients = 20
|
||||
|
||||
# ==== Web GUI configuration ====
|
||||
#receiver_name = "[Callsign]"
|
||||
#receiver_location = "Budapest, Hungary"
|
||||
#receiver_asl = 200
|
||||
#receiver_admin = "example@example.com"
|
||||
#receiver_gps = {"lat": 47.000000, "lon": 19.000000}
|
||||
#photo_title = "Panorama of Budapest from Schönherz Zoltán Dormitory"
|
||||
# photo_desc allows you to put pretty much any HTML you like into the receiver description.
|
||||
# The lines below should give you some examples of what's possible.
|
||||
#photo_desc = """
|
||||
#You can add your own background photo and receiver information.<br />
|
||||
#Receiver is operated by: <a href="mailto:openwebrx@localhost" target="_blank">Receiver Operator</a><br/>
|
||||
#Device: Receiver Device<br />
|
||||
#Antenna: Receiver Antenna<br />
|
||||
#Website: <a href="http://localhost" target="_blank">http://localhost</a>
|
||||
#"""
|
||||
|
||||
# ==== Public receiver listings ====
|
||||
# You can publish your receiver on online receiver directories, like https://www.receiverbook.de
|
||||
# You will receive a receiver key from the directory that will authenticate you as the operator of this receiver.
|
||||
# Please note that you not share your receiver keys publicly since anyone that obtains your receiver key can take over
|
||||
# your public listing.
|
||||
# Your receiver keys should be placed into this array:
|
||||
#receiver_keys = []
|
||||
# If you list your receiver on multiple sites, you can place all your keys into the array above, or you can append
|
||||
# keys to the arraylike this:
|
||||
# receiver_keys += ["my-receiver-key"]
|
||||
|
||||
# If you're not sure, simply copy & paste the code you received from your listing site below this line:
|
||||
|
||||
# ==== DSP/RX settings ====
|
||||
#fft_fps = 9
|
||||
#fft_size = 4096 # Should be power of 2
|
||||
#fft_voverlap_factor = (
|
||||
# 0.3 # If fft_voverlap_factor is above 0, multiple FFTs will be used for creating a line on the diagram.
|
||||
#)
|
||||
|
||||
#audio_compression = "adpcm" # valid values: "adpcm", "none"
|
||||
#fft_compression = "adpcm" # valid values: "adpcm", "none"
|
||||
|
||||
# Tau setting for WFM (broadcast FM) deemphasis\
|
||||
# Quote from wikipedia https://en.wikipedia.org/wiki/FM_broadcasting#Pre-emphasis_and_de-emphasis
|
||||
# "In most of the world a 50 µs time constant is used. In the Americas and South Korea, 75 µs is used"
|
||||
# Enable one of the following lines, depending on your location:
|
||||
# wfm_deemphasis_tau = 75e-6 # for US and South Korea
|
||||
#wfm_deemphasis_tau = 50e-6 # for the rest of the world
|
||||
|
||||
#digimodes_fft_size = 2048
|
||||
|
||||
# enables lookup of DMR ids using the radioid api
|
||||
#digital_voice_dmr_id_lookup = True
|
||||
|
||||
"""
|
||||
Note: if you experience audio underruns while CPU usage is 100%, you can:
|
||||
- decrease `samp_rate`,
|
||||
- set `fft_voverlap_factor` to 0,
|
||||
- decrease `fft_fps` and `fft_size`,
|
||||
- limit the number of users by decreasing `max_clients`.
|
||||
"""
|
||||
|
||||
# ==== I/Q sources ====
|
||||
# (Uncomment the appropriate by removing # characters at the beginning of the corresponding lines.)
|
||||
|
||||
###############################################################################
|
||||
# Is my SDR hardware supported? #
|
||||
# Check here: https://github.com/jketterl/openwebrx/wiki/Supported-Hardware #
|
||||
###############################################################################
|
||||
|
||||
# Currently supported types of sdr receivers:
|
||||
# "rtl_sdr", "rtl_sdr_soapy", "sdrplay", "hackrf", "airspy", "airspyhf", "fifi_sdr",
|
||||
# "perseussdr", "lime_sdr", "pluto_sdr", "soapy_remote", "hpsdr", "uhd",
|
||||
# "radioberry", "fcdpp", "rtl_tcp", "sddc", "runds"
|
||||
|
||||
# For more details on specific types, please checkout the wiki:
|
||||
# https://github.com/jketterl/openwebrx/wiki/Supported-Hardware#sdr-devices
|
||||
|
||||
#sdrs = {
|
||||
# "rtlsdr": {
|
||||
# "name": "RTL-SDR USB Stick",
|
||||
# "type": "rtl_sdr",
|
||||
# "ppm": 0,
|
||||
# # you can change this if you use an upconverter. formula is:
|
||||
# # center_freq + lfo_offset = actual frequency on the sdr
|
||||
# # "lfo_offset": 0,
|
||||
# "profiles": {
|
||||
# "70cm": {
|
||||
# "name": "70cm Relais",
|
||||
# "center_freq": 438800000,
|
||||
# "rf_gain": 29,
|
||||
# "samp_rate": 2400000,
|
||||
# "start_freq": 439275000,
|
||||
# "start_mod": "nfm",
|
||||
# },
|
||||
# "2m": {
|
||||
# "name": "2m komplett",
|
||||
# "center_freq": 145000000,
|
||||
# "rf_gain": 29,
|
||||
# "samp_rate": 2048000,
|
||||
# "start_freq": 145725000,
|
||||
# "start_mod": "nfm",
|
||||
# },
|
||||
# },
|
||||
# },
|
||||
# "airspy": {
|
||||
# "name": "Airspy HF+",
|
||||
# "type": "airspyhf",
|
||||
# "ppm": 0,
|
||||
# "rf_gain": "auto",
|
||||
# "profiles": {
|
||||
# "20m": {
|
||||
# "name": "20m",
|
||||
# "center_freq": 14150000,
|
||||
# "samp_rate": 384000,
|
||||
# "start_freq": 14070000,
|
||||
# "start_mod": "usb",
|
||||
# },
|
||||
# "30m": {
|
||||
# "name": "30m",
|
||||
# "center_freq": 10125000,
|
||||
# "samp_rate": 192000,
|
||||
# "start_freq": 10142000,
|
||||
# "start_mod": "usb",
|
||||
# },
|
||||
# "40m": {
|
||||
# "name": "40m",
|
||||
# "center_freq": 7100000,
|
||||
# "samp_rate": 256000,
|
||||
# "start_freq": 7070000,
|
||||
# "start_mod": "lsb",
|
||||
# },
|
||||
# "80m": {
|
||||
# "name": "80m",
|
||||
# "center_freq": 3650000,
|
||||
# "samp_rate": 384000,
|
||||
# "start_freq": 3570000,
|
||||
# "start_mod": "lsb",
|
||||
# },
|
||||
# "49m": {
|
||||
# "name": "49m Broadcast",
|
||||
# "center_freq": 6050000,
|
||||
# "samp_rate": 384000,
|
||||
# "start_freq": 6070000,
|
||||
# "start_mod": "am",
|
||||
# },
|
||||
# },
|
||||
# },
|
||||
# "sdrplay": {
|
||||
# "name": "SDRPlay RSP2",
|
||||
# "type": "sdrplay",
|
||||
# "ppm": 0,
|
||||
# "antenna": "Antenna A",
|
||||
# "profiles": {
|
||||
# "20m": {
|
||||
# "name": "20m",
|
||||
# "center_freq": 14150000,
|
||||
# "rf_gain": 0,
|
||||
# "samp_rate": 500000,
|
||||
# "start_freq": 14070000,
|
||||
# "start_mod": "usb",
|
||||
# },
|
||||
# "30m": {
|
||||
# "name": "30m",
|
||||
# "center_freq": 10125000,
|
||||
# "rf_gain": 0,
|
||||
# "samp_rate": 250000,
|
||||
# "start_freq": 10142000,
|
||||
# "start_mod": "usb",
|
||||
# },
|
||||
# "40m": {
|
||||
# "name": "40m",
|
||||
# "center_freq": 7100000,
|
||||
# "rf_gain": 0,
|
||||
# "samp_rate": 500000,
|
||||
# "start_freq": 7070000,
|
||||
# "start_mod": "lsb",
|
||||
# },
|
||||
# "80m": {
|
||||
# "name": "80m",
|
||||
# "center_freq": 3650000,
|
||||
# "rf_gain": 0,
|
||||
# "samp_rate": 500000,
|
||||
# "start_freq": 3570000,
|
||||
# "start_mod": "lsb",
|
||||
# },
|
||||
# "49m": {
|
||||
# "name": "49m Broadcast",
|
||||
# "center_freq": 6000000,
|
||||
# "rf_gain": 0,
|
||||
# "samp_rate": 500000,
|
||||
# "start_freq": 6070000,
|
||||
# "start_mod": "am",
|
||||
# },
|
||||
# },
|
||||
# },
|
||||
#}
|
||||
|
||||
# ==== Color themes ====
|
||||
|
||||
### google turbo colormap (see: https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html)
|
||||
#waterfall_scheme = "GoogleTurboWaterfall"
|
||||
|
||||
### original theme by teejez:
|
||||
#waterfall_scheme = "TeejeezWaterfall"
|
||||
|
||||
### old theme by HA7ILM:
|
||||
#waterfall_scheme = "Ha7ilmWaterfall"
|
||||
##For the old colors, you might also want to set [fft_voverlap_factor] to 0.
|
||||
|
||||
### custom waterfall schemes can be configured like this:
|
||||
#waterfall_scheme = "CustomWaterfall"
|
||||
#waterfall_colors = [0x0000FF, 0x00FF00, 0xFF0000]
|
||||
|
||||
### Waterfall calibration
|
||||
#waterfall_levels = {"min": -88, "max": -20} # in dB
|
||||
|
||||
#waterfall_auto_levels = {"min": 3, "max": 10}
|
||||
#waterfall_auto_min_range = 50
|
||||
|
||||
# Note: When the auto waterfall level button is clicked, the following happens:
|
||||
# [waterfall_levels.min] = [current_min_power_level] - [waterfall_auto_levels["min"]]
|
||||
# [waterfall_levels.max] = [current_max_power_level] + [waterfall_auto_levels["max"]]
|
||||
#
|
||||
# ___|__________________________________|____________________________________|__________________________________|___> signal power
|
||||
# \_waterfall_auto_levels["min"]_/ |__ current_min_power_level | \_waterfall_auto_levels["max"]_/
|
||||
# current_max_power_level __|
|
||||
|
||||
# This setting allows you to modify the precision of the frequency displays in OpenWebRX.
|
||||
# Set this to exponent of 10 to select the most precise digit in Hz you'd like to see
|
||||
# examples:
|
||||
# a value of 2 selects 10^2 = 100Hz tuning precision (default):
|
||||
#tuning_precision = 2
|
||||
# a value of 1 selects 10^1 = 10Hz tuning precision:
|
||||
#tuning_precision = 1
|
||||
|
||||
# This setting tells the auto-squelch the offset to add to the current signal level to use as the new squelch level.
|
||||
# Lowering this setting will give you a more sensitive squelch, but it may also cause unwanted squelch openings when
|
||||
# using the auto squelch.
|
||||
#squelch_auto_margin = 10 # in dB
|
||||
|
||||
#google_maps_api_key = ""
|
||||
|
||||
# how long should positions be visible on the map?
|
||||
# they will start fading out after half of that
|
||||
# in seconds; default: 2 hours
|
||||
#map_position_retention_time = 2 * 60 * 60
|
||||
|
||||
# decoder queue configuration
|
||||
# due to the nature of some operating modes (ft8, ft8, jt9, jt65, wspr and js8), the data is recorded for a given amount
|
||||
# of time (6 seconds up to 2 minutes) and decoded at the end. this can lead to very high peak loads.
|
||||
# to mitigate this, the recordings will be queued and processed in sequence.
|
||||
# the number of workers will limit the total amount of work (one worker will losely occupy one cpu / thread)
|
||||
#decoding_queue_workers = 2
|
||||
# the maximum queue length will cause decodes to be dumped if the workers cannot keep up
|
||||
# if you are running background services, make sure this number is high enough to accept the task influx during peaks
|
||||
# i.e. this should be higher than the number of decoding services running at the same time
|
||||
#decoding_queue_length = 10
|
||||
|
||||
# wsjt decoding depth will allow more results, but will also consume more cpu
|
||||
#wsjt_decoding_depth = 3
|
||||
# can also be set for each mode separately
|
||||
# jt65 seems to be somewhat prone to erroneous decodes, this setting handles that to some extent
|
||||
#wsjt_decoding_depths = {"jt65": 1}
|
||||
|
||||
# FST4 can be transmitted in different intervals. This setting determines which intervals will be decoded.
|
||||
# available values (in seconds): 15, 30, 60, 120, 300, 900, 1800
|
||||
#fst4_enabled_intervals = [15, 30]
|
||||
|
||||
# FST4W can be transmitted in different intervals. This setting determines which intervals will be decoded.
|
||||
# available values (in seconds): 120, 300, 900, 1800
|
||||
#fst4w_enabled_intervals = [120, 300]
|
||||
|
||||
# Q65 allows many combinations of intervals and submodes. This setting determines which combinations will be decoded.
|
||||
# Please use the mode letter followed by the decode interval in seconds to specify the combinations. For example:
|
||||
#q65_enabled_combinations = ["A30", "E120", "C60"]
|
||||
|
||||
# JS8 comes in different speeds: normal, slow, fast, turbo. This setting controls which ones are enabled.
|
||||
#js8_enabled_profiles = ["normal", "slow"]
|
||||
# JS8 decoding depth; higher value will get more results, but will also consume more cpu
|
||||
#js8_decoding_depth = 3
|
||||
|
||||
# Enable background service for decoding digital data. You can find more information at:
|
||||
# https://github.com/jketterl/openwebrx/wiki/Background-decoding
|
||||
#services_enabled = False
|
||||
#services_decoders = ["ft8", "ft4", "wspr", "packet"]
|
||||
|
||||
# === aprs igate settings ===
|
||||
# If you want to share your APRS decodes with the aprs network, configure these settings accordingly.
|
||||
# Make sure that you have set services_enabled to true and customize services_decoders to your needs.
|
||||
#aprs_callsign = "N0CALL"
|
||||
#aprs_igate_enabled = False
|
||||
#aprs_igate_server = "euro.aprs2.net"
|
||||
#aprs_igate_password = ""
|
||||
# beacon uses the receiver_gps setting, so if you enable this, make sure the location is correct there
|
||||
#aprs_igate_beacon = False
|
||||
|
||||
# Uncomment the following to customize gateway beacon details reported to the aprs network
|
||||
# Plese see Dire Wolf's documentation on PBEACON configuration for complete details:
|
||||
# https://github.com/wb2osz/direwolf/raw/master/doc/User-Guide.pdf
|
||||
|
||||
# Symbol in its two-character form as specified by the APRS spec at http://www.aprs.org/symbols/symbols-new.txt
|
||||
# Default: Receive only IGate (do not send msgs back to RF)
|
||||
# aprs_igate_symbol = "R&"
|
||||
|
||||
# Custom comment about igate
|
||||
# Default: OpenWebRX APRS gateway
|
||||
# aprs_igate_comment = "OpenWebRX APRS gateway"
|
||||
|
||||
# Antenna Height and Gain details
|
||||
# Unspecified by default
|
||||
# Antenna height above average terrain (HAAT) in meters
|
||||
# aprs_igate_height = "5"
|
||||
# Antenna gain in dBi
|
||||
# aprs_igate_gain = "0"
|
||||
# Antenna direction (N, NE, E, SE, S, SW, W, NW). Omnidirectional by default
|
||||
# aprs_igate_dir = "NE"
|
||||
|
||||
# === PSK Reporter settings ===
|
||||
# enable this if you want to upload all ft8, ft4 etc spots to pskreporter.info
|
||||
# this also uses the receiver_gps setting from above, so make sure it contains a correct locator
|
||||
#pskreporter_enabled = False
|
||||
#pskreporter_callsign = "N0CALL"
|
||||
# optional antenna information, uncomment to enable
|
||||
#pskreporter_antenna_information = "Dipole"
|
||||
|
||||
# === WSPRNet reporting settings
|
||||
# enable this if you want to upload WSPR spots to wsprnet.ort
|
||||
# in addition to these settings also make sure that receiver_gps contains your correct location
|
||||
#wsprnet_enabled = False
|
||||
#wsprnet_callsign = "N0CALL"
|
|
@ -1,9 +1,10 @@
|
|||
from csdr.chain.demodulator import BaseDemodulatorChain, FixedAudioRateChain, FixedIfSampleRateChain, DialFrequencyReceiver, MetaProvider, SlotFilterChain, DemodulatorError
|
||||
from csdr.chain.demodulator import BaseDemodulatorChain, FixedAudioRateChain, FixedIfSampleRateChain, DialFrequencyReceiver, MetaProvider, SlotFilterChain, DemodulatorError, ServiceDemodulator
|
||||
from pycsdr.modules import FmDemod, Agc, Writer, Buffer
|
||||
from pycsdr.types import Format
|
||||
from digiham.modules import DstarDecoder, DcBlock, FskDemodulator, GfskDemodulator, DigitalVoiceFilter, MbeSynthesizer, NarrowRrcFilter, NxdnDecoder, DmrDecoder, WideRrcFilter, YsfDecoder
|
||||
from digiham.modules import DstarDecoder, DcBlock, FskDemodulator, GfskDemodulator, DigitalVoiceFilter, MbeSynthesizer, NarrowRrcFilter, NxdnDecoder, DmrDecoder, WideRrcFilter, YsfDecoder, PocsagDecoder
|
||||
from digiham.ambe import Modes, ServerError
|
||||
from owrx.meta import MetaParser
|
||||
from owrx.pocsag import PocsagParser
|
||||
|
||||
|
||||
class DigihamChain(BaseDemodulatorChain, FixedIfSampleRateChain, FixedAudioRateChain, DialFrequencyReceiver, MetaProvider):
|
||||
|
@ -109,3 +110,24 @@ class Ysf(DigihamChain):
|
|||
filter=WideRrcFilter(),
|
||||
codecserver=codecserver
|
||||
)
|
||||
|
||||
|
||||
class PocsagDemodulator(ServiceDemodulator, DialFrequencyReceiver):
|
||||
def __init__(self):
|
||||
self.parser = PocsagParser()
|
||||
workers = [
|
||||
FmDemod(),
|
||||
FskDemodulator(samplesPerSymbol=40, invert=True),
|
||||
PocsagDecoder(),
|
||||
self.parser,
|
||||
]
|
||||
super().__init__(workers)
|
||||
|
||||
def supportsSquelch(self) -> bool:
|
||||
return False
|
||||
|
||||
def getFixedAudioRate(self) -> int:
|
||||
return 48000
|
||||
|
||||
def setDialFrequency(self, frequency: int) -> None:
|
||||
self.parser.setDialFrequency(frequency)
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
from csdr.chain.demodulator import ServiceDemodulator, SecondaryDemodulator, DialFrequencyReceiver, SecondarySelectorChain
|
||||
from csdr.module.msk144 import Msk144Module, ParserAdapter
|
||||
from owrx.audio.chopper import AudioChopper, AudioChopperParser
|
||||
from owrx.aprs.kiss import KissDeframer
|
||||
from owrx.aprs import Ax25Parser, AprsParser
|
||||
from pycsdr.modules import Convert, FmDemod, Agc, TimingRecovery, DBPskDecoder, VaricodeDecoder
|
||||
from pycsdr.types import Format
|
||||
from owrx.aprs.module import DirewolfModule
|
||||
from digiham.modules import FskDemodulator, PocsagDecoder
|
||||
from owrx.pocsag import PocsagParser
|
||||
|
||||
|
||||
class AudioChopperDemodulator(ServiceDemodulator, DialFrequencyReceiver):
|
||||
|
@ -22,6 +21,23 @@ class AudioChopperDemodulator(ServiceDemodulator, DialFrequencyReceiver):
|
|||
self.chopper.setDialFrequency(frequency)
|
||||
|
||||
|
||||
class Msk144Demodulator(ServiceDemodulator, DialFrequencyReceiver):
|
||||
def __init__(self):
|
||||
self.parser = ParserAdapter()
|
||||
workers = [
|
||||
Convert(Format.FLOAT, Format.SHORT),
|
||||
Msk144Module(),
|
||||
self.parser,
|
||||
]
|
||||
super().__init__(workers)
|
||||
|
||||
def getFixedAudioRate(self) -> int:
|
||||
return 12000
|
||||
|
||||
def setDialFrequency(self, frequency: int) -> None:
|
||||
self.parser.setDialFrequency(frequency)
|
||||
|
||||
|
||||
class PacketDemodulator(ServiceDemodulator, DialFrequencyReceiver):
|
||||
def __init__(self, service: bool = False):
|
||||
self.parser = AprsParser()
|
||||
|
@ -45,27 +61,6 @@ class PacketDemodulator(ServiceDemodulator, DialFrequencyReceiver):
|
|||
self.parser.setDialFrequency(frequency)
|
||||
|
||||
|
||||
class PocsagDemodulator(ServiceDemodulator, DialFrequencyReceiver):
|
||||
def __init__(self):
|
||||
self.parser = PocsagParser()
|
||||
workers = [
|
||||
FmDemod(),
|
||||
FskDemodulator(samplesPerSymbol=40, invert=True),
|
||||
PocsagDecoder(),
|
||||
self.parser,
|
||||
]
|
||||
super().__init__(workers)
|
||||
|
||||
def supportsSquelch(self) -> bool:
|
||||
return False
|
||||
|
||||
def getFixedAudioRate(self) -> int:
|
||||
return 48000
|
||||
|
||||
def setDialFrequency(self, frequency: int) -> None:
|
||||
self.parser.setDialFrequency(frequency)
|
||||
|
||||
|
||||
class PskDemodulator(SecondaryDemodulator, SecondarySelectorChain):
|
||||
def __init__(self, baudRate: float):
|
||||
self.baudRate = baudRate
|
||||
|
|
|
@ -126,7 +126,7 @@ class PopenModule(AutoStartModule, metaclass=ABCMeta):
|
|||
# resume in case the reader has been stop()ed before
|
||||
self.reader.resume()
|
||||
Thread(target=self.pump(self.reader.read, self.process.stdin.write)).start()
|
||||
Thread(target=self.pump(partial(self.process.stdout.read, 1024), self.writer.write)).start()
|
||||
Thread(target=self.pump(partial(self.process.stdout.read1, 1024), self.writer.write)).start()
|
||||
|
||||
def stop(self):
|
||||
if self.process is not None:
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
from pycsdr.types import Format
|
||||
from csdr.module import PopenModule, ThreadModule
|
||||
from owrx.wsjt import WsjtParser, Msk144Profile
|
||||
import pickle
|
||||
|
||||
import logging
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Msk144Module(PopenModule):
|
||||
def getCommand(self):
|
||||
return ["msk144decoder"]
|
||||
|
||||
def getInputFormat(self) -> Format:
|
||||
return Format.SHORT
|
||||
|
||||
def getOutputFormat(self) -> Format:
|
||||
return Format.CHAR
|
||||
|
||||
|
||||
class ParserAdapter(ThreadModule):
|
||||
def __init__(self):
|
||||
self.retained = bytes()
|
||||
self.parser = WsjtParser()
|
||||
self.dialFrequency = 0
|
||||
super().__init__()
|
||||
|
||||
def run(self):
|
||||
profile = Msk144Profile()
|
||||
|
||||
while self.doRun:
|
||||
data = self.reader.read()
|
||||
if data is None:
|
||||
self.doRun = False
|
||||
else:
|
||||
self.retained += data
|
||||
lines = self.retained.split(b"\n")
|
||||
|
||||
# keep the last line
|
||||
# this should either be empty if the last char was \n
|
||||
# or an incomplete line if the read returned early
|
||||
self.retained = lines[-1]
|
||||
|
||||
# parse all completed lines
|
||||
for line in lines[0:-1]:
|
||||
# actual messages from msk144decoder should start with "*** "
|
||||
if line[0:4] == b"*** ":
|
||||
self.writer.write(pickle.dumps(self.parser.parse(profile, self.dialFrequency, line[4:])))
|
||||
|
||||
def getInputFormat(self) -> Format:
|
||||
return Format.CHAR
|
||||
|
||||
def getOutputFormat(self) -> Format:
|
||||
return Format.CHAR
|
||||
|
||||
def setDialFrequency(self, frequency: int) -> None:
|
||||
self.dialFrequency = frequency
|
|
@ -1,6 +1,16 @@
|
|||
openwebrx (1.3.0) UNRELEASED; urgency=low
|
||||
* SDR device log messages are now available in the web configuration to
|
||||
simplify troubleshooting
|
||||
* Added support for the MSK144 digimode
|
||||
|
||||
-- Jakob Ketterl <jakob.ketterl@gmx.de> Thu, 16 Jun 2022 21:47:00 +0000
|
||||
-- Jakob Ketterl <jakob.ketterl@gmx.de> Fri, 30 Sep 2022 16:47:00 +0000
|
||||
|
||||
openwebrx (1.2.1) bullseye jammy; urgency=low
|
||||
|
||||
* FifiSDR support fixed (pipeline formats now line up correctly)
|
||||
* Added "Device" input for FifiSDR devices for sound card selection
|
||||
|
||||
-- Jakob Ketterl <jakob.ketterl@gmx.de> Tue, 20 Sep 2022 16:01:00 +0000
|
||||
|
||||
openwebrx (1.2.0) bullseye jammy; urgency=low
|
||||
|
||||
|
|
|
@ -11,6 +11,6 @@ Vcs-Git: https://github.com/jketterl/openwebrx.git
|
|||
Package: openwebrx
|
||||
Architecture: all
|
||||
Depends: adduser, python3 (>= 3.5), python3-pkg-resources, owrx-connector (>= 0.5), soapysdr-tools, python3-csdr (>= 0.18), ${python3:Depends}, ${misc:Depends}
|
||||
Recommends: python3-digiham (>= 0.6), direwolf (>= 1.4), wsjtx, js8call, runds-connector (>= 0.2), hpsdrconnector, aprs-symbols, m17-demod, js8call, python3-js8py (>= 0.1), nmux (>= 0.18), codecserver (>= 0.1)
|
||||
Recommends: python3-digiham (>= 0.6), direwolf (>= 1.4), wsjtx, js8call, runds-connector (>= 0.2), hpsdrconnector, aprs-symbols, m17-demod, js8call, python3-js8py (>= 0.2), nmux (>= 0.18), codecserver (>= 0.1), msk144decoder
|
||||
Description: multi-user web sdr
|
||||
Open source, multi-user SDR receiver with a web interface
|
||||
|
|
|
@ -1,310 +1,341 @@
|
|||
diff -ur wsjtx-orig/CMakeLists.txt wsjtx/CMakeLists.txt
|
||||
--- wsjtx-orig/CMakeLists.txt 2021-11-02 16:34:09.361811689 +0100
|
||||
+++ wsjtx/CMakeLists.txt 2021-11-02 16:38:36.696088115 +0100
|
||||
--- wsjtx-orig/CMakeLists.txt 2023-01-28 17:43:05.586124507 +0100
|
||||
+++ wsjtx/CMakeLists.txt 2023-01-28 17:56:07.108634912 +0100
|
||||
@@ -122,7 +122,7 @@
|
||||
option (WSJT_QDEBUG_TO_FILE "Redirect Qt debuging messages to a trace file.")
|
||||
option (WSJT_SOFT_KEYING "Apply a ramp to CW keying envelope to reduce transients." ON)
|
||||
option (WSJT_SKIP_MANPAGES "Skip *nix manpage generation.")
|
||||
-option (WSJT_GENERATE_DOCS "Generate documentation files." ON)
|
||||
+option (WSJT_GENERATE_DOCS "Generate documentation files.")
|
||||
option (WSJT_RIG_NONE_CAN_SPLIT "Allow split operation with \"None\" as rig.")
|
||||
option (WSJT_TRACE_UDP "Debugging option that turns on UDP message protocol diagnostics.")
|
||||
option (WSJT_BUILD_UTILS "Build simulators and code demonstrators." ON)
|
||||
@@ -169,76 +169,7 @@
|
||||
)
|
||||
|
||||
set (wsjt_qt_CXXSRCS
|
||||
- helper_functions.cpp
|
||||
- qt_helpers.cpp
|
||||
- widgets/MessageBox.cpp
|
||||
- MetaDataRegistry.cpp
|
||||
- Network/NetworkServerLookup.cpp
|
||||
revision_utils.cpp
|
||||
- L10nLoader.cpp
|
||||
- WFPalette.cpp
|
||||
- Radio.cpp
|
||||
- RadioMetaType.cpp
|
||||
- NonInheritingProcess.cpp
|
||||
- models/IARURegions.cpp
|
||||
- models/Bands.cpp
|
||||
- models/Modes.cpp
|
||||
- models/FrequencyList.cpp
|
||||
- models/StationList.cpp
|
||||
- widgets/FrequencyLineEdit.cpp
|
||||
- widgets/FrequencyDeltaLineEdit.cpp
|
||||
- item_delegates/CandidateKeyFilter.cpp
|
||||
- item_delegates/ForeignKeyDelegate.cpp
|
||||
- validators/LiveFrequencyValidator.cpp
|
||||
- GetUserId.cpp
|
||||
- Audio/AudioDevice.cpp
|
||||
- Transceiver/Transceiver.cpp
|
||||
- Transceiver/TransceiverBase.cpp
|
||||
- Transceiver/EmulateSplitTransceiver.cpp
|
||||
- Transceiver/TransceiverFactory.cpp
|
||||
- Transceiver/PollingTransceiver.cpp
|
||||
- Transceiver/HamlibTransceiver.cpp
|
||||
- Transceiver/HRDTransceiver.cpp
|
||||
- Transceiver/DXLabSuiteCommanderTransceiver.cpp
|
||||
- Network/NetworkMessage.cpp
|
||||
- Network/MessageClient.cpp
|
||||
- widgets/LettersSpinBox.cpp
|
||||
- widgets/HintedSpinBox.cpp
|
||||
- widgets/RestrictedSpinBox.cpp
|
||||
- widgets/HelpTextWindow.cpp
|
||||
- SampleDownloader.cpp
|
||||
- SampleDownloader/DirectoryDelegate.cpp
|
||||
- SampleDownloader/Directory.cpp
|
||||
- SampleDownloader/FileNode.cpp
|
||||
- SampleDownloader/RemoteFile.cpp
|
||||
- DisplayManual.cpp
|
||||
- MultiSettings.cpp
|
||||
- validators/MaidenheadLocatorValidator.cpp
|
||||
- validators/CallsignValidator.cpp
|
||||
- widgets/SplashScreen.cpp
|
||||
- EqualizationToolsDialog.cpp
|
||||
- widgets/DoubleClickablePushButton.cpp
|
||||
- widgets/DoubleClickableRadioButton.cpp
|
||||
- Network/LotWUsers.cpp
|
||||
- models/DecodeHighlightingModel.cpp
|
||||
- widgets/DecodeHighlightingListView.cpp
|
||||
- models/FoxLog.cpp
|
||||
- widgets/AbstractLogWindow.cpp
|
||||
- widgets/FoxLogWindow.cpp
|
||||
- widgets/CabrilloLogWindow.cpp
|
||||
- item_delegates/CallsignDelegate.cpp
|
||||
- item_delegates/MaidenheadLocatorDelegate.cpp
|
||||
- item_delegates/FrequencyDelegate.cpp
|
||||
- item_delegates/FrequencyDeltaDelegate.cpp
|
||||
- item_delegates/SQLiteDateTimeDelegate.cpp
|
||||
- models/CabrilloLog.cpp
|
||||
- logbook/AD1CCty.cpp
|
||||
- logbook/WorkedBefore.cpp
|
||||
- logbook/Multiplier.cpp
|
||||
- Network/NetworkAccessManager.cpp
|
||||
- widgets/LazyFillComboBox.cpp
|
||||
- widgets/CheckableItemComboBox.cpp
|
||||
- widgets/BandComboBox.cpp
|
||||
)
|
||||
|
||||
set (wsjt_qtmm_CXXSRCS
|
||||
@@ -1079,9 +1010,6 @@
|
||||
if (WSJT_GENERATE_DOCS)
|
||||
add_subdirectory (doc)
|
||||
endif (WSJT_GENERATE_DOCS)
|
||||
-if (EXISTS ${CMAKE_SOURCE_DIR}/tests AND IS_DIRECTORY ${CMAKE_SOURCE_DIR}/tests)
|
||||
- add_subdirectory (tests)
|
||||
-endif ()
|
||||
|
||||
# build a library of package functionality (without and optionally with OpenMP support)
|
||||
add_library (wsjt_cxx STATIC ${wsjt_CSRCS} ${wsjt_CXXSRCS})
|
||||
@@ -1340,10 +1268,7 @@
|
||||
add_library (wsjt_qt STATIC ${wsjt_qt_CXXSRCS} ${wsjt_qt_GENUISRCS} ${GENAXSRCS})
|
||||
# set wsjtx_udp exports to static variants
|
||||
target_compile_definitions (wsjt_qt PUBLIC UDP_STATIC_DEFINE)
|
||||
-target_link_libraries (wsjt_qt Hamlib::Hamlib Boost::log qcp Qt5::Widgets Qt5::Network Qt5::Sql)
|
||||
-if (WIN32)
|
||||
- target_link_libraries (wsjt_qt Qt5::AxContainer Qt5::AxBase)
|
||||
-endif (WIN32)
|
||||
+target_link_libraries (wsjt_qt Qt5::Core)
|
||||
|
||||
# build a library of package Qt functionality used in Fortran utilities
|
||||
add_library (fort_qt STATIC ${fort_qt_CXXSRCS})
|
||||
@@ -1408,60 +1333,6 @@
|
||||
add_subdirectory (map65)
|
||||
endif ()
|
||||
|
||||
-# build the main application
|
||||
-generate_version_info (wsjtx_VERSION_RESOURCES
|
||||
- NAME wsjtx
|
||||
- BUNDLE ${PROJECT_BUNDLE_NAME}
|
||||
- ICON ${WSJTX_ICON_FILE}
|
||||
- )
|
||||
-
|
||||
-add_executable (wsjtx MACOSX_BUNDLE
|
||||
- ${wsjtx_CXXSRCS}
|
||||
- ${wsjtx_GENUISRCS}
|
||||
- ${WSJTX_ICON_FILE}
|
||||
- ${wsjtx_RESOURCES_RCC}
|
||||
- ${wsjtx_VERSION_RESOURCES}
|
||||
- )
|
||||
-
|
||||
-if (WSJT_CREATE_WINMAIN)
|
||||
- set_target_properties (wsjtx PROPERTIES WIN32_EXECUTABLE ON)
|
||||
-endif (WSJT_CREATE_WINMAIN)
|
||||
-
|
||||
-set_target_properties (wsjtx PROPERTIES
|
||||
- MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Darwin/Info.plist.in"
|
||||
- MACOSX_BUNDLE_INFO_STRING "${PROJECT_DESCRIPTION}"
|
||||
- MACOSX_BUNDLE_ICON_FILE "${WSJTX_ICON_FILE}"
|
||||
- MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
|
||||
- MACOSX_BUNDLE_SHORT_VERSION_STRING "v${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}"
|
||||
- MACOSX_BUNDLE_LONG_VERSION_STRING "Version ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}${SCS_VERSION_STR}"
|
||||
- MACOSX_BUNDLE_BUNDLE_NAME "${PROJECT_BUNDLE_NAME}"
|
||||
- MACOSX_BUNDLE_BUNDLE_EXECUTABLE_NAME "${PROJECT_NAME}"
|
||||
- MACOSX_BUNDLE_COPYRIGHT "${PROJECT_COPYRIGHT}"
|
||||
- MACOSX_BUNDLE_GUI_IDENTIFIER "org.k1jt.wsjtx"
|
||||
- )
|
||||
-
|
||||
-target_include_directories (wsjtx PRIVATE ${FFTW3_INCLUDE_DIRS})
|
||||
-if (APPLE)
|
||||
- target_link_libraries (wsjtx wsjt_fort)
|
||||
-else ()
|
||||
- target_link_libraries (wsjtx wsjt_fort_omp)
|
||||
- if (OpenMP_C_FLAGS)
|
||||
- set_target_properties (wsjtx PROPERTIES
|
||||
- COMPILE_FLAGS "${OpenMP_C_FLAGS}"
|
||||
- LINK_FLAGS "${OpenMP_C_FLAGS}"
|
||||
- )
|
||||
- endif ()
|
||||
- set_target_properties (wsjtx PROPERTIES
|
||||
- Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/fortran_modules_omp
|
||||
- )
|
||||
- if (WIN32)
|
||||
- set_target_properties (wsjtx PROPERTIES
|
||||
- LINK_FLAGS -Wl,--stack,0x1000000,--heap,0x20000000
|
||||
- )
|
||||
- endif ()
|
||||
-endif ()
|
||||
-target_link_libraries (wsjtx Qt5::SerialPort wsjt_cxx wsjt_qt wsjt_qtmm ${FFTW3_LIBRARIES} ${LIBM_LIBRARIES})
|
||||
-
|
||||
# make a library for WSJT-X UDP servers
|
||||
# add_library (wsjtx_udp SHARED ${UDP_library_CXXSRCS})
|
||||
add_library (wsjtx_udp-static STATIC ${UDP_library_CXXSRCS})
|
||||
@@ -1501,47 +1372,9 @@
|
||||
add_executable (wsjtx_app_version AppVersion/AppVersion.cpp ${wsjtx_app_version_VERSION_RESOURCES})
|
||||
target_link_libraries (wsjtx_app_version wsjt_qt)
|
||||
|
||||
-generate_version_info (message_aggregator_VERSION_RESOURCES
|
||||
- NAME message_aggregator
|
||||
- BUNDLE ${PROJECT_BUNDLE_NAME}
|
||||
- ICON ${WSJTX_ICON_FILE}
|
||||
- FILE_DESCRIPTION "Example WSJT-X UDP Message Protocol application"
|
||||
- )
|
||||
-add_resources (message_aggregator_RESOURCES /qss ${message_aggregator_STYLESHEETS})
|
||||
-configure_file (UDPExamples/message_aggregator.qrc.in message_aggregator.qrc @ONLY)
|
||||
-qt5_add_resources (message_aggregator_RESOURCES_RCC
|
||||
- ${CMAKE_CURRENT_BINARY_DIR}/message_aggregator.qrc
|
||||
- contrib/QDarkStyleSheet/qdarkstyle/style.qrc
|
||||
- )
|
||||
-add_executable (message_aggregator
|
||||
- ${message_aggregator_CXXSRCS}
|
||||
- ${message_aggregator_RESOURCES_RCC}
|
||||
- ${message_aggregator_VERSION_RESOURCES}
|
||||
- )
|
||||
-target_link_libraries (message_aggregator wsjt_qt Qt5::Widgets wsjtx_udp-static)
|
||||
-
|
||||
-if (WSJT_CREATE_WINMAIN)
|
||||
- set_target_properties (message_aggregator PROPERTIES WIN32_EXECUTABLE ON)
|
||||
-endif (WSJT_CREATE_WINMAIN)
|
||||
-
|
||||
-if (UNIX)
|
||||
- if (NOT WSJT_SKIP_MANPAGES)
|
||||
- add_subdirectory (manpages)
|
||||
- add_dependencies (wsjtx manpages)
|
||||
- endif (NOT WSJT_SKIP_MANPAGES)
|
||||
- if (NOT APPLE)
|
||||
- add_subdirectory (debian)
|
||||
- add_dependencies (wsjtx debian)
|
||||
- endif (NOT APPLE)
|
||||
-endif (UNIX)
|
||||
-
|
||||
#
|
||||
# installation
|
||||
#
|
||||
-install (TARGETS wsjtx
|
||||
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
||||
- BUNDLE DESTINATION . COMPONENT runtime
|
||||
- )
|
||||
|
||||
# install (TARGETS wsjtx_udp EXPORT udp
|
||||
# RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
@@ -1560,12 +1393,7 @@
|
||||
# DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/wsjtx
|
||||
# )
|
||||
|
||||
-install (TARGETS udp_daemon message_aggregator wsjtx_app_version
|
||||
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
||||
- BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
||||
- )
|
||||
-
|
||||
-install (TARGETS jt9 wsprd fmtave fcal fmeasure
|
||||
+install (TARGETS wsjtx_app_version jt9 wsprd
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
||||
BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
||||
)
|
||||
@@ -1578,38 +1406,6 @@
|
||||
)
|
||||
endif(WSJT_BUILD_UTILS)
|
||||
|
||||
-install (PROGRAMS
|
||||
- ${RIGCTL_EXE}
|
||||
- DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
- #COMPONENT runtime
|
||||
- RENAME rigctl-wsjtx${CMAKE_EXECUTABLE_SUFFIX}
|
||||
- )
|
||||
-
|
||||
-install (PROGRAMS
|
||||
- ${RIGCTLD_EXE}
|
||||
- DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
- #COMPONENT runtime
|
||||
- RENAME rigctld-wsjtx${CMAKE_EXECUTABLE_SUFFIX}
|
||||
- )
|
||||
-
|
||||
-install (PROGRAMS
|
||||
- ${RIGCTLCOM_EXE}
|
||||
- DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
- #COMPONENT runtime
|
||||
- RENAME rigctlcom-wsjtx${CMAKE_EXECUTABLE_SUFFIX}
|
||||
- )
|
||||
-
|
||||
-install (FILES
|
||||
- README
|
||||
- COPYING
|
||||
- AUTHORS
|
||||
- THANKS
|
||||
- NEWS
|
||||
- BUGS
|
||||
- DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
||||
- #COMPONENT runtime
|
||||
- )
|
||||
-
|
||||
install (FILES
|
||||
cty.dat
|
||||
cty.dat_copyright.txt
|
||||
@@ -1618,13 +1414,6 @@
|
||||
#COMPONENT runtime
|
||||
)
|
||||
|
||||
-install (DIRECTORY
|
||||
- example_log_configurations
|
||||
- DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
||||
- FILES_MATCHING REGEX "^.*[^~]$"
|
||||
- #COMPONENT runtime
|
||||
- )
|
||||
-
|
||||
#
|
||||
# Mac installer files
|
||||
#
|
||||
@@ -1676,22 +1465,6 @@
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/wsjtx_config.h"
|
||||
)
|
||||
|
||||
-
|
||||
-if (NOT WIN32 AND NOT APPLE)
|
||||
- # install a desktop file so wsjtx appears in the application start
|
||||
- # menu with an icon
|
||||
- install (
|
||||
- FILES wsjtx.desktop message_aggregator.desktop
|
||||
- DESTINATION share/applications
|
||||
- #COMPONENT runtime
|
||||
- )
|
||||
- install (
|
||||
- FILES icons/Unix/wsjtx_icon.png
|
||||
- DESTINATION share/pixmaps
|
||||
- #COMPONENT runtime
|
||||
- )
|
||||
-endif (NOT WIN32 AND NOT APPLE)
|
||||
-
|
||||
if (APPLE)
|
||||
set (CMAKE_POSTFLIGHT_SCRIPT
|
||||
"${wsjtx_BINARY_DIR}/postflight.sh")
|
||||
option (WSJT_QDEBUG_TO_FILE "Redirect Qt debuging messages to a trace file.")
|
||||
option (WSJT_SOFT_KEYING "Apply a ramp to CW keying envelope to reduce transients." ON)
|
||||
option (WSJT_SKIP_MANPAGES "Skip *nix manpage generation.")
|
||||
-option (WSJT_GENERATE_DOCS "Generate documentation files." ON)
|
||||
+option (WSJT_GENERATE_DOCS "Generate documentation files.")
|
||||
option (WSJT_RIG_NONE_CAN_SPLIT "Allow split operation with \"None\" as rig.")
|
||||
option (WSJT_TRACE_UDP "Debugging option that turns on UDP message protocol diagnostics.")
|
||||
option (WSJT_BUILD_UTILS "Build simulators and code demonstrators." ON)
|
||||
@@ -170,77 +170,7 @@
|
||||
)
|
||||
|
||||
set (wsjt_qt_CXXSRCS
|
||||
- helper_functions.cpp
|
||||
- qt_helpers.cpp
|
||||
- widgets/MessageBox.cpp
|
||||
- MetaDataRegistry.cpp
|
||||
- Network/NetworkServerLookup.cpp
|
||||
revision_utils.cpp
|
||||
- L10nLoader.cpp
|
||||
- WFPalette.cpp
|
||||
- Radio.cpp
|
||||
- RadioMetaType.cpp
|
||||
- NonInheritingProcess.cpp
|
||||
- models/IARURegions.cpp
|
||||
- models/Bands.cpp
|
||||
- models/Modes.cpp
|
||||
- models/FrequencyList.cpp
|
||||
- models/StationList.cpp
|
||||
- widgets/FrequencyLineEdit.cpp
|
||||
- widgets/FrequencyDeltaLineEdit.cpp
|
||||
- item_delegates/CandidateKeyFilter.cpp
|
||||
- item_delegates/ForeignKeyDelegate.cpp
|
||||
- item_delegates/MessageItemDelegate.cpp
|
||||
- validators/LiveFrequencyValidator.cpp
|
||||
- GetUserId.cpp
|
||||
- Audio/AudioDevice.cpp
|
||||
- Transceiver/Transceiver.cpp
|
||||
- Transceiver/TransceiverBase.cpp
|
||||
- Transceiver/EmulateSplitTransceiver.cpp
|
||||
- Transceiver/TransceiverFactory.cpp
|
||||
- Transceiver/PollingTransceiver.cpp
|
||||
- Transceiver/HamlibTransceiver.cpp
|
||||
- Transceiver/HRDTransceiver.cpp
|
||||
- Transceiver/DXLabSuiteCommanderTransceiver.cpp
|
||||
- Network/NetworkMessage.cpp
|
||||
- Network/MessageClient.cpp
|
||||
- widgets/LettersSpinBox.cpp
|
||||
- widgets/HintedSpinBox.cpp
|
||||
- widgets/RestrictedSpinBox.cpp
|
||||
- widgets/HelpTextWindow.cpp
|
||||
- SampleDownloader.cpp
|
||||
- SampleDownloader/DirectoryDelegate.cpp
|
||||
- SampleDownloader/Directory.cpp
|
||||
- SampleDownloader/FileNode.cpp
|
||||
- SampleDownloader/RemoteFile.cpp
|
||||
- DisplayManual.cpp
|
||||
- MultiSettings.cpp
|
||||
- validators/MaidenheadLocatorValidator.cpp
|
||||
- validators/CallsignValidator.cpp
|
||||
- widgets/SplashScreen.cpp
|
||||
- EqualizationToolsDialog.cpp
|
||||
- widgets/DoubleClickablePushButton.cpp
|
||||
- widgets/DoubleClickableRadioButton.cpp
|
||||
- Network/LotWUsers.cpp
|
||||
- models/DecodeHighlightingModel.cpp
|
||||
- widgets/DecodeHighlightingListView.cpp
|
||||
- models/FoxLog.cpp
|
||||
- widgets/AbstractLogWindow.cpp
|
||||
- widgets/FoxLogWindow.cpp
|
||||
- widgets/CabrilloLogWindow.cpp
|
||||
- item_delegates/CallsignDelegate.cpp
|
||||
- item_delegates/MaidenheadLocatorDelegate.cpp
|
||||
- item_delegates/FrequencyDelegate.cpp
|
||||
- item_delegates/FrequencyDeltaDelegate.cpp
|
||||
- item_delegates/SQLiteDateTimeDelegate.cpp
|
||||
- models/CabrilloLog.cpp
|
||||
- logbook/AD1CCty.cpp
|
||||
- logbook/WorkedBefore.cpp
|
||||
- logbook/Multiplier.cpp
|
||||
- Network/NetworkAccessManager.cpp
|
||||
- widgets/LazyFillComboBox.cpp
|
||||
- widgets/CheckableItemComboBox.cpp
|
||||
- widgets/BandComboBox.cpp
|
||||
)
|
||||
|
||||
set (wsjt_qtmm_CXXSRCS
|
||||
@@ -1089,9 +1019,6 @@
|
||||
if (WSJT_GENERATE_DOCS)
|
||||
add_subdirectory (doc)
|
||||
endif (WSJT_GENERATE_DOCS)
|
||||
-if (EXISTS ${CMAKE_SOURCE_DIR}/tests AND IS_DIRECTORY ${CMAKE_SOURCE_DIR}/tests)
|
||||
- add_subdirectory (tests)
|
||||
-endif ()
|
||||
|
||||
# build a library of package functionality (without and optionally with OpenMP support)
|
||||
add_library (wsjt_cxx STATIC ${wsjt_CSRCS} ${wsjt_CXXSRCS})
|
||||
@@ -1357,10 +1284,7 @@
|
||||
add_library (wsjt_qt STATIC ${wsjt_qt_CXXSRCS} ${wsjt_qt_GENUISRCS} ${GENAXSRCS})
|
||||
# set wsjtx_udp exports to static variants
|
||||
target_compile_definitions (wsjt_qt PUBLIC UDP_STATIC_DEFINE)
|
||||
-target_link_libraries (wsjt_qt Hamlib::Hamlib Boost::log qcp Qt5::Widgets Qt5::Network Qt5::Sql)
|
||||
-if (WIN32)
|
||||
- target_link_libraries (wsjt_qt Qt5::AxContainer Qt5::AxBase)
|
||||
-endif (WIN32)
|
||||
+target_link_libraries (wsjt_qt Qt5::Core)
|
||||
|
||||
# build a library of package Qt functionality used in Fortran utilities
|
||||
add_library (fort_qt STATIC ${fort_qt_CXXSRCS})
|
||||
@@ -1425,90 +1349,6 @@
|
||||
add_subdirectory (map65)
|
||||
endif ()
|
||||
|
||||
-# build the main application
|
||||
-generate_version_info (wsjtx_VERSION_RESOURCES
|
||||
- NAME wsjtx
|
||||
- BUNDLE ${PROJECT_BUNDLE_NAME}
|
||||
- ICON ${WSJTX_ICON_FILE}
|
||||
- )
|
||||
-
|
||||
-add_executable (wsjtx MACOSX_BUNDLE
|
||||
- ${wsjtx_CXXSRCS}
|
||||
- ${wsjtx_GENUISRCS}
|
||||
- ${WSJTX_ICON_FILE}
|
||||
- ${wsjtx_RESOURCES_RCC}
|
||||
- ${wsjtx_VERSION_RESOURCES}
|
||||
- )
|
||||
-
|
||||
-if (WSJT_CREATE_WINMAIN)
|
||||
- set_target_properties (wsjtx PROPERTIES WIN32_EXECUTABLE ON)
|
||||
-endif (WSJT_CREATE_WINMAIN)
|
||||
-
|
||||
-set_target_properties (wsjtx PROPERTIES
|
||||
- MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Darwin/Info.plist.in"
|
||||
- MACOSX_BUNDLE_INFO_STRING "${PROJECT_DESCRIPTION}"
|
||||
- MACOSX_BUNDLE_ICON_FILE "${WSJTX_ICON_FILE}"
|
||||
- MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
|
||||
- MACOSX_BUNDLE_SHORT_VERSION_STRING "v${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}"
|
||||
- MACOSX_BUNDLE_LONG_VERSION_STRING "Version ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}${SCS_VERSION_STR}"
|
||||
- MACOSX_BUNDLE_BUNDLE_NAME "${PROJECT_BUNDLE_NAME}"
|
||||
- MACOSX_BUNDLE_BUNDLE_EXECUTABLE_NAME "${PROJECT_NAME}"
|
||||
- MACOSX_BUNDLE_COPYRIGHT "${PROJECT_COPYRIGHT}"
|
||||
- MACOSX_BUNDLE_GUI_IDENTIFIER "org.k1jt.wsjtx"
|
||||
- )
|
||||
-
|
||||
-target_include_directories (wsjtx PRIVATE ${FFTW3_INCLUDE_DIRS})
|
||||
-if ((NOT ${OPENMP_FOUND}) OR APPLE)
|
||||
- target_link_libraries (wsjtx wsjt_fort)
|
||||
-else ()
|
||||
- target_link_libraries (wsjtx wsjt_fort_omp)
|
||||
- if (OpenMP_C_FLAGS)
|
||||
- set_target_properties (wsjtx PROPERTIES
|
||||
- COMPILE_FLAGS "${OpenMP_C_FLAGS}"
|
||||
- LINK_FLAGS "${OpenMP_C_FLAGS}"
|
||||
- )
|
||||
- endif ()
|
||||
- set_target_properties (wsjtx PROPERTIES
|
||||
- Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/fortran_modules_omp
|
||||
- )
|
||||
- if (WIN32)
|
||||
- set_target_properties (wsjtx PROPERTIES
|
||||
- LINK_FLAGS -Wl,--stack,0x1000000,--heap,0x20000000
|
||||
- )
|
||||
- endif ()
|
||||
-endif ()
|
||||
-target_link_libraries (wsjtx Qt5::SerialPort wsjt_cxx wsjt_qt wsjt_qtmm ${FFTW3_LIBRARIES} ${LIBM_LIBRARIES})
|
||||
-
|
||||
-# make a library for WSJT-X UDP servers
|
||||
-# add_library (wsjtx_udp SHARED ${UDP_library_CXXSRCS})
|
||||
-add_library (wsjtx_udp-static STATIC ${UDP_library_CXXSRCS})
|
||||
-#target_include_directories (wsjtx_udp
|
||||
-# INTERFACE
|
||||
-# $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/wsjtx>
|
||||
-# )
|
||||
-target_include_directories (wsjtx_udp-static
|
||||
- INTERFACE
|
||||
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/wsjtx>
|
||||
- )
|
||||
-#set_target_properties (wsjtx_udp PROPERTIES
|
||||
-# PUBLIC_HEADER "${UDP_library_HEADERS}"
|
||||
-# )
|
||||
-set_target_properties (wsjtx_udp-static PROPERTIES
|
||||
- OUTPUT_NAME wsjtx_udp
|
||||
- )
|
||||
-target_compile_definitions (wsjtx_udp-static PUBLIC UDP_STATIC_DEFINE)
|
||||
-target_link_libraries (wsjtx_udp-static Qt5::Network Qt5::Gui)
|
||||
-generate_export_header (wsjtx_udp-static BASE_NAME udp)
|
||||
-
|
||||
-generate_version_info (udp_daemon_VERSION_RESOURCES
|
||||
- NAME udp_daemon
|
||||
- BUNDLE ${PROJECT_BUNDLE_NAME}
|
||||
- ICON ${WSJTX_ICON_FILE}
|
||||
- FILE_DESCRIPTION "Example WSJT-X UDP Message Protocol daemon"
|
||||
- )
|
||||
-add_executable (udp_daemon UDPExamples/UDPDaemon.cpp ${udp_daemon_VERSION_RESOURCES})
|
||||
-target_link_libraries (udp_daemon wsjtx_udp-static)
|
||||
-
|
||||
generate_version_info (wsjtx_app_version_VERSION_RESOURCES
|
||||
NAME wsjtx_app_version
|
||||
BUNDLE ${PROJECT_BUNDLE_NAME}
|
||||
@@ -1518,47 +1358,9 @@
|
||||
add_executable (wsjtx_app_version AppVersion/AppVersion.cpp ${wsjtx_app_version_VERSION_RESOURCES})
|
||||
target_link_libraries (wsjtx_app_version wsjt_qt)
|
||||
|
||||
-generate_version_info (message_aggregator_VERSION_RESOURCES
|
||||
- NAME message_aggregator
|
||||
- BUNDLE ${PROJECT_BUNDLE_NAME}
|
||||
- ICON ${WSJTX_ICON_FILE}
|
||||
- FILE_DESCRIPTION "Example WSJT-X UDP Message Protocol application"
|
||||
- )
|
||||
-add_resources (message_aggregator_RESOURCES /qss ${message_aggregator_STYLESHEETS})
|
||||
-configure_file (UDPExamples/message_aggregator.qrc.in message_aggregator.qrc @ONLY)
|
||||
-qt5_add_resources (message_aggregator_RESOURCES_RCC
|
||||
- ${CMAKE_CURRENT_BINARY_DIR}/message_aggregator.qrc
|
||||
- contrib/QDarkStyleSheet/qdarkstyle/style.qrc
|
||||
- )
|
||||
-add_executable (message_aggregator
|
||||
- ${message_aggregator_CXXSRCS}
|
||||
- ${message_aggregator_RESOURCES_RCC}
|
||||
- ${message_aggregator_VERSION_RESOURCES}
|
||||
- )
|
||||
-target_link_libraries (message_aggregator wsjt_qt Qt5::Widgets wsjtx_udp-static)
|
||||
-
|
||||
-if (WSJT_CREATE_WINMAIN)
|
||||
- set_target_properties (message_aggregator PROPERTIES WIN32_EXECUTABLE ON)
|
||||
-endif (WSJT_CREATE_WINMAIN)
|
||||
-
|
||||
-if (UNIX)
|
||||
- if (NOT WSJT_SKIP_MANPAGES)
|
||||
- add_subdirectory (manpages)
|
||||
- add_dependencies (wsjtx manpages)
|
||||
- endif (NOT WSJT_SKIP_MANPAGES)
|
||||
- if (NOT APPLE)
|
||||
- add_subdirectory (debian)
|
||||
- add_dependencies (wsjtx debian)
|
||||
- endif (NOT APPLE)
|
||||
-endif (UNIX)
|
||||
-
|
||||
#
|
||||
# installation
|
||||
#
|
||||
-install (TARGETS wsjtx
|
||||
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
||||
- BUNDLE DESTINATION . COMPONENT runtime
|
||||
- )
|
||||
|
||||
# install (TARGETS wsjtx_udp EXPORT udp
|
||||
# RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
@@ -1577,12 +1379,7 @@
|
||||
# DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/wsjtx
|
||||
# )
|
||||
|
||||
-install (TARGETS udp_daemon message_aggregator wsjtx_app_version
|
||||
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
||||
- BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
||||
- )
|
||||
-
|
||||
-install (TARGETS jt9 wsprd fmtave fcal fmeasure
|
||||
+install (TARGETS wsjtx_app_version jt9 wsprd
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
||||
BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
||||
)
|
||||
@@ -1595,38 +1392,6 @@
|
||||
)
|
||||
endif(WSJT_BUILD_UTILS)
|
||||
|
||||
-install (PROGRAMS
|
||||
- ${RIGCTL_EXE}
|
||||
- DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
- #COMPONENT runtime
|
||||
- RENAME rigctl-wsjtx${CMAKE_EXECUTABLE_SUFFIX}
|
||||
- )
|
||||
-
|
||||
-install (PROGRAMS
|
||||
- ${RIGCTLD_EXE}
|
||||
- DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
- #COMPONENT runtime
|
||||
- RENAME rigctld-wsjtx${CMAKE_EXECUTABLE_SUFFIX}
|
||||
- )
|
||||
-
|
||||
-install (PROGRAMS
|
||||
- ${RIGCTLCOM_EXE}
|
||||
- DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
- #COMPONENT runtime
|
||||
- RENAME rigctlcom-wsjtx${CMAKE_EXECUTABLE_SUFFIX}
|
||||
- )
|
||||
-
|
||||
-install (FILES
|
||||
- README
|
||||
- COPYING
|
||||
- AUTHORS
|
||||
- THANKS
|
||||
- NEWS
|
||||
- BUGS
|
||||
- DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
||||
- #COMPONENT runtime
|
||||
- )
|
||||
-
|
||||
install (FILES
|
||||
cty.dat
|
||||
cty.dat_copyright.txt
|
||||
@@ -1635,13 +1400,6 @@
|
||||
#COMPONENT runtime
|
||||
)
|
||||
|
||||
-install (DIRECTORY
|
||||
- example_log_configurations
|
||||
- DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
||||
- FILES_MATCHING REGEX "^.*[^~]$"
|
||||
- #COMPONENT runtime
|
||||
- )
|
||||
-
|
||||
#
|
||||
# Mac installer files
|
||||
#
|
||||
@@ -1693,22 +1451,6 @@
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/wsjtx_config.h"
|
||||
)
|
||||
|
||||
-
|
||||
-if (NOT WIN32 AND NOT APPLE)
|
||||
- # install a desktop file so wsjtx appears in the application start
|
||||
- # menu with an icon
|
||||
- install (
|
||||
- FILES wsjtx.desktop message_aggregator.desktop
|
||||
- DESTINATION share/applications
|
||||
- #COMPONENT runtime
|
||||
- )
|
||||
- install (
|
||||
- FILES icons/Unix/wsjtx_icon.png
|
||||
- DESTINATION share/pixmaps
|
||||
- #COMPONENT runtime
|
||||
- )
|
||||
-endif (NOT WIN32 AND NOT APPLE)
|
||||
-
|
||||
if (APPLE)
|
||||
set (CMAKE_POSTFLIGHT_SCRIPT
|
||||
"${wsjtx_BINARY_DIR}/postflight.sh")
|
||||
|
|
|
@ -24,7 +24,8 @@ apt-get update
|
|||
apt-get -y install --no-install-recommends $BUILD_PACKAGES
|
||||
|
||||
git clone https://github.com/jketterl/owrx_connector.git
|
||||
cmakebuild owrx_connector 0.6.0
|
||||
# latest develop as of 2022-12-11 (std::endl implicit flushing)
|
||||
cmakebuild owrx_connector bca362707131289f91441c8080fd368fdc067b6d
|
||||
|
||||
apt-get -y purge --autoremove $BUILD_PACKAGES
|
||||
apt-get clean
|
||||
|
|
|
@ -29,7 +29,7 @@ tar xfz $PACKAGE
|
|||
|
||||
git clone https://github.com/jancona/hpsdrconnector.git
|
||||
pushd hpsdrconnector
|
||||
git checkout v0.6.0
|
||||
git checkout v0.6.1
|
||||
/tmp/go/bin/go build
|
||||
install -m 0755 hpsdrconnector /usr/local/bin
|
||||
|
||||
|
|
|
@ -25,7 +25,8 @@ apt-get update
|
|||
apt-get -y install --no-install-recommends $STATIC_PACKAGES $BUILD_PACKAGES
|
||||
|
||||
git clone https://github.com/jketterl/runds_connector.git
|
||||
cmakebuild runds_connector 0.2.1
|
||||
# latest develop as of 2022-12-11 (std::endl implicit flushing)
|
||||
cmakebuild runds_connector 06ca993a3c81ddb0a2581b1474895da07752a9e1
|
||||
|
||||
apt-get -y purge --autoremove $BUILD_PACKAGES
|
||||
apt-get clean
|
||||
|
|
|
@ -38,7 +38,7 @@ case $ARCH in
|
|||
;;
|
||||
esac
|
||||
|
||||
wget https://www.sdrplay.com/software/$BINARY
|
||||
wget --no-http-keep-alive https://www.sdrplay.com/software/$BINARY
|
||||
sh $BINARY --noexec --target sdrplay
|
||||
patch --verbose -Np0 < /install-lib.$ARCH.patch
|
||||
|
||||
|
|
|
@ -7,6 +7,9 @@ function cmakebuild() {
|
|||
if [[ ! -z "${2:-}" ]]; then
|
||||
git checkout $2
|
||||
fi
|
||||
if [[ -f ".gitmodules" ]]; then
|
||||
git submodule update --init
|
||||
fi
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ${CMAKE_ARGS:-} ..
|
||||
|
@ -18,8 +21,8 @@ function cmakebuild() {
|
|||
|
||||
cd /tmp
|
||||
|
||||
STATIC_PACKAGES="libfftw3-bin python3 python3-setuptools netcat-openbsd libsndfile1 liblapack3 libusb-1.0-0 libqt5core5a libreadline8 libgfortran5 libgomp1 libasound2 libudev1 ca-certificates libpulse0 libfaad2 libopus0 libboost-program-options1.74.0 libboost-log1.74.0"
|
||||
BUILD_PACKAGES="wget git libsndfile1-dev libfftw3-dev cmake make gcc g++ liblapack-dev texinfo gfortran libusb-1.0-0-dev qtbase5-dev qtmultimedia5-dev qttools5-dev libqt5serialport5-dev qttools5-dev-tools asciidoctor asciidoc libasound2-dev libudev-dev libhamlib-dev patch xsltproc qt5-qmake libfaad-dev libopus-dev libboost-dev libboost-program-options-dev libboost-log-dev libboost-regex-dev libpulse-dev"
|
||||
STATIC_PACKAGES="libfftw3-bin python3 python3-setuptools netcat-openbsd libsndfile1 liblapack3 libusb-1.0-0 libqt5core5a libreadline8 libgfortran5 libgomp1 libasound2 libudev1 ca-certificates libpulse0 libfaad2 libopus0 libboost-program-options1.74.0 libboost-log1.74.0 libcurl4"
|
||||
BUILD_PACKAGES="wget git libsndfile1-dev libfftw3-dev cmake make gcc g++ liblapack-dev texinfo gfortran libusb-1.0-0-dev qtbase5-dev qtmultimedia5-dev qttools5-dev libqt5serialport5-dev qttools5-dev-tools asciidoctor asciidoc libasound2-dev libudev-dev libhamlib-dev patch xsltproc qt5-qmake libfaad-dev libopus-dev libboost-dev libboost-program-options-dev libboost-log-dev libboost-regex-dev libpulse-dev libcurl4-openssl-dev"
|
||||
apt-get update
|
||||
apt-get -y install auto-apt-proxy
|
||||
apt-get -y install --no-install-recommends $STATIC_PACKAGES $BUILD_PACKAGES
|
||||
|
@ -51,15 +54,19 @@ rm /js8call-hamlib.patch
|
|||
cmakebuild ${JS8CALL_DIR}
|
||||
rm ${JS8CALL_TGZ}
|
||||
|
||||
WSJT_DIR=wsjtx-2.5.4
|
||||
WSJT_DIR=wsjtx-2.6.1
|
||||
WSJT_TGZ=${WSJT_DIR}.tgz
|
||||
wget http://physics.princeton.edu/pulsar/k1jt/${WSJT_TGZ}
|
||||
wget https://downloads.sourceforge.net/project/wsjt/${WSJT_DIR}/${WSJT_TGZ}
|
||||
tar xfz ${WSJT_TGZ}
|
||||
patch -Np0 -d ${WSJT_DIR} < /wsjtx-hamlib.patch
|
||||
mv /wsjtx.patch ${WSJT_DIR}
|
||||
cmakebuild ${WSJT_DIR}
|
||||
rm ${WSJT_TGZ}
|
||||
|
||||
git clone https://github.com/alexander-sholohov/msk144decoder.git
|
||||
# latest from main as of 2023-02-21
|
||||
MAKEFLAGS="" cmakebuild msk144decoder fe2991681e455636e258e83c29fd4b2a72d16095
|
||||
|
||||
git clone --depth 1 -b 1.6 https://github.com/wb2osz/direwolf.git
|
||||
cd direwolf
|
||||
# hamlib is present (necessary for the wsjt-x and js8call builds) and would be used, but there's no real need.
|
||||
|
|
|
@ -25,17 +25,18 @@ apt-get -y install --no-install-recommends $STATIC_PACKAGES $BUILD_PACKAGES
|
|||
|
||||
git clone https://github.com/jketterl/js8py.git
|
||||
pushd js8py
|
||||
git checkout 0.1.2
|
||||
# latest develop as of 2022-11-30 (structured callsign data)
|
||||
git checkout f7e394b7892d26cbdcce5d43c0b4081a2a6a48f6
|
||||
python3 setup.py install
|
||||
popd
|
||||
rm -rf js8py
|
||||
|
||||
git clone https://github.com/jketterl/csdr.git
|
||||
cmakebuild csdr 0.18.0
|
||||
cmakebuild csdr 0.18.1
|
||||
|
||||
git clone https://github.com/jketterl/pycsdr.git
|
||||
cd pycsdr
|
||||
git checkout 0.18.0
|
||||
git checkout 0.18.1
|
||||
./setup.py install install_headers
|
||||
cd ..
|
||||
rm -rf pycsdr
|
||||
|
@ -46,11 +47,11 @@ cp codecserver/conf/codecserver.conf /usr/local/etc/codecserver
|
|||
cmakebuild codecserver 0.2.0
|
||||
|
||||
git clone https://github.com/jketterl/digiham.git
|
||||
cmakebuild digiham 0.6.0
|
||||
cmakebuild digiham 0.6.1
|
||||
|
||||
git clone https://github.com/jketterl/pydigiham.git
|
||||
cd pydigiham
|
||||
git checkout 0.6.0
|
||||
git checkout 0.6.1
|
||||
./setup.py install
|
||||
cd ..
|
||||
rm -rf pydigiham
|
||||
|
|
|
@ -159,4 +159,8 @@ h1 {
|
|||
|
||||
.imageupload.is-invalid ~ .invalid-feedback {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.device-log-messages {
|
||||
max-height: 500px;
|
||||
}
|
|
@ -1265,6 +1265,7 @@ img.openwebrx-mirror-img
|
|||
#openwebrx-panel-digimodes[data-mode="fst4"] #openwebrx-digimode-content-container,
|
||||
#openwebrx-panel-digimodes[data-mode="fst4w"] #openwebrx-digimode-content-container,
|
||||
#openwebrx-panel-digimodes[data-mode="q65"] #openwebrx-digimode-content-container,
|
||||
#openwebrx-panel-digimodes[data-mode="msk144"] #openwebrx-digimode-content-container,
|
||||
#openwebrx-panel-digimodes[data-mode="ft8"] #openwebrx-digimode-select-channel,
|
||||
#openwebrx-panel-digimodes[data-mode="wspr"] #openwebrx-digimode-select-channel,
|
||||
#openwebrx-panel-digimodes[data-mode="jt65"] #openwebrx-digimode-select-channel,
|
||||
|
@ -1275,7 +1276,8 @@ img.openwebrx-mirror-img
|
|||
#openwebrx-panel-digimodes[data-mode="js8"] #openwebrx-digimode-select-channel,
|
||||
#openwebrx-panel-digimodes[data-mode="fst4"] #openwebrx-digimode-select-channel,
|
||||
#openwebrx-panel-digimodes[data-mode="fst4w"] #openwebrx-digimode-select-channel,
|
||||
#openwebrx-panel-digimodes[data-mode="q65"] #openwebrx-digimode-select-channel
|
||||
#openwebrx-panel-digimodes[data-mode="q65"] #openwebrx-digimode-select-channel,
|
||||
#openwebrx-panel-digimodes[data-mode="msk144"] #openwebrx-digimode-select-channel
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
@ -1290,7 +1292,8 @@ img.openwebrx-mirror-img
|
|||
#openwebrx-panel-digimodes[data-mode="js8"] #openwebrx-digimode-canvas-container,
|
||||
#openwebrx-panel-digimodes[data-mode="fst4"] #openwebrx-digimode-canvas-container,
|
||||
#openwebrx-panel-digimodes[data-mode="fst4w"] #openwebrx-digimode-canvas-container,
|
||||
#openwebrx-panel-digimodes[data-mode="q65"] #openwebrx-digimode-canvas-container
|
||||
#openwebrx-panel-digimodes[data-mode="q65"] #openwebrx-digimode-canvas-container,
|
||||
#openwebrx-panel-digimodes[data-mode="msk144"] #openwebrx-digimode-canvas-container
|
||||
{
|
||||
height: 200px;
|
||||
margin: -10px;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<div class="webrx-rx-photo-desc">${photo_desc}</div>
|
||||
</div>
|
||||
<a class="openwebrx-rx-details-arrow openwebrx-rx-details-arrow--down openwebrx-photo-trigger">
|
||||
<svg class="down" viewBox="0 0 43 12"><use xlink:href="static/gfx/svg-defs.svg#rx-details-arrow-down"></use></svg>
|
||||
<svg class="up" viewBox="0 0 43 12"><use xlink:href="static/gfx/svg-defs.svg#rx-details-arrow-up"></use></svg>
|
||||
<svg class="down" viewBox="0 0 43 12"><use xlink:href="${document_root}static/gfx/svg-defs.svg#rx-details-arrow-down"></use></svg>
|
||||
<svg class="up" viewBox="0 0 43 12"><use xlink:href="${document_root}static/gfx/svg-defs.svg#rx-details-arrow-up"></use></svg>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -70,7 +70,7 @@ AprsMarker.prototype.onAdd = function() {
|
|||
div.appendChild(overlay);
|
||||
|
||||
var self = this;
|
||||
google.maps.event.addDomListener(div, "click", function(event) {
|
||||
div.addEventListener("click", function(event) {
|
||||
event.stopPropagation();
|
||||
google.maps.event.trigger(self, "click", event);
|
||||
});
|
||||
|
|
|
@ -331,7 +331,9 @@ ImaAdpcmCodec.prototype.reset = function() {
|
|||
this.synchronized = 0;
|
||||
this.syncWord = "SYNC";
|
||||
this.syncCounter = 0;
|
||||
this.skip = 0;
|
||||
this.phase = 0;
|
||||
this.syncBuffer = new Uint8Array(4);
|
||||
this.syncBufferIndex = 0;
|
||||
};
|
||||
|
||||
ImaAdpcmCodec.imaIndexTable = [ -1, -1, -1, -1, 2, 4, 6, 8, -1, -1, -1, -1, 2, 4, 6, 8 ];
|
||||
|
@ -359,38 +361,45 @@ ImaAdpcmCodec.prototype.decode = function(data) {
|
|||
|
||||
ImaAdpcmCodec.prototype.decodeWithSync = function(data) {
|
||||
var output = new Int16Array(data.length * 2);
|
||||
var index = this.skip;
|
||||
var oi = 0;
|
||||
while (index < data.length) {
|
||||
while (this.synchronized < 4 && index < data.length) {
|
||||
if (data[index] === this.syncWord.charCodeAt(this.synchronized)) {
|
||||
this.synchronized++;
|
||||
} else {
|
||||
this.synchronized = 0;
|
||||
}
|
||||
index++;
|
||||
if (this.synchronized === 4) {
|
||||
if (index + 4 < data.length) {
|
||||
var syncData = new Int16Array(data.buffer.slice(index, index + 4));
|
||||
for (var index = 0; index < data.length; index++) {
|
||||
switch (this.phase) {
|
||||
case 0:
|
||||
// search for sync word
|
||||
if (data[index] !== this.syncWord.charCodeAt(this.synchronized++)) {
|
||||
// reset if data is unexpected
|
||||
this.synchronized = 0;
|
||||
}
|
||||
// if sync word has been found pass on to next phase
|
||||
if (this.synchronized === 4) {
|
||||
this.syncBufferIndex = 0;
|
||||
this.phase = 1;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
// read codec runtime data from stream
|
||||
this.syncBuffer[this.syncBufferIndex++] = data[index];
|
||||
// if data is complete, apply and pass on to next phase
|
||||
if (this.syncBufferIndex === 4) {
|
||||
var syncData = new Int16Array(this.syncBuffer.buffer);
|
||||
this.stepIndex = syncData[0];
|
||||
this.predictor = syncData[1];
|
||||
this.syncCounter = 1000;
|
||||
this.phase = 2;
|
||||
}
|
||||
this.syncCounter = 1000;
|
||||
index += 4;
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (index < data.length) {
|
||||
if (this.syncCounter-- < 0) {
|
||||
this.synchronized = 0;
|
||||
case 2:
|
||||
// decode actual audio data
|
||||
output[oi++] = this.decodeNibble(data[index] & 0x0F);
|
||||
output[oi++] = this.decodeNibble(data[index] >> 4);
|
||||
// if the next sync keyword is due, reset and return to phase 0
|
||||
if (this.syncCounter-- === 0) {
|
||||
this.synchronized = 0;
|
||||
this.phase = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
output[oi++] = this.decodeNibble(data[index] & 0x0F);
|
||||
output[oi++] = this.decodeNibble(data[index] >> 4);
|
||||
index++;
|
||||
}
|
||||
}
|
||||
this.skip = index - data.length;
|
||||
return output.slice(0, oi);
|
||||
};
|
||||
|
||||
|
|
|
@ -81,6 +81,12 @@ Envelope.prototype.draw = function(visible_range){
|
|||
scale_ctx.fill();
|
||||
scale_ctx.globalAlpha = 1;
|
||||
scale_ctx.stroke();
|
||||
scale_ctx.lineWidth = 1;
|
||||
scale_ctx.textAlign = "left";
|
||||
scale_ctx.fillText(this.demodulator.high_cut.toString(), to_px + env_att_w, env_h2);
|
||||
scale_ctx.textAlign = "right";
|
||||
scale_ctx.fillText(this.demodulator.low_cut.toString(), from_px - env_att_w, env_h2);
|
||||
scale_ctx.lineWidth = 3;
|
||||
}
|
||||
if (typeof line !== "undefined") // out of screen?
|
||||
{
|
||||
|
|
|
@ -158,8 +158,8 @@ DemodulatorPanel.prototype.updatePanels = function() {
|
|||
var modulation = this.getDemodulator().get_secondary_demod();
|
||||
$('#openwebrx-panel-digimodes').attr('data-mode', modulation);
|
||||
toggle_panel("openwebrx-panel-digimodes", !!modulation);
|
||||
toggle_panel("openwebrx-panel-wsjt-message", ['ft8', 'wspr', 'jt65', 'jt9', 'ft4', 'fst4', 'fst4w', "q65"].indexOf(modulation) >= 0);
|
||||
toggle_panel("openwebrx-panel-js8-message", modulation == "js8");
|
||||
toggle_panel("openwebrx-panel-wsjt-message", ['ft8', 'wspr', 'jt65', 'jt9', 'ft4', 'fst4', 'fst4w', "q65", "msk144"].indexOf(modulation) >= 0);
|
||||
toggle_panel("openwebrx-panel-js8-message", modulation === "js8");
|
||||
toggle_panel("openwebrx-panel-packet-message", modulation === "packet");
|
||||
toggle_panel("openwebrx-panel-pocsag-message", modulation === "pocsag");
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ MessagePanel.prototype.initClearButton = function() {
|
|||
function WsjtMessagePanel(el) {
|
||||
MessagePanel.call(this, el);
|
||||
this.initClearTimer();
|
||||
this.qsoModes = ['FT8', 'JT65', 'JT9', 'FT4', 'FST4', 'Q65'];
|
||||
this.qsoModes = ['FT8', 'JT65', 'JT9', 'FT4', 'FST4', 'Q65', 'MSK144'];
|
||||
this.beaconModes = ['WSPR', 'FST4W'];
|
||||
this.modes = [].concat(this.qsoModes, this.beaconModes);
|
||||
}
|
||||
|
@ -157,13 +157,17 @@ PacketMessagePanel.prototype.pushMessage = function(msg) {
|
|||
if (msg.type && msg.type === 'thirdparty' && msg.data) {
|
||||
msg = msg.data;
|
||||
}
|
||||
|
||||
var source = msg.source;
|
||||
if (msg.type) {
|
||||
if (msg.type === 'item') {
|
||||
source = msg.item;
|
||||
}
|
||||
if (msg.type === 'object') {
|
||||
source = msg.object;
|
||||
var callsign;
|
||||
if ('object' in source) {
|
||||
callsign = source.object;
|
||||
} else if ('item' in source) {
|
||||
callsign = source.item;
|
||||
} else {
|
||||
callsign = source.callsign;
|
||||
if ('ssid' in source) {
|
||||
callsign += '-' + source.ssid;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -202,7 +206,7 @@ PacketMessagePanel.prototype.pushMessage = function(msg) {
|
|||
'style="' + stylesToString(styles) + '"'
|
||||
].join(' ');
|
||||
if (msg.lat && msg.lon) {
|
||||
link = '<a ' + attrs + ' href="map?callsign=' + encodeURIComponent(source) + '" target="openwebrx-map">' + overlay + '</a>';
|
||||
link = '<a ' + attrs + ' href="map?' + new URLSearchParams(source).toString() + '" target="openwebrx-map">' + overlay + '</a>';
|
||||
} else {
|
||||
link = '<div ' + attrs + '>' + overlay + '</div>'
|
||||
}
|
||||
|
@ -210,7 +214,7 @@ PacketMessagePanel.prototype.pushMessage = function(msg) {
|
|||
$b.append($(
|
||||
'<tr>' +
|
||||
'<td>' + timestamp + '</td>' +
|
||||
'<td class="callsign">' + source + '</td>' +
|
||||
'<td class="callsign">' + callsign + '</td>' +
|
||||
'<td class="coord">' + link + '</td>' +
|
||||
'<td class="message">' + (msg.comment || msg.message || '') + '</td>' +
|
||||
'</tr>'
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
$.fn.logMessages = function() {
|
||||
$.each(this, function(){
|
||||
$(this).scrollTop(this.scrollHeight);
|
||||
});
|
||||
};
|
143
htdocs/map.js
143
htdocs/map.js
|
@ -1,17 +1,12 @@
|
|||
$(function(){
|
||||
var query = window.location.search.replace(/^\?/, '').split('&').map(function(v){
|
||||
var s = v.split('=');
|
||||
var r = {};
|
||||
r[s[0]] = s.slice(1).join('=');
|
||||
return r;
|
||||
}).reduce(function(a, b){
|
||||
return a.assign(b);
|
||||
});
|
||||
var query = new URLSearchParams(window.location.search);
|
||||
|
||||
var expectedCallsign;
|
||||
if (query.callsign) expectedCallsign = decodeURIComponent(query.callsign);
|
||||
if (query.has('callsign')) {
|
||||
expectedCallsign = Object.fromEntries(query.entries());
|
||||
}
|
||||
var expectedLocator;
|
||||
if (query.locator) expectedLocator = query.locator;
|
||||
if (query.has('locator')) expectedLocator = query.get('locator');
|
||||
|
||||
var protocol = window.location.protocol.match(/https/) ? 'wss' : 'ws';
|
||||
|
||||
|
@ -37,6 +32,7 @@ $(function(){
|
|||
var retention_time = 2 * 60 * 60 * 1000;
|
||||
var strokeOpacity = 0.8;
|
||||
var fillOpacity = 0.35;
|
||||
var callsign_service;
|
||||
|
||||
var colorKeys = {};
|
||||
var colorScale = chroma.scale(['red', 'blue', 'green']).mode('hsl');
|
||||
|
@ -101,6 +97,11 @@ $(function(){
|
|||
return '<li class="square' + disabled + '" data-selector="' + key + '"><span class="illustration" style="background-color:' + chroma(value).alpha(fillOpacity) + ';border-color:' + chroma(value).alpha(strokeOpacity) + ';"></span>' + key + '</li>';
|
||||
});
|
||||
$(".openwebrx-map-legend .content").html('<ul>' + lis.join('') + '</ul>');
|
||||
};
|
||||
|
||||
var shallowEquals = function(obj1, obj2) {
|
||||
// basic shallow object comparison
|
||||
return Object.entries(obj1).sort().toString() === Object.entries(obj2).sort().toString();
|
||||
}
|
||||
|
||||
var processUpdates = function(updates) {
|
||||
|
@ -109,6 +110,7 @@ $(function(){
|
|||
return;
|
||||
}
|
||||
updates.forEach(function(update){
|
||||
var key = sourceToKey(update.source);
|
||||
|
||||
switch (update.location.type) {
|
||||
case 'latlon':
|
||||
|
@ -122,33 +124,33 @@ $(function(){
|
|||
aprsOptions.course = update.location.course;
|
||||
aprsOptions.speed = update.location.speed;
|
||||
}
|
||||
if (markers[update.callsign]) {
|
||||
marker = markers[update.callsign];
|
||||
if (markers[key]) {
|
||||
marker = markers[key];
|
||||
} else {
|
||||
marker = new markerClass();
|
||||
marker.addListener('click', function(){
|
||||
showMarkerInfoWindow(update.callsign, pos);
|
||||
showMarkerInfoWindow(update.source, pos);
|
||||
});
|
||||
markers[update.callsign] = marker;
|
||||
markers[key] = marker;
|
||||
}
|
||||
marker.setOptions($.extend({
|
||||
position: pos,
|
||||
map: map,
|
||||
title: update.callsign
|
||||
title: sourceToString(update.source)
|
||||
}, aprsOptions, getMarkerOpacityOptions(update.lastseen) ));
|
||||
marker.lastseen = update.lastseen;
|
||||
marker.mode = update.mode;
|
||||
marker.band = update.band;
|
||||
marker.comment = update.location.comment;
|
||||
|
||||
if (expectedCallsign && expectedCallsign == update.callsign) {
|
||||
if (expectedCallsign && shallowEquals(expectedCallsign, update.source)) {
|
||||
map.panTo(pos);
|
||||
showMarkerInfoWindow(update.callsign, pos);
|
||||
showMarkerInfoWindow(update.source, pos);
|
||||
expectedCallsign = false;
|
||||
}
|
||||
|
||||
if (infowindow && infowindow.callsign && infowindow.callsign == update.callsign) {
|
||||
showMarkerInfoWindow(infowindow.callsign, pos);
|
||||
if (infowindow && infowindow.source && shallowEquals(infowindow.source, update.source)) {
|
||||
showMarkerInfoWindow(infowindow.source, pos);
|
||||
}
|
||||
break;
|
||||
case 'locator':
|
||||
|
@ -159,15 +161,16 @@ $(function(){
|
|||
var rectangle;
|
||||
// the accessor is designed to work on the rectangle... but it should work on the update object, too
|
||||
var color = getColor(colorAccessor(update));
|
||||
if (rectangles[update.callsign]) {
|
||||
rectangle = rectangles[update.callsign];
|
||||
if (rectangles[key]) {
|
||||
rectangle = rectangles[key];
|
||||
} else {
|
||||
rectangle = new google.maps.Rectangle();
|
||||
rectangle.addListener('click', function(){
|
||||
showLocatorInfoWindow(this.locator, this.center);
|
||||
});
|
||||
rectangles[update.callsign] = rectangle;
|
||||
rectangles[key] = rectangle;
|
||||
}
|
||||
rectangle.source = update.source;
|
||||
rectangle.lastseen = update.lastseen;
|
||||
rectangle.locator = update.location.locator;
|
||||
rectangle.mode = update.mode;
|
||||
|
@ -187,13 +190,13 @@ $(function(){
|
|||
}
|
||||
}, getRectangleOpacityOptions(update.lastseen) ));
|
||||
|
||||
if (expectedLocator && expectedLocator == update.location.locator) {
|
||||
if (expectedLocator && expectedLocator === update.location.locator) {
|
||||
map.panTo(center);
|
||||
showLocatorInfoWindow(expectedLocator, center);
|
||||
expectedLocator = false;
|
||||
}
|
||||
|
||||
if (infowindow && infowindow.locator && infowindow.locator == update.location.locator) {
|
||||
if (infowindow && infowindow.locator && infowindow.locator === update.location.locator) {
|
||||
showLocatorInfoWindow(infowindow.locator, center);
|
||||
}
|
||||
break;
|
||||
|
@ -202,7 +205,7 @@ $(function(){
|
|||
};
|
||||
|
||||
var clearMap = function(){
|
||||
var reset = function(callsign, item) { item.setMap(); };
|
||||
var reset = function(_, item) { item.setMap(); };
|
||||
$.each(markers, reset);
|
||||
$.each(rectangles, reset);
|
||||
receiverMarker.setMap();
|
||||
|
@ -286,6 +289,9 @@ $(function(){
|
|||
if ('map_position_retention_time' in config) {
|
||||
retention_time = config.map_position_retention_time * 1000;
|
||||
}
|
||||
if ('callsign_service' in config) {
|
||||
callsign_service = config['callsign_service'];
|
||||
}
|
||||
break;
|
||||
case "update":
|
||||
processUpdates(json.value);
|
||||
|
@ -332,32 +338,77 @@ $(function(){
|
|||
infowindow = new google.maps.InfoWindow();
|
||||
google.maps.event.addListener(infowindow, 'closeclick', function() {
|
||||
delete infowindow.locator;
|
||||
delete infowindow.callsign;
|
||||
delete infowindow.source;
|
||||
});
|
||||
}
|
||||
delete infowindow.locator;
|
||||
delete infowindow.callsign;
|
||||
delete infowindow.source;
|
||||
return infowindow;
|
||||
}
|
||||
};
|
||||
|
||||
var sourceToKey = function(source) {
|
||||
// special treatment for special entities
|
||||
// not just for display but also in key treatment in order not to overlap with other locations sent by the same callsign
|
||||
if ('item' in source) return source['item'];
|
||||
if ('object' in source) return source['object'];
|
||||
var key = source.callsign;
|
||||
if ('ssid' in source) key += '-' + source.ssid;
|
||||
return key;
|
||||
};
|
||||
|
||||
// we can reuse the same logic for displaying and indexing
|
||||
var sourceToString = sourceToKey;
|
||||
|
||||
var linkifySource = function(source) {
|
||||
var callsignString = sourceToString(source);
|
||||
switch (callsign_service) {
|
||||
case "qrzcq":
|
||||
return '<a target="callsign_info" href="https://www.qrzcq.com/call/' + source.callsign + '">' + callsignString + '</a>';
|
||||
case "qrz":
|
||||
return '<a target="callsign_info" href="https://www.qrz.com/db/' + source.callsign + '">' + callsignString + '</a>';
|
||||
case 'aprsfi':
|
||||
var callWithSsid = sourceToKey(source);
|
||||
return '<a target="callsign_info" href="https://aprs.fi/info/a/' + callWithSsid + '">' + callsignString + '</a>';
|
||||
default:
|
||||
return callsignString;
|
||||
}
|
||||
};
|
||||
|
||||
var distanceKm = function(p1, p2) {
|
||||
// Earth radius in km
|
||||
var R = 6371.0;
|
||||
// Convert degrees to radians
|
||||
var rlat1 = p1.lat() * (Math.PI/180);
|
||||
var rlat2 = p2.lat() * (Math.PI/180);
|
||||
// Compute difference in radians
|
||||
var difflat = rlat2-rlat1;
|
||||
var difflon = (p2.lng()-p1.lng()) * (Math.PI/180);
|
||||
// Compute distance
|
||||
d = 2 * R * Math.asin(Math.sqrt(
|
||||
Math.sin(difflat/2) * Math.sin(difflat/2) +
|
||||
Math.cos(rlat1) * Math.cos(rlat2) * Math.sin(difflon/2) * Math.sin(difflon/2)
|
||||
));
|
||||
return Math.round(d);
|
||||
};
|
||||
|
||||
var infowindow;
|
||||
var showLocatorInfoWindow = function(locator, pos) {
|
||||
var infowindow = getInfoWindow();
|
||||
infowindow.locator = locator;
|
||||
var inLocator = $.map(rectangles, function(r, callsign) {
|
||||
return {callsign: callsign, locator: r.locator, lastseen: r.lastseen, mode: r.mode, band: r.band}
|
||||
}).filter(rectangleFilter).filter(function(d) {
|
||||
return d.locator == locator;
|
||||
var inLocator = Object.values(rectangles).filter(rectangleFilter).filter(function(d) {
|
||||
return d.locator === locator;
|
||||
}).sort(function(a, b){
|
||||
return b.lastseen - a.lastseen;
|
||||
});
|
||||
var distance = receiverMarker?
|
||||
" at " + distanceKm(receiverMarker.position, pos) + " km" : "";
|
||||
infowindow.setContent(
|
||||
'<h3>Locator: ' + locator + '</h3>' +
|
||||
'<h3>Locator: ' + locator + distance + '</h3>' +
|
||||
'<div>Active Callsigns:</div>' +
|
||||
'<ul>' +
|
||||
inLocator.map(function(i){
|
||||
var timestring = moment(i.lastseen).fromNow();
|
||||
var message = i.callsign + ' (' + timestring + ' using ' + i.mode;
|
||||
var message = linkifySource(i.source) + ' (' + timestring + ' using ' + i.mode;
|
||||
if (i.band) message += ' on ' + i.band;
|
||||
message += ')';
|
||||
return '<li>' + message + '</li>'
|
||||
|
@ -368,22 +419,26 @@ $(function(){
|
|||
infowindow.open(map);
|
||||
};
|
||||
|
||||
var showMarkerInfoWindow = function(callsign, pos) {
|
||||
var showMarkerInfoWindow = function(source, pos) {
|
||||
var infowindow = getInfoWindow();
|
||||
infowindow.callsign = callsign;
|
||||
var marker = markers[callsign];
|
||||
infowindow.source = source;
|
||||
var marker = markers[sourceToKey(source)];
|
||||
var timestring = moment(marker.lastseen).fromNow();
|
||||
var commentString = "";
|
||||
var distance = "";
|
||||
if (marker.comment) {
|
||||
commentString = '<div>' + marker.comment + '</div>';
|
||||
}
|
||||
if (receiverMarker) {
|
||||
distance = " at " + distanceKm(receiverMarker.position, marker.position) + " km";
|
||||
}
|
||||
infowindow.setContent(
|
||||
'<h3>' + callsign + '</h3>' +
|
||||
'<h3>' + linkifySource(source) + distance + '</h3>' +
|
||||
'<div>' + timestring + ' using ' + marker.mode + ( marker.band ? ' on ' + marker.band : '' ) + '</div>' +
|
||||
commentString
|
||||
);
|
||||
infowindow.open(map, marker);
|
||||
}
|
||||
};
|
||||
|
||||
var showReceiverInfoWindow = function(marker) {
|
||||
var infowindow = getInfoWindow()
|
||||
|
@ -392,7 +447,7 @@ $(function(){
|
|||
'<div>Receiver location</div>'
|
||||
);
|
||||
infowindow.open(map, marker);
|
||||
}
|
||||
};
|
||||
|
||||
var getScale = function(lastseen) {
|
||||
var age = new Date().getTime() - lastseen;
|
||||
|
@ -421,19 +476,19 @@ $(function(){
|
|||
// fade out / remove positions after time
|
||||
setInterval(function(){
|
||||
var now = new Date().getTime();
|
||||
$.each(rectangles, function(callsign, m) {
|
||||
Object.values(rectangles).forEach(function(m){
|
||||
var age = now - m.lastseen;
|
||||
if (age > retention_time) {
|
||||
delete rectangles[callsign];
|
||||
delete rectangles[sourceToKey(m.source)];
|
||||
m.setMap();
|
||||
return;
|
||||
}
|
||||
m.setOptions(getRectangleOpacityOptions(m.lastseen));
|
||||
});
|
||||
$.each(markers, function(callsign, m) {
|
||||
Object.values(markers).forEach(function(m) {
|
||||
var age = now - m.lastseen;
|
||||
if (age > retention_time) {
|
||||
delete markers[callsign];
|
||||
delete markers[sourceToKey(m.source)];
|
||||
m.setMap();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -778,6 +778,7 @@ function on_ws_recv(evt) {
|
|||
$('#openwebrx-sdr-profiles-listbox').val(currentprofile.toString());
|
||||
|
||||
waterfall_clear();
|
||||
zoom_set(0);
|
||||
}
|
||||
|
||||
if ('tuning_precision' in config)
|
||||
|
@ -942,9 +943,15 @@ var waterfall_measure_minmax_now = false;
|
|||
var waterfall_measure_minmax_continuous = false;
|
||||
|
||||
function waterfall_measure_minmax_do(what) {
|
||||
// Get visible range
|
||||
var range = get_visible_freq_range();
|
||||
var start = center_freq - bandwidth / 2;
|
||||
|
||||
// this is based on an oversampling factor of about 1,25
|
||||
var ignored = .1 * what.length;
|
||||
var data = what.slice(ignored, -ignored);
|
||||
range.start = Math.max(0.1, (range.start - start) / bandwidth);
|
||||
range.end = Math.min(0.9, (range.end - start) / bandwidth);
|
||||
|
||||
var data = what.slice(range.start * what.length, range.end * what.length);
|
||||
return {
|
||||
min: Math.min.apply(Math, data),
|
||||
max: Math.max.apply(Math, data)
|
||||
|
@ -1116,8 +1123,9 @@ function init_canvas_container() {
|
|||
canvas_container.addEventListener("mouseup", canvas_mouseup, false);
|
||||
canvas_container.addEventListener("mousedown", canvas_mousedown, false);
|
||||
canvas_container.addEventListener("wheel", canvas_mousewheel, false);
|
||||
var frequency_container = $("#openwebrx-frequency-container");
|
||||
frequency_container.on("wheel", canvas_mousewheel, false);
|
||||
$("#openwebrx-frequency-container").each(function(){
|
||||
this.addEventListener("wheel", canvas_mousewheel, false);
|
||||
});
|
||||
}
|
||||
|
||||
canvas_maxshift = 0;
|
||||
|
|
|
@ -8,4 +8,5 @@ $(function(){
|
|||
$('.optional-section').optionalSection();
|
||||
$('#scheduler').schedulerInput();
|
||||
$('.exponential-input').exponentialInput();
|
||||
$('.device-log-messages').logMessages();
|
||||
});
|
|
@ -1,6 +1,7 @@
|
|||
[core]
|
||||
data_directory = /var/lib/openwebrx
|
||||
temporary_directory = /tmp
|
||||
log_level = INFO
|
||||
|
||||
[web]
|
||||
port = 8073
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import logging
|
||||
|
||||
# the linter will complain about this, but the logging must be configured before importing all the other modules
|
||||
logging.basicConfig(level=logging.DEBUG, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s")
|
||||
# loglevel will be adjusted later, INFO is just for the startup
|
||||
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s")
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
from http.server import HTTPServer
|
||||
|
@ -51,9 +52,8 @@ def main():
|
|||
|
||||
args = parser.parse_args()
|
||||
|
||||
# set loglevel to info for CLI commands
|
||||
if args.module is not None and not args.debug:
|
||||
logging.getLogger().setLevel(logging.INFO)
|
||||
if args.debug:
|
||||
logging.getLogger().setLevel(logging.DEBUG)
|
||||
|
||||
if args.version:
|
||||
print("OpenWebRX version {version}".format(version=openwebrx_version))
|
||||
|
@ -65,10 +65,10 @@ def main():
|
|||
if args.module == "config":
|
||||
return run_admin_action(configparser, args)
|
||||
|
||||
return start_receiver()
|
||||
return start_receiver(loglevel=logging.DEBUG if args.debug else None)
|
||||
|
||||
|
||||
def start_receiver():
|
||||
def start_receiver(loglevel=None):
|
||||
print(
|
||||
"""
|
||||
|
||||
|
@ -87,9 +87,13 @@ Support and info: https://groups.io/g/openwebrx
|
|||
for sig in [signal.SIGINT, signal.SIGTERM]:
|
||||
signal.signal(sig, handleSignal)
|
||||
|
||||
coreConfig = CoreConfig()
|
||||
|
||||
# passed loglevel takes priority (used for the --debug argument)
|
||||
logging.getLogger().setLevel(coreConfig.get_log_level() if loglevel is None else loglevel)
|
||||
|
||||
# config warmup
|
||||
Config.validateConfig()
|
||||
coreConfig = CoreConfig()
|
||||
|
||||
featureDetector = FeatureDetector()
|
||||
failed = featureDetector.get_failed_requirements("core")
|
||||
|
|
|
@ -33,7 +33,7 @@ thirdpartyeRegex = re.compile("^([a-zA-Z0-9-]+)>((([a-zA-Z0-9-]+\\*?,)*)([a-zA-Z
|
|||
messageIdRegex = re.compile("^(.*){([0-9]{1,5})$")
|
||||
|
||||
# regex to filter pseudo "WIDE" path elements
|
||||
widePattern = re.compile("^WIDE[0-9]-[0-9]$")
|
||||
widePattern = re.compile("^WIDE[0-9]$")
|
||||
|
||||
|
||||
def decodeBase91(input):
|
||||
|
@ -67,12 +67,13 @@ class Ax25Parser(PickleModule):
|
|||
logger.exception("error parsing ax25 frame")
|
||||
|
||||
def extractCallsign(self, input):
|
||||
cs = bytes([b >> 1 for b in input[0:6]]).decode(encoding, "replace").strip()
|
||||
cs = {
|
||||
"callsign": bytes([b >> 1 for b in input[0:6]]).decode(encoding, "replace").strip(),
|
||||
}
|
||||
ssid = (input[6] & 0b00011110) >> 1
|
||||
if ssid > 0:
|
||||
return "{callsign}-{ssid}".format(callsign=cs, ssid=ssid)
|
||||
else:
|
||||
return cs
|
||||
cs["ssid"] = ssid
|
||||
return cs
|
||||
|
||||
|
||||
class WeatherMapping(object):
|
||||
|
@ -178,7 +179,7 @@ class AprsParser(PickleModule):
|
|||
|
||||
def isDirect(self, aprsData):
|
||||
if "path" in aprsData and len(aprsData["path"]) > 0:
|
||||
hops = [host for host in aprsData["path"] if widePattern.match(host) is None]
|
||||
hops = [host for host in aprsData["path"] if widePattern.match(host["callsign"]) is None]
|
||||
if len(hops) > 0:
|
||||
return False
|
||||
if "type" in aprsData and aprsData["type"] in ["thirdparty", "item", "object"]:
|
||||
|
@ -207,12 +208,13 @@ class AprsParser(PickleModule):
|
|||
mapData = mapData["data"]
|
||||
if "lat" in mapData and "lon" in mapData:
|
||||
loc = AprsLocation(mapData)
|
||||
source = mapData["source"]
|
||||
source = mapData["source"].copy()
|
||||
# these are special packets, sent on behalf of other entities
|
||||
if "type" in mapData:
|
||||
if mapData["type"] == "item":
|
||||
source = mapData["item"]
|
||||
elif mapData["type"] == "object":
|
||||
source = mapData["object"]
|
||||
if mapData["type"] == "item" and "item" in mapData:
|
||||
source["item"] = mapData["item"]
|
||||
elif mapData["type"] == "object" and "object" in mapData:
|
||||
source["object"] = mapData["object"]
|
||||
Map.getSharedInstance().updateLocation(source, loc, "APRS", self.band)
|
||||
|
||||
def hasCompressedCoordinates(self, raw):
|
||||
|
@ -345,15 +347,24 @@ class AprsParser(PickleModule):
|
|||
return result
|
||||
|
||||
def parseThirdpartyAprsData(self, information):
|
||||
# in thirdparty packets, the callsign is passed as a string with -SSID suffix...
|
||||
# this seems to be the only case where parsing is necessary, hence this function is inline
|
||||
def parseCallsign(callsign):
|
||||
el = callsign.split('-')
|
||||
result = {"callsign": el[0]}
|
||||
if len(el) > 1:
|
||||
result["ssid"] = int(el[1])
|
||||
return result
|
||||
|
||||
matches = thirdpartyeRegex.match(information)
|
||||
if matches:
|
||||
path = matches.group(2).split(",")
|
||||
destination = next((c.strip("*").upper() for c in path if c.endswith("*")), None)
|
||||
data = self.parseAprsData(
|
||||
{
|
||||
"source": matches.group(1).upper(),
|
||||
"destination": destination,
|
||||
"path": path,
|
||||
"source": parseCallsign(matches.group(1).upper()),
|
||||
"destination": parseCallsign(destination),
|
||||
"path": [parseCallsign(c) for c in path],
|
||||
"data": matches.group(6).encode(encoding),
|
||||
}
|
||||
)
|
||||
|
@ -531,7 +542,7 @@ class MicEParser(object):
|
|||
|
||||
def parse(self, data):
|
||||
information = data["data"]
|
||||
destination = data["destination"]
|
||||
destination = data["destination"]["callsign"]
|
||||
|
||||
rawLatitude = [self.extractNumber(c) for c in destination[0:6]]
|
||||
lat = self.listToNumber(rawLatitude[0:2]) + self.listToNumber(rawLatitude[2:6]) / 6000
|
||||
|
|
|
@ -9,6 +9,7 @@ class CoreConfig(object):
|
|||
"core": {
|
||||
"data_directory": "/var/lib/openwebrx",
|
||||
"temporary_directory": "/tmp",
|
||||
"log_level": "INFO",
|
||||
},
|
||||
"web": {
|
||||
"port": 8073,
|
||||
|
@ -34,6 +35,7 @@ class CoreConfig(object):
|
|||
CoreConfig.checkDirectory(self.data_directory, "data_directory")
|
||||
self.temporary_directory = config.get("core", "temporary_directory")
|
||||
CoreConfig.checkDirectory(self.temporary_directory, "temporary_directory")
|
||||
self.log_level = config.get("core", "log_level")
|
||||
self.web_port = config.getint("web", "port")
|
||||
self.aprs_symbols_path = config.get("aprs", "symbols_path")
|
||||
|
||||
|
@ -57,3 +59,6 @@ class CoreConfig(object):
|
|||
|
||||
def get_aprs_symbols_path(self):
|
||||
return self.aprs_symbols_path
|
||||
|
||||
def get_log_level(self):
|
||||
return self.log_level
|
||||
|
|
|
@ -2,7 +2,7 @@ from owrx.property import PropertyLayer
|
|||
|
||||
|
||||
defaultConfig = PropertyLayer(
|
||||
version=7,
|
||||
version=8,
|
||||
max_clients=20,
|
||||
receiver_name="[Callsign]",
|
||||
receiver_location="Budapest, Hungary",
|
||||
|
@ -90,7 +90,7 @@ defaultConfig = PropertyLayer(
|
|||
),
|
||||
),
|
||||
sdrplay=PropertyLayer(
|
||||
name="SDRPlay RSP2",
|
||||
name="SDRPlay device",
|
||||
type="sdrplay",
|
||||
antenna="Antenna A",
|
||||
profiles=PropertyLayer(
|
||||
|
|
|
@ -111,8 +111,21 @@ class ConfigMigratorVersion6(ConfigMigrator):
|
|||
config["version"] = 7
|
||||
|
||||
|
||||
class ConfigMigratorVersion7(ConfigMigrator):
|
||||
def migrate(self, config):
|
||||
if "callsign_url" in config:
|
||||
if "qrzcq.com" in config["callsign_url"]:
|
||||
config["callsign_service"] = "qrzcq"
|
||||
elif "qrz.com" in config["callsign_url"]:
|
||||
config["callsign_service"] = "qrz"
|
||||
else:
|
||||
logger.warning("unable to migrate callsign_url! please check settings!")
|
||||
del config["callsign_url"]
|
||||
config["version"] = 8
|
||||
|
||||
|
||||
class Migrator(object):
|
||||
currentVersion = 7
|
||||
currentVersion = 8
|
||||
migrators = {
|
||||
1: ConfigMigratorVersion1(),
|
||||
2: ConfigMigratorVersion2(),
|
||||
|
@ -120,6 +133,7 @@ class Migrator(object):
|
|||
4: ConfigMigratorVersion4(),
|
||||
5: ConfigMigratorVersion5(),
|
||||
6: ConfigMigratorVersion6(),
|
||||
7: ConfigMigratorVersion7(),
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
|
|
|
@ -456,6 +456,7 @@ class MapConnection(OpenWebRxClient):
|
|||
"google_maps_api_key",
|
||||
"receiver_gps",
|
||||
"map_position_retention_time",
|
||||
"callsign_service",
|
||||
"receiver_name",
|
||||
)
|
||||
filtered_config.wire(self.write_config)
|
||||
|
|
|
@ -158,6 +158,7 @@ class CompiledAssetsController(GzipMixin, ModificationAwareController):
|
|||
"lib/settings/OptionalSection.js",
|
||||
"lib/settings/SchedulerInput.js",
|
||||
"lib/settings/ExponentialInput.js",
|
||||
"lib/settings/LogMessages.js",
|
||||
"settings.js",
|
||||
],
|
||||
}
|
||||
|
|
|
@ -168,6 +168,18 @@ class GeneralSettingsController(SettingsFormController):
|
|||
infotext="Specifies how log markers / grids will remain visible on the map",
|
||||
append="s",
|
||||
),
|
||||
DropdownInput(
|
||||
"callsign_service",
|
||||
"Callsign database service",
|
||||
infotext="Allows users to navigate to an external callsign database service by clicking on "
|
||||
+ "callsigns",
|
||||
options=[
|
||||
Option(None, "disabled"),
|
||||
Option("qrzcq", "qrzcq.com"),
|
||||
Option("qrz", "qrz.com"),
|
||||
Option("aprsfi", "aprs.fi"),
|
||||
],
|
||||
),
|
||||
),
|
||||
]
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ from owrx.form.input import TextInput, DropdownInput, Option
|
|||
from owrx.form.input.validator import RequiredValidator
|
||||
from owrx.property import PropertyLayer
|
||||
from owrx.breadcrumb import BreadcrumbMixin, Breadcrumb, BreadcrumbItem
|
||||
from owrx.log import HistoryHandler
|
||||
from abc import ABCMeta, abstractmethod
|
||||
from uuid import uuid4
|
||||
|
||||
|
@ -279,6 +280,21 @@ class SdrDeviceController(SdrFormControllerWithModal):
|
|||
config.store()
|
||||
return self.send_redirect("{}settings/sdr".format(self.get_document_root()))
|
||||
|
||||
def render_sections(self):
|
||||
handler = HistoryHandler.getHandler("owrx.source.{id}".format(id=self.device_id))
|
||||
return """
|
||||
{sections}
|
||||
<div class="card mt-2">
|
||||
<div class="card-header">Recent device log messages</div>
|
||||
<div class="card-body">
|
||||
<pre class="card-text device-log-messages">{messages}</pre>
|
||||
</div>
|
||||
</div>
|
||||
""".format(
|
||||
sections=super().render_sections(),
|
||||
messages=handler.getFormattedHistory(),
|
||||
)
|
||||
|
||||
|
||||
class NewSdrDeviceController(SettingsFormController):
|
||||
def __init__(self, handler, request, options):
|
||||
|
|
|
@ -581,6 +581,9 @@ class DspManager(SdrSourceEventClient, ClientDemodulatorSecondaryDspEventClient)
|
|||
from csdr.chain.digimodes import AudioChopperDemodulator
|
||||
from owrx.wsjt import WsjtParser
|
||||
return AudioChopperDemodulator(mod, WsjtParser())
|
||||
elif mod == "msk144":
|
||||
from csdr.chain.digimodes import Msk144Demodulator
|
||||
return Msk144Demodulator()
|
||||
elif mod == "js8":
|
||||
from csdr.chain.digimodes import AudioChopperDemodulator
|
||||
from owrx.js8 import Js8Parser
|
||||
|
@ -589,7 +592,7 @@ class DspManager(SdrSourceEventClient, ClientDemodulatorSecondaryDspEventClient)
|
|||
from csdr.chain.digimodes import PacketDemodulator
|
||||
return PacketDemodulator()
|
||||
elif mod == "pocsag":
|
||||
from csdr.chain.digimodes import PocsagDemodulator
|
||||
from csdr.chain.digiham import PocsagDemodulator
|
||||
return PocsagDemodulator()
|
||||
elif mod == "bpsk31":
|
||||
from csdr.chain.digimodes import PskDemodulator
|
||||
|
|
|
@ -80,6 +80,7 @@ class FeatureDetector(object):
|
|||
"wsjt-x": ["wsjtx"],
|
||||
"wsjt-x-2-3": ["wsjtx_2_3"],
|
||||
"wsjt-x-2-4": ["wsjtx_2_4"],
|
||||
"msk144": ["msk144decoder"],
|
||||
"packet": ["direwolf"],
|
||||
"pocsag": ["digiham"],
|
||||
"js8call": ["js8", "js8py"],
|
||||
|
@ -428,7 +429,7 @@ class FeatureDetector(object):
|
|||
def has_wsjtx(self):
|
||||
"""
|
||||
To decode FT8 and other digimodes, you need to install the WSJT-X software suite. Please check the
|
||||
[WSJT-X homepage](https://physics.princeton.edu/pulsar/k1jt/wsjtx.html) for ready-made packages or instructions
|
||||
[WSJT-X homepage](https://wsjt.sourceforge.io/) for ready-made packages or instructions
|
||||
on how to build from source.
|
||||
"""
|
||||
return reduce(and_, map(self.command_is_runnable, ["jt9", "wsprd"]), True)
|
||||
|
@ -459,6 +460,13 @@ class FeatureDetector(object):
|
|||
"""
|
||||
return self.has_wsjtx() and self._has_wsjtx_version(LooseVersion("2.4"))
|
||||
|
||||
def has_msk144decoder(self):
|
||||
"""
|
||||
To decode the MSK144 digimode please install the "msk144decoder". See the
|
||||
[project page](https://github.com/alexander-sholohov/msk144decoder) for more details.
|
||||
"""
|
||||
return self.command_is_runnable("msk144decoder")
|
||||
|
||||
def has_js8(self):
|
||||
"""
|
||||
To decode JS8, you will need to install [JS8Call](http://js8call.com/)
|
||||
|
@ -474,7 +482,7 @@ class FeatureDetector(object):
|
|||
The js8py library is used to decode binary JS8 messages into readable text. More information is available on
|
||||
[its github page](https://github.com/jketterl/js8py).
|
||||
"""
|
||||
required_version = StrictVersion("0.1")
|
||||
required_version = StrictVersion("0.2")
|
||||
try:
|
||||
from js8py.version import strictversion
|
||||
|
||||
|
|
|
@ -103,11 +103,11 @@ class Js8Parser(AudioChopperParser):
|
|||
|
||||
if (isinstance(frame, Js8FrameHeartbeat) or isinstance(frame, Js8FrameCompound)) and frame.grid:
|
||||
Map.getSharedInstance().updateLocation(
|
||||
frame.callsign, LocatorLocation(frame.grid), "JS8", band
|
||||
frame.source, LocatorLocation(frame.grid), "JS8", band
|
||||
)
|
||||
ReportingEngine.getSharedInstance().spot(
|
||||
{
|
||||
"callsign": frame.callsign,
|
||||
"source": frame.source,
|
||||
"mode": "JS8",
|
||||
"locator": frame.grid,
|
||||
"freq": freq + frame.freq,
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
import threading
|
||||
import os
|
||||
from logging import Logger, Handler, LogRecord, Formatter
|
||||
|
||||
|
||||
class LogPipe(threading.Thread):
|
||||
|
||||
def __init__(self, level: int, logger: Logger, prefix: str = ""):
|
||||
threading.Thread.__init__(self)
|
||||
self.daemon = False
|
||||
self.level = level
|
||||
self.logger = logger
|
||||
self.prefix = prefix
|
||||
self.fdRead, self.fdWrite = os.pipe()
|
||||
self.pipeReader = os.fdopen(self.fdRead)
|
||||
self.start()
|
||||
|
||||
def fileno(self):
|
||||
return self.fdWrite
|
||||
|
||||
def run(self):
|
||||
for line in iter(self.pipeReader.readline, ''):
|
||||
self.logger.log(self.level, "{}: {}".format(self.prefix, line.strip('\n')))
|
||||
|
||||
self.pipeReader.close()
|
||||
|
||||
def close(self):
|
||||
os.close(self.fdWrite)
|
||||
|
||||
|
||||
class HistoryHandler(Handler):
|
||||
handlers = {}
|
||||
|
||||
@staticmethod
|
||||
def getHandler(name: str):
|
||||
if name not in HistoryHandler.handlers:
|
||||
HistoryHandler.handlers[name] = HistoryHandler()
|
||||
return HistoryHandler.handlers[name]
|
||||
|
||||
def __init__(self, maxRecords: int = 200):
|
||||
super().__init__()
|
||||
self.history = []
|
||||
self.maxRecords = maxRecords
|
||||
self.setFormatter(Formatter(fmt="%(asctime)s - %(name)s - %(levelname)s - %(message)s"))
|
||||
|
||||
def emit(self, record: LogRecord) -> None:
|
||||
self.history.append(record)
|
||||
# truncate
|
||||
self.history = self.history[-self.maxRecords:]
|
||||
|
||||
def getFormattedHistory(self) -> str:
|
||||
return "\n".join([self.format(r) for r in self.history])
|
35
owrx/map.py
35
owrx/map.py
|
@ -61,13 +61,13 @@ class Map(object):
|
|||
client.write_update(
|
||||
[
|
||||
{
|
||||
"callsign": callsign,
|
||||
"source": record["source"],
|
||||
"location": record["location"].__dict__(),
|
||||
"lastseen": record["updated"].timestamp() * 1000,
|
||||
"mode": record["mode"],
|
||||
"band": record["band"].getName() if record["band"] is not None else None,
|
||||
}
|
||||
for (callsign, record) in self.positions.items()
|
||||
for record in self.positions.values()
|
||||
]
|
||||
)
|
||||
|
||||
|
@ -77,14 +77,20 @@ class Map(object):
|
|||
except ValueError:
|
||||
pass
|
||||
|
||||
def updateLocation(self, callsign, loc: Location, mode: str, band: Band = None):
|
||||
def _sourceToKey(self, source):
|
||||
if "ssid" in source:
|
||||
return "{callsign}-{ssid}".format(**source)
|
||||
return source["callsign"]
|
||||
|
||||
def updateLocation(self, source, loc: Location, mode: str, band: Band = None):
|
||||
ts = datetime.now()
|
||||
key = self._sourceToKey(source)
|
||||
with self.positionsLock:
|
||||
self.positions[callsign] = {"location": loc, "updated": ts, "mode": mode, "band": band}
|
||||
self.positions[key] = {"source": source, "location": loc, "updated": ts, "mode": mode, "band": band}
|
||||
self.broadcast(
|
||||
[
|
||||
{
|
||||
"callsign": callsign,
|
||||
"source": source,
|
||||
"location": loc.__dict__(),
|
||||
"lastseen": ts.timestamp() * 1000,
|
||||
"mode": mode,
|
||||
|
@ -93,17 +99,18 @@ class Map(object):
|
|||
]
|
||||
)
|
||||
|
||||
def touchLocation(self, callsign):
|
||||
def touchLocation(self, source):
|
||||
# not implemented on the client side yet, so do not use!
|
||||
ts = datetime.now()
|
||||
key = self._sourceToKey(source)
|
||||
with self.positionsLock:
|
||||
if callsign in self.positions:
|
||||
self.positions[callsign]["updated"] = ts
|
||||
self.broadcast([{"callsign": callsign, "lastseen": ts.timestamp() * 1000}])
|
||||
if key in self.positions:
|
||||
self.positions[key]["updated"] = ts
|
||||
self.broadcast([{"source": source, "lastseen": ts.timestamp() * 1000}])
|
||||
|
||||
def removeLocation(self, callsign):
|
||||
def removeLocation(self, key):
|
||||
with self.positionsLock:
|
||||
del self.positions[callsign]
|
||||
del self.positions[key]
|
||||
# TODO broadcast removal to clients
|
||||
|
||||
def removeOldPositions(self):
|
||||
|
@ -111,9 +118,9 @@ class Map(object):
|
|||
retention = timedelta(seconds=pm["map_position_retention_time"])
|
||||
cutoff = datetime.now() - retention
|
||||
|
||||
to_be_removed = [callsign for (callsign, pos) in self.positions.items() if pos["updated"] < cutoff]
|
||||
for callsign in to_be_removed:
|
||||
self.removeLocation(callsign)
|
||||
to_be_removed = [key for (key, pos) in self.positions.items() if pos["updated"] < cutoff]
|
||||
for key in to_be_removed:
|
||||
self.removeLocation(key)
|
||||
|
||||
def rebuildPositions(self):
|
||||
logger.debug("rebuilding map storage; size before: %i", sys.getsizeof(self.positions))
|
||||
|
|
|
@ -129,7 +129,7 @@ class DigihamEnricher(Enricher, metaclass=ABCMeta):
|
|||
callsign = self.getCallsign(meta)
|
||||
if callsign is not None and "lat" in meta and "lon" in meta:
|
||||
loc = LatLngLocation(meta["lat"], meta["lon"])
|
||||
Map.getSharedInstance().updateLocation(callsign, loc, mode, self.parser.getBand())
|
||||
Map.getSharedInstance().updateLocation({"callsign": callsign}, loc, mode, self.parser.getBand())
|
||||
return meta
|
||||
|
||||
@abstractmethod
|
||||
|
@ -202,7 +202,7 @@ class DStarEnricher(DigihamEnricher):
|
|||
if "ourcall" in meta:
|
||||
# send location info to map as well (it will show up with the correct symbol there!)
|
||||
loc = AprsLocation(data)
|
||||
Map.getSharedInstance().updateLocation(meta["ourcall"], loc, "DPRS", self.parser.getBand())
|
||||
Map.getSharedInstance().updateLocation({"callsign": meta["ourcall"]}, loc, "DPRS", self.parser.getBand())
|
||||
except Exception:
|
||||
logger.exception("Error while parsing DPRS data")
|
||||
|
||||
|
|
|
@ -120,6 +120,7 @@ class Modes(object):
|
|||
WsjtMode("fst4", "FST4", requirements=["wsjt-x-2-3"]),
|
||||
WsjtMode("fst4w", "FST4W", bandpass=Bandpass(1350, 1650), requirements=["wsjt-x-2-3"]),
|
||||
WsjtMode("q65", "Q65", requirements=["wsjt-x-2-4"]),
|
||||
DigitalMode("msk144", "MSK144", requirements=["msk144"], underlying=["usb"], service=True),
|
||||
Js8Mode("js8", "JS8Call"),
|
||||
DigitalMode(
|
||||
"packet",
|
||||
|
|
|
@ -27,9 +27,9 @@ class PskReporter(Reporter):
|
|||
Supports all valid MODE and SUBMODE values from the ADIF standard.
|
||||
|
||||
Current version at the time of the last change:
|
||||
https://www.adif.org/312/ADIF_312.htm#Mode_Enumeration
|
||||
https://www.adif.org/314/ADIF_314.htm#Mode_Enumeration
|
||||
"""
|
||||
return ["FT8", "FT4", "JT9", "JT65", "FST4", "JS8", "Q65", "WSPR", "FST4W"]
|
||||
return ["FT8", "FT4", "JT9", "JT65", "FST4", "JS8", "Q65", "WSPR", "FST4W", "MSK144"]
|
||||
|
||||
def stop(self):
|
||||
self.cancelTimer()
|
||||
|
@ -56,7 +56,7 @@ class PskReporter(Reporter):
|
|||
self.timer.start()
|
||||
|
||||
def spotEquals(self, s1, s2):
|
||||
keys = ["callsign", "timestamp", "locator", "mode", "msg"]
|
||||
keys = ["source", "timestamp", "locator", "mode", "msg"]
|
||||
|
||||
return reduce(and_, map(lambda key: s1[key] == s2[key], keys))
|
||||
|
||||
|
@ -105,27 +105,34 @@ class Uploader(object):
|
|||
# filter out any erroneous encodes
|
||||
encoded = [e for e in encoded if e is not None]
|
||||
|
||||
def chunks(l, n):
|
||||
"""Yield successive n-sized chunks from l."""
|
||||
for i in range(0, len(l), n):
|
||||
yield l[i : i + n]
|
||||
def chunks(block, max_size):
|
||||
size = 0
|
||||
current = []
|
||||
for r in block:
|
||||
if size + len(r) > max_size:
|
||||
yield current
|
||||
current = []
|
||||
size = 0
|
||||
size += len(r)
|
||||
current.append(r)
|
||||
yield current
|
||||
|
||||
rHeader = self.getReceiverInformationHeader()
|
||||
rInfo = self.getReceiverInformation()
|
||||
sHeader = self.getSenderInformationHeader()
|
||||
|
||||
packets = []
|
||||
# 50 seems to be a safe bet
|
||||
for chunk in chunks(encoded, 50):
|
||||
# 1200 bytes of sender data should keep the packet size below MTU for most cases
|
||||
for chunk in chunks(encoded, 1200):
|
||||
sInfo = self.getSenderInformation(chunk)
|
||||
length = 16 + len(rHeader) + len(sHeader) + len(rInfo) + len(sInfo)
|
||||
header = self.getHeader(length)
|
||||
packets.append(header + rHeader + sHeader + rInfo + sInfo)
|
||||
self.sequence = (self.sequence + len(chunk)) % (1 << 32)
|
||||
|
||||
return packets
|
||||
|
||||
def getHeader(self, length):
|
||||
self.sequence += 1
|
||||
return bytes(
|
||||
# protocol version
|
||||
[0x00, 0x0A]
|
||||
|
@ -141,8 +148,8 @@ class Uploader(object):
|
|||
def encodeSpot(self, spot):
|
||||
try:
|
||||
return bytes(
|
||||
self.encodeString(spot["callsign"])
|
||||
+ list(int(spot["freq"]).to_bytes(4, "big"))
|
||||
self.encodeString(spot["source"]["callsign"])
|
||||
+ list(int(spot["freq"]).to_bytes(5, "big"))
|
||||
+ list(int(spot["db"]).to_bytes(1, "big", signed=True))
|
||||
+ self.encodeString(spot["mode"])
|
||||
+ self.encodeString(spot["locator"])
|
||||
|
@ -208,7 +215,7 @@ class Uploader(object):
|
|||
# senderCallsign
|
||||
+ [0x80, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x76, 0x8F]
|
||||
# frequency
|
||||
+ [0x80, 0x05, 0x00, 0x04, 0x00, 0x00, 0x76, 0x8F]
|
||||
+ [0x80, 0x05, 0x00, 0x05, 0x00, 0x00, 0x76, 0x8F]
|
||||
# sNR
|
||||
+ [0x80, 0x06, 0x00, 0x01, 0x00, 0x00, 0x76, 0x8F]
|
||||
# mode
|
||||
|
|
|
@ -56,7 +56,7 @@ class Worker(threading.Thread):
|
|||
# FST4W does not have drift
|
||||
"drift": spot["drift"] if "drift" in spot else 0,
|
||||
"tqrg": spot["freq"] / 1e6,
|
||||
"tcall": spot["callsign"],
|
||||
"tcall": spot["source"]["callsign"],
|
||||
"tgrid": spot["locator"],
|
||||
"dbm": spot["dbm"],
|
||||
"version": openwebrx_version,
|
||||
|
|
|
@ -122,6 +122,15 @@ class ServiceHandler(SdrSourceEventClient):
|
|||
self.startupTimer.start()
|
||||
|
||||
def updateServices(self):
|
||||
def addService(dial, source):
|
||||
mode = dial["mode"]
|
||||
frequency = dial["frequency"]
|
||||
try:
|
||||
service = self.setupService(mode, frequency, source)
|
||||
self.services.append(service)
|
||||
except Exception:
|
||||
logger.exception("Error setting up service %s on frequency %d", mode, frequency)
|
||||
|
||||
with self.lock:
|
||||
logger.debug("re-scheduling services due to sdr changes")
|
||||
self.stopServices()
|
||||
|
@ -146,7 +155,7 @@ class ServiceHandler(SdrSourceEventClient):
|
|||
groups = self.optimizeResampling(dials, sr)
|
||||
if groups is None:
|
||||
for dial in dials:
|
||||
self.services.append(self.setupService(dial["mode"], dial["frequency"], self.source))
|
||||
addService(dial, self.source)
|
||||
else:
|
||||
for group in groups:
|
||||
if len(group) > 1:
|
||||
|
@ -157,14 +166,14 @@ class ServiceHandler(SdrSourceEventClient):
|
|||
resampler = Resampler(resampler_props, self.source)
|
||||
|
||||
for dial in group:
|
||||
self.services.append(self.setupService(dial["mode"], dial["frequency"], resampler))
|
||||
addService(dial, resampler)
|
||||
|
||||
# resampler goes in after the services since it must not be shutdown as long as the services are
|
||||
# still running
|
||||
self.services.append(resampler)
|
||||
else:
|
||||
dial = group[0]
|
||||
self.services.append(self.setupService(dial["mode"], dial["frequency"], self.source))
|
||||
addService(dial, self.source)
|
||||
|
||||
def get_min_max(self, group):
|
||||
frequencies = sorted(group, key=lambda f: f["frequency"])
|
||||
|
@ -279,11 +288,13 @@ class ServiceHandler(SdrSourceEventClient):
|
|||
def _getSecondaryDemodulator(self, mod) -> Optional[ServiceDemodulator]:
|
||||
if isinstance(mod, ServiceDemodulatorChain):
|
||||
return mod
|
||||
# TODO add remaining modes
|
||||
if mod in ["ft8", "wspr", "jt65", "jt9", "ft4", "fst4", "fst4w", "q65"]:
|
||||
from csdr.chain.digimodes import AudioChopperDemodulator
|
||||
from owrx.wsjt import WsjtParser
|
||||
return AudioChopperDemodulator(mod, WsjtParser())
|
||||
elif mod == "msk144":
|
||||
from csdr.chain.digimodes import Msk144Demodulator
|
||||
return Msk144Demodulator()
|
||||
elif mod == "js8":
|
||||
from csdr.chain.digimodes import AudioChopperDemodulator
|
||||
from owrx.js8 import Js8Parser
|
||||
|
@ -291,7 +302,8 @@ class ServiceHandler(SdrSourceEventClient):
|
|||
elif mod == "packet":
|
||||
from csdr.chain.digimodes import PacketDemodulator
|
||||
return PacketDemodulator(service=True)
|
||||
return None
|
||||
|
||||
raise ValueError("unsupported service modulation: {}".format(mod))
|
||||
|
||||
|
||||
class Services(object):
|
||||
|
|
|
@ -16,8 +16,10 @@ from owrx.form.input import Input, TextInput, NumberInput, CheckboxInput, ModesI
|
|||
from owrx.form.input.converter import OptionalConverter
|
||||
from owrx.form.input.device import GainInput, SchedulerInput, WaterfallLevelsInput
|
||||
from owrx.form.input.validator import RequiredValidator
|
||||
from owrx.form.input.converter import Converter
|
||||
from owrx.form.section import OptionalSection
|
||||
from owrx.feature import FeatureDetector
|
||||
from owrx.log import LogPipe, HistoryHandler
|
||||
from typing import List
|
||||
from enum import Enum
|
||||
|
||||
|
@ -114,6 +116,10 @@ class SdrSource(ABC):
|
|||
self.commandMapper = None
|
||||
self.tcpSource = None
|
||||
self.buffer = None
|
||||
self.logger = logger.getChild(id) if id is not None else logger
|
||||
self.logger.addHandler(HistoryHandler.getHandler(self.logger.name))
|
||||
self.stdoutPipe = None
|
||||
self.stderrPipe = None
|
||||
|
||||
self.props = PropertyStack()
|
||||
|
||||
|
@ -185,17 +191,17 @@ class SdrSource(ABC):
|
|||
for id, p in self.props["profiles"].items():
|
||||
props.replaceLayer(0, p)
|
||||
if "center_freq" not in props:
|
||||
logger.warning('Profile "%s" does not specify a center_freq', id)
|
||||
self.logger.warning('Profile "%s" does not specify a center_freq', id)
|
||||
continue
|
||||
if "samp_rate" not in props:
|
||||
logger.warning('Profile "%s" does not specify a samp_rate', id)
|
||||
self.logger.warning('Profile "%s" does not specify a samp_rate', id)
|
||||
continue
|
||||
if "start_freq" in props:
|
||||
start_freq = props["start_freq"]
|
||||
srh = props["samp_rate"] / 2
|
||||
center_freq = props["center_freq"]
|
||||
if start_freq < center_freq - srh or start_freq > center_freq + srh:
|
||||
logger.warning('start_freq for profile "%s" is out of range', id)
|
||||
self.logger.warning('start_freq for profile "%s" is out of range', id)
|
||||
|
||||
def isAlwaysOn(self):
|
||||
return "always-on" in self.props and self.props["always-on"]
|
||||
|
@ -225,11 +231,12 @@ class SdrSource(ABC):
|
|||
return [self.getCommandMapper().map(self.getCommandValues())]
|
||||
|
||||
def activateProfile(self, profile_id):
|
||||
logger.debug("activating profile {0} for {1}".format(profile_id, self.getId()))
|
||||
try:
|
||||
profile_name = self.getProfiles()[profile_id]["name"]
|
||||
self.logger.debug("activating profile \"%s\" for \"%s\"", profile_name, self.getName())
|
||||
self.profileCarousel.switch(profile_id)
|
||||
except KeyError:
|
||||
logger.warning("invalid profile %s for sdr %s. ignoring", profile_id, self.getId())
|
||||
self.logger.warning("invalid profile %s for sdr %s. ignoring", profile_id, self.getId())
|
||||
|
||||
def getId(self):
|
||||
return self.id
|
||||
|
@ -249,10 +256,13 @@ class SdrSource(ABC):
|
|||
def getPort(self):
|
||||
return self.port
|
||||
|
||||
def _getTcpSourceFormat(self):
|
||||
return Format.COMPLEX_FLOAT
|
||||
|
||||
def _getTcpSource(self):
|
||||
with self.modificationLock:
|
||||
if self.tcpSource is None:
|
||||
self.tcpSource = TcpSource(self.port, Format.COMPLEX_FLOAT)
|
||||
self.tcpSource = TcpSource(self.port, self._getTcpSourceFormat())
|
||||
return self.tcpSource
|
||||
|
||||
def getBuffer(self):
|
||||
|
@ -280,23 +290,37 @@ class SdrSource(ABC):
|
|||
try:
|
||||
self.preStart()
|
||||
except Exception:
|
||||
logger.exception("Exception during preStart()")
|
||||
self.logger.exception("Exception during preStart()")
|
||||
|
||||
cmd = self.getCommand()
|
||||
cmd = [c for c in cmd if c is not None]
|
||||
|
||||
self.stdoutPipe = LogPipe(logging.INFO, self.logger, "STDOUT")
|
||||
self.stderrPipe = LogPipe(logging.WARNING, self.logger, "STDERR")
|
||||
|
||||
# don't use shell mode for commands without piping
|
||||
if len(cmd) > 1:
|
||||
# multiple commands with pipes
|
||||
cmd = "|".join(cmd)
|
||||
self.process = subprocess.Popen(cmd, shell=True, start_new_session=True)
|
||||
self.process = subprocess.Popen(
|
||||
cmd,
|
||||
shell=True,
|
||||
start_new_session=True,
|
||||
stdout=self.stdoutPipe,
|
||||
stderr=self.stderrPipe
|
||||
)
|
||||
else:
|
||||
# single command
|
||||
cmd = cmd[0]
|
||||
# start_new_session can go as soon as there's no piped commands left
|
||||
# the os.killpg call must be replaced with something more reasonable at the same time
|
||||
self.process = subprocess.Popen(shlex.split(cmd), start_new_session=True)
|
||||
logger.info("Started sdr source: " + cmd)
|
||||
self.process = subprocess.Popen(
|
||||
shlex.split(cmd),
|
||||
start_new_session=True,
|
||||
stdout=self.stdoutPipe,
|
||||
stderr=self.stderrPipe
|
||||
)
|
||||
self.logger.info("Started sdr source: " + cmd)
|
||||
|
||||
available = False
|
||||
failed = False
|
||||
|
@ -304,9 +328,13 @@ class SdrSource(ABC):
|
|||
def wait_for_process_to_end():
|
||||
nonlocal failed
|
||||
rc = self.process.wait()
|
||||
logger.debug("shut down with RC={0}".format(rc))
|
||||
self.logger.debug("shut down with RC={0}".format(rc))
|
||||
self.process = None
|
||||
self.monitor = None
|
||||
self.stdoutPipe.close()
|
||||
self.stdoutPipe = None
|
||||
self.stderrPipe.close()
|
||||
self.stderrPipe = None
|
||||
if self.getState() is SdrSourceState.RUNNING:
|
||||
self.fail()
|
||||
else:
|
||||
|
@ -337,7 +365,7 @@ class SdrSource(ABC):
|
|||
try:
|
||||
self.postStart()
|
||||
except Exception:
|
||||
logger.exception("Exception during postStart()")
|
||||
self.logger.exception("Exception during postStart()")
|
||||
failed = True
|
||||
|
||||
if failed:
|
||||
|
@ -371,7 +399,7 @@ class SdrSource(ABC):
|
|||
self.monitor.join(10)
|
||||
# if the monitor is still running, the process still hasn't ended, so kill it
|
||||
if self.monitor:
|
||||
logger.warning("source has not shut down normally within 10 seconds, sending SIGKILL")
|
||||
self.logger.warning("source has not shut down normally within 10 seconds, sending SIGKILL")
|
||||
os.killpg(os.getpgid(self.process.pid), signal.SIGKILL)
|
||||
except ProcessLookupError:
|
||||
# been killed by something else, ignore
|
||||
|
@ -479,6 +507,32 @@ class SdrDeviceDescriptionMissing(Exception):
|
|||
pass
|
||||
|
||||
|
||||
class SdrDeviceTypeConverter(Converter):
|
||||
def convert_to_form(self, value):
|
||||
# local import due to circular dependendies
|
||||
types = SdrDeviceDescription.getTypes()
|
||||
if value in types:
|
||||
return types[value]
|
||||
return value
|
||||
|
||||
def convert_from_form(self, value):
|
||||
return None
|
||||
|
||||
|
||||
class SdrDeviceTypeDisplay(Input):
|
||||
"""
|
||||
Not an input per se, just an element that can display the SDR device type in the web config
|
||||
"""
|
||||
def __init__(self, id, label):
|
||||
super().__init__(id, label, disabled=True)
|
||||
|
||||
def defaultConverter(self):
|
||||
return SdrDeviceTypeConverter()
|
||||
|
||||
def parse(self, data):
|
||||
return {}
|
||||
|
||||
|
||||
class SdrDeviceDescription(object):
|
||||
@staticmethod
|
||||
def getByType(sdr_type: str) -> "SdrDeviceDescription":
|
||||
|
@ -536,6 +590,7 @@ class SdrDeviceDescription(object):
|
|||
|
||||
def getInputs(self) -> List[Input]:
|
||||
return [
|
||||
SdrDeviceTypeDisplay("type", "Device type"),
|
||||
CheckboxInput("enabled", "Enable this device", converter=OptionalConverter(defaultFormValue=True)),
|
||||
GainInput("rf_gain", "Device gain", self.hasAgc()),
|
||||
NumberInput(
|
||||
|
@ -573,7 +628,7 @@ class SdrDeviceDescription(object):
|
|||
return True
|
||||
|
||||
def getDeviceMandatoryKeys(self):
|
||||
return ["name", "enabled"]
|
||||
return ["name", "type", "enabled"]
|
||||
|
||||
def getDeviceOptionalKeys(self):
|
||||
keys = [
|
||||
|
|
|
@ -6,10 +6,6 @@ from owrx.command import Flag, Option
|
|||
from typing import List
|
||||
from owrx.form.input import Input, NumberInput, CheckboxInput
|
||||
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ConnectorSource(SdrSource):
|
||||
def __init__(self, id, props):
|
||||
|
@ -40,7 +36,7 @@ class ConnectorSource(SdrSource):
|
|||
for prop, value in changes.items():
|
||||
if value is PropertyDeleted:
|
||||
value = None
|
||||
logger.debug("sending property change over control socket: {0} changed to {1}".format(prop, value))
|
||||
self.logger.debug("sending property change over control socket: {0} changed to {1}".format(prop, value))
|
||||
self.controlSocket.sendall("{prop}:{value}\n".format(prop=prop, value=value).encode())
|
||||
|
||||
def onPropertyChange(self, changes):
|
||||
|
@ -56,7 +52,7 @@ class ConnectorSource(SdrSource):
|
|||
self.sendControlMessage(changes)
|
||||
|
||||
def postStart(self):
|
||||
logger.debug("opening control socket...")
|
||||
self.logger.debug("opening control socket...")
|
||||
self.controlSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
self.controlSocket.connect(("localhost", self.controlPort))
|
||||
|
||||
|
|
|
@ -5,14 +5,14 @@ from typing import Optional
|
|||
from pycsdr.modules import Buffer
|
||||
from pycsdr.types import Format
|
||||
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class DirectSource(SdrSource, metaclass=ABCMeta):
|
||||
def __init__(self, id, props):
|
||||
self._conversion = None
|
||||
super().__init__(id, props)
|
||||
|
||||
def onPropertyChange(self, changes):
|
||||
logger.debug("restarting sdr source due to property changes: {0}".format(changes))
|
||||
self.logger.debug("restarting sdr source due to property changes: {0}".format(changes))
|
||||
self.stop()
|
||||
self.sleepOnRestart()
|
||||
self.start()
|
||||
|
@ -48,6 +48,10 @@ class DirectSource(SdrSource, metaclass=ABCMeta):
|
|||
def getFormatConversion(self) -> Optional[Chain]:
|
||||
return None
|
||||
|
||||
def _getTcpSourceFormat(self):
|
||||
conversion = self.getFormatConversion()
|
||||
return Format.COMPLEX_FLOAT if conversion is None else conversion.getInputFormat()
|
||||
|
||||
# override this in subclasses, if necessary
|
||||
def sleepOnRestart(self):
|
||||
pass
|
||||
|
@ -57,12 +61,12 @@ class DirectSource(SdrSource, metaclass=ABCMeta):
|
|||
source = self._getTcpSource()
|
||||
buffer = Buffer(source.getOutputFormat())
|
||||
source.setWriter(buffer)
|
||||
conversion = self.getFormatConversion()
|
||||
if conversion is not None:
|
||||
conversion.setReader(buffer.getReader())
|
||||
self._conversion = self.getFormatConversion()
|
||||
if self._conversion is not None:
|
||||
self._conversion.setReader(buffer.getReader())
|
||||
# this one must be COMPLEX_FLOAT
|
||||
buffer = Buffer(Format.COMPLEX_FLOAT)
|
||||
conversion.setWriter(buffer)
|
||||
self._conversion.setWriter(buffer)
|
||||
self.buffer = buffer
|
||||
return self.buffer
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
from owrx.command import Option
|
||||
from owrx.source.direct import DirectSource, DirectSourceDeviceDescription
|
||||
from owrx.log import LogPipe
|
||||
from subprocess import Popen
|
||||
from csdr.chain import Chain
|
||||
from pycsdr.modules import Convert, Gain
|
||||
from pycsdr.types import Format
|
||||
|
||||
from typing import List
|
||||
from owrx.form.input import Input, TextInput
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class FifiSdrSource(DirectSource):
|
||||
def getCommandMapper(self):
|
||||
|
@ -27,11 +27,19 @@ class FifiSdrSource(DirectSource):
|
|||
return Chain([Convert(Format.COMPLEX_SHORT, Format.COMPLEX_FLOAT), Gain(Format.COMPLEX_FLOAT, 5.0)])
|
||||
|
||||
def sendRockProgFrequency(self, frequency):
|
||||
process = Popen(["rockprog", "--vco", "-w", "--freq={}".format(frequency / 1e6)])
|
||||
stdoutPipe = LogPipe(logging.DEBUG, self.logger, "STDOUT")
|
||||
stderrPipe = LogPipe(logging.DEBUG, self.logger, "STDERR")
|
||||
process = Popen(
|
||||
["rockprog", "--vco", "-w", "--freq={}".format(frequency / 1e6)],
|
||||
stdout=stdoutPipe,
|
||||
stderr=stderrPipe
|
||||
)
|
||||
process.communicate()
|
||||
rc = process.wait()
|
||||
if rc != 0:
|
||||
logger.warning("rockprog failed to set frequency; rc=%i", rc)
|
||||
self.logger.warning("rockprog failed to set frequency; rc=%i", rc)
|
||||
stdoutPipe.close()
|
||||
stderrPipe.close()
|
||||
|
||||
def preStart(self):
|
||||
values = self.getCommandValues()
|
||||
|
@ -49,3 +57,15 @@ class FifiSdrDeviceDescription(DirectSourceDeviceDescription):
|
|||
def supportsPpm(self):
|
||||
# not currently mapped, and it's unclear how this should be sent to the device
|
||||
return False
|
||||
|
||||
def getInputs(self) -> List[Input]:
|
||||
return super().getInputs() + [
|
||||
TextInput(
|
||||
"device",
|
||||
"Device identifier",
|
||||
infotext="Alsa audio device identifier",
|
||||
),
|
||||
]
|
||||
|
||||
def getDeviceOptionalKeys(self):
|
||||
return super().getDeviceOptionalKeys() + ["device"]
|
||||
|
|
|
@ -3,14 +3,10 @@ from pycsdr.modules import Buffer, FirDecimate, Shift
|
|||
from pycsdr.types import Format
|
||||
from csdr.chain import Chain
|
||||
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Resampler(SdrSource):
|
||||
def onPropertyChange(self, changes):
|
||||
logger.warning("Resampler is unable to handle property changes: {0}".format(changes))
|
||||
self.logger.warning("Resampler is unable to handle property changes: {0}".format(changes))
|
||||
|
||||
def __init__(self, props, sdr):
|
||||
sdrProps = sdr.getProps()
|
||||
|
@ -41,7 +37,7 @@ class Resampler(SdrSource):
|
|||
super().stop()
|
||||
|
||||
def activateProfile(self, profile_id=None):
|
||||
logger.warning("Resampler does not support setting profiles")
|
||||
self.logger.warning("Resampler does not support setting profiles")
|
||||
pass
|
||||
|
||||
def validateProfiles(self):
|
||||
|
|
23
owrx/wsjt.py
23
owrx/wsjt.py
|
@ -245,6 +245,17 @@ class Q65Profile(WsjtProfile):
|
|||
return ["jt9", "--q65", "-p", str(self.interval), "-b", self.mode.name, "-d", str(self.decoding_depth()), file]
|
||||
|
||||
|
||||
class Msk144Profile(WsjtProfile):
|
||||
def getMode(self):
|
||||
return "MSK144"
|
||||
|
||||
def getInterval(self):
|
||||
return 15
|
||||
|
||||
def decoder_commandline(self, file):
|
||||
return None
|
||||
|
||||
|
||||
class WsjtParser(AudioChopperParser):
|
||||
def parse(self, profile: WsjtProfile, freq: int, raw_msg: bytes):
|
||||
try:
|
||||
|
@ -276,9 +287,9 @@ class WsjtParser(AudioChopperParser):
|
|||
out["interval"] = profile.getInterval()
|
||||
|
||||
self.pushDecode(mode, band)
|
||||
if "callsign" in out and "locator" in out:
|
||||
if "source" in out and "locator" in out:
|
||||
Map.getSharedInstance().updateLocation(
|
||||
out["callsign"], LocatorLocation(out["locator"]), mode, band
|
||||
out["source"], LocatorLocation(out["locator"]), mode, band
|
||||
)
|
||||
ReportingEngine.getSharedInstance().spot(out)
|
||||
|
||||
|
@ -342,8 +353,8 @@ class QsoMessageParser(MessageParser):
|
|||
# this is a valid locator in theory, but it's somewhere in the arctic ocean, near the north pole, so it's very
|
||||
# likely this just means roger roger goodbye.
|
||||
if m.group(3) == "RR73":
|
||||
return {"callsign": m.group(1)}
|
||||
return {"callsign": m.group(1), "locator": m.group(3)}
|
||||
return {"source": {"callsign": m.group(1)}}
|
||||
return {"source": {"callsign": m.group(1)}, "locator": m.group(3)}
|
||||
|
||||
|
||||
# Used in propagation reporting / beacon modes (WSPR / FST4W)
|
||||
|
@ -354,7 +365,7 @@ class BeaconMessageParser(MessageParser):
|
|||
m = BeaconMessageParser.wspr_splitter_pattern.match(msg)
|
||||
if m is None:
|
||||
return {}
|
||||
return {"callsign": m.group(1), "locator": m.group(2), "dbm": m.group(3)}
|
||||
return {"source": {"callsign": m.group(1)}, "locator": m.group(2), "dbm": m.group(3)}
|
||||
|
||||
|
||||
class Jt9Decoder(Decoder):
|
||||
|
@ -366,6 +377,8 @@ class Jt9Decoder(Decoder):
|
|||
# '0003 -4 0.4 1762 # CQ R2ABM KO85'
|
||||
# fst4 sample
|
||||
# '**** -23 0.6 3023 ` <...> <...> R 591631 BI53PV'
|
||||
# MSK144 sample
|
||||
# '221602 8 0.4 1488 & K1JT WA4CQG EM72'
|
||||
msg, timestamp = self.parse_timestamp(msg)
|
||||
wsjt_msg = msg[17:53].strip()
|
||||
|
||||
|
|
18
setup.py
18
setup.py
|
@ -14,22 +14,8 @@ setup(
|
|||
version=str(looseversion),
|
||||
packages=find_namespace_packages(
|
||||
include=[
|
||||
"owrx",
|
||||
"owrx.source",
|
||||
"owrx.service",
|
||||
"owrx.controllers",
|
||||
"owrx.controllers.settings",
|
||||
"owrx.property",
|
||||
"owrx.form",
|
||||
"owrx.form.input",
|
||||
"owrx.config",
|
||||
"owrx.reporting",
|
||||
"owrx.audio",
|
||||
"owrx.admin",
|
||||
"owrx.aprs",
|
||||
"csdr",
|
||||
"csdr.chain",
|
||||
"csdr.module",
|
||||
"owrx*",
|
||||
"csdr*",
|
||||
"htdocs",
|
||||
]
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue