Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 02-12-2014, 12:04   #1
Registered User
 
meg23's Avatar

Join Date: Jul 2014
Location: Pittsburgh, PA
Boat: Yacht Charter Boats
Posts: 15
GPS Simulation with OpenCPN

I am digging into the OpenCPN source code and I want to be able to simulate GPS location from a local TCP connection. Basically, I would like to be able to generate NMEA GPS sentences without a GPS and have those read by OpenCPN.

Is their a good open source tool to be able to do this?

Thanks, Max
meg23 is offline   Reply With Quote
Old 02-12-2014, 12:24   #2
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: GPS Simulation with OpenCPN

Yes, you can get the VDR recorder player plugin. Install and activate and then browse to and play a nmea file. There are some nmea files on Opencpn Beta file thingie, stored there for guys like you ti rest

Sent from my SCH-I545 using Cruisers Sailing Forum mobile app
rgleason is offline   Reply With Quote
Old 02-12-2014, 12:43   #3
Registered User
 
meg23's Avatar

Join Date: Jul 2014
Location: Pittsburgh, PA
Boat: Yacht Charter Boats
Posts: 15
Re: GPS Simulation with OpenCPN

That could work as well, but what I would really like to do is to write an application that generates a route based on realtime weather and wind direction and then push that as gps data to OpenCPN via a tcp connection.
meg23 is offline   Reply With Quote
Old 02-12-2014, 12:52   #4
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,211
Re: GPS Simulation with OpenCPN

Max...
Netcat, for example. Or any decent programming language - pretty much all of them have libraries to create network servers with close to zero effort, so as you will have to process your weather info anyway, maybe that is the way to go.

Pavel
nohal is offline   Reply With Quote
Old 02-12-2014, 13:24   #5
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: GPS Simulation with OpenCPN

I hesitate to suggest weather_routing plugin because of the emphasis on weather, but that is the most obvious route to go and it does respond to many weather factors.
rgleason is offline   Reply With Quote
Old 03-12-2014, 01:38   #6
Registered User

Join Date: Feb 2010
Posts: 619
Re: GPS Simulation with OpenCPN

Quote:
Originally Posted by meg23 View Post
what I would really like to do is to write an application that generates a route based on realtime weather and wind direction and then push that as gps data to OpenCPN via a tcp connection.
I recently wrote some Python programs that drive OCPN NMEA input via UDP. You may find the code examples in this thread http://www.cruisersforum.com/forums/...ml#post1517589

At least the network communication part should be usable for another project.

I found Python a good tool for this, but of course - as Pavel suggests - any decent language will do...
PjotrC is offline   Reply With Quote
Old 03-12-2014, 05:23   #7
Registered User
 
meg23's Avatar

Join Date: Jul 2014
Location: Pittsburgh, PA
Boat: Yacht Charter Boats
Posts: 15
Re: GPS Simulation with OpenCPN

Thanks for all the suggestions. I was able to cobble some code together in Java to generate GPS sentences and pass them via tcp to OpenCPN. This seems to be working nicely. There is a really nice marine library for Java, which centers around NMEA. See below:

Java Marine API - NMEA 0183 library for Java

Once I get something a little more professional setup, I will publish this on github. Will probably turn into an AWT tool to control speed,direction, bearing of ship at sea.
meg23 is offline   Reply With Quote
Reply

Tags
enc, gps, opencpn


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
AIS Simulation - Run VDR to play AIS Nmea file rgleason OpenCPN 16 12-01-2013 10:28
OpenCPN Passage Simulation sinbad7 OpenCPN 0 14-09-2012 19:29
Radar Simulation Screen for OpenCPN sinbad7 OpenCPN 24 01-06-2012 18:44
Google Earth Track and Simulation sinbad7 OpenCPN 5 07-09-2011 11:34

Advertise Here


All times are GMT -7. The time now is 03:42.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.