Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 02-12-2014, 13: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, 13:24   #2
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,407
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, 13: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, 13:52   #4
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,019
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 online now   Reply With Quote
Old 02-12-2014, 14:24   #5
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,407
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, 02: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 Flight Simulator as GPS test NMEA genarator

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, 06: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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
AIS Simulation - Run VDR to play AIS Nmea file rgleason OpenCPN 16 12-01-2013 11:28
OpenCPN Passage Simulation sinbad7 OpenCPN 0 14-09-2012 20:29
Radar Simulation Screen for OpenCPN sinbad7 OpenCPN 24 01-06-2012 19:44
Google Earth Track and Simulation sinbad7 OpenCPN 5 07-09-2011 12:34



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 01:45.


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.