Compare commits
69 Commits
1.2.0
...
underlying
Author | SHA1 | Date | |
---|---|---|---|
258aebd0c3 | |||
a54a5fd560 | |||
cb5b2e64af | |||
685b9970d2 | |||
c385a8f6b1 | |||
aa60b9d4a7 | |||
bff09e3363 | |||
774f8bd91a | |||
b1684908a4 | |||
ed76fd7606 | |||
7b3f212ccb | |||
216a3db45d | |||
c16de474c6 | |||
afcd8277d1 | |||
525b70d495 | |||
f58023f3e5 | |||
252edb7a5a | |||
2993cc4279 | |||
cc4f3c6c1d | |||
0de597481c | |||
2342bb5d29 | |||
b1ac8caf9b | |||
d79a1396a6 | |||
1e6e7528b5 | |||
f6326f8631 | |||
c61986dbcc | |||
bbc9d9e7a8 | |||
a309af40e9 | |||
f3a3b9243c | |||
edc9009359 | |||
13e323cdd2 | |||
ab40a2934f | |||
322b6a0d52 | |||
bba900d8f8 | |||
64f0510da0 | |||
4050bd7f96 | |||
35abd711ca | |||
258e41669e | |||
975f5ffdf0 | |||
90ed47a115 | |||
271bd723bc | |||
8a7e91be38 | |||
9416db5f42 | |||
0127e32ea1 | |||
e20d94e241 | |||
6c01d48493 | |||
94269e211e | |||
811d95c7bc | |||
c07e33d19d | |||
c150eca75c | |||
7a61f991ad | |||
4423c7f13a | |||
5cd0847362 | |||
1635cbfa42 | |||
e92b6d657b | |||
d5f7ce9508 | |||
bfd4d5657c | |||
bb625a5f9f | |||
2ccdc90cc5 | |||
ff43555411 | |||
339864a572 | |||
6192978f2f | |||
66d4d88156 | |||
c87daaabbe | |||
6f0a209a38 | |||
26440d4e24 | |||
08188527ce | |||
8532d9048e | |||
1771fd55e1 |
@ -1,3 +1,11 @@
|
|||||||
|
**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**
|
**1.2.0**
|
||||||
- Major rewrite of all demodulation components to make use of the new csdr/pycsdr and digiham/pydigiham demodulator
|
- Major rewrite of all demodulation components to make use of the new csdr/pycsdr and digiham/pydigiham demodulator
|
||||||
modules
|
modules
|
||||||
|
@ -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)
|
- supports a wide range of [SDR hardware](https://github.com/jketterl/openwebrx/wiki/Supported-Hardware#sdr-devices)
|
||||||
- Multiple SDR devices can be used simultaneously
|
- Multiple SDR devices can be used simultaneously
|
||||||
- [digiham](https://github.com/jketterl/digiham) based demodularors (DMR, YSF, Pocsag, D-Star, NXDN)
|
- [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)
|
FST4W)
|
||||||
- [direwolf](https://github.com/wb2osz/direwolf) based demodulation of APRS packets
|
- [direwolf](https://github.com/wb2osz/direwolf) based demodulation of APRS packets
|
||||||
- [JS8Call](http://js8call.com/) support
|
- [JS8Call](http://js8call.com/) support
|
||||||
|
12
bands.json
12
bands.json
@ -177,7 +177,8 @@
|
|||||||
"jt9": 50312000,
|
"jt9": 50312000,
|
||||||
"ft4": 50318000,
|
"ft4": 50318000,
|
||||||
"js8": 50318000,
|
"js8": 50318000,
|
||||||
"q65": [50211000, 50275000]
|
"q65": [50211000, 50275000],
|
||||||
|
"msk144": 50260000
|
||||||
},
|
},
|
||||||
"tags": ["hamradio"]
|
"tags": ["hamradio"]
|
||||||
},
|
},
|
||||||
@ -186,7 +187,8 @@
|
|||||||
"lower_bound": 70150000,
|
"lower_bound": 70150000,
|
||||||
"upper_bound": 70200000,
|
"upper_bound": 70200000,
|
||||||
"frequencies": {
|
"frequencies": {
|
||||||
"wspr": 70091000
|
"wspr": 70091000,
|
||||||
|
"msk144": 70230000
|
||||||
},
|
},
|
||||||
"tags": ["hamradio"]
|
"tags": ["hamradio"]
|
||||||
},
|
},
|
||||||
@ -200,7 +202,8 @@
|
|||||||
"ft4": 144170000,
|
"ft4": 144170000,
|
||||||
"jt65": 144120000,
|
"jt65": 144120000,
|
||||||
"packet": 144800000,
|
"packet": 144800000,
|
||||||
"q65": 144116000
|
"q65": 144116000,
|
||||||
|
"msk144": 144360000
|
||||||
},
|
},
|
||||||
"tags": ["hamradio"]
|
"tags": ["hamradio"]
|
||||||
},
|
},
|
||||||
@ -210,7 +213,8 @@
|
|||||||
"upper_bound": 440000000,
|
"upper_bound": 440000000,
|
||||||
"frequencies": {
|
"frequencies": {
|
||||||
"pocsag": 439987500,
|
"pocsag": 439987500,
|
||||||
"q65": 432065000
|
"q65": 432065000,
|
||||||
|
"msk144": 432360000
|
||||||
},
|
},
|
||||||
"tags": ["hamradio"]
|
"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.modules import FmDemod, Agc, Writer, Buffer
|
||||||
from pycsdr.types import Format
|
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 digiham.ambe import Modes, ServerError
|
||||||
from owrx.meta import MetaParser
|
from owrx.meta import MetaParser
|
||||||
|
from owrx.pocsag import PocsagParser
|
||||||
|
|
||||||
|
|
||||||
class DigihamChain(BaseDemodulatorChain, FixedIfSampleRateChain, FixedAudioRateChain, DialFrequencyReceiver, MetaProvider):
|
class DigihamChain(BaseDemodulatorChain, FixedIfSampleRateChain, FixedAudioRateChain, DialFrequencyReceiver, MetaProvider):
|
||||||
@ -109,3 +110,24 @@ class Ysf(DigihamChain):
|
|||||||
filter=WideRrcFilter(),
|
filter=WideRrcFilter(),
|
||||||
codecserver=codecserver
|
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.chain.demodulator import ServiceDemodulator, SecondaryDemodulator, DialFrequencyReceiver, SecondarySelectorChain
|
||||||
|
from csdr.module.msk144 import Msk144Module, ParserAdapter
|
||||||
from owrx.audio.chopper import AudioChopper, AudioChopperParser
|
from owrx.audio.chopper import AudioChopper, AudioChopperParser
|
||||||
from owrx.aprs.kiss import KissDeframer
|
from owrx.aprs.kiss import KissDeframer
|
||||||
from owrx.aprs import Ax25Parser, AprsParser
|
from owrx.aprs import Ax25Parser, AprsParser
|
||||||
from pycsdr.modules import Convert, FmDemod, Agc, TimingRecovery, DBPskDecoder, VaricodeDecoder
|
from pycsdr.modules import Convert, FmDemod, Agc, TimingRecovery, DBPskDecoder, VaricodeDecoder
|
||||||
from pycsdr.types import Format
|
from pycsdr.types import Format
|
||||||
from owrx.aprs.module import DirewolfModule
|
from owrx.aprs.module import DirewolfModule
|
||||||
from digiham.modules import FskDemodulator, PocsagDecoder
|
|
||||||
from owrx.pocsag import PocsagParser
|
|
||||||
|
|
||||||
|
|
||||||
class AudioChopperDemodulator(ServiceDemodulator, DialFrequencyReceiver):
|
class AudioChopperDemodulator(ServiceDemodulator, DialFrequencyReceiver):
|
||||||
@ -22,6 +21,23 @@ class AudioChopperDemodulator(ServiceDemodulator, DialFrequencyReceiver):
|
|||||||
self.chopper.setDialFrequency(frequency)
|
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):
|
class PacketDemodulator(ServiceDemodulator, DialFrequencyReceiver):
|
||||||
def __init__(self, service: bool = False):
|
def __init__(self, service: bool = False):
|
||||||
self.parser = AprsParser()
|
self.parser = AprsParser()
|
||||||
@ -45,27 +61,6 @@ class PacketDemodulator(ServiceDemodulator, DialFrequencyReceiver):
|
|||||||
self.parser.setDialFrequency(frequency)
|
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):
|
class PskDemodulator(SecondaryDemodulator, SecondarySelectorChain):
|
||||||
def __init__(self, baudRate: float):
|
def __init__(self, baudRate: float):
|
||||||
self.baudRate = baudRate
|
self.baudRate = baudRate
|
||||||
|
@ -126,7 +126,7 @@ class PopenModule(AutoStartModule, metaclass=ABCMeta):
|
|||||||
# resume in case the reader has been stop()ed before
|
# resume in case the reader has been stop()ed before
|
||||||
self.reader.resume()
|
self.reader.resume()
|
||||||
Thread(target=self.pump(self.reader.read, self.process.stdin.write)).start()
|
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):
|
def stop(self):
|
||||||
if self.process is not None:
|
if self.process is not None:
|
||||||
|
57
csdr/module/msk144.py
Normal file
57
csdr/module/msk144.py
Normal file
@ -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
|
14
debian/changelog
vendored
14
debian/changelog
vendored
@ -1,3 +1,17 @@
|
|||||||
|
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> 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
|
openwebrx (1.2.0) bullseye jammy; urgency=low
|
||||||
|
|
||||||
* Major rewrite of all demodulation components to make use of the new
|
* Major rewrite of all demodulation components to make use of the new
|
||||||
|
2
debian/control
vendored
2
debian/control
vendored
@ -11,6 +11,6 @@ Vcs-Git: https://github.com/jketterl/openwebrx.git
|
|||||||
Package: openwebrx
|
Package: openwebrx
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Depends: adduser, python3 (>= 3.5), python3-pkg-resources, owrx-connector (>= 0.5), soapysdr-tools, python3-csdr (>= 0.18), ${python3:Depends}, ${misc:Depends}
|
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
|
Description: multi-user web sdr
|
||||||
Open source, multi-user SDR receiver with a web interface
|
Open source, multi-user SDR receiver with a web interface
|
||||||
|
@ -1,310 +1,341 @@
|
|||||||
diff -ur wsjtx-orig/CMakeLists.txt wsjtx/CMakeLists.txt
|
diff -ur wsjtx-orig/CMakeLists.txt wsjtx/CMakeLists.txt
|
||||||
--- wsjtx-orig/CMakeLists.txt 2021-11-02 16:34:09.361811689 +0100
|
--- wsjtx-orig/CMakeLists.txt 2023-01-28 17:43:05.586124507 +0100
|
||||||
+++ wsjtx/CMakeLists.txt 2021-11-02 16:38:36.696088115 +0100
|
+++ wsjtx/CMakeLists.txt 2023-01-28 17:56:07.108634912 +0100
|
||||||
@@ -122,7 +122,7 @@
|
@@ -122,7 +122,7 @@
|
||||||
option (WSJT_QDEBUG_TO_FILE "Redirect Qt debuging messages to a trace file.")
|
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_SOFT_KEYING "Apply a ramp to CW keying envelope to reduce transients." ON)
|
||||||
option (WSJT_SKIP_MANPAGES "Skip *nix manpage generation.")
|
option (WSJT_SKIP_MANPAGES "Skip *nix manpage generation.")
|
||||||
-option (WSJT_GENERATE_DOCS "Generate documentation files." ON)
|
-option (WSJT_GENERATE_DOCS "Generate documentation files." ON)
|
||||||
+option (WSJT_GENERATE_DOCS "Generate documentation files.")
|
+option (WSJT_GENERATE_DOCS "Generate documentation files.")
|
||||||
option (WSJT_RIG_NONE_CAN_SPLIT "Allow split operation with \"None\" as rig.")
|
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_TRACE_UDP "Debugging option that turns on UDP message protocol diagnostics.")
|
||||||
option (WSJT_BUILD_UTILS "Build simulators and code demonstrators." ON)
|
option (WSJT_BUILD_UTILS "Build simulators and code demonstrators." ON)
|
||||||
@@ -169,76 +169,7 @@
|
@@ -170,77 +170,7 @@
|
||||||
)
|
)
|
||||||
|
|
||||||
set (wsjt_qt_CXXSRCS
|
set (wsjt_qt_CXXSRCS
|
||||||
- helper_functions.cpp
|
- helper_functions.cpp
|
||||||
- qt_helpers.cpp
|
- qt_helpers.cpp
|
||||||
- widgets/MessageBox.cpp
|
- widgets/MessageBox.cpp
|
||||||
- MetaDataRegistry.cpp
|
- MetaDataRegistry.cpp
|
||||||
- Network/NetworkServerLookup.cpp
|
- Network/NetworkServerLookup.cpp
|
||||||
revision_utils.cpp
|
revision_utils.cpp
|
||||||
- L10nLoader.cpp
|
- L10nLoader.cpp
|
||||||
- WFPalette.cpp
|
- WFPalette.cpp
|
||||||
- Radio.cpp
|
- Radio.cpp
|
||||||
- RadioMetaType.cpp
|
- RadioMetaType.cpp
|
||||||
- NonInheritingProcess.cpp
|
- NonInheritingProcess.cpp
|
||||||
- models/IARURegions.cpp
|
- models/IARURegions.cpp
|
||||||
- models/Bands.cpp
|
- models/Bands.cpp
|
||||||
- models/Modes.cpp
|
- models/Modes.cpp
|
||||||
- models/FrequencyList.cpp
|
- models/FrequencyList.cpp
|
||||||
- models/StationList.cpp
|
- models/StationList.cpp
|
||||||
- widgets/FrequencyLineEdit.cpp
|
- widgets/FrequencyLineEdit.cpp
|
||||||
- widgets/FrequencyDeltaLineEdit.cpp
|
- widgets/FrequencyDeltaLineEdit.cpp
|
||||||
- item_delegates/CandidateKeyFilter.cpp
|
- item_delegates/CandidateKeyFilter.cpp
|
||||||
- item_delegates/ForeignKeyDelegate.cpp
|
- item_delegates/ForeignKeyDelegate.cpp
|
||||||
- validators/LiveFrequencyValidator.cpp
|
- item_delegates/MessageItemDelegate.cpp
|
||||||
- GetUserId.cpp
|
- validators/LiveFrequencyValidator.cpp
|
||||||
- Audio/AudioDevice.cpp
|
- GetUserId.cpp
|
||||||
- Transceiver/Transceiver.cpp
|
- Audio/AudioDevice.cpp
|
||||||
- Transceiver/TransceiverBase.cpp
|
- Transceiver/Transceiver.cpp
|
||||||
- Transceiver/EmulateSplitTransceiver.cpp
|
- Transceiver/TransceiverBase.cpp
|
||||||
- Transceiver/TransceiverFactory.cpp
|
- Transceiver/EmulateSplitTransceiver.cpp
|
||||||
- Transceiver/PollingTransceiver.cpp
|
- Transceiver/TransceiverFactory.cpp
|
||||||
- Transceiver/HamlibTransceiver.cpp
|
- Transceiver/PollingTransceiver.cpp
|
||||||
- Transceiver/HRDTransceiver.cpp
|
- Transceiver/HamlibTransceiver.cpp
|
||||||
- Transceiver/DXLabSuiteCommanderTransceiver.cpp
|
- Transceiver/HRDTransceiver.cpp
|
||||||
- Network/NetworkMessage.cpp
|
- Transceiver/DXLabSuiteCommanderTransceiver.cpp
|
||||||
- Network/MessageClient.cpp
|
- Network/NetworkMessage.cpp
|
||||||
- widgets/LettersSpinBox.cpp
|
- Network/MessageClient.cpp
|
||||||
- widgets/HintedSpinBox.cpp
|
- widgets/LettersSpinBox.cpp
|
||||||
- widgets/RestrictedSpinBox.cpp
|
- widgets/HintedSpinBox.cpp
|
||||||
- widgets/HelpTextWindow.cpp
|
- widgets/RestrictedSpinBox.cpp
|
||||||
- SampleDownloader.cpp
|
- widgets/HelpTextWindow.cpp
|
||||||
- SampleDownloader/DirectoryDelegate.cpp
|
- SampleDownloader.cpp
|
||||||
- SampleDownloader/Directory.cpp
|
- SampleDownloader/DirectoryDelegate.cpp
|
||||||
- SampleDownloader/FileNode.cpp
|
- SampleDownloader/Directory.cpp
|
||||||
- SampleDownloader/RemoteFile.cpp
|
- SampleDownloader/FileNode.cpp
|
||||||
- DisplayManual.cpp
|
- SampleDownloader/RemoteFile.cpp
|
||||||
- MultiSettings.cpp
|
- DisplayManual.cpp
|
||||||
- validators/MaidenheadLocatorValidator.cpp
|
- MultiSettings.cpp
|
||||||
- validators/CallsignValidator.cpp
|
- validators/MaidenheadLocatorValidator.cpp
|
||||||
- widgets/SplashScreen.cpp
|
- validators/CallsignValidator.cpp
|
||||||
- EqualizationToolsDialog.cpp
|
- widgets/SplashScreen.cpp
|
||||||
- widgets/DoubleClickablePushButton.cpp
|
- EqualizationToolsDialog.cpp
|
||||||
- widgets/DoubleClickableRadioButton.cpp
|
- widgets/DoubleClickablePushButton.cpp
|
||||||
- Network/LotWUsers.cpp
|
- widgets/DoubleClickableRadioButton.cpp
|
||||||
- models/DecodeHighlightingModel.cpp
|
- Network/LotWUsers.cpp
|
||||||
- widgets/DecodeHighlightingListView.cpp
|
- models/DecodeHighlightingModel.cpp
|
||||||
- models/FoxLog.cpp
|
- widgets/DecodeHighlightingListView.cpp
|
||||||
- widgets/AbstractLogWindow.cpp
|
- models/FoxLog.cpp
|
||||||
- widgets/FoxLogWindow.cpp
|
- widgets/AbstractLogWindow.cpp
|
||||||
- widgets/CabrilloLogWindow.cpp
|
- widgets/FoxLogWindow.cpp
|
||||||
- item_delegates/CallsignDelegate.cpp
|
- widgets/CabrilloLogWindow.cpp
|
||||||
- item_delegates/MaidenheadLocatorDelegate.cpp
|
- item_delegates/CallsignDelegate.cpp
|
||||||
- item_delegates/FrequencyDelegate.cpp
|
- item_delegates/MaidenheadLocatorDelegate.cpp
|
||||||
- item_delegates/FrequencyDeltaDelegate.cpp
|
- item_delegates/FrequencyDelegate.cpp
|
||||||
- item_delegates/SQLiteDateTimeDelegate.cpp
|
- item_delegates/FrequencyDeltaDelegate.cpp
|
||||||
- models/CabrilloLog.cpp
|
- item_delegates/SQLiteDateTimeDelegate.cpp
|
||||||
- logbook/AD1CCty.cpp
|
- models/CabrilloLog.cpp
|
||||||
- logbook/WorkedBefore.cpp
|
- logbook/AD1CCty.cpp
|
||||||
- logbook/Multiplier.cpp
|
- logbook/WorkedBefore.cpp
|
||||||
- Network/NetworkAccessManager.cpp
|
- logbook/Multiplier.cpp
|
||||||
- widgets/LazyFillComboBox.cpp
|
- Network/NetworkAccessManager.cpp
|
||||||
- widgets/CheckableItemComboBox.cpp
|
- widgets/LazyFillComboBox.cpp
|
||||||
- widgets/BandComboBox.cpp
|
- widgets/CheckableItemComboBox.cpp
|
||||||
)
|
- widgets/BandComboBox.cpp
|
||||||
|
)
|
||||||
set (wsjt_qtmm_CXXSRCS
|
|
||||||
@@ -1079,9 +1010,6 @@
|
set (wsjt_qtmm_CXXSRCS
|
||||||
if (WSJT_GENERATE_DOCS)
|
@@ -1089,9 +1019,6 @@
|
||||||
add_subdirectory (doc)
|
if (WSJT_GENERATE_DOCS)
|
||||||
endif (WSJT_GENERATE_DOCS)
|
add_subdirectory (doc)
|
||||||
-if (EXISTS ${CMAKE_SOURCE_DIR}/tests AND IS_DIRECTORY ${CMAKE_SOURCE_DIR}/tests)
|
endif (WSJT_GENERATE_DOCS)
|
||||||
- add_subdirectory (tests)
|
-if (EXISTS ${CMAKE_SOURCE_DIR}/tests AND IS_DIRECTORY ${CMAKE_SOURCE_DIR}/tests)
|
||||||
-endif ()
|
- 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})
|
# build a library of package functionality (without and optionally with OpenMP support)
|
||||||
@@ -1340,10 +1268,7 @@
|
add_library (wsjt_cxx STATIC ${wsjt_CSRCS} ${wsjt_CXXSRCS})
|
||||||
add_library (wsjt_qt STATIC ${wsjt_qt_CXXSRCS} ${wsjt_qt_GENUISRCS} ${GENAXSRCS})
|
@@ -1357,10 +1284,7 @@
|
||||||
# set wsjtx_udp exports to static variants
|
add_library (wsjt_qt STATIC ${wsjt_qt_CXXSRCS} ${wsjt_qt_GENUISRCS} ${GENAXSRCS})
|
||||||
target_compile_definitions (wsjt_qt PUBLIC UDP_STATIC_DEFINE)
|
# set wsjtx_udp exports to static variants
|
||||||
-target_link_libraries (wsjt_qt Hamlib::Hamlib Boost::log qcp Qt5::Widgets Qt5::Network Qt5::Sql)
|
target_compile_definitions (wsjt_qt PUBLIC UDP_STATIC_DEFINE)
|
||||||
-if (WIN32)
|
-target_link_libraries (wsjt_qt Hamlib::Hamlib Boost::log qcp Qt5::Widgets Qt5::Network Qt5::Sql)
|
||||||
- target_link_libraries (wsjt_qt Qt5::AxContainer Qt5::AxBase)
|
-if (WIN32)
|
||||||
-endif (WIN32)
|
- target_link_libraries (wsjt_qt Qt5::AxContainer Qt5::AxBase)
|
||||||
+target_link_libraries (wsjt_qt Qt5::Core)
|
-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})
|
# build a library of package Qt functionality used in Fortran utilities
|
||||||
@@ -1408,60 +1333,6 @@
|
add_library (fort_qt STATIC ${fort_qt_CXXSRCS})
|
||||||
add_subdirectory (map65)
|
@@ -1425,90 +1349,6 @@
|
||||||
endif ()
|
add_subdirectory (map65)
|
||||||
|
endif ()
|
||||||
-# build the main application
|
|
||||||
-generate_version_info (wsjtx_VERSION_RESOURCES
|
-# build the main application
|
||||||
- NAME wsjtx
|
-generate_version_info (wsjtx_VERSION_RESOURCES
|
||||||
- BUNDLE ${PROJECT_BUNDLE_NAME}
|
- NAME wsjtx
|
||||||
- ICON ${WSJTX_ICON_FILE}
|
- BUNDLE ${PROJECT_BUNDLE_NAME}
|
||||||
- )
|
- ICON ${WSJTX_ICON_FILE}
|
||||||
-
|
- )
|
||||||
-add_executable (wsjtx MACOSX_BUNDLE
|
-
|
||||||
- ${wsjtx_CXXSRCS}
|
-add_executable (wsjtx MACOSX_BUNDLE
|
||||||
- ${wsjtx_GENUISRCS}
|
- ${wsjtx_CXXSRCS}
|
||||||
- ${WSJTX_ICON_FILE}
|
- ${wsjtx_GENUISRCS}
|
||||||
- ${wsjtx_RESOURCES_RCC}
|
- ${WSJTX_ICON_FILE}
|
||||||
- ${wsjtx_VERSION_RESOURCES}
|
- ${wsjtx_RESOURCES_RCC}
|
||||||
- )
|
- ${wsjtx_VERSION_RESOURCES}
|
||||||
-
|
- )
|
||||||
-if (WSJT_CREATE_WINMAIN)
|
-
|
||||||
- set_target_properties (wsjtx PROPERTIES WIN32_EXECUTABLE ON)
|
-if (WSJT_CREATE_WINMAIN)
|
||||||
-endif (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"
|
-set_target_properties (wsjtx PROPERTIES
|
||||||
- MACOSX_BUNDLE_INFO_STRING "${PROJECT_DESCRIPTION}"
|
- MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Darwin/Info.plist.in"
|
||||||
- MACOSX_BUNDLE_ICON_FILE "${WSJTX_ICON_FILE}"
|
- MACOSX_BUNDLE_INFO_STRING "${PROJECT_DESCRIPTION}"
|
||||||
- MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
|
- MACOSX_BUNDLE_ICON_FILE "${WSJTX_ICON_FILE}"
|
||||||
- MACOSX_BUNDLE_SHORT_VERSION_STRING "v${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}"
|
- MACOSX_BUNDLE_BUNDLE_VERSION ${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_SHORT_VERSION_STRING "v${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}"
|
||||||
- MACOSX_BUNDLE_BUNDLE_NAME "${PROJECT_BUNDLE_NAME}"
|
- MACOSX_BUNDLE_LONG_VERSION_STRING "Version ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}${SCS_VERSION_STR}"
|
||||||
- MACOSX_BUNDLE_BUNDLE_EXECUTABLE_NAME "${PROJECT_NAME}"
|
- MACOSX_BUNDLE_BUNDLE_NAME "${PROJECT_BUNDLE_NAME}"
|
||||||
- MACOSX_BUNDLE_COPYRIGHT "${PROJECT_COPYRIGHT}"
|
- MACOSX_BUNDLE_BUNDLE_EXECUTABLE_NAME "${PROJECT_NAME}"
|
||||||
- MACOSX_BUNDLE_GUI_IDENTIFIER "org.k1jt.wsjtx"
|
- MACOSX_BUNDLE_COPYRIGHT "${PROJECT_COPYRIGHT}"
|
||||||
- )
|
- MACOSX_BUNDLE_GUI_IDENTIFIER "org.k1jt.wsjtx"
|
||||||
-
|
- )
|
||||||
-target_include_directories (wsjtx PRIVATE ${FFTW3_INCLUDE_DIRS})
|
-
|
||||||
-if (APPLE)
|
-target_include_directories (wsjtx PRIVATE ${FFTW3_INCLUDE_DIRS})
|
||||||
- target_link_libraries (wsjtx wsjt_fort)
|
-if ((NOT ${OPENMP_FOUND}) OR APPLE)
|
||||||
-else ()
|
- target_link_libraries (wsjtx wsjt_fort)
|
||||||
- target_link_libraries (wsjtx wsjt_fort_omp)
|
-else ()
|
||||||
- if (OpenMP_C_FLAGS)
|
- target_link_libraries (wsjtx wsjt_fort_omp)
|
||||||
- set_target_properties (wsjtx PROPERTIES
|
- if (OpenMP_C_FLAGS)
|
||||||
- COMPILE_FLAGS "${OpenMP_C_FLAGS}"
|
- set_target_properties (wsjtx PROPERTIES
|
||||||
- LINK_FLAGS "${OpenMP_C_FLAGS}"
|
- COMPILE_FLAGS "${OpenMP_C_FLAGS}"
|
||||||
- )
|
- LINK_FLAGS "${OpenMP_C_FLAGS}"
|
||||||
- endif ()
|
- )
|
||||||
- set_target_properties (wsjtx PROPERTIES
|
- endif ()
|
||||||
- Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/fortran_modules_omp
|
- set_target_properties (wsjtx PROPERTIES
|
||||||
- )
|
- Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/fortran_modules_omp
|
||||||
- if (WIN32)
|
- )
|
||||||
- set_target_properties (wsjtx PROPERTIES
|
- if (WIN32)
|
||||||
- LINK_FLAGS -Wl,--stack,0x1000000,--heap,0x20000000
|
- set_target_properties (wsjtx PROPERTIES
|
||||||
- )
|
- LINK_FLAGS -Wl,--stack,0x1000000,--heap,0x20000000
|
||||||
- endif ()
|
- )
|
||||||
-endif ()
|
- endif ()
|
||||||
-target_link_libraries (wsjtx Qt5::SerialPort wsjt_cxx wsjt_qt wsjt_qtmm ${FFTW3_LIBRARIES} ${LIBM_LIBRARIES})
|
-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})
|
-# make a library for WSJT-X UDP servers
|
||||||
add_library (wsjtx_udp-static STATIC ${UDP_library_CXXSRCS})
|
-# add_library (wsjtx_udp SHARED ${UDP_library_CXXSRCS})
|
||||||
@@ -1501,47 +1372,9 @@
|
-add_library (wsjtx_udp-static STATIC ${UDP_library_CXXSRCS})
|
||||||
add_executable (wsjtx_app_version AppVersion/AppVersion.cpp ${wsjtx_app_version_VERSION_RESOURCES})
|
-#target_include_directories (wsjtx_udp
|
||||||
target_link_libraries (wsjtx_app_version wsjt_qt)
|
-# INTERFACE
|
||||||
|
-# $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/wsjtx>
|
||||||
-generate_version_info (message_aggregator_VERSION_RESOURCES
|
-# )
|
||||||
- NAME message_aggregator
|
-target_include_directories (wsjtx_udp-static
|
||||||
- BUNDLE ${PROJECT_BUNDLE_NAME}
|
- INTERFACE
|
||||||
- ICON ${WSJTX_ICON_FILE}
|
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/wsjtx>
|
||||||
- FILE_DESCRIPTION "Example WSJT-X UDP Message Protocol application"
|
- )
|
||||||
- )
|
-#set_target_properties (wsjtx_udp PROPERTIES
|
||||||
-add_resources (message_aggregator_RESOURCES /qss ${message_aggregator_STYLESHEETS})
|
-# PUBLIC_HEADER "${UDP_library_HEADERS}"
|
||||||
-configure_file (UDPExamples/message_aggregator.qrc.in message_aggregator.qrc @ONLY)
|
-# )
|
||||||
-qt5_add_resources (message_aggregator_RESOURCES_RCC
|
-set_target_properties (wsjtx_udp-static PROPERTIES
|
||||||
- ${CMAKE_CURRENT_BINARY_DIR}/message_aggregator.qrc
|
- OUTPUT_NAME wsjtx_udp
|
||||||
- contrib/QDarkStyleSheet/qdarkstyle/style.qrc
|
- )
|
||||||
- )
|
-target_compile_definitions (wsjtx_udp-static PUBLIC UDP_STATIC_DEFINE)
|
||||||
-add_executable (message_aggregator
|
-target_link_libraries (wsjtx_udp-static Qt5::Network Qt5::Gui)
|
||||||
- ${message_aggregator_CXXSRCS}
|
-generate_export_header (wsjtx_udp-static BASE_NAME udp)
|
||||||
- ${message_aggregator_RESOURCES_RCC}
|
-
|
||||||
- ${message_aggregator_VERSION_RESOURCES}
|
-generate_version_info (udp_daemon_VERSION_RESOURCES
|
||||||
- )
|
- NAME udp_daemon
|
||||||
-target_link_libraries (message_aggregator wsjt_qt Qt5::Widgets wsjtx_udp-static)
|
- BUNDLE ${PROJECT_BUNDLE_NAME}
|
||||||
-
|
- ICON ${WSJTX_ICON_FILE}
|
||||||
-if (WSJT_CREATE_WINMAIN)
|
- FILE_DESCRIPTION "Example WSJT-X UDP Message Protocol daemon"
|
||||||
- set_target_properties (message_aggregator PROPERTIES WIN32_EXECUTABLE ON)
|
- )
|
||||||
-endif (WSJT_CREATE_WINMAIN)
|
-add_executable (udp_daemon UDPExamples/UDPDaemon.cpp ${udp_daemon_VERSION_RESOURCES})
|
||||||
-
|
-target_link_libraries (udp_daemon wsjtx_udp-static)
|
||||||
-if (UNIX)
|
-
|
||||||
- if (NOT WSJT_SKIP_MANPAGES)
|
generate_version_info (wsjtx_app_version_VERSION_RESOURCES
|
||||||
- add_subdirectory (manpages)
|
NAME wsjtx_app_version
|
||||||
- add_dependencies (wsjtx manpages)
|
BUNDLE ${PROJECT_BUNDLE_NAME}
|
||||||
- endif (NOT WSJT_SKIP_MANPAGES)
|
@@ -1518,47 +1358,9 @@
|
||||||
- if (NOT APPLE)
|
add_executable (wsjtx_app_version AppVersion/AppVersion.cpp ${wsjtx_app_version_VERSION_RESOURCES})
|
||||||
- add_subdirectory (debian)
|
target_link_libraries (wsjtx_app_version wsjt_qt)
|
||||||
- add_dependencies (wsjtx debian)
|
|
||||||
- endif (NOT APPLE)
|
-generate_version_info (message_aggregator_VERSION_RESOURCES
|
||||||
-endif (UNIX)
|
- NAME message_aggregator
|
||||||
-
|
- BUNDLE ${PROJECT_BUNDLE_NAME}
|
||||||
#
|
- ICON ${WSJTX_ICON_FILE}
|
||||||
# installation
|
- FILE_DESCRIPTION "Example WSJT-X UDP Message Protocol application"
|
||||||
#
|
- )
|
||||||
-install (TARGETS wsjtx
|
-add_resources (message_aggregator_RESOURCES /qss ${message_aggregator_STYLESHEETS})
|
||||||
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
-configure_file (UDPExamples/message_aggregator.qrc.in message_aggregator.qrc @ONLY)
|
||||||
- BUNDLE DESTINATION . COMPONENT runtime
|
-qt5_add_resources (message_aggregator_RESOURCES_RCC
|
||||||
- )
|
- ${CMAKE_CURRENT_BINARY_DIR}/message_aggregator.qrc
|
||||||
|
- contrib/QDarkStyleSheet/qdarkstyle/style.qrc
|
||||||
# install (TARGETS wsjtx_udp EXPORT udp
|
- )
|
||||||
# RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
-add_executable (message_aggregator
|
||||||
@@ -1560,12 +1393,7 @@
|
- ${message_aggregator_CXXSRCS}
|
||||||
# DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/wsjtx
|
- ${message_aggregator_RESOURCES_RCC}
|
||||||
# )
|
- ${message_aggregator_VERSION_RESOURCES}
|
||||||
|
- )
|
||||||
-install (TARGETS udp_daemon message_aggregator wsjtx_app_version
|
-target_link_libraries (message_aggregator wsjt_qt Qt5::Widgets wsjtx_udp-static)
|
||||||
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
-
|
||||||
- BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
-if (WSJT_CREATE_WINMAIN)
|
||||||
- )
|
- set_target_properties (message_aggregator PROPERTIES WIN32_EXECUTABLE ON)
|
||||||
-
|
-endif (WSJT_CREATE_WINMAIN)
|
||||||
-install (TARGETS jt9 wsprd fmtave fcal fmeasure
|
-
|
||||||
+install (TARGETS wsjtx_app_version jt9 wsprd
|
-if (UNIX)
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
- if (NOT WSJT_SKIP_MANPAGES)
|
||||||
BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
- add_subdirectory (manpages)
|
||||||
)
|
- add_dependencies (wsjtx manpages)
|
||||||
@@ -1578,38 +1406,6 @@
|
- endif (NOT WSJT_SKIP_MANPAGES)
|
||||||
)
|
- if (NOT APPLE)
|
||||||
endif(WSJT_BUILD_UTILS)
|
- add_subdirectory (debian)
|
||||||
|
- add_dependencies (wsjtx debian)
|
||||||
-install (PROGRAMS
|
- endif (NOT APPLE)
|
||||||
- ${RIGCTL_EXE}
|
-endif (UNIX)
|
||||||
- DESTINATION ${CMAKE_INSTALL_BINDIR}
|
-
|
||||||
- #COMPONENT runtime
|
#
|
||||||
- RENAME rigctl-wsjtx${CMAKE_EXECUTABLE_SUFFIX}
|
# installation
|
||||||
- )
|
#
|
||||||
-
|
-install (TARGETS wsjtx
|
||||||
-install (PROGRAMS
|
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
||||||
- ${RIGCTLD_EXE}
|
- BUNDLE DESTINATION . COMPONENT runtime
|
||||||
- DESTINATION ${CMAKE_INSTALL_BINDIR}
|
- )
|
||||||
- #COMPONENT runtime
|
|
||||||
- RENAME rigctld-wsjtx${CMAKE_EXECUTABLE_SUFFIX}
|
# install (TARGETS wsjtx_udp EXPORT udp
|
||||||
- )
|
# RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
-
|
@@ -1577,12 +1379,7 @@
|
||||||
-install (PROGRAMS
|
# DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/wsjtx
|
||||||
- ${RIGCTLCOM_EXE}
|
# )
|
||||||
- DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
||||||
- #COMPONENT runtime
|
-install (TARGETS udp_daemon message_aggregator wsjtx_app_version
|
||||||
- RENAME rigctlcom-wsjtx${CMAKE_EXECUTABLE_SUFFIX}
|
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
||||||
- )
|
- BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
||||||
-
|
- )
|
||||||
-install (FILES
|
-
|
||||||
- README
|
-install (TARGETS jt9 wsprd fmtave fcal fmeasure
|
||||||
- COPYING
|
+install (TARGETS wsjtx_app_version jt9 wsprd
|
||||||
- AUTHORS
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
||||||
- THANKS
|
BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
||||||
- NEWS
|
)
|
||||||
- BUGS
|
@@ -1595,38 +1392,6 @@
|
||||||
- DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
)
|
||||||
- #COMPONENT runtime
|
endif(WSJT_BUILD_UTILS)
|
||||||
- )
|
|
||||||
-
|
-install (PROGRAMS
|
||||||
install (FILES
|
- ${RIGCTL_EXE}
|
||||||
cty.dat
|
- DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
cty.dat_copyright.txt
|
- #COMPONENT runtime
|
||||||
@@ -1618,13 +1414,6 @@
|
- RENAME rigctl-wsjtx${CMAKE_EXECUTABLE_SUFFIX}
|
||||||
#COMPONENT runtime
|
- )
|
||||||
)
|
-
|
||||||
|
-install (PROGRAMS
|
||||||
-install (DIRECTORY
|
- ${RIGCTLD_EXE}
|
||||||
- example_log_configurations
|
- DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
- DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
- #COMPONENT runtime
|
||||||
- FILES_MATCHING REGEX "^.*[^~]$"
|
- RENAME rigctld-wsjtx${CMAKE_EXECUTABLE_SUFFIX}
|
||||||
- #COMPONENT runtime
|
- )
|
||||||
- )
|
-
|
||||||
-
|
-install (PROGRAMS
|
||||||
#
|
- ${RIGCTLCOM_EXE}
|
||||||
# Mac installer files
|
- DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
#
|
- #COMPONENT runtime
|
||||||
@@ -1676,22 +1465,6 @@
|
- RENAME rigctlcom-wsjtx${CMAKE_EXECUTABLE_SUFFIX}
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/wsjtx_config.h"
|
- )
|
||||||
)
|
-
|
||||||
|
-install (FILES
|
||||||
-
|
- README
|
||||||
-if (NOT WIN32 AND NOT APPLE)
|
- COPYING
|
||||||
- # install a desktop file so wsjtx appears in the application start
|
- AUTHORS
|
||||||
- # menu with an icon
|
- THANKS
|
||||||
- install (
|
- NEWS
|
||||||
- FILES wsjtx.desktop message_aggregator.desktop
|
- BUGS
|
||||||
- DESTINATION share/applications
|
- DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
||||||
- #COMPONENT runtime
|
- #COMPONENT runtime
|
||||||
- )
|
- )
|
||||||
- install (
|
-
|
||||||
- FILES icons/Unix/wsjtx_icon.png
|
install (FILES
|
||||||
- DESTINATION share/pixmaps
|
cty.dat
|
||||||
- #COMPONENT runtime
|
cty.dat_copyright.txt
|
||||||
- )
|
@@ -1635,13 +1400,6 @@
|
||||||
-endif (NOT WIN32 AND NOT APPLE)
|
#COMPONENT runtime
|
||||||
-
|
)
|
||||||
if (APPLE)
|
|
||||||
set (CMAKE_POSTFLIGHT_SCRIPT
|
-install (DIRECTORY
|
||||||
"${wsjtx_BINARY_DIR}/postflight.sh")
|
- 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
|
apt-get -y install --no-install-recommends $BUILD_PACKAGES
|
||||||
|
|
||||||
git clone https://github.com/jketterl/owrx_connector.git
|
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 -y purge --autoremove $BUILD_PACKAGES
|
||||||
apt-get clean
|
apt-get clean
|
||||||
|
@ -29,7 +29,7 @@ tar xfz $PACKAGE
|
|||||||
|
|
||||||
git clone https://github.com/jancona/hpsdrconnector.git
|
git clone https://github.com/jancona/hpsdrconnector.git
|
||||||
pushd hpsdrconnector
|
pushd hpsdrconnector
|
||||||
git checkout v0.6.0
|
git checkout v0.6.1
|
||||||
/tmp/go/bin/go build
|
/tmp/go/bin/go build
|
||||||
install -m 0755 hpsdrconnector /usr/local/bin
|
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
|
apt-get -y install --no-install-recommends $STATIC_PACKAGES $BUILD_PACKAGES
|
||||||
|
|
||||||
git clone https://github.com/jketterl/runds_connector.git
|
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 -y purge --autoremove $BUILD_PACKAGES
|
||||||
apt-get clean
|
apt-get clean
|
||||||
|
@ -7,6 +7,9 @@ function cmakebuild() {
|
|||||||
if [[ ! -z "${2:-}" ]]; then
|
if [[ ! -z "${2:-}" ]]; then
|
||||||
git checkout $2
|
git checkout $2
|
||||||
fi
|
fi
|
||||||
|
if [[ -f ".gitmodules" ]]; then
|
||||||
|
git submodule update --init
|
||||||
|
fi
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake ${CMAKE_ARGS:-} ..
|
cmake ${CMAKE_ARGS:-} ..
|
||||||
@ -18,8 +21,8 @@ function cmakebuild() {
|
|||||||
|
|
||||||
cd /tmp
|
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"
|
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"
|
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 update
|
||||||
apt-get -y install auto-apt-proxy
|
apt-get -y install auto-apt-proxy
|
||||||
apt-get -y install --no-install-recommends $STATIC_PACKAGES $BUILD_PACKAGES
|
apt-get -y install --no-install-recommends $STATIC_PACKAGES $BUILD_PACKAGES
|
||||||
@ -51,15 +54,19 @@ rm /js8call-hamlib.patch
|
|||||||
cmakebuild ${JS8CALL_DIR}
|
cmakebuild ${JS8CALL_DIR}
|
||||||
rm ${JS8CALL_TGZ}
|
rm ${JS8CALL_TGZ}
|
||||||
|
|
||||||
WSJT_DIR=wsjtx-2.5.4
|
WSJT_DIR=wsjtx-2.6.1
|
||||||
WSJT_TGZ=${WSJT_DIR}.tgz
|
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}
|
tar xfz ${WSJT_TGZ}
|
||||||
patch -Np0 -d ${WSJT_DIR} < /wsjtx-hamlib.patch
|
patch -Np0 -d ${WSJT_DIR} < /wsjtx-hamlib.patch
|
||||||
mv /wsjtx.patch ${WSJT_DIR}
|
mv /wsjtx.patch ${WSJT_DIR}
|
||||||
cmakebuild ${WSJT_DIR}
|
cmakebuild ${WSJT_DIR}
|
||||||
rm ${WSJT_TGZ}
|
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
|
git clone --depth 1 -b 1.6 https://github.com/wb2osz/direwolf.git
|
||||||
cd direwolf
|
cd direwolf
|
||||||
# hamlib is present (necessary for the wsjt-x and js8call builds) and would be used, but there's no real need.
|
# 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
|
git clone https://github.com/jketterl/js8py.git
|
||||||
pushd js8py
|
pushd js8py
|
||||||
git checkout 0.1.2
|
# latest develop as of 2022-11-30 (structured callsign data)
|
||||||
|
git checkout f7e394b7892d26cbdcce5d43c0b4081a2a6a48f6
|
||||||
python3 setup.py install
|
python3 setup.py install
|
||||||
popd
|
popd
|
||||||
rm -rf js8py
|
rm -rf js8py
|
||||||
|
|
||||||
git clone https://github.com/jketterl/csdr.git
|
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
|
git clone https://github.com/jketterl/pycsdr.git
|
||||||
cd pycsdr
|
cd pycsdr
|
||||||
git checkout 0.18.0
|
git checkout 0.18.1
|
||||||
./setup.py install install_headers
|
./setup.py install install_headers
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf pycsdr
|
rm -rf pycsdr
|
||||||
@ -46,11 +47,11 @@ cp codecserver/conf/codecserver.conf /usr/local/etc/codecserver
|
|||||||
cmakebuild codecserver 0.2.0
|
cmakebuild codecserver 0.2.0
|
||||||
|
|
||||||
git clone https://github.com/jketterl/digiham.git
|
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
|
git clone https://github.com/jketterl/pydigiham.git
|
||||||
cd pydigiham
|
cd pydigiham
|
||||||
git checkout 0.6.0
|
git checkout 0.6.1
|
||||||
./setup.py install
|
./setup.py install
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf pydigiham
|
rm -rf pydigiham
|
||||||
|
@ -159,4 +159,8 @@ h1 {
|
|||||||
|
|
||||||
.imageupload.is-invalid ~ .invalid-feedback {
|
.imageupload.is-invalid ~ .invalid-feedback {
|
||||||
display: block;
|
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="fst4"] #openwebrx-digimode-content-container,
|
||||||
#openwebrx-panel-digimodes[data-mode="fst4w"] #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="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="ft8"] #openwebrx-digimode-select-channel,
|
||||||
#openwebrx-panel-digimodes[data-mode="wspr"] #openwebrx-digimode-select-channel,
|
#openwebrx-panel-digimodes[data-mode="wspr"] #openwebrx-digimode-select-channel,
|
||||||
#openwebrx-panel-digimodes[data-mode="jt65"] #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="js8"] #openwebrx-digimode-select-channel,
|
||||||
#openwebrx-panel-digimodes[data-mode="fst4"] #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="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;
|
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="js8"] #openwebrx-digimode-canvas-container,
|
||||||
#openwebrx-panel-digimodes[data-mode="fst4"] #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="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;
|
height: 200px;
|
||||||
margin: -10px;
|
margin: -10px;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<div class="webrx-rx-photo-desc">${photo_desc}</div>
|
<div class="webrx-rx-photo-desc">${photo_desc}</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="openwebrx-rx-details-arrow openwebrx-rx-details-arrow--down openwebrx-photo-trigger">
|
<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="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="static/gfx/svg-defs.svg#rx-details-arrow-up"></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>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -55,6 +55,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="openwebrx-panels-container">
|
<div id="openwebrx-panels-container">
|
||||||
<div id="openwebrx-panels-container-left">
|
<div id="openwebrx-panels-container-left">
|
||||||
|
<div class="openwebrx-panel" data-panel-name="client-under-devel" style="width: 245px; background-color: Red;">
|
||||||
|
<span style="font-size: 15pt; font-weight: bold;">Under construction</span>
|
||||||
|
<br />We're working on the code right now, so the application might fail.
|
||||||
|
</div>
|
||||||
<div class="openwebrx-panel" id="openwebrx-panel-digimodes" style="display: none; width: 619px;" data-panel-name="digimodes">
|
<div class="openwebrx-panel" id="openwebrx-panel-digimodes" style="display: none; width: 619px;" data-panel-name="digimodes">
|
||||||
<div id="openwebrx-digimode-canvas-container">
|
<div id="openwebrx-digimode-canvas-container">
|
||||||
<div id="openwebrx-digimode-select-channel"></div>
|
<div id="openwebrx-digimode-select-channel"></div>
|
||||||
|
@ -70,7 +70,7 @@ AprsMarker.prototype.onAdd = function() {
|
|||||||
div.appendChild(overlay);
|
div.appendChild(overlay);
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
google.maps.event.addDomListener(div, "click", function(event) {
|
div.addEventListener("click", function(event) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
google.maps.event.trigger(self, "click", event);
|
google.maps.event.trigger(self, "click", event);
|
||||||
});
|
});
|
||||||
|
@ -331,7 +331,9 @@ ImaAdpcmCodec.prototype.reset = function() {
|
|||||||
this.synchronized = 0;
|
this.synchronized = 0;
|
||||||
this.syncWord = "SYNC";
|
this.syncWord = "SYNC";
|
||||||
this.syncCounter = 0;
|
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 ];
|
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) {
|
ImaAdpcmCodec.prototype.decodeWithSync = function(data) {
|
||||||
var output = new Int16Array(data.length * 2);
|
var output = new Int16Array(data.length * 2);
|
||||||
var index = this.skip;
|
|
||||||
var oi = 0;
|
var oi = 0;
|
||||||
while (index < data.length) {
|
for (var index = 0; index < data.length; index++) {
|
||||||
while (this.synchronized < 4 && index < data.length) {
|
switch (this.phase) {
|
||||||
if (data[index] === this.syncWord.charCodeAt(this.synchronized)) {
|
case 0:
|
||||||
this.synchronized++;
|
// search for sync word
|
||||||
} else {
|
if (data[index] !== this.syncWord.charCodeAt(this.synchronized++)) {
|
||||||
this.synchronized = 0;
|
// reset if data is unexpected
|
||||||
}
|
this.synchronized = 0;
|
||||||
index++;
|
}
|
||||||
if (this.synchronized === 4) {
|
// if sync word has been found pass on to next phase
|
||||||
if (index + 4 < data.length) {
|
if (this.synchronized === 4) {
|
||||||
var syncData = new Int16Array(data.buffer.slice(index, index + 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.stepIndex = syncData[0];
|
||||||
this.predictor = syncData[1];
|
this.predictor = syncData[1];
|
||||||
|
this.syncCounter = 1000;
|
||||||
|
this.phase = 2;
|
||||||
}
|
}
|
||||||
this.syncCounter = 1000;
|
|
||||||
index += 4;
|
|
||||||
break;
|
break;
|
||||||
}
|
case 2:
|
||||||
}
|
// decode actual audio data
|
||||||
while (index < data.length) {
|
output[oi++] = this.decodeNibble(data[index] & 0x0F);
|
||||||
if (this.syncCounter-- < 0) {
|
output[oi++] = this.decodeNibble(data[index] >> 4);
|
||||||
this.synchronized = 0;
|
// if the next sync keyword is due, reset and return to phase 0
|
||||||
|
if (this.syncCounter-- === 0) {
|
||||||
|
this.synchronized = 0;
|
||||||
|
this.phase = 0;
|
||||||
|
}
|
||||||
break;
|
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);
|
return output.slice(0, oi);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ function BookmarkBar() {
|
|||||||
if (!b || !b.frequency || !b.modulation) return;
|
if (!b || !b.frequency || !b.modulation) return;
|
||||||
me.getDemodulator().set_offset_frequency(b.frequency - center_freq);
|
me.getDemodulator().set_offset_frequency(b.frequency - center_freq);
|
||||||
if (b.modulation) {
|
if (b.modulation) {
|
||||||
me.getDemodulatorPanel().setMode(b.modulation);
|
me.getDemodulatorPanel().setMode(b.modulation, b.underlying);
|
||||||
}
|
}
|
||||||
$bookmark.addClass('selected');
|
$bookmark.addClass('selected');
|
||||||
});
|
});
|
||||||
|
@ -81,6 +81,12 @@ Envelope.prototype.draw = function(visible_range){
|
|||||||
scale_ctx.fill();
|
scale_ctx.fill();
|
||||||
scale_ctx.globalAlpha = 1;
|
scale_ctx.globalAlpha = 1;
|
||||||
scale_ctx.stroke();
|
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?
|
if (typeof line !== "undefined") // out of screen?
|
||||||
{
|
{
|
||||||
|
@ -18,7 +18,12 @@ function DemodulatorPanel(el) {
|
|||||||
el.on('click', '.openwebrx-demodulator-button', function() {
|
el.on('click', '.openwebrx-demodulator-button', function() {
|
||||||
var modulation = $(this).data('modulation');
|
var modulation = $(this).data('modulation');
|
||||||
if (modulation) {
|
if (modulation) {
|
||||||
self.setMode(modulation);
|
if (self.mode && self.mode.type === 'digimode' && self.mode.underlying.indexOf(modulation) >= 0) {
|
||||||
|
// keep the mode, just switch underlying modulation
|
||||||
|
self.setMode(self.mode.modulation, modulation)
|
||||||
|
} else {
|
||||||
|
self.setMode(modulation);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
self.disableDigiMode();
|
self.disableDigiMode();
|
||||||
}
|
}
|
||||||
@ -80,12 +85,13 @@ DemodulatorPanel.prototype.render = function() {
|
|||||||
this.el.find(".openwebrx-modes").html(html);
|
this.el.find(".openwebrx-modes").html(html);
|
||||||
};
|
};
|
||||||
|
|
||||||
DemodulatorPanel.prototype.setMode = function(requestedModulation) {
|
DemodulatorPanel.prototype.setMode = function(requestedModulation, underlyingModulation) {
|
||||||
var mode = Modes.findByModulation(requestedModulation);
|
var mode = Modes.findByModulation(requestedModulation);
|
||||||
if (!mode) {
|
if (!mode) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.mode === mode) {
|
|
||||||
|
if (this.mode === mode && this.underlyingModulation === underlyingModulation) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!mode.isAvailable()) {
|
if (!mode.isAvailable()) {
|
||||||
@ -93,16 +99,15 @@ DemodulatorPanel.prototype.setMode = function(requestedModulation) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var modulation;
|
||||||
if (mode.type === 'digimode') {
|
if (mode.type === 'digimode') {
|
||||||
modulation = mode.underlying[0];
|
if (underlyingModulation) {
|
||||||
} else {
|
modulation = underlyingModulation
|
||||||
if (this.mode && this.mode.type === 'digimode' && this.mode.underlying.indexOf(requestedModulation) >= 0) {
|
|
||||||
// keep the mode, just switch underlying modulation
|
|
||||||
mode = this.mode;
|
|
||||||
modulation = requestedModulation;
|
|
||||||
} else {
|
} else {
|
||||||
modulation = mode.modulation;
|
modulation = mode.underlying[0];
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
modulation = mode.modulation;
|
||||||
}
|
}
|
||||||
|
|
||||||
var current = this.collectParams();
|
var current = this.collectParams();
|
||||||
@ -142,6 +147,7 @@ DemodulatorPanel.prototype.setMode = function(requestedModulation) {
|
|||||||
|
|
||||||
this.demodulator.start();
|
this.demodulator.start();
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
|
this.underlyingModulation = modulation;
|
||||||
|
|
||||||
this.updateButtons();
|
this.updateButtons();
|
||||||
this.updatePanels();
|
this.updatePanels();
|
||||||
@ -149,8 +155,6 @@ DemodulatorPanel.prototype.setMode = function(requestedModulation) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
DemodulatorPanel.prototype.disableDigiMode = function() {
|
DemodulatorPanel.prototype.disableDigiMode = function() {
|
||||||
// just a little trick to get out of the digimode
|
|
||||||
delete this.mode;
|
|
||||||
this.setMode(this.getDemodulator().get_modulation());
|
this.setMode(this.getDemodulator().get_modulation());
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -158,8 +162,8 @@ DemodulatorPanel.prototype.updatePanels = function() {
|
|||||||
var modulation = this.getDemodulator().get_secondary_demod();
|
var modulation = this.getDemodulator().get_secondary_demod();
|
||||||
$('#openwebrx-panel-digimodes').attr('data-mode', modulation);
|
$('#openwebrx-panel-digimodes').attr('data-mode', modulation);
|
||||||
toggle_panel("openwebrx-panel-digimodes", !!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-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-js8-message", modulation === "js8");
|
||||||
toggle_panel("openwebrx-panel-packet-message", modulation === "packet");
|
toggle_panel("openwebrx-panel-packet-message", modulation === "packet");
|
||||||
toggle_panel("openwebrx-panel-pocsag-message", modulation === "pocsag");
|
toggle_panel("openwebrx-panel-pocsag-message", modulation === "pocsag");
|
||||||
|
|
||||||
@ -203,7 +207,11 @@ DemodulatorPanel.prototype.stopDemodulator = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DemodulatorPanel.prototype._apply = function(params) {
|
DemodulatorPanel.prototype._apply = function(params) {
|
||||||
this.setMode(params.mod);
|
if (params.secondary_mod) {
|
||||||
|
this.setMode(params.secondary_mod, params.mod)
|
||||||
|
} else {
|
||||||
|
this.setMode(params.mod);
|
||||||
|
}
|
||||||
this.getDemodulator().set_offset_frequency(params.offset_frequency);
|
this.getDemodulator().set_offset_frequency(params.offset_frequency);
|
||||||
this.getDemodulator().setSquelch(params.squelch_level);
|
this.getDemodulator().setSquelch(params.squelch_level);
|
||||||
this.updateButtons();
|
this.updateButtons();
|
||||||
@ -223,8 +231,9 @@ DemodulatorPanel.prototype.onHashChange = function() {
|
|||||||
|
|
||||||
DemodulatorPanel.prototype.transformHashParams = function(params) {
|
DemodulatorPanel.prototype.transformHashParams = function(params) {
|
||||||
var ret = {
|
var ret = {
|
||||||
mod: params.secondary_mod || params.mod
|
mod: params.mod
|
||||||
};
|
};
|
||||||
|
if (typeof(params.secondary_mod) !== 'undefined') ret.secondary_mod = params.secondary_mod;
|
||||||
if (typeof(params.offset_frequency) !== 'undefined') ret.offset_frequency = params.offset_frequency;
|
if (typeof(params.offset_frequency) !== 'undefined') ret.offset_frequency = params.offset_frequency;
|
||||||
if (typeof(params.sql) !== 'undefined') ret.squelch_level = parseInt(params.sql);
|
if (typeof(params.sql) !== 'undefined') ret.squelch_level = parseInt(params.sql);
|
||||||
return ret;
|
return ret;
|
||||||
@ -329,7 +338,7 @@ DemodulatorPanel.prototype.updateHash = function() {
|
|||||||
freq: demod.get_offset_frequency() + self.center_freq,
|
freq: demod.get_offset_frequency() + self.center_freq,
|
||||||
mod: demod.get_modulation(),
|
mod: demod.get_modulation(),
|
||||||
secondary_mod: demod.get_secondary_demod(),
|
secondary_mod: demod.get_secondary_demod(),
|
||||||
sql: demod.getSquelch(),
|
sql: demod.getSquelch()
|
||||||
}, function(value, key){
|
}, function(value, key){
|
||||||
if (typeof(value) === 'undefined' || value === false) return undefined;
|
if (typeof(value) === 'undefined' || value === false) return undefined;
|
||||||
return key + '=' + value;
|
return key + '=' + value;
|
||||||
|
@ -98,8 +98,13 @@ TuneableFrequencyDisplay.prototype.setupEvents = function() {
|
|||||||
if (index < 0) return;
|
if (index < 0) return;
|
||||||
|
|
||||||
var delta = 10 ** (Math.floor(Math.max(me.exponent, Math.log10(me.frequency))) - index);
|
var delta = 10 ** (Math.floor(Math.max(me.exponent, Math.log10(me.frequency))) - index);
|
||||||
if (e.originalEvent.deltaY > 0) delta *= -1;
|
var newFrequency;
|
||||||
var newFrequency = me.frequency + delta;
|
if ('deltaMode' in e.originalEvent && e.originalEvent.deltaMode === 0) {
|
||||||
|
newFrequency = me.frequency - delta * (e.originalEvent.deltaY / 50);
|
||||||
|
} else {
|
||||||
|
if (e.originalEvent.deltaY > 0) delta *= -1;
|
||||||
|
newFrequency = me.frequency + delta;
|
||||||
|
}
|
||||||
|
|
||||||
me.element.trigger('frequencychange', newFrequency);
|
me.element.trigger('frequencychange', newFrequency);
|
||||||
});
|
});
|
||||||
|
@ -50,7 +50,7 @@ MessagePanel.prototype.initClearButton = function() {
|
|||||||
function WsjtMessagePanel(el) {
|
function WsjtMessagePanel(el) {
|
||||||
MessagePanel.call(this, el);
|
MessagePanel.call(this, el);
|
||||||
this.initClearTimer();
|
this.initClearTimer();
|
||||||
this.qsoModes = ['FT8', 'JT65', 'JT9', 'FT4', 'FST4', 'Q65'];
|
this.qsoModes = ['FT8', 'JT65', 'JT9', 'FT4', 'FST4', 'Q65', 'MSK144'];
|
||||||
this.beaconModes = ['WSPR', 'FST4W'];
|
this.beaconModes = ['WSPR', 'FST4W'];
|
||||||
this.modes = [].concat(this.qsoModes, this.beaconModes);
|
this.modes = [].concat(this.qsoModes, this.beaconModes);
|
||||||
}
|
}
|
||||||
@ -157,13 +157,17 @@ PacketMessagePanel.prototype.pushMessage = function(msg) {
|
|||||||
if (msg.type && msg.type === 'thirdparty' && msg.data) {
|
if (msg.type && msg.type === 'thirdparty' && msg.data) {
|
||||||
msg = msg.data;
|
msg = msg.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
var source = msg.source;
|
var source = msg.source;
|
||||||
if (msg.type) {
|
var callsign;
|
||||||
if (msg.type === 'item') {
|
if ('object' in source) {
|
||||||
source = msg.item;
|
callsign = source.object;
|
||||||
}
|
} else if ('item' in source) {
|
||||||
if (msg.type === 'object') {
|
callsign = source.item;
|
||||||
source = msg.object;
|
} else {
|
||||||
|
callsign = source.callsign;
|
||||||
|
if ('ssid' in source) {
|
||||||
|
callsign += '-' + source.ssid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,7 +206,7 @@ PacketMessagePanel.prototype.pushMessage = function(msg) {
|
|||||||
'style="' + stylesToString(styles) + '"'
|
'style="' + stylesToString(styles) + '"'
|
||||||
].join(' ');
|
].join(' ');
|
||||||
if (msg.lat && msg.lon) {
|
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 {
|
} else {
|
||||||
link = '<div ' + attrs + '>' + overlay + '</div>'
|
link = '<div ' + attrs + '>' + overlay + '</div>'
|
||||||
}
|
}
|
||||||
@ -210,7 +214,7 @@ PacketMessagePanel.prototype.pushMessage = function(msg) {
|
|||||||
$b.append($(
|
$b.append($(
|
||||||
'<tr>' +
|
'<tr>' +
|
||||||
'<td>' + timestamp + '</td>' +
|
'<td>' + timestamp + '</td>' +
|
||||||
'<td class="callsign">' + source + '</td>' +
|
'<td class="callsign">' + callsign + '</td>' +
|
||||||
'<td class="coord">' + link + '</td>' +
|
'<td class="coord">' + link + '</td>' +
|
||||||
'<td class="message">' + (msg.comment || msg.message || '') + '</td>' +
|
'<td class="message">' + (msg.comment || msg.message || '') + '</td>' +
|
||||||
'</tr>'
|
'</tr>'
|
||||||
|
5
htdocs/lib/settings/LogMessages.js
Normal file
5
htdocs/lib/settings/LogMessages.js
Normal file
@ -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(){
|
$(function(){
|
||||||
var query = window.location.search.replace(/^\?/, '').split('&').map(function(v){
|
var query = new URLSearchParams(window.location.search);
|
||||||
var s = v.split('=');
|
|
||||||
var r = {};
|
|
||||||
r[s[0]] = s.slice(1).join('=');
|
|
||||||
return r;
|
|
||||||
}).reduce(function(a, b){
|
|
||||||
return a.assign(b);
|
|
||||||
});
|
|
||||||
|
|
||||||
var expectedCallsign;
|
var expectedCallsign;
|
||||||
if (query.callsign) expectedCallsign = decodeURIComponent(query.callsign);
|
if (query.has('callsign')) {
|
||||||
|
expectedCallsign = Object.fromEntries(query.entries());
|
||||||
|
}
|
||||||
var expectedLocator;
|
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';
|
var protocol = window.location.protocol.match(/https/) ? 'wss' : 'ws';
|
||||||
|
|
||||||
@ -37,6 +32,7 @@ $(function(){
|
|||||||
var retention_time = 2 * 60 * 60 * 1000;
|
var retention_time = 2 * 60 * 60 * 1000;
|
||||||
var strokeOpacity = 0.8;
|
var strokeOpacity = 0.8;
|
||||||
var fillOpacity = 0.35;
|
var fillOpacity = 0.35;
|
||||||
|
var callsign_service;
|
||||||
|
|
||||||
var colorKeys = {};
|
var colorKeys = {};
|
||||||
var colorScale = chroma.scale(['red', 'blue', 'green']).mode('hsl');
|
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>';
|
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>');
|
$(".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) {
|
var processUpdates = function(updates) {
|
||||||
@ -109,6 +110,7 @@ $(function(){
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
updates.forEach(function(update){
|
updates.forEach(function(update){
|
||||||
|
var key = sourceToKey(update.source);
|
||||||
|
|
||||||
switch (update.location.type) {
|
switch (update.location.type) {
|
||||||
case 'latlon':
|
case 'latlon':
|
||||||
@ -122,33 +124,33 @@ $(function(){
|
|||||||
aprsOptions.course = update.location.course;
|
aprsOptions.course = update.location.course;
|
||||||
aprsOptions.speed = update.location.speed;
|
aprsOptions.speed = update.location.speed;
|
||||||
}
|
}
|
||||||
if (markers[update.callsign]) {
|
if (markers[key]) {
|
||||||
marker = markers[update.callsign];
|
marker = markers[key];
|
||||||
} else {
|
} else {
|
||||||
marker = new markerClass();
|
marker = new markerClass();
|
||||||
marker.addListener('click', function(){
|
marker.addListener('click', function(){
|
||||||
showMarkerInfoWindow(update.callsign, pos);
|
showMarkerInfoWindow(update.source, pos);
|
||||||
});
|
});
|
||||||
markers[update.callsign] = marker;
|
markers[key] = marker;
|
||||||
}
|
}
|
||||||
marker.setOptions($.extend({
|
marker.setOptions($.extend({
|
||||||
position: pos,
|
position: pos,
|
||||||
map: map,
|
map: map,
|
||||||
title: update.callsign
|
title: sourceToString(update.source)
|
||||||
}, aprsOptions, getMarkerOpacityOptions(update.lastseen) ));
|
}, aprsOptions, getMarkerOpacityOptions(update.lastseen) ));
|
||||||
marker.lastseen = update.lastseen;
|
marker.lastseen = update.lastseen;
|
||||||
marker.mode = update.mode;
|
marker.mode = update.mode;
|
||||||
marker.band = update.band;
|
marker.band = update.band;
|
||||||
marker.comment = update.location.comment;
|
marker.comment = update.location.comment;
|
||||||
|
|
||||||
if (expectedCallsign && expectedCallsign == update.callsign) {
|
if (expectedCallsign && shallowEquals(expectedCallsign, update.source)) {
|
||||||
map.panTo(pos);
|
map.panTo(pos);
|
||||||
showMarkerInfoWindow(update.callsign, pos);
|
showMarkerInfoWindow(update.source, pos);
|
||||||
expectedCallsign = false;
|
expectedCallsign = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (infowindow && infowindow.callsign && infowindow.callsign == update.callsign) {
|
if (infowindow && infowindow.source && shallowEquals(infowindow.source, update.source)) {
|
||||||
showMarkerInfoWindow(infowindow.callsign, pos);
|
showMarkerInfoWindow(infowindow.source, pos);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'locator':
|
case 'locator':
|
||||||
@ -159,15 +161,16 @@ $(function(){
|
|||||||
var rectangle;
|
var rectangle;
|
||||||
// the accessor is designed to work on the rectangle... but it should work on the update object, too
|
// the accessor is designed to work on the rectangle... but it should work on the update object, too
|
||||||
var color = getColor(colorAccessor(update));
|
var color = getColor(colorAccessor(update));
|
||||||
if (rectangles[update.callsign]) {
|
if (rectangles[key]) {
|
||||||
rectangle = rectangles[update.callsign];
|
rectangle = rectangles[key];
|
||||||
} else {
|
} else {
|
||||||
rectangle = new google.maps.Rectangle();
|
rectangle = new google.maps.Rectangle();
|
||||||
rectangle.addListener('click', function(){
|
rectangle.addListener('click', function(){
|
||||||
showLocatorInfoWindow(this.locator, this.center);
|
showLocatorInfoWindow(this.locator, this.center);
|
||||||
});
|
});
|
||||||
rectangles[update.callsign] = rectangle;
|
rectangles[key] = rectangle;
|
||||||
}
|
}
|
||||||
|
rectangle.source = update.source;
|
||||||
rectangle.lastseen = update.lastseen;
|
rectangle.lastseen = update.lastseen;
|
||||||
rectangle.locator = update.location.locator;
|
rectangle.locator = update.location.locator;
|
||||||
rectangle.mode = update.mode;
|
rectangle.mode = update.mode;
|
||||||
@ -187,13 +190,13 @@ $(function(){
|
|||||||
}
|
}
|
||||||
}, getRectangleOpacityOptions(update.lastseen) ));
|
}, getRectangleOpacityOptions(update.lastseen) ));
|
||||||
|
|
||||||
if (expectedLocator && expectedLocator == update.location.locator) {
|
if (expectedLocator && expectedLocator === update.location.locator) {
|
||||||
map.panTo(center);
|
map.panTo(center);
|
||||||
showLocatorInfoWindow(expectedLocator, center);
|
showLocatorInfoWindow(expectedLocator, center);
|
||||||
expectedLocator = false;
|
expectedLocator = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (infowindow && infowindow.locator && infowindow.locator == update.location.locator) {
|
if (infowindow && infowindow.locator && infowindow.locator === update.location.locator) {
|
||||||
showLocatorInfoWindow(infowindow.locator, center);
|
showLocatorInfoWindow(infowindow.locator, center);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -202,7 +205,7 @@ $(function(){
|
|||||||
};
|
};
|
||||||
|
|
||||||
var clearMap = function(){
|
var clearMap = function(){
|
||||||
var reset = function(callsign, item) { item.setMap(); };
|
var reset = function(_, item) { item.setMap(); };
|
||||||
$.each(markers, reset);
|
$.each(markers, reset);
|
||||||
$.each(rectangles, reset);
|
$.each(rectangles, reset);
|
||||||
receiverMarker.setMap();
|
receiverMarker.setMap();
|
||||||
@ -286,6 +289,9 @@ $(function(){
|
|||||||
if ('map_position_retention_time' in config) {
|
if ('map_position_retention_time' in config) {
|
||||||
retention_time = config.map_position_retention_time * 1000;
|
retention_time = config.map_position_retention_time * 1000;
|
||||||
}
|
}
|
||||||
|
if ('callsign_service' in config) {
|
||||||
|
callsign_service = config['callsign_service'];
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "update":
|
case "update":
|
||||||
processUpdates(json.value);
|
processUpdates(json.value);
|
||||||
@ -332,32 +338,77 @@ $(function(){
|
|||||||
infowindow = new google.maps.InfoWindow();
|
infowindow = new google.maps.InfoWindow();
|
||||||
google.maps.event.addListener(infowindow, 'closeclick', function() {
|
google.maps.event.addListener(infowindow, 'closeclick', function() {
|
||||||
delete infowindow.locator;
|
delete infowindow.locator;
|
||||||
delete infowindow.callsign;
|
delete infowindow.source;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
delete infowindow.locator;
|
delete infowindow.locator;
|
||||||
delete infowindow.callsign;
|
delete infowindow.source;
|
||||||
return infowindow;
|
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 infowindow;
|
||||||
var showLocatorInfoWindow = function(locator, pos) {
|
var showLocatorInfoWindow = function(locator, pos) {
|
||||||
var infowindow = getInfoWindow();
|
var infowindow = getInfoWindow();
|
||||||
infowindow.locator = locator;
|
infowindow.locator = locator;
|
||||||
var inLocator = $.map(rectangles, function(r, callsign) {
|
var inLocator = Object.values(rectangles).filter(rectangleFilter).filter(function(d) {
|
||||||
return {callsign: callsign, locator: r.locator, lastseen: r.lastseen, mode: r.mode, band: r.band}
|
return d.locator === locator;
|
||||||
}).filter(rectangleFilter).filter(function(d) {
|
|
||||||
return d.locator == locator;
|
|
||||||
}).sort(function(a, b){
|
}).sort(function(a, b){
|
||||||
return b.lastseen - a.lastseen;
|
return b.lastseen - a.lastseen;
|
||||||
});
|
});
|
||||||
|
var distance = receiverMarker?
|
||||||
|
" at " + distanceKm(receiverMarker.position, pos) + " km" : "";
|
||||||
infowindow.setContent(
|
infowindow.setContent(
|
||||||
'<h3>Locator: ' + locator + '</h3>' +
|
'<h3>Locator: ' + locator + distance + '</h3>' +
|
||||||
'<div>Active Callsigns:</div>' +
|
'<div>Active Callsigns:</div>' +
|
||||||
'<ul>' +
|
'<ul>' +
|
||||||
inLocator.map(function(i){
|
inLocator.map(function(i){
|
||||||
var timestring = moment(i.lastseen).fromNow();
|
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;
|
if (i.band) message += ' on ' + i.band;
|
||||||
message += ')';
|
message += ')';
|
||||||
return '<li>' + message + '</li>'
|
return '<li>' + message + '</li>'
|
||||||
@ -368,22 +419,26 @@ $(function(){
|
|||||||
infowindow.open(map);
|
infowindow.open(map);
|
||||||
};
|
};
|
||||||
|
|
||||||
var showMarkerInfoWindow = function(callsign, pos) {
|
var showMarkerInfoWindow = function(source, pos) {
|
||||||
var infowindow = getInfoWindow();
|
var infowindow = getInfoWindow();
|
||||||
infowindow.callsign = callsign;
|
infowindow.source = source;
|
||||||
var marker = markers[callsign];
|
var marker = markers[sourceToKey(source)];
|
||||||
var timestring = moment(marker.lastseen).fromNow();
|
var timestring = moment(marker.lastseen).fromNow();
|
||||||
var commentString = "";
|
var commentString = "";
|
||||||
|
var distance = "";
|
||||||
if (marker.comment) {
|
if (marker.comment) {
|
||||||
commentString = '<div>' + marker.comment + '</div>';
|
commentString = '<div>' + marker.comment + '</div>';
|
||||||
}
|
}
|
||||||
|
if (receiverMarker) {
|
||||||
|
distance = " at " + distanceKm(receiverMarker.position, marker.position) + " km";
|
||||||
|
}
|
||||||
infowindow.setContent(
|
infowindow.setContent(
|
||||||
'<h3>' + callsign + '</h3>' +
|
'<h3>' + linkifySource(source) + distance + '</h3>' +
|
||||||
'<div>' + timestring + ' using ' + marker.mode + ( marker.band ? ' on ' + marker.band : '' ) + '</div>' +
|
'<div>' + timestring + ' using ' + marker.mode + ( marker.band ? ' on ' + marker.band : '' ) + '</div>' +
|
||||||
commentString
|
commentString
|
||||||
);
|
);
|
||||||
infowindow.open(map, marker);
|
infowindow.open(map, marker);
|
||||||
}
|
};
|
||||||
|
|
||||||
var showReceiverInfoWindow = function(marker) {
|
var showReceiverInfoWindow = function(marker) {
|
||||||
var infowindow = getInfoWindow()
|
var infowindow = getInfoWindow()
|
||||||
@ -392,7 +447,7 @@ $(function(){
|
|||||||
'<div>Receiver location</div>'
|
'<div>Receiver location</div>'
|
||||||
);
|
);
|
||||||
infowindow.open(map, marker);
|
infowindow.open(map, marker);
|
||||||
}
|
};
|
||||||
|
|
||||||
var getScale = function(lastseen) {
|
var getScale = function(lastseen) {
|
||||||
var age = new Date().getTime() - lastseen;
|
var age = new Date().getTime() - lastseen;
|
||||||
@ -421,19 +476,19 @@ $(function(){
|
|||||||
// fade out / remove positions after time
|
// fade out / remove positions after time
|
||||||
setInterval(function(){
|
setInterval(function(){
|
||||||
var now = new Date().getTime();
|
var now = new Date().getTime();
|
||||||
$.each(rectangles, function(callsign, m) {
|
Object.values(rectangles).forEach(function(m){
|
||||||
var age = now - m.lastseen;
|
var age = now - m.lastseen;
|
||||||
if (age > retention_time) {
|
if (age > retention_time) {
|
||||||
delete rectangles[callsign];
|
delete rectangles[sourceToKey(m.source)];
|
||||||
m.setMap();
|
m.setMap();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m.setOptions(getRectangleOpacityOptions(m.lastseen));
|
m.setOptions(getRectangleOpacityOptions(m.lastseen));
|
||||||
});
|
});
|
||||||
$.each(markers, function(callsign, m) {
|
Object.values(markers).forEach(function(m) {
|
||||||
var age = now - m.lastseen;
|
var age = now - m.lastseen;
|
||||||
if (age > retention_time) {
|
if (age > retention_time) {
|
||||||
delete markers[callsign];
|
delete markers[sourceToKey(m.source)];
|
||||||
m.setMap();
|
m.setMap();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ function zoomOutOneStep() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function zoomInTotal() {
|
function zoomInTotal() {
|
||||||
zoom_set(zoom_levels.length - 1);
|
zoom_set(zoom_levels_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
function zoomOutTotal() {
|
function zoomOutTotal() {
|
||||||
@ -317,7 +317,7 @@ function scale_px_from_freq(f, range) {
|
|||||||
function get_visible_freq_range() {
|
function get_visible_freq_range() {
|
||||||
if (!bandwidth) return false;
|
if (!bandwidth) return false;
|
||||||
var fcalc = function (x) {
|
var fcalc = function (x) {
|
||||||
var canvasWidth = waterfallWidth() * zoom_levels[zoom_level];
|
var canvasWidth = waterfallWidth() * get_zoom(zoom_level);
|
||||||
return Math.round(((-zoom_offset_px + x) / canvasWidth) * bandwidth) + (center_freq - bandwidth / 2);
|
return Math.round(((-zoom_offset_px + x) / canvasWidth) * bandwidth) + (center_freq - bandwidth / 2);
|
||||||
};
|
};
|
||||||
var out = {
|
var out = {
|
||||||
@ -565,7 +565,7 @@ function canvas_mousemove(evt) {
|
|||||||
) {
|
) {
|
||||||
zoom_center_rel += dpx;
|
zoom_center_rel += dpx;
|
||||||
}
|
}
|
||||||
resize_canvases(false);
|
resize_canvases();
|
||||||
canvas_drag_last_x = evt.pageX;
|
canvas_drag_last_x = evt.pageX;
|
||||||
canvas_drag_last_y = evt.pageY;
|
canvas_drag_last_y = evt.pageY;
|
||||||
mkscale();
|
mkscale();
|
||||||
@ -616,9 +616,14 @@ function get_relative_x(evt) {
|
|||||||
|
|
||||||
function canvas_mousewheel(evt) {
|
function canvas_mousewheel(evt) {
|
||||||
if (!waterfall_setup_done) return;
|
if (!waterfall_setup_done) return;
|
||||||
|
|
||||||
|
var delta = -evt.deltaY;
|
||||||
|
// deltaMode 0 means pixels instead of lines
|
||||||
|
if ('deltaMode' in evt && evt.deltaMode === 0) {
|
||||||
|
delta /= 50;
|
||||||
|
}
|
||||||
var relativeX = get_relative_x(evt);
|
var relativeX = get_relative_x(evt);
|
||||||
var dir = (evt.deltaY / Math.abs(evt.deltaY)) > 0;
|
zoom_step(delta, relativeX, zoom_center_where_calc(evt.pageX));
|
||||||
zoom_step(dir, relativeX, zoom_center_where_calc(evt.pageX));
|
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -631,7 +636,6 @@ function get_zoom_coeff_from_hps(hps) {
|
|||||||
return bandwidth / shown_bw;
|
return bandwidth / shown_bw;
|
||||||
}
|
}
|
||||||
|
|
||||||
var zoom_levels = [1];
|
|
||||||
var zoom_level = 0;
|
var zoom_level = 0;
|
||||||
var zoom_offset_px = 0;
|
var zoom_offset_px = 0;
|
||||||
var zoom_center_rel = 0;
|
var zoom_center_rel = 0;
|
||||||
@ -639,45 +643,48 @@ var zoom_center_where = 0;
|
|||||||
|
|
||||||
var smeter_level = 0;
|
var smeter_level = 0;
|
||||||
|
|
||||||
function mkzoomlevels() {
|
function get_zoom(level) {
|
||||||
zoom_levels = [1];
|
|
||||||
var maxc = get_zoom_coeff_from_hps(zoom_max_level_hps);
|
var maxc = get_zoom_coeff_from_hps(zoom_max_level_hps);
|
||||||
if (maxc < 1) return;
|
if (maxc < 1) return;
|
||||||
// logarithmic interpolation
|
// logarithmic interpolation
|
||||||
var zoom_ratio = Math.pow(maxc, 1 / zoom_levels_count);
|
var zoom_ratio = Math.pow(maxc, 1 / zoom_levels_count);
|
||||||
for (var i = 1; i < zoom_levels_count; i++)
|
return Math.pow(zoom_ratio, level);
|
||||||
zoom_levels.push(Math.pow(zoom_ratio, i));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function zoom_step(out, where, onscreen) {
|
function zoom_step(delta, where, onscreen) {
|
||||||
if ((out && zoom_level === 0) || (!out && zoom_level >= zoom_levels_count - 1)) return;
|
zoom_level += delta;
|
||||||
if (out) --zoom_level;
|
if (zoom_level < 0) {
|
||||||
else ++zoom_level;
|
zoom_level = 0;
|
||||||
|
} else if (zoom_level > zoom_levels_count) {
|
||||||
|
zoom_level = zoom_levels_count;
|
||||||
|
}
|
||||||
|
|
||||||
zoom_center_rel = canvas_get_freq_offset(where);
|
zoom_center_rel = canvas_get_freq_offset(where);
|
||||||
//console.log("zoom_step || zlevel: "+zoom_level.toString()+" zlevel_val: "+zoom_levels[zoom_level].toString()+" zoom_center_rel: "+zoom_center_rel.toString());
|
|
||||||
zoom_center_where = onscreen;
|
zoom_center_where = onscreen;
|
||||||
//console.log(zoom_center_where, zoom_center_rel, where);
|
resize_canvases();
|
||||||
resize_canvases(true);
|
|
||||||
mkscale();
|
mkscale();
|
||||||
bookmarks.position();
|
bookmarks.position();
|
||||||
}
|
}
|
||||||
|
|
||||||
function zoom_set(level) {
|
function zoom_set(level) {
|
||||||
if (!(level >= 0 && level <= zoom_levels.length - 1)) return;
|
if (level < 0) {
|
||||||
level = parseInt(level);
|
zoom_level = 0;
|
||||||
zoom_level = level;
|
} else if (level > zoom_levels_count) {
|
||||||
|
zoom_level = zoom_levels_count;
|
||||||
|
} else {
|
||||||
|
zoom_level = parseFloat(level);
|
||||||
|
}
|
||||||
//zoom_center_rel=canvas_get_freq_offset(-canvases[0].offsetLeft+waterfallWidth()/2); //zoom to screen center instead of demod envelope
|
//zoom_center_rel=canvas_get_freq_offset(-canvases[0].offsetLeft+waterfallWidth()/2); //zoom to screen center instead of demod envelope
|
||||||
zoom_center_rel = $('#openwebrx-panel-receiver').demodulatorPanel().getDemodulator().get_offset_frequency();
|
zoom_center_rel = $('#openwebrx-panel-receiver').demodulatorPanel().getDemodulator().get_offset_frequency();
|
||||||
zoom_center_where = 0.5 + (zoom_center_rel / bandwidth); //this is a kind of hack
|
zoom_center_where = 0.5 + (zoom_center_rel / bandwidth); //this is a kind of hack
|
||||||
resize_canvases(true);
|
resize_canvases();
|
||||||
mkscale();
|
mkscale();
|
||||||
bookmarks.position();
|
bookmarks.position();
|
||||||
}
|
}
|
||||||
|
|
||||||
function zoom_calc() {
|
function zoom_calc() {
|
||||||
var winsize = waterfallWidth();
|
var winsize = waterfallWidth();
|
||||||
var canvases_new_width = winsize * zoom_levels[zoom_level];
|
var canvases_new_width = winsize * get_zoom(zoom_level);
|
||||||
zoom_offset_px = -((canvases_new_width * (0.5 + zoom_center_rel / bandwidth)) - (winsize * zoom_center_where));
|
zoom_offset_px = -((canvases_new_width * (0.5 + zoom_center_rel / bandwidth)) - (winsize * zoom_center_where));
|
||||||
if (zoom_offset_px > 0) zoom_offset_px = 0;
|
if (zoom_offset_px > 0) zoom_offset_px = 0;
|
||||||
if (zoom_offset_px < winsize - canvases_new_width)
|
if (zoom_offset_px < winsize - canvases_new_width)
|
||||||
@ -771,6 +778,7 @@ function on_ws_recv(evt) {
|
|||||||
$('#openwebrx-sdr-profiles-listbox').val(currentprofile.toString());
|
$('#openwebrx-sdr-profiles-listbox').val(currentprofile.toString());
|
||||||
|
|
||||||
waterfall_clear();
|
waterfall_clear();
|
||||||
|
zoom_set(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('tuning_precision' in config)
|
if ('tuning_precision' in config)
|
||||||
@ -823,7 +831,8 @@ function on_ws_recv(evt) {
|
|||||||
return {
|
return {
|
||||||
name: d['mode'].toUpperCase(),
|
name: d['mode'].toUpperCase(),
|
||||||
modulation: d['mode'],
|
modulation: d['mode'],
|
||||||
frequency: d['frequency']
|
frequency: d['frequency'],
|
||||||
|
underlying: d['underlying']
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
bookmarks.replace_bookmarks(as_bookmarks, 'dial_frequencies');
|
bookmarks.replace_bookmarks(as_bookmarks, 'dial_frequencies');
|
||||||
@ -935,9 +944,15 @@ var waterfall_measure_minmax_now = false;
|
|||||||
var waterfall_measure_minmax_continuous = false;
|
var waterfall_measure_minmax_continuous = false;
|
||||||
|
|
||||||
function waterfall_measure_minmax_do(what) {
|
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
|
// this is based on an oversampling factor of about 1,25
|
||||||
var ignored = .1 * what.length;
|
range.start = Math.max(0.1, (range.start - start) / bandwidth);
|
||||||
var data = what.slice(ignored, -ignored);
|
range.end = Math.min(0.9, (range.end - start) / bandwidth);
|
||||||
|
|
||||||
|
var data = what.slice(range.start * what.length, range.end * what.length);
|
||||||
return {
|
return {
|
||||||
min: Math.min.apply(Math, data),
|
min: Math.min.apply(Math, data),
|
||||||
max: Math.max.apply(Math, data)
|
max: Math.max.apply(Math, data)
|
||||||
@ -1109,8 +1124,9 @@ function init_canvas_container() {
|
|||||||
canvas_container.addEventListener("mouseup", canvas_mouseup, false);
|
canvas_container.addEventListener("mouseup", canvas_mouseup, false);
|
||||||
canvas_container.addEventListener("mousedown", canvas_mousedown, false);
|
canvas_container.addEventListener("mousedown", canvas_mousedown, false);
|
||||||
canvas_container.addEventListener("wheel", canvas_mousewheel, false);
|
canvas_container.addEventListener("wheel", canvas_mousewheel, false);
|
||||||
var frequency_container = $("#openwebrx-frequency-container");
|
$("#openwebrx-frequency-container").each(function(){
|
||||||
frequency_container.on("wheel", canvas_mousewheel, false);
|
this.addEventListener("wheel", canvas_mousewheel, false);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
canvas_maxshift = 0;
|
canvas_maxshift = 0;
|
||||||
@ -1122,12 +1138,10 @@ function shift_canvases() {
|
|||||||
canvas_maxshift++;
|
canvas_maxshift++;
|
||||||
}
|
}
|
||||||
|
|
||||||
function resize_canvases(zoom) {
|
function resize_canvases() {
|
||||||
if (typeof zoom === "undefined") zoom = false;
|
|
||||||
if (!zoom) mkzoomlevels();
|
|
||||||
zoom_calc();
|
zoom_calc();
|
||||||
$('#webrx-canvas-container').css({
|
$('#webrx-canvas-container').css({
|
||||||
width: waterfallWidth() * zoom_levels[zoom_level] + 'px',
|
width: waterfallWidth() * get_zoom(zoom_level) + 'px',
|
||||||
left: zoom_offset_px + "px"
|
left: zoom_offset_px + "px"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -1136,7 +1150,6 @@ function waterfall_init() {
|
|||||||
init_canvas_container();
|
init_canvas_container();
|
||||||
resize_canvases();
|
resize_canvases();
|
||||||
scale_setup();
|
scale_setup();
|
||||||
mkzoomlevels();
|
|
||||||
waterfall_setup_done = 1;
|
waterfall_setup_done = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,4 +8,5 @@ $(function(){
|
|||||||
$('.optional-section').optionalSection();
|
$('.optional-section').optionalSection();
|
||||||
$('#scheduler').schedulerInput();
|
$('#scheduler').schedulerInput();
|
||||||
$('.exponential-input').exponentialInput();
|
$('.exponential-input').exponentialInput();
|
||||||
|
$('.device-log-messages').logMessages();
|
||||||
});
|
});
|
@ -1,6 +1,7 @@
|
|||||||
[core]
|
[core]
|
||||||
data_directory = /var/lib/openwebrx
|
data_directory = /var/lib/openwebrx
|
||||||
temporary_directory = /tmp
|
temporary_directory = /tmp
|
||||||
|
log_level = INFO
|
||||||
|
|
||||||
[web]
|
[web]
|
||||||
port = 8073
|
port = 8073
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
# the linter will complain about this, but the logging must be configured before importing all the other modules
|
# 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__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
from http.server import HTTPServer
|
from http.server import HTTPServer
|
||||||
@ -51,9 +52,8 @@ def main():
|
|||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
# set loglevel to info for CLI commands
|
if args.debug:
|
||||||
if args.module is not None and not args.debug:
|
logging.getLogger().setLevel(logging.DEBUG)
|
||||||
logging.getLogger().setLevel(logging.INFO)
|
|
||||||
|
|
||||||
if args.version:
|
if args.version:
|
||||||
print("OpenWebRX version {version}".format(version=openwebrx_version))
|
print("OpenWebRX version {version}".format(version=openwebrx_version))
|
||||||
@ -65,10 +65,10 @@ def main():
|
|||||||
if args.module == "config":
|
if args.module == "config":
|
||||||
return run_admin_action(configparser, args)
|
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(
|
print(
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -87,9 +87,13 @@ Support and info: https://groups.io/g/openwebrx
|
|||||||
for sig in [signal.SIGINT, signal.SIGTERM]:
|
for sig in [signal.SIGINT, signal.SIGTERM]:
|
||||||
signal.signal(sig, handleSignal)
|
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 warmup
|
||||||
Config.validateConfig()
|
Config.validateConfig()
|
||||||
coreConfig = CoreConfig()
|
|
||||||
|
|
||||||
featureDetector = FeatureDetector()
|
featureDetector = FeatureDetector()
|
||||||
failed = featureDetector.get_failed_requirements("core")
|
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})$")
|
messageIdRegex = re.compile("^(.*){([0-9]{1,5})$")
|
||||||
|
|
||||||
# regex to filter pseudo "WIDE" path elements
|
# regex to filter pseudo "WIDE" path elements
|
||||||
widePattern = re.compile("^WIDE[0-9]-[0-9]$")
|
widePattern = re.compile("^WIDE[0-9]$")
|
||||||
|
|
||||||
|
|
||||||
def decodeBase91(input):
|
def decodeBase91(input):
|
||||||
@ -67,12 +67,13 @@ class Ax25Parser(PickleModule):
|
|||||||
logger.exception("error parsing ax25 frame")
|
logger.exception("error parsing ax25 frame")
|
||||||
|
|
||||||
def extractCallsign(self, input):
|
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
|
ssid = (input[6] & 0b00011110) >> 1
|
||||||
if ssid > 0:
|
if ssid > 0:
|
||||||
return "{callsign}-{ssid}".format(callsign=cs, ssid=ssid)
|
cs["ssid"] = ssid
|
||||||
else:
|
return cs
|
||||||
return cs
|
|
||||||
|
|
||||||
|
|
||||||
class WeatherMapping(object):
|
class WeatherMapping(object):
|
||||||
@ -178,7 +179,7 @@ class AprsParser(PickleModule):
|
|||||||
|
|
||||||
def isDirect(self, aprsData):
|
def isDirect(self, aprsData):
|
||||||
if "path" in aprsData and len(aprsData["path"]) > 0:
|
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:
|
if len(hops) > 0:
|
||||||
return False
|
return False
|
||||||
if "type" in aprsData and aprsData["type"] in ["thirdparty", "item", "object"]:
|
if "type" in aprsData and aprsData["type"] in ["thirdparty", "item", "object"]:
|
||||||
@ -207,12 +208,13 @@ class AprsParser(PickleModule):
|
|||||||
mapData = mapData["data"]
|
mapData = mapData["data"]
|
||||||
if "lat" in mapData and "lon" in mapData:
|
if "lat" in mapData and "lon" in mapData:
|
||||||
loc = AprsLocation(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 "type" in mapData:
|
||||||
if mapData["type"] == "item":
|
if mapData["type"] == "item" and "item" in mapData:
|
||||||
source = mapData["item"]
|
source["item"] = mapData["item"]
|
||||||
elif mapData["type"] == "object":
|
elif mapData["type"] == "object" and "object" in mapData:
|
||||||
source = mapData["object"]
|
source["object"] = mapData["object"]
|
||||||
Map.getSharedInstance().updateLocation(source, loc, "APRS", self.band)
|
Map.getSharedInstance().updateLocation(source, loc, "APRS", self.band)
|
||||||
|
|
||||||
def hasCompressedCoordinates(self, raw):
|
def hasCompressedCoordinates(self, raw):
|
||||||
@ -345,15 +347,24 @@ class AprsParser(PickleModule):
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
def parseThirdpartyAprsData(self, information):
|
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)
|
matches = thirdpartyeRegex.match(information)
|
||||||
if matches:
|
if matches:
|
||||||
path = matches.group(2).split(",")
|
path = matches.group(2).split(",")
|
||||||
destination = next((c.strip("*").upper() for c in path if c.endswith("*")), None)
|
destination = next((c.strip("*").upper() for c in path if c.endswith("*")), None)
|
||||||
data = self.parseAprsData(
|
data = self.parseAprsData(
|
||||||
{
|
{
|
||||||
"source": matches.group(1).upper(),
|
"source": parseCallsign(matches.group(1).upper()),
|
||||||
"destination": destination,
|
"destination": parseCallsign(destination),
|
||||||
"path": path,
|
"path": [parseCallsign(c) for c in path],
|
||||||
"data": matches.group(6).encode(encoding),
|
"data": matches.group(6).encode(encoding),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@ -531,7 +542,7 @@ class MicEParser(object):
|
|||||||
|
|
||||||
def parse(self, data):
|
def parse(self, data):
|
||||||
information = data["data"]
|
information = data["data"]
|
||||||
destination = data["destination"]
|
destination = data["destination"]["callsign"]
|
||||||
|
|
||||||
rawLatitude = [self.extractNumber(c) for c in destination[0:6]]
|
rawLatitude = [self.extractNumber(c) for c in destination[0:6]]
|
||||||
lat = self.listToNumber(rawLatitude[0:2]) + self.listToNumber(rawLatitude[2:6]) / 6000
|
lat = self.listToNumber(rawLatitude[0:2]) + self.listToNumber(rawLatitude[2:6]) / 6000
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from owrx.modes import Modes
|
from owrx.modes import Modes, DigitalMode
|
||||||
from datetime import datetime, timezone
|
from datetime import datetime, timezone
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
@ -9,14 +9,14 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
class Band(object):
|
class Band(object):
|
||||||
def __init__(self, dict):
|
def __init__(self, b_dict):
|
||||||
self.name = dict["name"]
|
self.name = b_dict["name"]
|
||||||
self.lower_bound = dict["lower_bound"]
|
self.lower_bound = b_dict["lower_bound"]
|
||||||
self.upper_bound = dict["upper_bound"]
|
self.upper_bound = b_dict["upper_bound"]
|
||||||
self.frequencies = []
|
self.frequencies = []
|
||||||
if "frequencies" in dict:
|
if "frequencies" in b_dict:
|
||||||
availableModes = [mode.modulation for mode in Modes.getAvailableModes()]
|
availableModes = [mode.modulation for mode in Modes.getAvailableModes()]
|
||||||
for (mode, freqs) in dict["frequencies"].items():
|
for (mode, freqs) in b_dict["frequencies"].items():
|
||||||
if mode not in availableModes:
|
if mode not in availableModes:
|
||||||
logger.info(
|
logger.info(
|
||||||
'Modulation "{mode}" is not available, bandplan bookmark will not be displayed'.format(
|
'Modulation "{mode}" is not available, bandplan bookmark will not be displayed'.format(
|
||||||
@ -27,14 +27,30 @@ class Band(object):
|
|||||||
if not isinstance(freqs, list):
|
if not isinstance(freqs, list):
|
||||||
freqs = [freqs]
|
freqs = [freqs]
|
||||||
for f in freqs:
|
for f in freqs:
|
||||||
if not self.inBand(f):
|
f_dict = {"frequency": f} if not isinstance(f, dict) else f
|
||||||
|
f_dict["mode"] = mode
|
||||||
|
|
||||||
|
if not self.inBand(f_dict["frequency"]):
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Frequency for {mode} on {band} is not within band limits: {frequency}".format(
|
"Frequency for {mode} on {band} is not within band limits: {frequency}".format(
|
||||||
mode=mode, frequency=f, band=self.name
|
mode=mode, frequency=f_dict["frequency"], band=self.name
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
self.frequencies.append({"mode": mode, "frequency": f})
|
|
||||||
|
if "underlying" in f_dict:
|
||||||
|
m = Modes.findByModulation(mode)
|
||||||
|
if not isinstance(m, DigitalMode):
|
||||||
|
logger.warning("%s is not a digital mode, cannot be used with \"underlying\" config", mode)
|
||||||
|
continue
|
||||||
|
if f_dict["underlying"] not in m.underlying:
|
||||||
|
logger.warning(
|
||||||
|
"%s is not a valid underlying mode for %s; skipping",
|
||||||
|
f_dict["underlying"],
|
||||||
|
mode
|
||||||
|
)
|
||||||
|
|
||||||
|
self.frequencies.append(f_dict)
|
||||||
|
|
||||||
def inBand(self, freq):
|
def inBand(self, freq):
|
||||||
return self.lower_bound <= freq <= self.upper_bound
|
return self.lower_bound <= freq <= self.upper_bound
|
||||||
|
@ -9,6 +9,7 @@ class CoreConfig(object):
|
|||||||
"core": {
|
"core": {
|
||||||
"data_directory": "/var/lib/openwebrx",
|
"data_directory": "/var/lib/openwebrx",
|
||||||
"temporary_directory": "/tmp",
|
"temporary_directory": "/tmp",
|
||||||
|
"log_level": "INFO",
|
||||||
},
|
},
|
||||||
"web": {
|
"web": {
|
||||||
"port": 8073,
|
"port": 8073,
|
||||||
@ -34,6 +35,7 @@ class CoreConfig(object):
|
|||||||
CoreConfig.checkDirectory(self.data_directory, "data_directory")
|
CoreConfig.checkDirectory(self.data_directory, "data_directory")
|
||||||
self.temporary_directory = config.get("core", "temporary_directory")
|
self.temporary_directory = config.get("core", "temporary_directory")
|
||||||
CoreConfig.checkDirectory(self.temporary_directory, "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.web_port = config.getint("web", "port")
|
||||||
self.aprs_symbols_path = config.get("aprs", "symbols_path")
|
self.aprs_symbols_path = config.get("aprs", "symbols_path")
|
||||||
|
|
||||||
@ -57,3 +59,6 @@ class CoreConfig(object):
|
|||||||
|
|
||||||
def get_aprs_symbols_path(self):
|
def get_aprs_symbols_path(self):
|
||||||
return self.aprs_symbols_path
|
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(
|
defaultConfig = PropertyLayer(
|
||||||
version=7,
|
version=8,
|
||||||
max_clients=20,
|
max_clients=20,
|
||||||
receiver_name="[Callsign]",
|
receiver_name="[Callsign]",
|
||||||
receiver_location="Budapest, Hungary",
|
receiver_location="Budapest, Hungary",
|
||||||
@ -90,7 +90,7 @@ defaultConfig = PropertyLayer(
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
sdrplay=PropertyLayer(
|
sdrplay=PropertyLayer(
|
||||||
name="SDRPlay RSP2",
|
name="SDRPlay device",
|
||||||
type="sdrplay",
|
type="sdrplay",
|
||||||
antenna="Antenna A",
|
antenna="Antenna A",
|
||||||
profiles=PropertyLayer(
|
profiles=PropertyLayer(
|
||||||
|
@ -111,8 +111,21 @@ class ConfigMigratorVersion6(ConfigMigrator):
|
|||||||
config["version"] = 7
|
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):
|
class Migrator(object):
|
||||||
currentVersion = 7
|
currentVersion = 8
|
||||||
migrators = {
|
migrators = {
|
||||||
1: ConfigMigratorVersion1(),
|
1: ConfigMigratorVersion1(),
|
||||||
2: ConfigMigratorVersion2(),
|
2: ConfigMigratorVersion2(),
|
||||||
@ -120,6 +133,7 @@ class Migrator(object):
|
|||||||
4: ConfigMigratorVersion4(),
|
4: ConfigMigratorVersion4(),
|
||||||
5: ConfigMigratorVersion5(),
|
5: ConfigMigratorVersion5(),
|
||||||
6: ConfigMigratorVersion6(),
|
6: ConfigMigratorVersion6(),
|
||||||
|
7: ConfigMigratorVersion7(),
|
||||||
}
|
}
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -456,6 +456,7 @@ class MapConnection(OpenWebRxClient):
|
|||||||
"google_maps_api_key",
|
"google_maps_api_key",
|
||||||
"receiver_gps",
|
"receiver_gps",
|
||||||
"map_position_retention_time",
|
"map_position_retention_time",
|
||||||
|
"callsign_service",
|
||||||
"receiver_name",
|
"receiver_name",
|
||||||
)
|
)
|
||||||
filtered_config.wire(self.write_config)
|
filtered_config.wire(self.write_config)
|
||||||
|
@ -158,6 +158,7 @@ class CompiledAssetsController(GzipMixin, ModificationAwareController):
|
|||||||
"lib/settings/OptionalSection.js",
|
"lib/settings/OptionalSection.js",
|
||||||
"lib/settings/SchedulerInput.js",
|
"lib/settings/SchedulerInput.js",
|
||||||
"lib/settings/ExponentialInput.js",
|
"lib/settings/ExponentialInput.js",
|
||||||
|
"lib/settings/LogMessages.js",
|
||||||
"settings.js",
|
"settings.js",
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
@ -168,6 +168,18 @@ class GeneralSettingsController(SettingsFormController):
|
|||||||
infotext="Specifies how log markers / grids will remain visible on the map",
|
infotext="Specifies how log markers / grids will remain visible on the map",
|
||||||
append="s",
|
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.form.input.validator import RequiredValidator
|
||||||
from owrx.property import PropertyLayer
|
from owrx.property import PropertyLayer
|
||||||
from owrx.breadcrumb import BreadcrumbMixin, Breadcrumb, BreadcrumbItem
|
from owrx.breadcrumb import BreadcrumbMixin, Breadcrumb, BreadcrumbItem
|
||||||
|
from owrx.log import HistoryHandler
|
||||||
from abc import ABCMeta, abstractmethod
|
from abc import ABCMeta, abstractmethod
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
|
||||||
@ -279,6 +280,21 @@ class SdrDeviceController(SdrFormControllerWithModal):
|
|||||||
config.store()
|
config.store()
|
||||||
return self.send_redirect("{}settings/sdr".format(self.get_document_root()))
|
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):
|
class NewSdrDeviceController(SettingsFormController):
|
||||||
def __init__(self, handler, request, options):
|
def __init__(self, handler, request, options):
|
||||||
|
@ -581,6 +581,9 @@ class DspManager(SdrSourceEventClient, ClientDemodulatorSecondaryDspEventClient)
|
|||||||
from csdr.chain.digimodes import AudioChopperDemodulator
|
from csdr.chain.digimodes import AudioChopperDemodulator
|
||||||
from owrx.wsjt import WsjtParser
|
from owrx.wsjt import WsjtParser
|
||||||
return AudioChopperDemodulator(mod, WsjtParser())
|
return AudioChopperDemodulator(mod, WsjtParser())
|
||||||
|
elif mod == "msk144":
|
||||||
|
from csdr.chain.digimodes import Msk144Demodulator
|
||||||
|
return Msk144Demodulator()
|
||||||
elif mod == "js8":
|
elif mod == "js8":
|
||||||
from csdr.chain.digimodes import AudioChopperDemodulator
|
from csdr.chain.digimodes import AudioChopperDemodulator
|
||||||
from owrx.js8 import Js8Parser
|
from owrx.js8 import Js8Parser
|
||||||
@ -589,7 +592,7 @@ class DspManager(SdrSourceEventClient, ClientDemodulatorSecondaryDspEventClient)
|
|||||||
from csdr.chain.digimodes import PacketDemodulator
|
from csdr.chain.digimodes import PacketDemodulator
|
||||||
return PacketDemodulator()
|
return PacketDemodulator()
|
||||||
elif mod == "pocsag":
|
elif mod == "pocsag":
|
||||||
from csdr.chain.digimodes import PocsagDemodulator
|
from csdr.chain.digiham import PocsagDemodulator
|
||||||
return PocsagDemodulator()
|
return PocsagDemodulator()
|
||||||
elif mod == "bpsk31":
|
elif mod == "bpsk31":
|
||||||
from csdr.chain.digimodes import PskDemodulator
|
from csdr.chain.digimodes import PskDemodulator
|
||||||
|
@ -80,6 +80,7 @@ class FeatureDetector(object):
|
|||||||
"wsjt-x": ["wsjtx"],
|
"wsjt-x": ["wsjtx"],
|
||||||
"wsjt-x-2-3": ["wsjtx_2_3"],
|
"wsjt-x-2-3": ["wsjtx_2_3"],
|
||||||
"wsjt-x-2-4": ["wsjtx_2_4"],
|
"wsjt-x-2-4": ["wsjtx_2_4"],
|
||||||
|
"msk144": ["msk144decoder"],
|
||||||
"packet": ["direwolf"],
|
"packet": ["direwolf"],
|
||||||
"pocsag": ["digiham"],
|
"pocsag": ["digiham"],
|
||||||
"js8call": ["js8", "js8py"],
|
"js8call": ["js8", "js8py"],
|
||||||
@ -428,7 +429,7 @@ class FeatureDetector(object):
|
|||||||
def has_wsjtx(self):
|
def has_wsjtx(self):
|
||||||
"""
|
"""
|
||||||
To decode FT8 and other digimodes, you need to install the WSJT-X software suite. Please check the
|
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.
|
on how to build from source.
|
||||||
"""
|
"""
|
||||||
return reduce(and_, map(self.command_is_runnable, ["jt9", "wsprd"]), True)
|
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"))
|
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):
|
def has_js8(self):
|
||||||
"""
|
"""
|
||||||
To decode JS8, you will need to install [JS8Call](http://js8call.com/)
|
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
|
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).
|
[its github page](https://github.com/jketterl/js8py).
|
||||||
"""
|
"""
|
||||||
required_version = StrictVersion("0.1")
|
required_version = StrictVersion("0.2")
|
||||||
try:
|
try:
|
||||||
from js8py.version import strictversion
|
from js8py.version import strictversion
|
||||||
|
|
||||||
|
@ -103,11 +103,11 @@ class Js8Parser(AudioChopperParser):
|
|||||||
|
|
||||||
if (isinstance(frame, Js8FrameHeartbeat) or isinstance(frame, Js8FrameCompound)) and frame.grid:
|
if (isinstance(frame, Js8FrameHeartbeat) or isinstance(frame, Js8FrameCompound)) and frame.grid:
|
||||||
Map.getSharedInstance().updateLocation(
|
Map.getSharedInstance().updateLocation(
|
||||||
frame.callsign, LocatorLocation(frame.grid), "JS8", band
|
frame.source, LocatorLocation(frame.grid), "JS8", band
|
||||||
)
|
)
|
||||||
ReportingEngine.getSharedInstance().spot(
|
ReportingEngine.getSharedInstance().spot(
|
||||||
{
|
{
|
||||||
"callsign": frame.callsign,
|
"source": frame.source,
|
||||||
"mode": "JS8",
|
"mode": "JS8",
|
||||||
"locator": frame.grid,
|
"locator": frame.grid,
|
||||||
"freq": freq + frame.freq,
|
"freq": freq + frame.freq,
|
||||||
|
52
owrx/log/__init__.py
Normal file
52
owrx/log/__init__.py
Normal file
@ -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(
|
client.write_update(
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"callsign": callsign,
|
"source": record["source"],
|
||||||
"location": record["location"].__dict__(),
|
"location": record["location"].__dict__(),
|
||||||
"lastseen": record["updated"].timestamp() * 1000,
|
"lastseen": record["updated"].timestamp() * 1000,
|
||||||
"mode": record["mode"],
|
"mode": record["mode"],
|
||||||
"band": record["band"].getName() if record["band"] is not None else None,
|
"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:
|
except ValueError:
|
||||||
pass
|
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()
|
ts = datetime.now()
|
||||||
|
key = self._sourceToKey(source)
|
||||||
with self.positionsLock:
|
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(
|
self.broadcast(
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"callsign": callsign,
|
"source": source,
|
||||||
"location": loc.__dict__(),
|
"location": loc.__dict__(),
|
||||||
"lastseen": ts.timestamp() * 1000,
|
"lastseen": ts.timestamp() * 1000,
|
||||||
"mode": mode,
|
"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!
|
# not implemented on the client side yet, so do not use!
|
||||||
ts = datetime.now()
|
ts = datetime.now()
|
||||||
|
key = self._sourceToKey(source)
|
||||||
with self.positionsLock:
|
with self.positionsLock:
|
||||||
if callsign in self.positions:
|
if key in self.positions:
|
||||||
self.positions[callsign]["updated"] = ts
|
self.positions[key]["updated"] = ts
|
||||||
self.broadcast([{"callsign": callsign, "lastseen": ts.timestamp() * 1000}])
|
self.broadcast([{"source": source, "lastseen": ts.timestamp() * 1000}])
|
||||||
|
|
||||||
def removeLocation(self, callsign):
|
def removeLocation(self, key):
|
||||||
with self.positionsLock:
|
with self.positionsLock:
|
||||||
del self.positions[callsign]
|
del self.positions[key]
|
||||||
# TODO broadcast removal to clients
|
# TODO broadcast removal to clients
|
||||||
|
|
||||||
def removeOldPositions(self):
|
def removeOldPositions(self):
|
||||||
@ -111,9 +118,9 @@ class Map(object):
|
|||||||
retention = timedelta(seconds=pm["map_position_retention_time"])
|
retention = timedelta(seconds=pm["map_position_retention_time"])
|
||||||
cutoff = datetime.now() - retention
|
cutoff = datetime.now() - retention
|
||||||
|
|
||||||
to_be_removed = [callsign for (callsign, pos) in self.positions.items() if pos["updated"] < cutoff]
|
to_be_removed = [key for (key, pos) in self.positions.items() if pos["updated"] < cutoff]
|
||||||
for callsign in to_be_removed:
|
for key in to_be_removed:
|
||||||
self.removeLocation(callsign)
|
self.removeLocation(key)
|
||||||
|
|
||||||
def rebuildPositions(self):
|
def rebuildPositions(self):
|
||||||
logger.debug("rebuilding map storage; size before: %i", sys.getsizeof(self.positions))
|
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)
|
callsign = self.getCallsign(meta)
|
||||||
if callsign is not None and "lat" in meta and "lon" in meta:
|
if callsign is not None and "lat" in meta and "lon" in meta:
|
||||||
loc = LatLngLocation(meta["lat"], meta["lon"])
|
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
|
return meta
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
@ -202,7 +202,7 @@ class DStarEnricher(DigihamEnricher):
|
|||||||
if "ourcall" in meta:
|
if "ourcall" in meta:
|
||||||
# send location info to map as well (it will show up with the correct symbol there!)
|
# send location info to map as well (it will show up with the correct symbol there!)
|
||||||
loc = AprsLocation(data)
|
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:
|
except Exception:
|
||||||
logger.exception("Error while parsing DPRS data")
|
logger.exception("Error while parsing DPRS data")
|
||||||
|
|
||||||
|
@ -55,6 +55,13 @@ class DigitalMode(Mode):
|
|||||||
def get_modulation(self):
|
def get_modulation(self):
|
||||||
return self.get_underlying_mode().get_modulation()
|
return self.get_underlying_mode().get_modulation()
|
||||||
|
|
||||||
|
def for_underlying(self, underlying: str):
|
||||||
|
if underlying not in self.underlying:
|
||||||
|
raise ValueError("{} is not a valid underlying mode for {}".format(underlying, self.modulation))
|
||||||
|
return DigitalMode(
|
||||||
|
self.modulation, self.name, [underlying], self.bandpass, self.requirements, self.service, self.squelch
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class AudioChopperMode(DigitalMode, metaclass=ABCMeta):
|
class AudioChopperMode(DigitalMode, metaclass=ABCMeta):
|
||||||
def __init__(self, modulation, name, bandpass=None, requirements=None):
|
def __init__(self, modulation, name, bandpass=None, requirements=None):
|
||||||
@ -120,6 +127,7 @@ class Modes(object):
|
|||||||
WsjtMode("fst4", "FST4", requirements=["wsjt-x-2-3"]),
|
WsjtMode("fst4", "FST4", requirements=["wsjt-x-2-3"]),
|
||||||
WsjtMode("fst4w", "FST4W", bandpass=Bandpass(1350, 1650), 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"]),
|
WsjtMode("q65", "Q65", requirements=["wsjt-x-2-4"]),
|
||||||
|
DigitalMode("msk144", "MSK144", requirements=["msk144"], underlying=["usb"], service=True),
|
||||||
Js8Mode("js8", "JS8Call"),
|
Js8Mode("js8", "JS8Call"),
|
||||||
DigitalMode(
|
DigitalMode(
|
||||||
"packet",
|
"packet",
|
||||||
|
@ -27,9 +27,9 @@ class PskReporter(Reporter):
|
|||||||
Supports all valid MODE and SUBMODE values from the ADIF standard.
|
Supports all valid MODE and SUBMODE values from the ADIF standard.
|
||||||
|
|
||||||
Current version at the time of the last change:
|
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):
|
def stop(self):
|
||||||
self.cancelTimer()
|
self.cancelTimer()
|
||||||
@ -56,7 +56,7 @@ class PskReporter(Reporter):
|
|||||||
self.timer.start()
|
self.timer.start()
|
||||||
|
|
||||||
def spotEquals(self, s1, s2):
|
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))
|
return reduce(and_, map(lambda key: s1[key] == s2[key], keys))
|
||||||
|
|
||||||
@ -105,27 +105,34 @@ class Uploader(object):
|
|||||||
# filter out any erroneous encodes
|
# filter out any erroneous encodes
|
||||||
encoded = [e for e in encoded if e is not None]
|
encoded = [e for e in encoded if e is not None]
|
||||||
|
|
||||||
def chunks(l, n):
|
def chunks(block, max_size):
|
||||||
"""Yield successive n-sized chunks from l."""
|
size = 0
|
||||||
for i in range(0, len(l), n):
|
current = []
|
||||||
yield l[i : i + n]
|
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()
|
rHeader = self.getReceiverInformationHeader()
|
||||||
rInfo = self.getReceiverInformation()
|
rInfo = self.getReceiverInformation()
|
||||||
sHeader = self.getSenderInformationHeader()
|
sHeader = self.getSenderInformationHeader()
|
||||||
|
|
||||||
packets = []
|
packets = []
|
||||||
# 50 seems to be a safe bet
|
# 1200 bytes of sender data should keep the packet size below MTU for most cases
|
||||||
for chunk in chunks(encoded, 50):
|
for chunk in chunks(encoded, 1200):
|
||||||
sInfo = self.getSenderInformation(chunk)
|
sInfo = self.getSenderInformation(chunk)
|
||||||
length = 16 + len(rHeader) + len(sHeader) + len(rInfo) + len(sInfo)
|
length = 16 + len(rHeader) + len(sHeader) + len(rInfo) + len(sInfo)
|
||||||
header = self.getHeader(length)
|
header = self.getHeader(length)
|
||||||
packets.append(header + rHeader + sHeader + rInfo + sInfo)
|
packets.append(header + rHeader + sHeader + rInfo + sInfo)
|
||||||
|
self.sequence = (self.sequence + len(chunk)) % (1 << 32)
|
||||||
|
|
||||||
return packets
|
return packets
|
||||||
|
|
||||||
def getHeader(self, length):
|
def getHeader(self, length):
|
||||||
self.sequence += 1
|
|
||||||
return bytes(
|
return bytes(
|
||||||
# protocol version
|
# protocol version
|
||||||
[0x00, 0x0A]
|
[0x00, 0x0A]
|
||||||
@ -141,8 +148,8 @@ class Uploader(object):
|
|||||||
def encodeSpot(self, spot):
|
def encodeSpot(self, spot):
|
||||||
try:
|
try:
|
||||||
return bytes(
|
return bytes(
|
||||||
self.encodeString(spot["callsign"])
|
self.encodeString(spot["source"]["callsign"])
|
||||||
+ list(int(spot["freq"]).to_bytes(4, "big"))
|
+ list(int(spot["freq"]).to_bytes(5, "big"))
|
||||||
+ list(int(spot["db"]).to_bytes(1, "big", signed=True))
|
+ list(int(spot["db"]).to_bytes(1, "big", signed=True))
|
||||||
+ self.encodeString(spot["mode"])
|
+ self.encodeString(spot["mode"])
|
||||||
+ self.encodeString(spot["locator"])
|
+ self.encodeString(spot["locator"])
|
||||||
@ -208,7 +215,7 @@ class Uploader(object):
|
|||||||
# senderCallsign
|
# senderCallsign
|
||||||
+ [0x80, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x76, 0x8F]
|
+ [0x80, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x76, 0x8F]
|
||||||
# frequency
|
# frequency
|
||||||
+ [0x80, 0x05, 0x00, 0x04, 0x00, 0x00, 0x76, 0x8F]
|
+ [0x80, 0x05, 0x00, 0x05, 0x00, 0x00, 0x76, 0x8F]
|
||||||
# sNR
|
# sNR
|
||||||
+ [0x80, 0x06, 0x00, 0x01, 0x00, 0x00, 0x76, 0x8F]
|
+ [0x80, 0x06, 0x00, 0x01, 0x00, 0x00, 0x76, 0x8F]
|
||||||
# mode
|
# mode
|
||||||
|
@ -56,7 +56,7 @@ class Worker(threading.Thread):
|
|||||||
# FST4W does not have drift
|
# FST4W does not have drift
|
||||||
"drift": spot["drift"] if "drift" in spot else 0,
|
"drift": spot["drift"] if "drift" in spot else 0,
|
||||||
"tqrg": spot["freq"] / 1e6,
|
"tqrg": spot["freq"] / 1e6,
|
||||||
"tcall": spot["callsign"],
|
"tcall": spot["source"]["callsign"],
|
||||||
"tgrid": spot["locator"],
|
"tgrid": spot["locator"],
|
||||||
"dbm": spot["dbm"],
|
"dbm": spot["dbm"],
|
||||||
"version": openwebrx_version,
|
"version": openwebrx_version,
|
||||||
|
@ -122,6 +122,13 @@ class ServiceHandler(SdrSourceEventClient):
|
|||||||
self.startupTimer.start()
|
self.startupTimer.start()
|
||||||
|
|
||||||
def updateServices(self):
|
def updateServices(self):
|
||||||
|
def addService(dial, source):
|
||||||
|
try:
|
||||||
|
service = self.setupService(dial, source)
|
||||||
|
self.services.append(service)
|
||||||
|
except Exception:
|
||||||
|
logger.exception("Error setting up service {mode} on frequency {frequency}".format(**dial))
|
||||||
|
|
||||||
with self.lock:
|
with self.lock:
|
||||||
logger.debug("re-scheduling services due to sdr changes")
|
logger.debug("re-scheduling services due to sdr changes")
|
||||||
self.stopServices()
|
self.stopServices()
|
||||||
@ -146,7 +153,7 @@ class ServiceHandler(SdrSourceEventClient):
|
|||||||
groups = self.optimizeResampling(dials, sr)
|
groups = self.optimizeResampling(dials, sr)
|
||||||
if groups is None:
|
if groups is None:
|
||||||
for dial in dials:
|
for dial in dials:
|
||||||
self.services.append(self.setupService(dial["mode"], dial["frequency"], self.source))
|
addService(dial, self.source)
|
||||||
else:
|
else:
|
||||||
for group in groups:
|
for group in groups:
|
||||||
if len(group) > 1:
|
if len(group) > 1:
|
||||||
@ -157,14 +164,14 @@ class ServiceHandler(SdrSourceEventClient):
|
|||||||
resampler = Resampler(resampler_props, self.source)
|
resampler = Resampler(resampler_props, self.source)
|
||||||
|
|
||||||
for dial in group:
|
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
|
# resampler goes in after the services since it must not be shutdown as long as the services are
|
||||||
# still running
|
# still running
|
||||||
self.services.append(resampler)
|
self.services.append(resampler)
|
||||||
else:
|
else:
|
||||||
dial = group[0]
|
dial = group[0]
|
||||||
self.services.append(self.setupService(dial["mode"], dial["frequency"], self.source))
|
addService(dial, self.source)
|
||||||
|
|
||||||
def get_min_max(self, group):
|
def get_min_max(self, group):
|
||||||
frequencies = sorted(group, key=lambda f: f["frequency"])
|
frequencies = sorted(group, key=lambda f: f["frequency"])
|
||||||
@ -238,23 +245,26 @@ class ServiceHandler(SdrSourceEventClient):
|
|||||||
return None
|
return None
|
||||||
return best["groups"]
|
return best["groups"]
|
||||||
|
|
||||||
def setupService(self, mode, frequency, source):
|
def setupService(self, dial, source):
|
||||||
logger.debug("setting up service {0} on frequency {1}".format(mode, frequency))
|
logger.debug("setting up service {mode} on frequency {frequency}".format(**dial))
|
||||||
|
|
||||||
modeObject = Modes.findByModulation(mode)
|
modeObject = Modes.findByModulation(dial["mode"])
|
||||||
if not isinstance(modeObject, DigitalMode):
|
if not isinstance(modeObject, DigitalMode):
|
||||||
logger.warning("mode is not a digimode: %s", mode)
|
logger.warning("mode is not a digimode: %s", dial["mode"])
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
if "underlying" in dial:
|
||||||
|
modeObject = modeObject.for_underlying(dial["underlying"])
|
||||||
|
|
||||||
demod = self._getDemodulator(modeObject.get_modulation())
|
demod = self._getDemodulator(modeObject.get_modulation())
|
||||||
secondaryDemod = self._getSecondaryDemodulator(modeObject.modulation)
|
secondaryDemod = self._getSecondaryDemodulator(modeObject.modulation)
|
||||||
center_freq = source.getProps()["center_freq"]
|
center_freq = source.getProps()["center_freq"]
|
||||||
sampleRate = source.getProps()["samp_rate"]
|
sampleRate = source.getProps()["samp_rate"]
|
||||||
bandpass = modeObject.get_bandpass()
|
bandpass = modeObject.get_bandpass()
|
||||||
if isinstance(secondaryDemod, DialFrequencyReceiver):
|
if isinstance(secondaryDemod, DialFrequencyReceiver):
|
||||||
secondaryDemod.setDialFrequency(frequency)
|
secondaryDemod.setDialFrequency(dial["frequency"])
|
||||||
|
|
||||||
chain = ServiceDemodulatorChain(demod, secondaryDemod, sampleRate, frequency - center_freq)
|
chain = ServiceDemodulatorChain(demod, secondaryDemod, sampleRate, dial["frequency"] - center_freq)
|
||||||
chain.setBandPass(bandpass.low_cut, bandpass.high_cut)
|
chain.setBandPass(bandpass.low_cut, bandpass.high_cut)
|
||||||
chain.setReader(source.getBuffer().getReader())
|
chain.setReader(source.getBuffer().getReader())
|
||||||
|
|
||||||
@ -279,11 +289,13 @@ class ServiceHandler(SdrSourceEventClient):
|
|||||||
def _getSecondaryDemodulator(self, mod) -> Optional[ServiceDemodulator]:
|
def _getSecondaryDemodulator(self, mod) -> Optional[ServiceDemodulator]:
|
||||||
if isinstance(mod, ServiceDemodulatorChain):
|
if isinstance(mod, ServiceDemodulatorChain):
|
||||||
return mod
|
return mod
|
||||||
# TODO add remaining modes
|
|
||||||
if mod in ["ft8", "wspr", "jt65", "jt9", "ft4", "fst4", "fst4w", "q65"]:
|
if mod in ["ft8", "wspr", "jt65", "jt9", "ft4", "fst4", "fst4w", "q65"]:
|
||||||
from csdr.chain.digimodes import AudioChopperDemodulator
|
from csdr.chain.digimodes import AudioChopperDemodulator
|
||||||
from owrx.wsjt import WsjtParser
|
from owrx.wsjt import WsjtParser
|
||||||
return AudioChopperDemodulator(mod, WsjtParser())
|
return AudioChopperDemodulator(mod, WsjtParser())
|
||||||
|
elif mod == "msk144":
|
||||||
|
from csdr.chain.digimodes import Msk144Demodulator
|
||||||
|
return Msk144Demodulator()
|
||||||
elif mod == "js8":
|
elif mod == "js8":
|
||||||
from csdr.chain.digimodes import AudioChopperDemodulator
|
from csdr.chain.digimodes import AudioChopperDemodulator
|
||||||
from owrx.js8 import Js8Parser
|
from owrx.js8 import Js8Parser
|
||||||
@ -291,7 +303,8 @@ class ServiceHandler(SdrSourceEventClient):
|
|||||||
elif mod == "packet":
|
elif mod == "packet":
|
||||||
from csdr.chain.digimodes import PacketDemodulator
|
from csdr.chain.digimodes import PacketDemodulator
|
||||||
return PacketDemodulator(service=True)
|
return PacketDemodulator(service=True)
|
||||||
return None
|
|
||||||
|
raise ValueError("unsupported service modulation: {}".format(mod))
|
||||||
|
|
||||||
|
|
||||||
class Services(object):
|
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.converter import OptionalConverter
|
||||||
from owrx.form.input.device import GainInput, SchedulerInput, WaterfallLevelsInput
|
from owrx.form.input.device import GainInput, SchedulerInput, WaterfallLevelsInput
|
||||||
from owrx.form.input.validator import RequiredValidator
|
from owrx.form.input.validator import RequiredValidator
|
||||||
|
from owrx.form.input.converter import Converter
|
||||||
from owrx.form.section import OptionalSection
|
from owrx.form.section import OptionalSection
|
||||||
from owrx.feature import FeatureDetector
|
from owrx.feature import FeatureDetector
|
||||||
|
from owrx.log import LogPipe, HistoryHandler
|
||||||
from typing import List
|
from typing import List
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
@ -114,6 +116,10 @@ class SdrSource(ABC):
|
|||||||
self.commandMapper = None
|
self.commandMapper = None
|
||||||
self.tcpSource = None
|
self.tcpSource = None
|
||||||
self.buffer = 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()
|
self.props = PropertyStack()
|
||||||
|
|
||||||
@ -185,17 +191,17 @@ class SdrSource(ABC):
|
|||||||
for id, p in self.props["profiles"].items():
|
for id, p in self.props["profiles"].items():
|
||||||
props.replaceLayer(0, p)
|
props.replaceLayer(0, p)
|
||||||
if "center_freq" not in props:
|
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
|
continue
|
||||||
if "samp_rate" not in props:
|
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
|
continue
|
||||||
if "start_freq" in props:
|
if "start_freq" in props:
|
||||||
start_freq = props["start_freq"]
|
start_freq = props["start_freq"]
|
||||||
srh = props["samp_rate"] / 2
|
srh = props["samp_rate"] / 2
|
||||||
center_freq = props["center_freq"]
|
center_freq = props["center_freq"]
|
||||||
if start_freq < center_freq - srh or start_freq > center_freq + srh:
|
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):
|
def isAlwaysOn(self):
|
||||||
return "always-on" in self.props and self.props["always-on"]
|
return "always-on" in self.props and self.props["always-on"]
|
||||||
@ -225,11 +231,12 @@ class SdrSource(ABC):
|
|||||||
return [self.getCommandMapper().map(self.getCommandValues())]
|
return [self.getCommandMapper().map(self.getCommandValues())]
|
||||||
|
|
||||||
def activateProfile(self, profile_id):
|
def activateProfile(self, profile_id):
|
||||||
logger.debug("activating profile {0} for {1}".format(profile_id, self.getId()))
|
|
||||||
try:
|
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)
|
self.profileCarousel.switch(profile_id)
|
||||||
except KeyError:
|
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):
|
def getId(self):
|
||||||
return self.id
|
return self.id
|
||||||
@ -249,10 +256,13 @@ class SdrSource(ABC):
|
|||||||
def getPort(self):
|
def getPort(self):
|
||||||
return self.port
|
return self.port
|
||||||
|
|
||||||
|
def _getTcpSourceFormat(self):
|
||||||
|
return Format.COMPLEX_FLOAT
|
||||||
|
|
||||||
def _getTcpSource(self):
|
def _getTcpSource(self):
|
||||||
with self.modificationLock:
|
with self.modificationLock:
|
||||||
if self.tcpSource is None:
|
if self.tcpSource is None:
|
||||||
self.tcpSource = TcpSource(self.port, Format.COMPLEX_FLOAT)
|
self.tcpSource = TcpSource(self.port, self._getTcpSourceFormat())
|
||||||
return self.tcpSource
|
return self.tcpSource
|
||||||
|
|
||||||
def getBuffer(self):
|
def getBuffer(self):
|
||||||
@ -280,23 +290,37 @@ class SdrSource(ABC):
|
|||||||
try:
|
try:
|
||||||
self.preStart()
|
self.preStart()
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.exception("Exception during preStart()")
|
self.logger.exception("Exception during preStart()")
|
||||||
|
|
||||||
cmd = self.getCommand()
|
cmd = self.getCommand()
|
||||||
cmd = [c for c in cmd if c is not None]
|
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
|
# don't use shell mode for commands without piping
|
||||||
if len(cmd) > 1:
|
if len(cmd) > 1:
|
||||||
# multiple commands with pipes
|
# multiple commands with pipes
|
||||||
cmd = "|".join(cmd)
|
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:
|
else:
|
||||||
# single command
|
# single command
|
||||||
cmd = cmd[0]
|
cmd = cmd[0]
|
||||||
# start_new_session can go as soon as there's no piped commands left
|
# 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
|
# 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)
|
self.process = subprocess.Popen(
|
||||||
logger.info("Started sdr source: " + cmd)
|
shlex.split(cmd),
|
||||||
|
start_new_session=True,
|
||||||
|
stdout=self.stdoutPipe,
|
||||||
|
stderr=self.stderrPipe
|
||||||
|
)
|
||||||
|
self.logger.info("Started sdr source: " + cmd)
|
||||||
|
|
||||||
available = False
|
available = False
|
||||||
failed = False
|
failed = False
|
||||||
@ -304,9 +328,13 @@ class SdrSource(ABC):
|
|||||||
def wait_for_process_to_end():
|
def wait_for_process_to_end():
|
||||||
nonlocal failed
|
nonlocal failed
|
||||||
rc = self.process.wait()
|
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.process = None
|
||||||
self.monitor = None
|
self.monitor = None
|
||||||
|
self.stdoutPipe.close()
|
||||||
|
self.stdoutPipe = None
|
||||||
|
self.stderrPipe.close()
|
||||||
|
self.stderrPipe = None
|
||||||
if self.getState() is SdrSourceState.RUNNING:
|
if self.getState() is SdrSourceState.RUNNING:
|
||||||
self.fail()
|
self.fail()
|
||||||
else:
|
else:
|
||||||
@ -337,7 +365,7 @@ class SdrSource(ABC):
|
|||||||
try:
|
try:
|
||||||
self.postStart()
|
self.postStart()
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.exception("Exception during postStart()")
|
self.logger.exception("Exception during postStart()")
|
||||||
failed = True
|
failed = True
|
||||||
|
|
||||||
if failed:
|
if failed:
|
||||||
@ -371,7 +399,7 @@ class SdrSource(ABC):
|
|||||||
self.monitor.join(10)
|
self.monitor.join(10)
|
||||||
# if the monitor is still running, the process still hasn't ended, so kill it
|
# if the monitor is still running, the process still hasn't ended, so kill it
|
||||||
if self.monitor:
|
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)
|
os.killpg(os.getpgid(self.process.pid), signal.SIGKILL)
|
||||||
except ProcessLookupError:
|
except ProcessLookupError:
|
||||||
# been killed by something else, ignore
|
# been killed by something else, ignore
|
||||||
@ -479,6 +507,32 @@ class SdrDeviceDescriptionMissing(Exception):
|
|||||||
pass
|
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):
|
class SdrDeviceDescription(object):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def getByType(sdr_type: str) -> "SdrDeviceDescription":
|
def getByType(sdr_type: str) -> "SdrDeviceDescription":
|
||||||
@ -536,6 +590,7 @@ class SdrDeviceDescription(object):
|
|||||||
|
|
||||||
def getInputs(self) -> List[Input]:
|
def getInputs(self) -> List[Input]:
|
||||||
return [
|
return [
|
||||||
|
SdrDeviceTypeDisplay("type", "Device type"),
|
||||||
CheckboxInput("enabled", "Enable this device", converter=OptionalConverter(defaultFormValue=True)),
|
CheckboxInput("enabled", "Enable this device", converter=OptionalConverter(defaultFormValue=True)),
|
||||||
GainInput("rf_gain", "Device gain", self.hasAgc()),
|
GainInput("rf_gain", "Device gain", self.hasAgc()),
|
||||||
NumberInput(
|
NumberInput(
|
||||||
@ -573,7 +628,7 @@ class SdrDeviceDescription(object):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def getDeviceMandatoryKeys(self):
|
def getDeviceMandatoryKeys(self):
|
||||||
return ["name", "enabled"]
|
return ["name", "type", "enabled"]
|
||||||
|
|
||||||
def getDeviceOptionalKeys(self):
|
def getDeviceOptionalKeys(self):
|
||||||
keys = [
|
keys = [
|
||||||
|
@ -6,10 +6,6 @@ from owrx.command import Flag, Option
|
|||||||
from typing import List
|
from typing import List
|
||||||
from owrx.form.input import Input, NumberInput, CheckboxInput
|
from owrx.form.input import Input, NumberInput, CheckboxInput
|
||||||
|
|
||||||
import logging
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class ConnectorSource(SdrSource):
|
class ConnectorSource(SdrSource):
|
||||||
def __init__(self, id, props):
|
def __init__(self, id, props):
|
||||||
@ -40,7 +36,7 @@ class ConnectorSource(SdrSource):
|
|||||||
for prop, value in changes.items():
|
for prop, value in changes.items():
|
||||||
if value is PropertyDeleted:
|
if value is PropertyDeleted:
|
||||||
value = None
|
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())
|
self.controlSocket.sendall("{prop}:{value}\n".format(prop=prop, value=value).encode())
|
||||||
|
|
||||||
def onPropertyChange(self, changes):
|
def onPropertyChange(self, changes):
|
||||||
@ -56,7 +52,7 @@ class ConnectorSource(SdrSource):
|
|||||||
self.sendControlMessage(changes)
|
self.sendControlMessage(changes)
|
||||||
|
|
||||||
def postStart(self):
|
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 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
self.controlSocket.connect(("localhost", self.controlPort))
|
self.controlSocket.connect(("localhost", self.controlPort))
|
||||||
|
|
||||||
|
@ -5,14 +5,14 @@ from typing import Optional
|
|||||||
from pycsdr.modules import Buffer
|
from pycsdr.modules import Buffer
|
||||||
from pycsdr.types import Format
|
from pycsdr.types import Format
|
||||||
|
|
||||||
import logging
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class DirectSource(SdrSource, metaclass=ABCMeta):
|
class DirectSource(SdrSource, metaclass=ABCMeta):
|
||||||
|
def __init__(self, id, props):
|
||||||
|
self._conversion = None
|
||||||
|
super().__init__(id, props)
|
||||||
|
|
||||||
def onPropertyChange(self, changes):
|
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.stop()
|
||||||
self.sleepOnRestart()
|
self.sleepOnRestart()
|
||||||
self.start()
|
self.start()
|
||||||
@ -48,6 +48,10 @@ class DirectSource(SdrSource, metaclass=ABCMeta):
|
|||||||
def getFormatConversion(self) -> Optional[Chain]:
|
def getFormatConversion(self) -> Optional[Chain]:
|
||||||
return None
|
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
|
# override this in subclasses, if necessary
|
||||||
def sleepOnRestart(self):
|
def sleepOnRestart(self):
|
||||||
pass
|
pass
|
||||||
@ -57,12 +61,12 @@ class DirectSource(SdrSource, metaclass=ABCMeta):
|
|||||||
source = self._getTcpSource()
|
source = self._getTcpSource()
|
||||||
buffer = Buffer(source.getOutputFormat())
|
buffer = Buffer(source.getOutputFormat())
|
||||||
source.setWriter(buffer)
|
source.setWriter(buffer)
|
||||||
conversion = self.getFormatConversion()
|
self._conversion = self.getFormatConversion()
|
||||||
if conversion is not None:
|
if self._conversion is not None:
|
||||||
conversion.setReader(buffer.getReader())
|
self._conversion.setReader(buffer.getReader())
|
||||||
# this one must be COMPLEX_FLOAT
|
# this one must be COMPLEX_FLOAT
|
||||||
buffer = Buffer(Format.COMPLEX_FLOAT)
|
buffer = Buffer(Format.COMPLEX_FLOAT)
|
||||||
conversion.setWriter(buffer)
|
self._conversion.setWriter(buffer)
|
||||||
self.buffer = buffer
|
self.buffer = buffer
|
||||||
return self.buffer
|
return self.buffer
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
from owrx.command import Option
|
from owrx.command import Option
|
||||||
from owrx.source.direct import DirectSource, DirectSourceDeviceDescription
|
from owrx.source.direct import DirectSource, DirectSourceDeviceDescription
|
||||||
|
from owrx.log import LogPipe
|
||||||
from subprocess import Popen
|
from subprocess import Popen
|
||||||
from csdr.chain import Chain
|
from csdr.chain import Chain
|
||||||
from pycsdr.modules import Convert, Gain
|
from pycsdr.modules import Convert, Gain
|
||||||
from pycsdr.types import Format
|
from pycsdr.types import Format
|
||||||
|
from typing import List
|
||||||
|
from owrx.form.input import Input, TextInput
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class FifiSdrSource(DirectSource):
|
class FifiSdrSource(DirectSource):
|
||||||
def getCommandMapper(self):
|
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)])
|
return Chain([Convert(Format.COMPLEX_SHORT, Format.COMPLEX_FLOAT), Gain(Format.COMPLEX_FLOAT, 5.0)])
|
||||||
|
|
||||||
def sendRockProgFrequency(self, frequency):
|
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()
|
process.communicate()
|
||||||
rc = process.wait()
|
rc = process.wait()
|
||||||
if rc != 0:
|
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):
|
def preStart(self):
|
||||||
values = self.getCommandValues()
|
values = self.getCommandValues()
|
||||||
@ -49,3 +57,15 @@ class FifiSdrDeviceDescription(DirectSourceDeviceDescription):
|
|||||||
def supportsPpm(self):
|
def supportsPpm(self):
|
||||||
# not currently mapped, and it's unclear how this should be sent to the device
|
# not currently mapped, and it's unclear how this should be sent to the device
|
||||||
return False
|
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 pycsdr.types import Format
|
||||||
from csdr.chain import Chain
|
from csdr.chain import Chain
|
||||||
|
|
||||||
import logging
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class Resampler(SdrSource):
|
class Resampler(SdrSource):
|
||||||
def onPropertyChange(self, changes):
|
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):
|
def __init__(self, props, sdr):
|
||||||
sdrProps = sdr.getProps()
|
sdrProps = sdr.getProps()
|
||||||
@ -41,7 +37,7 @@ class Resampler(SdrSource):
|
|||||||
super().stop()
|
super().stop()
|
||||||
|
|
||||||
def activateProfile(self, profile_id=None):
|
def activateProfile(self, profile_id=None):
|
||||||
logger.warning("Resampler does not support setting profiles")
|
self.logger.warning("Resampler does not support setting profiles")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def validateProfiles(self):
|
def validateProfiles(self):
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from distutils.version import LooseVersion
|
from distutils.version import LooseVersion
|
||||||
|
|
||||||
_versionstring = "1.2.0"
|
_versionstring = "1.3.0-dev"
|
||||||
looseversion = LooseVersion(_versionstring)
|
looseversion = LooseVersion(_versionstring)
|
||||||
openwebrx_version = "v{0}".format(looseversion)
|
openwebrx_version = "v{0}".format(looseversion)
|
||||||
|
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]
|
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):
|
class WsjtParser(AudioChopperParser):
|
||||||
def parse(self, profile: WsjtProfile, freq: int, raw_msg: bytes):
|
def parse(self, profile: WsjtProfile, freq: int, raw_msg: bytes):
|
||||||
try:
|
try:
|
||||||
@ -276,9 +287,9 @@ class WsjtParser(AudioChopperParser):
|
|||||||
out["interval"] = profile.getInterval()
|
out["interval"] = profile.getInterval()
|
||||||
|
|
||||||
self.pushDecode(mode, band)
|
self.pushDecode(mode, band)
|
||||||
if "callsign" in out and "locator" in out:
|
if "source" in out and "locator" in out:
|
||||||
Map.getSharedInstance().updateLocation(
|
Map.getSharedInstance().updateLocation(
|
||||||
out["callsign"], LocatorLocation(out["locator"]), mode, band
|
out["source"], LocatorLocation(out["locator"]), mode, band
|
||||||
)
|
)
|
||||||
ReportingEngine.getSharedInstance().spot(out)
|
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
|
# 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.
|
# likely this just means roger roger goodbye.
|
||||||
if m.group(3) == "RR73":
|
if m.group(3) == "RR73":
|
||||||
return {"callsign": m.group(1)}
|
return {"source": {"callsign": m.group(1)}}
|
||||||
return {"callsign": m.group(1), "locator": m.group(3)}
|
return {"source": {"callsign": m.group(1)}, "locator": m.group(3)}
|
||||||
|
|
||||||
|
|
||||||
# Used in propagation reporting / beacon modes (WSPR / FST4W)
|
# Used in propagation reporting / beacon modes (WSPR / FST4W)
|
||||||
@ -354,7 +365,7 @@ class BeaconMessageParser(MessageParser):
|
|||||||
m = BeaconMessageParser.wspr_splitter_pattern.match(msg)
|
m = BeaconMessageParser.wspr_splitter_pattern.match(msg)
|
||||||
if m is None:
|
if m is None:
|
||||||
return {}
|
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):
|
class Jt9Decoder(Decoder):
|
||||||
@ -366,6 +377,8 @@ class Jt9Decoder(Decoder):
|
|||||||
# '0003 -4 0.4 1762 # CQ R2ABM KO85'
|
# '0003 -4 0.4 1762 # CQ R2ABM KO85'
|
||||||
# fst4 sample
|
# fst4 sample
|
||||||
# '**** -23 0.6 3023 ` <...> <...> R 591631 BI53PV'
|
# '**** -23 0.6 3023 ` <...> <...> R 591631 BI53PV'
|
||||||
|
# MSK144 sample
|
||||||
|
# '221602 8 0.4 1488 & K1JT WA4CQG EM72'
|
||||||
msg, timestamp = self.parse_timestamp(msg)
|
msg, timestamp = self.parse_timestamp(msg)
|
||||||
wsjt_msg = msg[17:53].strip()
|
wsjt_msg = msg[17:53].strip()
|
||||||
|
|
||||||
|
18
setup.py
18
setup.py
@ -14,22 +14,8 @@ setup(
|
|||||||
version=str(looseversion),
|
version=str(looseversion),
|
||||||
packages=find_namespace_packages(
|
packages=find_namespace_packages(
|
||||||
include=[
|
include=[
|
||||||
"owrx",
|
"owrx*",
|
||||||
"owrx.source",
|
"csdr*",
|
||||||
"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",
|
|
||||||
"htdocs",
|
"htdocs",
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
|
Reference in New Issue
Block a user