Merge branch 'develop' of https://github.com/luarvique/openwebrx into develop

This commit is contained in:
Marat Fayzullin 2022-10-25 20:11:15 -04:00
commit 67e9e302c2
9 changed files with 77 additions and 18 deletions

View File

@ -1,5 +1,9 @@
**unreleased**
**1.2.1**
- FifiSDR support fixed (pipeline formats now line up correctly)
- Added "Device" input for FifiSDR devices for sound card selection
**1.2.0**
- Major rewrite of all demodulation components to make use of the new csdr/pycsdr and digiham/pydigiham demodulator
modules

9
debian/changelog vendored
View File

@ -1,6 +1,13 @@
openwebrx (1.3.0) UNRELEASED; urgency=low
-- Jakob Ketterl <jakob.ketterl@gmx.de> Thu, 16 Jun 2022 21:47:00 +0000
-- Jakob Ketterl <jakob.ketterl@gmx.de> Fri, 30 Sep 2022 16:47:00 +0000
openwebrx (1.2.1) bullseye jammy; urgency=low
* FifiSDR support fixed (pipeline formats now line up correctly)
* Added "Device" input for FifiSDR devices for sound card selection
-- Jakob Ketterl <jakob.ketterl@gmx.de> Tue, 20 Sep 2022 16:01:00 +0000
openwebrx (1.2.0) bullseye jammy; urgency=low

View File

@ -24,7 +24,7 @@ apt-get update
apt-get -y install --no-install-recommends $BUILD_PACKAGES
git clone https://github.com/jketterl/owrx_connector.git
cmakebuild owrx_connector 0.6.0
cmakebuild owrx_connector 0.6.1
apt-get -y purge --autoremove $BUILD_PACKAGES
apt-get clean

View File

@ -25,7 +25,7 @@ apt-get update
apt-get -y install --no-install-recommends $STATIC_PACKAGES $BUILD_PACKAGES
git clone https://github.com/jketterl/runds_connector.git
cmakebuild runds_connector 0.2.1
cmakebuild runds_connector 0.2.2
apt-get -y purge --autoremove $BUILD_PACKAGES
apt-get clean

View File

@ -31,11 +31,11 @@ popd
rm -rf js8py
git clone https://github.com/jketterl/csdr.git
cmakebuild csdr 0.18.0
cmakebuild csdr 0.18.1
git clone https://github.com/jketterl/pycsdr.git
cd pycsdr
git checkout 0.18.0
git checkout 0.18.1
./setup.py install install_headers
cd ..
rm -rf pycsdr
@ -46,11 +46,11 @@ cp codecserver/conf/codecserver.conf /usr/local/etc/codecserver
cmakebuild codecserver 0.2.0
git clone https://github.com/jketterl/digiham.git
cmakebuild digiham 0.6.0
cmakebuild digiham 0.6.1
git clone https://github.com/jketterl/pydigiham.git
cd pydigiham
git checkout 0.6.0
git checkout 0.6.1
./setup.py install
cd ..
rm -rf pydigiham

View File

