drowe67 / freedv-gui

GUI Application for FreeDV – open source digital voice for HF radio
https://freedv.org/
GNU Lesser General Public License v2.1
208 stars 52 forks source link

Reported distances wrong in current master #648

Closed barjac closed 9 months ago

barjac commented 9 months ago

After noticing this yesterday with master at #06d34 I tested again today with the following patch suggested on IRC:

diff -ur freedv-1.9.7-202401111524-4541e_o/src/freedv_reporter.cpp freedv-1.9.7-202401111524-4541e/src/freedv_reporter.cpp
--- freedv-1.9.7-202401111524-4541e_o/src/freedv_reporter.cpp   2024-01-11 15:24:28.510460027 +0000
+++ freedv-1.9.7-202401111524-4541e/src/freedv_reporter.cpp 2024-01-11 15:28:41.691489861 +0000
@@ -985,7 +985,8 @@

     // If grid square is 6 or more letters, THEN use the next two.
     // Otherwise, optional.
-    wxString optionalSegment = gridSquare.Mid(4, 2);
+    //wxString optionalSegment = gridSquare.Mid(4, 2);
+    wxString optionalSegment = gridSquare.Mid(4, 2).Lower();
     wxRegEx allLetters(_("^[a-z]{2}$"));
     if (gridSquare.Length() >= 6 && allLetters.Matches(optionalSegment))
     {

Other stations were using 1.9.6 and reported to me on air the distances they were seeing reported for me.

Three examples are below in Miles:

Call                 G6LJJ      GW3OAJ    G6FLH
Locator              IO81ij     IO81fq    IO91vl
1.9.6 reported       165        149       224
QRZ.com              165.3      149.5     225 (google maps)
master with patch    138        138       268

As can be seen above the distances reported by 1.9.6 reporter are accurate, but the ones reported in master are wildly out. The one taken from google maps measurement was due to the QRZ.com location being set for London not the actual QTH.

tmiw commented 9 months ago

The patch was wrong; it should have been the regex just below the optionalSegment line that changed. Please confirm that https://github.com/drowe67/freedv-gui/pull/649 resolves this issue and I can go ahead and merge.

barjac commented 9 months ago

Yes that looks fine now :)