Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 09-10-2013, 19:36   #1
Registered User

Join Date: Jul 2013
Posts: 17
Incorporaint parts of OpenCpn into my own applciation

I am not a boat owner, just a software developer. A friend has asked me to deveop a one-off applciation, of use only to him.

The only part which is giving me trouble is that he wants "turn by turn" navigation, such as one might get from Google Maps for driving directions.

Given two ports or Lat/Long, he wants me to provide a series of waypoints, including Lat/Long of each. If possible he wants the estimaetd time for each leg, which I can calcluate, but he also wants me to take into account shipping lanes, weather conditions and the like.

Frankly, I have no idea how to do this and, after much googling for a free solution, it looks like OpenCPN might be the only way to implement that part of the applciation.

  1. Can OpenCPN indeed do that?
  2. is there an API?
  3. if not, and I link the Open CPN source with my own, where in the OpenCN code shoud I be looking in order to get this information?
  4. Did I miss some other Free & open Source S/w which can do this?
Thanks in advance any help!
__________________

__________________
SALT108 is offline   Reply With Quote
Old 09-10-2013, 20:01   #2
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,018
Re: Incorporaint parts of OpenCpn into my own applciation

SALT108...
ad 1. Do what exactly? Turn by turn navigation? No.
ad 2. Not a type of API you probably have on mind. But the source is GPL, so everything OpenCPN can do has an API in fact.
ad 3. You should definitely start looking at https://github.com/OpenCPN/OpenCPN/b...hart1.cpp#L895
ad 4. Don'y know, you might have missed a couple of open source projects doing either marine navigation of some sort (qtVlm, capcode to name a few) or turn by turn navigation (navit for one)

Pavel
__________________

__________________
nohal is offline   Reply With Quote
Old 09-10-2013, 21:15   #3
Registered User

Join Date: Jul 2013
Posts: 17
Re: Incorporaint parts of OpenCpn into my own applciation

Wow, thank you so much for such a quick and helpful reply, Pavel.

I will look into the source code of OpenCPN, especially where you mentioned.

I had a quick glance at Navit, as my friend really wants "turn by turn", in the sense that he wants nautical nvigation, taking into account shipping lanes, winds, tides, etc. At first glance Navit looks like dry land only, but I will glance again.

Thanks again for your help!
__________________
SALT108 is offline   Reply With Quote
Old 09-10-2013, 21:23   #4
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,018
Re: Incorporaint parts of OpenCpn into my own applciation

Well... It was meant more as a joke, you should take a look at qtVlm as far as weather routing goes. And you should probably tell your friend that a boat is not a car Good luck in this endeavour.

Pavel
__________________
nohal is offline   Reply With Quote
Old 10-10-2013, 20:00   #5
Registered User

Join Date: Jul 2013
Posts: 17
Re: Incorporaint parts of OpenCpn into my own applciation

