From e2472fe9e08fa3afcd161e213e7b50f79a8e6f74 Mon Sep 17 00:00:00 2001 From: "Stanislav Lechev [0xAF]" Date: Fri, 27 Dec 2024 01:40:05 +0200 Subject: [PATCH] fix doppler plugin --- receiver/doppler/doppler.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/receiver/doppler/doppler.js b/receiver/doppler/doppler.js index a4d3115..75e7acf 100644 --- a/receiver/doppler/doppler.js +++ b/receiver/doppler/doppler.js @@ -71,11 +71,11 @@ Plugins.doppler.init = async function () { } $("#satellite-name").text(data.name); $("#satellite-track").addClass('highlighted').text("STOP"); + var demodulator = $('#openwebrx-panel-receiver').demodulatorPanel().getDemodulator(); + startFreq = demodulator.get_offset_frequency() + center_freq; Plugins.doppler.intervalId = setInterval(() => { - var demodulator = $('#openwebrx-panel-receiver').demodulatorPanel().getDemodulator(); - curFreq = demodulator.get_offset_frequency() + center_freq; - newFreq = AF_GetDoppler(data.line1, data.line2, receiverPos.lat, receiverPos.lon, curFreq); - // newFreqAF = AF_GetDoppler(data.line1, data.line2, receiverPos.lat, receiverPos.lon, curFreq); + newFreq = AF_GetDoppler(data.line1, data.line2, receiverPos.lat, receiverPos.lon, startFreq); + // newFreqAF = AF_GetDoppler(data.line1, data.line2, receiverPos.lat, receiverPos.lon, startFreq); // console.log(`NewFreq: Sergey's: ${newFreq}, AF: ${newFreqAF}`); demodulator.set_offset_frequency(newFreq - center_freq); }, 1000); @@ -112,7 +112,3 @@ Plugins.doppler.init = async function () { return true; } - - - -