@ -342,17 +342,34 @@ $(function(){
delete infowindow.locator;
delete infowindow.callsign;
return infowindow;
}
};
var linkifyCallsign = function(callsign) {
if ((callsign_url == null) || (callsign_url == ''))
return callsign;
else
return '<a target="callsign_info" href="' +
callsign_url.replaceAll('{}', callsign) +
callsign_url.replaceAll('{}', callsign.replace(new RegExp('-.*$'), '')) +
'">' + callsign + '</a>';
};
var distanceKm = function(p1, p2) {
// Earth radius in km
var R = 6371.0;
// Convert degrees to radians
var rlat1 = p1.lat() * (Math.PI/180);
var rlat2 = p2.lat() * (Math.PI/180);
// Compute difference in radians
var difflat = rlat2-rlat1;
var difflon = (p2.lng()-p1.lng()) * (Math.PI/180);
// Compute distance
d = 2 * R * Math.asin(Math.sqrt(
Math.sin(difflat/2) * Math.sin(difflat/2) +
Math.cos(rlat1) * Math.cos(rlat2) * Math.sin(difflon/2) * Math.sin(difflon/2)
));
return Math.round(d);
};
var infowindow;
var showLocatorInfoWindow = function(locator, pos) {
var infowindow = getInfoWindow();
@ -364,8 +381,10 @@ $(function(){
}).sort(function(a, b){
return b.lastseen - a.lastseen;
});
var distance = receiverMarker?
" at " + distanceKm(receiverMarker.position, pos) + " km" : "";
infowindow.setContent(
'<h3>Locator: ' + locator + '</h3>' +
'<h3>Locator: ' + locator + distance + '</h3>' +
'<div>Active Callsigns:</div>' +
'<ul>' +
inLocator.map(function(i){
@ -387,16 +406,20 @@ $(function(){
var marker = markers[callsign];
var timestring = moment(marker.lastseen).fromNow();
var commentString = "";
var distance = "";
if (marker.comment) {
commentString = '<div>' + marker.comment + '</div>';
}
if (receiverMarker) {
distance = " at " + distanceKm(receiverMarker.position, marker.position) + " km";
}
infowindow.setContent(
'<h3>' + linkifyCallsign(callsign) + '</h3>' +
'<h3>' + linkifyCallsign(callsign) + distance + '</h3>' +
'<div>' + timestring + ' using ' + marker.mode + ( marker.band ? ' on ' + marker.band : '' ) + '</div>' +
commentString
);
infowindow.open(map, marker);
}
};
var showReceiverInfoWindow = function(marker) {
var infowindow = getInfoWindow()
@ -405,7 +428,7 @@ $(function(){
'<div>Receiver location</div>'
);
infowindow.open(map, marker);
}
};
var getScale = function(lastseen) {
var age = new Date().getTime() - lastseen;

View File

@ -249,10 +249,13 @@ class SdrSource(ABC):
def getPort(self):
return self.port
def _getTcpSourceFormat(self):
return Format.COMPLEX_FLOAT
def _getTcpSource(self):
with self.modificationLock:
if self.tcpSource is None:
self.tcpSource = TcpSource(self.port, Format.COMPLEX_FLOAT)
self.tcpSource = TcpSource(self.port, self._getTcpSourceFormat())
return self.tcpSource
def getBuffer(self):

View File

@ -11,6 +11,10 @@ logger = logging.getLogger(__name__)
class DirectSource(SdrSource, metaclass=ABCMeta):
def __init__(self, id, props):
self._conversion = None
super().__init__(id, props)
def onPropertyChange(self, changes):
logger.debug("restarting sdr source due to property changes: {0}".format(changes))
self.stop()
@ -48,6 +52,10 @@ class DirectSource(SdrSource, metaclass=ABCMeta):
def getFormatConversion(self) -> Optional[Chain]:
return None
def _getTcpSourceFormat(self):
conversion = self.getFormatConversion()
return Format.COMPLEX_FLOAT if conversion is None else conversion.getInputFormat()
# override this in subclasses, if necessary
def sleepOnRestart(self):
pass
@ -57,12 +65,12 @@ class DirectSource(SdrSource, metaclass=ABCMeta):
source = self._getTcpSource()
buffer = Buffer(source.getOutputFormat())
source.setWriter(buffer)
conversion = self.getFormatConversion()
if conversion is not None:
conversion.setReader(buffer.getReader())
self._conversion = self.getFormatConversion()
if self._conversion is not None:
self._conversion.setReader(buffer.getReader())
# this one must be COMPLEX_FLOAT
buffer = Buffer(Format.COMPLEX_FLOAT)
conversion.setWriter(buffer)
self._conversion.setWriter(buffer)
self.buffer = buffer
return self.buffer

View File

@ -4,6 +4,8 @@ from subprocess import Popen
from csdr.chain import Chain
from pycsdr.modules import Convert, Gain
from pycsdr.types import Format
from typing import List
from owrx.form.input import Input, TextInput
import logging
@ -49,3 +51,15 @@ class FifiSdrDeviceDescription(DirectSourceDeviceDescription):
def supportsPpm(self):
# not currently mapped, and it's unclear how this should be sent to the device
return False
def getInputs(self) -> List[Input]:
return super().getInputs() + [
TextInput(
"device",
"Device identifier",
infotext="Alsa audio device identifier",
),
]
def getDeviceOptionalKeys(self):
return super().getDeviceOptionalKeys() + ["device"]