Anchorage Position 5° 19' 49.188" N 163° 1' 16.788" E
decimal values of above: 5.33033 163.02133 and are stored that way in GA.
After double-clicking the area in OpenCPN the waypoint does appear but seems off by ~50m. In OpenCPN the decimal values for lat/lon are:
5.330000
163.021000
The position in OpenCPn is wrong by 0.00033 degrees in lat as well as in lon!!!
A quick/rough calculation:
Difference in lat or lon is 0.00033 degrees * (60*min/deg)= 0.0198min
1 minute = 1nm = 1852m
0.0198min*1852m/min = 36.6696m off in lat as well as in lon.
==> Pythagoras: SQRT(2x36.6696m^2) = error in position = 51.8m
For the plugin I suggest to add two more decimals to get to an accuracy of <= 1m
You are absolutely right, had a rounding bug in Description section. Just pushed out code change and new Win installer. Let me know if this doesn't work.
You are absolutely right, had a rounding bug in Description section. Just pushed out code change and new Win installer. Let me know if this doesn't work.
Thank you.
I pulled the new git and cleared the plugin cache.
The description of the waypint now shows
Anchorage Name: Kosrae, Lelu Harbor
Anchorage Position: 5.3303 163.0213 (4 decimals)
I think even this is not enough, it should be
5.33033 163.02133 as stored in the GA database (5 decimals)
The lat/lon for the waypoint is only:
5.330000 / 163.021000 (3 decimals)
I noticed tnis kind of error to. Is there any way to enable entering a goodanchorage waypoint under the right click menu, just like squiddio? I think this type of action would be most user friendly. Also we should be able to adjust the location easily.
Suggestion: Try squiddio and see how ir works.
Sent from my SCH-I545 using Cruisers Sailing Forum mobile app
I hear you. Let me take a look at what's going on with our APIs, as this is where the rounding is taking place. Have to run now (family day), but will try to resolve this by tomorrow.
Fixed the rounding problem on the API side and in the plugin. Pushed the code change out.
Will look at the other error next. I agree, it smells like a problem with encoding.
BTW, thrilled to see you adding anchorages. Thank you!
Getting closer, not yet there:
I pulled the new git and cleared the plugin cache.
The description of the waypoint now shows
Anchorage Name: Kosrae, Lelu Harbor
Anchorage Position: 5.33033 163.02133 (5 decimals, good!)
But the lat/lon for the waypoint in OpenCPN still is only:
5.330000 / 163.021000 (3 decimals)
From what I can gather, waypoint info is gathered in two steps:
First waypoints for a certain area are downloaded without description (double click with plug-in icon active)
then when right click on a waypoint, more info is pulles from the server.
I think the info transmitted by the server in the first step still has only 3 decimals, the info pulled later then has all 5 decimals but is only used for the description, not to update the lat/lon fields in OpenCPN.
I was trying to figure out what you meant by saying that waypoint isn't showing 5 digits. Now I get it! In GA lingo waypoint is a "Safe Waypoint", and I was certain that I've fixed that one!
Yes, I forgot to update the lat/lon and title of the marker itself. OK, back to the drawing board.
I just published the fix for OpenCPN waypoint lat/lon. After right-clicking an anchorage the coordinates should be updated to 5 digits after the decimal. Let me know if this works.
Thank you!
Sorry Windows folks, I'm a bit weary of creating a new installer just yet.
I just published the fix for OpenCPN waypoint lat/lon. After right-clicking an anchorage the coordinates should be updated to 5 digits after the decimal. Let me know if this works.
Thank you!
Sorry Windows folks, I'm a bit weary of creating a new installer just yet.
Yes, that worked! The marker moved to the correct position after right clicking it.
Can the same precision being used when sending a batch of marker position in step 1, when double clicking the chart? If amount of traffic is a concern, maybe increase precision from 3 to 4 digits?
I guess with 3 digits a marker is shifting around once the details are loaded, doesn't it? Fair enough. Expanded to 4 digits on the API side. No code update needed.
Windows users, just published an updated installer.