Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to load grid square for G and EI SOTA summits #336

Closed
sjmelhuish opened this issue Mar 23, 2024 · 3 comments
Closed

Failing to load grid square for G and EI SOTA summits #336

sjmelhuish opened this issue Mar 23, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@sjmelhuish
Copy link

When I load a SOTAREF into the Details->SOTA field QLog fills in the Gridsquare field. For example, if I enter "F/PO-001" the Gridsquare field is correctly populated with "IN92WS".

However, when I enter e.g. "G/SC-001" the Gridsquare is incorrectly populated with "JJ00AA". This corresponds to lat = lon = 0.0, so is clearly an error. For this example the correct value would be "IO81ED". This applies to all summits which use the British and Irish grids (G, GD, GI, GM, GW and EI).

Why?
I suspect the cause might be data\Data.cpp lines 860-861:

        SOTARet.gridref1 = querySOTA.value(6).toDouble();
        SOTARet.gridref2 = querySOTA.value(7).toDouble();

(but maybe elsewhere too?)

For most summits in SOTA's summitslist.csv download latitude and longitude are duplicated into gridref1 and gridref2. But for G & EI summits gridref1 contains the alpha-numeric grid reference ("SS 891415" for the example) and gridref2 is blank. Therefore the toDouble() calls will fail. Perhaps also this will cause trouble in the database?

@foldynl
Copy link
Owner

foldynl commented Mar 24, 2024

Good analysis. Thanks for the info. I looked at it and I don't see why the British and Irish have something different than the rest of the world in Gridref1/2. All we have to do is switch to using Lat/Lon fields. Is it correct?

However, I performed a deeper analysis and found that sometimes the data in Gridref1/2 is more accurate than in Lat/lon. I'm a bit confused. What would you recommend? Is it sufficient to use Lat/Lon information? Or should something more complicated be implemented?

@foldynl foldynl added the help wanted Extra attention is needed label Mar 24, 2024
@foldynl
Copy link
Owner

foldynl commented Mar 24, 2024

It seems that it is sufficient to use lat/lon information. I randomly selected cases of different information (gridref1/2 vs Lat/Lon) and the computed Grid was always the same.

@foldynl foldynl added bug Something isn't working and removed help wanted Extra attention is needed labels Mar 24, 2024
@sjmelhuish
Copy link
Author

Many thanks for fixing that. Yes, using the lat/lon fields is preferable.

The SOTA programme started out in Britain in 2002 using a 3rd-party list that had positions quoted according to the British Ordnance Survey grid. These were retained when other associations surveyed using lat/lon were added later. So it's just one of those historical accidents!

Thanks again. Great program.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants