Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 29-12-2017, 15:50   #1
Registered User

Join Date: Aug 2012
Location: San Jose, CA, USA
Posts: 81
Track longitudes > 180

Hi,

while working on my "track overlay window" pull request I noticed that my test tracks from San Francisco to Monteray had longitude values of around 238 instead of -122. I compensated for this in my pull request in one place (by substracting 360), but that really is a band-aid at best.

This track was produced from weather routing, and I don't have other tracks right now to play around with. So perhaps the problem is in weather routing? Or does OCPN allow these "unusual" longitudes (in which case I have to fix the code that did not like these values)?
__________________

nkiesel is offline   Reply With Quote
Old 29-12-2017, 19:57   #2
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: charleston
Boat: bristol 27
Posts: 3,501
Re: Track longitudes > 180

The weather routing plugin uses such longitudes internally, but it doesn't bother to normalize them for export. Maybe it should?

These longitudes are allowed by opencpn, and not automatically normalized.. maybe the core program should normalize the longitudes as well.
__________________

boat_alexandra is offline   Reply With Quote
Old 30-12-2017, 09:26   #3
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 13,530
Re: Track longitudes > 180

Quote:
The weather routing plugin uses such longitudes internally, but it doesn't bother to normalize them for export. Maybe it should?

These longitudes are allowed by opencpn, and not automatically normalized.. maybe the core program should normalize the longitudes as well.
Yes, agreed here.

There are some of the same kinds of issues with Dashboard Instruments.

See https://opencpn.org/flyspray/index.p...ktype&sort=asc
rgleason is offline   Reply With Quote
Old 31-12-2017, 00:29   #4
Registered User

Join Date: Aug 2012
Location: San Jose, CA, USA
Posts: 81
Re: Track longitudes > 180

The place my code tripped over was Select::IsSegmentSelected which does simple numeric comparison. I could easily see that there are more such places.

Solution could be to always enforce "normalized" values for coordinates or have some central "is this coordinate in this range" helper and use that everywhere. My guess is that enforcing "normalized" values is the simpler approach because most places already produce them normalized.
nkiesel is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need external mainsail track guides for 7/8" track Redduke Deck hardware: Rigging, Sails & Hoisting 2 05-05-2015 09:24
For Sale: Heavy duty genoa cars and track ends for 1 1/4" track Bristol30 Classifieds Archive 5 11-01-2013 06:20
Want To Buy: Strong track or Batt cars with Track thesparrow Classifieds Archive 1 25-12-2011 12:29

Advertise Here


Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 14:35.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
×

ShowCase vBulletin Plugins by Drive Thru Online, Inc.