From be2182b23d12e09ed732b142cdf00114478c11cd Mon Sep 17 00:00:00 2001 From: Bob Larkin Date: Sun, 13 Nov 2022 23:32:48 -0800 Subject: [PATCH] Added distance to station. --- examples/FT8Receive/FT8Receive.ino | 10 ++++++++-- examples/FT8Receive/Process_DSP_R.ino | 19 +++++++++---------- examples/FT8Receive/decode_ft8R.ino | 8 +++++++- examples/FT8Receive/locatorR.ino | 7 ++----- 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/examples/FT8Receive/FT8Receive.ino b/examples/FT8Receive/FT8Receive.ino index 4315709..7cfe373 100644 --- a/examples/FT8Receive/FT8Receive.ino +++ b/examples/FT8Receive/FT8Receive.ino @@ -129,6 +129,8 @@ int Target_Flag = 0; char Target_Call[7]; //six character call sign + /0 char Target_Locator[5]; // four character locator + /0 int Target_RSL; // four character RSL + /0 +float32_t Station_Latitude, Station_Longitude; +float32_t Target_Latitude, Target_Longitude; // Define FT8 symbol counts int ND = 58; @@ -158,10 +160,14 @@ uint8_t secLast = 0; const int ledPin = 13; bool showPower = false; uint32_t tp = 0; - uint32_t tu; - uint32_t ct=0; +uint32_t tu; +uint32_t ct=0; void setup(void) { + strcpy(Station_Call, "W7PUA"); + strcpy(home_Locator, "CN84"); + Station_Latitude = mh2latf(home_Locator); + Station_Longitude = mh2lonf(home_Locator); // set the Time library to use Teensy 4.x's RTC to keep time setSyncProvider(getTeensy3Time); AudioMemory_F32(50, audio_settings); diff --git a/examples/FT8Receive/Process_DSP_R.ino b/examples/FT8Receive/Process_DSP_R.ino index 1461ad3..aad8129 100644 --- a/examples/FT8Receive/Process_DSP_R.ino +++ b/examples/FT8Receive/Process_DSP_R.ino @@ -48,21 +48,20 @@ float fftOutput[2048]; float window[2048]; // Change to 1024 by symmetry <<<<<<<<<<<<<<<<<<< arm_rfft_fast_instance_f32 Sfft; - - float32_t powerSum = 0.0f; // Use these for snr estimate - float32_t runningSum = 0.0f; - float32_t powerMax = 0.0f; - float32_t runningMax = 0.0f; - float32_t noiseBuffer[8]; // Circular storage - uint16_t noiseBufferWrite = 0; // Array index - bool noiseMeasured = false; // <<<<<