A joke? sigh :-(

Well, I imagine that commercial shipping has this sort of thing. It is certainly technically possible; probably just unlikely that someone has open-sourced it.

I will keep looking. If I find seething, make I can put together an application & open source it.

QtVlm looks quite interesting; I will look into that. Thanks again
__________________
SALT108 is offline   Reply With Quote
Old 11-10-2013, 04:59   #6
Senior Cruiser
 
Sailmonkey's Avatar

Cruisers Forum Supporter

Join Date: Sep 2009
Location: Houston
Boat: '76 Allied Seawind II, 32'
Posts: 5,781
Quote:
Originally Posted by SALT108 View Post
A joke? sigh :-(

Well, I imagine that commercial shipping has this sort of thing. It is certainly technically possible; probably just unlikely that someone has open-sourced it.

I will keep looking. If I find seething, make I can put together an application & open source it.

QtVlm looks quite interesting; I will look into that. Thanks again
Commercial shipping has no such thing. Commercial mariners a trained to navigate, and lanes are not set in stone.
__________________
Sailmonkey is offline   Reply With Quote
Old 17-10-2013, 19:55   #7
Registered User

Join Date: Jul 2013
Posts: 17
Re: Incorporaint parts of OpenCpn into my own applciation

Told you I wasn't a sailor. Thanks. I guess that I don't have to be 100% accurate, just get a close approximation as to time & distance to a given portTold you I wasn't a sailor. Thanks. I guess that I don't have to be 100% accurate, just get a close approximation as to time & distance to a given port
__________________
SALT108 is offline   Reply With Quote
Old 18-10-2013, 10:40   #8
Senior Cruiser
 
Sailmonkey's Avatar

Cruisers Forum Supporter

Join Date: Sep 2009
Location: Houston
Boat: '76 Allied Seawind II, 32'
Posts: 5,781
That's already built into opncpn. Or any GPS for that matter.

I'm not trying to be rude, but the idea of running turn by turn navigation on the water is truly frightening.
__________________
Sailmonkey is offline   Reply With Quote
Old 18-10-2013, 12:13   #9
Moderator
 
Adelie's Avatar

Join Date: Feb 2010
Location: La Ciudad de la Misión Didacus de Alcalá en Alta California, Virreinato de Nueva España
Boat: Cal 20
Posts: 4,635
Quote:
Originally Posted by SALT108 View Post
A joke? sigh :-(

Well, I imagine that commercial shipping has this sort of thing. It is certainly technically possible; probably just unlikely that someone has open-sourced it.

I will keep looking. If I find seething, make I can put together an application & open source it.

QtVlm looks quite interesting; I will look into that. Thanks again
I doubt commercial shipping has this, what your customer is looking for borders on replacement for judgement. On land this works because travel on roads is highly prescribed, lanes are a fixed width with one line of cars per lane and must be followed in a specific direction and there are a limited number of arrangements for intersections which all have specific controls established at each one.

At sea lanes are established wide enough for one to fifty vessels depending on size, with crossing situations possible anywhere. Picking a distance off to clear a hazard involve judgement. I would be ok passing 100yd upwind of an isolated rock that I could see but would not be happy sailing 500yd upwind of a 5nm long leeward shore. How do you program a computer to understand the difference and make adjustments as the length of the leeward shore gets longer or shorter.

I Think what you might be able to do is pick the fastest route with weather in mind and highlight all the points of closest approach to various items/hazards shown.
__________________
A house is but a boat so poorly built and so firmly run aground no one would think to try and refloat it.
SailboatData
Adelie is online now   Reply With Quote
Old 18-10-2013, 13:03   #10
Registered User

Join Date: Dec 2008
Location: Oriental, NC
Boat: Mainship Pilot 34
Posts: 1,429
Re: Incorporaint parts of OpenCpn into my own applciation

As others have pointed out, sea navigation is not like road navigation. It can't and shouldn't be reduced to a bunch of algorithms.

Perhaps what you should consider is using a navigation program like OpenCpn to form your route, using user determined waypoints to avoid obstructions, stay in safe waters, etc. Then download that route to whatever your customer/friend wants to use. You could even use the route list yourself with a bit of spherical trigonometry (well more than a bit) compute the angle of each turn, the new course and the distance to the new waypoint.
__________________
djmarchand is offline   Reply With Quote
Old 19-10-2013, 19:25   #11
Registered User
 
sgschwend's Avatar

Join Date: Sep 2011
Location: Whidbey Island
Boat: Tollycraft 34' Tri-cabin
Posts: 56
Re: Incorporaint parts of OpenCpn into my own applciation

Your software would become a liability to the user.

In my view Maritime Law requires a watch that utilizes all appropriate means such as radar, monitor radio frequencies, able to operate the helm and all other controls....

Might be better to obtain a merchant marine master's license first then ask you to build a software application to augment those new skills.
__________________
sgschwend is offline   Reply With Quote
Old 19-10-2013, 22:06   #12
Registered User

Join Date: Jul 2013
Posts: 17
Re: Incorporaint parts of OpenCpn into my own applciation

Quote:
Originally Posted by sgschwend View Post
Your software would become a liability to the user.
Yes, that does seem to be the prevailing view.

I think that I phrased my question badly. I am only concerned with estimating travel time & fuel consumption. An approximation of a route can do that for me. I do not intend for anyone to follow (or evern see) the route.

Thanks for your feedback; I will update the question. Oops, I can't.


Quote:
Originally Posted by sgschwend View Post
Might be better to obtain a merchant marine master's license first then ask you to build a software application to augment those new skills.
Errrm, just a little more time, effort and money than I am willing to put in ;-) but I do understand what you are saying. Thnaks again.
__________________
SALT108 is offline   Reply With Quote
Old 20-10-2013, 10:00   #13
Registered User
 
sgschwend's Avatar

Join Date: Sep 2011
Location: Whidbey Island
Boat: Tollycraft 34' Tri-cabin
Posts: 56
Re: Incorporaint parts of OpenCpn into my own applciation

ETA should not be too difficult. There is an easy way to create a route and also real time tracking.

Would not a real time difference provide an ETA? It would require the creation of a route, or a look up table of routes for the user to select. Both are incorporated in OpenCPN.

ETA is a classic question, I would start with that.

There are products that measure fuel flow, fuel consumption and even some that will return Nm/gal. Flowscan is one brand name.
__________________
sgschwend is offline   Reply With Quote
Old 20-10-2013, 10:08   #14
Registered User

Join Date: May 2011
Location: Toronto
Boat: Sandpiper 565
Posts: 2,943
Re: Incorporaint parts of OpenCpn into my own applciation

(Interesting problem. I'm a programmer too)

For your revised requirements:

Biggest problem - program awareness of things like channels, hazards, shipping lanes, etc requires substantial initial data processing. Electronic charts may contain all this info, but not necessarily in a way that would result in simple algorithms to use them. If this is for a well-travelled navigation area, the use might justify the cost of the human effort to enter the waypoints for safe paths through the area that the program would follow as much as possible..

The closest I think you can get to your customer's requirement is something like so:
- the desired course is either completely laid out by the user as a sequence of waypoints, or the program has been provided with "standard" paths to follow as described above when selecting a path between given ports.
- it's complex but not impossible to factor in such things as tides and currents over the path, given the date and time of departure. It's probably impractical to factor in weather, but the possibility is there.

Combined with the boat's data (fuel consumption at different speeds, mainly), a reasonable fuel estimate could be made.

Obviously, the navigator can follow the pre-entered or selected waypoints on the passage.

It would take alot of refinement to get to the point where the application could suggest the most fuel-efficient route.
__________________

__________________
Lake-Effect is offline   Reply With Quote
Reply

Tags
enc, opencpn, parts

Thread Tools
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




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 13:58.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.