Skip to content

Commit

Permalink
Merge pull request #649 from drowe67/ms-grid-square-math
Browse files Browse the repository at this point in the history
Fix issue preventing usage of the 5th and 6th letter of the grid square.
  • Loading branch information
tmiw authored Jan 12, 2024
2 parents 21fedeb + a66d58a commit 7efb0e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion USER_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes
* Update Filter dialog to better handle resizing. (PR #641)
* Fix capitalization of distance units in FreeDV Reporter window. (PR #642)
* Rename KHz to kHz in documentation and UI. (PR #643)
* Avoid calculating distances in FreeDV Reporter window for those with invalid grid squares. (PR #646)
* Avoid calculating distances in FreeDV Reporter window for those with invalid grid squares. (PR #646, #649)
* Fix display bugs in FreeDV Reporter window when switching between dark and light mode. (PR #646)
2. Enhancements:
* Allow user to refresh status message even if it hasn't been changed. (PR #632)
Expand Down
2 changes: 1 addition & 1 deletion src/freedv_reporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ void FreeDVReporterDialog::calculateLatLonFromGridSquare_(wxString gridSquare, d
// If grid square is 6 or more letters, THEN use the next two.
// Otherwise, optional.
wxString optionalSegment = gridSquare.Mid(4, 2);
wxRegEx allLetters(_("^[a-z]{2}$"));
wxRegEx allLetters(_("^[A-Z]{2}$"));
if (gridSquare.Length() >= 6 && allLetters.Matches(optionalSegment))
{
lon += ((char)gridSquare.GetChar(4) - charA) * 5.0 / 60;
Expand Down

0 comments on commit 7efb0e5

Please sign in to comment.