kopia lustrzana https://github.com/projecthorus/radiosonde_auto_rx
Merge remote-tracking branch 'upstream/testing' into testing
commit
027f107609
17
Dockerfile
17
Dockerfile
|
|
@ -6,8 +6,20 @@ FROM python:3.7-buster AS build
|
|||
# Upgrade base packages.
|
||||
RUN apt-get update && \
|
||||
apt-get upgrade -y && \
|
||||
apt-get install -y \
|
||||
cmake \
|
||||
libusb-1.0-0-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Compile rtl-sdr from source.
|
||||
RUN git clone https://github.com/steve-m/librtlsdr.git /root/librtlsdr && \
|
||||
mkdir -p /root/librtlsdr/build && \
|
||||
cd /root/librtlsdr/build && \
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/root/target/usr/local -Wno-dev ../ && \
|
||||
make && \
|
||||
make install && \
|
||||
rm -rf /root/librtlsdr
|
||||
|
||||
# Copy in requirements.txt.
|
||||
COPY auto_rx/requirements.txt \
|
||||
/root/radiosonde_auto_rx/auto_rx/requirements.txt
|
||||
|
|
@ -41,13 +53,16 @@ RUN case $(uname -m) in \
|
|||
apt-get install -y \
|
||||
libatomic1 \
|
||||
rng-tools \
|
||||
rtl-sdr \
|
||||
sox \
|
||||
tini \
|
||||
usbutils \
|
||||
${extra_packages} && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy rtl-sdr from the build container.
|
||||
COPY --from=build /root/target /
|
||||
RUN ldconfig
|
||||
|
||||
# Copy any additional Python packages from the build container.
|
||||
COPY --from=build /root/.local /root/.local
|
||||
|
||||
|
|
|
|||
|
|
@ -10,15 +10,26 @@ RUN case $(uname -m) in \
|
|||
apt-get update && \
|
||||
apt-get upgrade -y && \
|
||||
apt-get install -y \
|
||||
cmake \
|
||||
libatomic1 \
|
||||
libusb-1.0-0-dev \
|
||||
rng-tools \
|
||||
rtl-sdr \
|
||||
sox \
|
||||
tini \
|
||||
usbutils \
|
||||
${extra_packages} && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Compile rtl-sdr from source and install.
|
||||
RUN git clone https://github.com/steve-m/librtlsdr.git /root/librtlsdr && \
|
||||
mkdir -p /root/librtlsdr/build && \
|
||||
cd /root/librtlsdr/build && \
|
||||
cmake -Wno-dev ../ && \
|
||||
make && \
|
||||
make install && \
|
||||
rm -rf /root/librtlsdr && \
|
||||
ldconfig
|
||||
|
||||
# Copy in requirements.txt.
|
||||
COPY auto_rx/requirements.txt \
|
||||
/tmp/requirements.txt
|
||||
|
|
|
|||
|
|
@ -192,27 +192,19 @@
|
|||
if (bearingRounded in polygonData) {
|
||||
if (parseFloat(value['first']['range_km']) > polygonData[bearingRounded][0]) {
|
||||
polygonData[bearingRounded] = [parseFloat(value['first']['range_km']), parseFloat(value['first']['lat']), parseFloat(value['first']['lon'])]
|
||||
edge_lat = parseFloat(value['first']['lat']);
|
||||
edge_lon = parseFloat(value['first']['lon']);
|
||||
}
|
||||
} else {
|
||||
polygonData[bearingRounded] = [parseFloat(value['first']['range_km']), parseFloat(value['first']['lat']), parseFloat(value['first']['lon'])]
|
||||
edge_lat = parseFloat(value['first']['lat']);
|
||||
edge_lon = parseFloat(value['first']['lon']);
|
||||
}
|
||||
bearingRounded = Math.round(parseFloat(value['last']['bearing'])/divisorValue)*divisorValue;
|
||||
if (bearingRounded in polygonData) {
|
||||
if (parseFloat(value['last']['range_km']) > polygonData[bearingRounded][0]) {
|
||||
polygonData[bearingRounded] = [parseFloat(value['last']['range_km']), parseFloat(value['last']['lat']), parseFloat(value['last']['lon'])]
|
||||
edge_lat = parseFloat(value['last']['lat']);
|
||||
edge_lon = parseFloat(value['last']['lon']);
|
||||
}
|
||||
} else {
|
||||
polygonData[bearingRounded] = [parseFloat(value['last']['range_km']), parseFloat(value['last']['lat']), parseFloat(value['last']['lon'])]
|
||||
edge_lat = parseFloat(value['last']['lat']);
|
||||
edge_lon = parseFloat(value['last']['lon']);
|
||||
}
|
||||
layerBounds.extend([edge_lat, edge_lon]);
|
||||
|
||||
} catch (err) {}
|
||||
}
|
||||
//create polygon
|
||||
|
|
@ -221,6 +213,9 @@
|
|||
for (const [key, value] of Object.entries(polygonData)) {
|
||||
tempLatLng = [value[1], value[2]];
|
||||
polygonLatLngs.push(tempLatLng);
|
||||
edge_lat = value[1];
|
||||
edge_lon = value[2];
|
||||
layerBounds.extend([edge_lat, edge_lon]);
|
||||
}
|
||||
|
||||
var polygonTesting = L.polygon(polygonLatLngs, {color: 'red'});
|
||||
|
|
@ -714,7 +709,7 @@
|
|||
table.selectRow();
|
||||
mymap.eachLayer(function(layer){
|
||||
try {
|
||||
if (layer['options']['icon']['options']['iconUrl'] == "/static/img/landing_marker.png") {
|
||||
if (layer['options']['icon']['options']['iconUrl'] == "/static/img/landing_marker.png" || layer['options']['icon']['options']['iconUrl'] == "/static/img/launch_marker.png") {
|
||||
new_icon = layer['options']['icon'];
|
||||
new_icon.options.iconSize = [20, 20];
|
||||
new_icon.options.iconAnchor = [10, 10];
|
||||
|
|
@ -729,7 +724,7 @@
|
|||
table.deselectRow();
|
||||
mymap.eachLayer(function(layer){
|
||||
try {
|
||||
if (layer['options']['icon']['options']['iconUrl'] == "/static/img/landing_marker.png") {
|
||||
if (layer['options']['icon']['options']['iconUrl'] == "/static/img/landing_marker.png" || layer['options']['icon']['options']['iconUrl'] == "/static/img/launch_marker.png") {
|
||||
new_icon = layer['options']['icon'];
|
||||
new_icon.options.iconSize = [15, 15];
|
||||
new_icon.options.iconAnchor = [7.5, 7.5];
|
||||
|
|
|
|||
|
|
@ -671,12 +671,7 @@
|
|||
sonde_id_data.vel_h = (sonde_id_data.vel_h*3.6).toFixed(1);
|
||||
// Add a link to HabHub if we have habitat enabled.
|
||||
if (autorx_config.sondehub_enabled == true) {
|
||||
// Add a link to HabHub card if sonde is old.
|
||||
if (sonde_id_data.age != "old") {
|
||||
sonde_id_data.id = "<a href='http://sondehub.org/" + sonde_id.replace(/^(DFM|M10|M20|IMET|IMET54|MRZ)-/,"") + "' target='_blank'>" + sonde_id + "</a>";
|
||||
} else {
|
||||
sonde_id_data.id = "<a href='http://sondehub.org/card/" + sonde_id.replace(/^(DFM|M10|M20|IMET|IMET54|MRZ)-/,"") + "' target='_blank'>" + sonde_id + "</a>";
|
||||
}
|
||||
// These links are only going to work for Vaisala radiosondes since the APRS callsign is never passed through to the web interface,
|
||||
// and the APRS callsigns for everything other than RS41s and RS92s is different to the 'full' serials
|
||||
} else if (autorx_config.aprs_enabled == true && autorx_config.aprs_server == "radiosondy.info") {
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue