Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 21-11-2016, 11:26   #16
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 2,722
Re: Tracking and plotting multiple GPS devices

Understood that the towed object has some positioning device delivering data in NMEA format.

That's why I said "if you are already outputting something from that object, why not directly in a different format from RMC etc."

On stand-by...
__________________

__________________
bcn is offline   Reply With Quote
Old 21-11-2016, 12:09   #17
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 3,899
Re: Tracking and plotting multiple GPS devices

I wrote something that reads raw position/speed/time of day data from a file and converts it to NMEA AIS messages. I think this is the cleanest way to have multiple targets appear in OpenCPN with their correct position and speed. It also shows a nice track for each object. It is a simple matter to make one change to OpenCPN to have the AIS tracks be as long as you want from any practical standpoint.

If there is interest I think I can dig up the code although it is probably written in Python. But python is ok because all you really need is a utility to consume the raw data, convert to NMEA AIS and spit out the data to an IP/port and OpenCPN will accept it. So with this approach you don't have to modify OpenCPN at all.
__________________

__________________
transmitterdan is offline   Reply With Quote
Old 21-11-2016, 12:15   #18
Registered User

Join Date: Nov 2016
Posts: 10
Re: Tracking and plotting multiple GPS devices

Quote:
Originally Posted by transmitterdan View Post
I wrote something that reads raw position/speed/time of day data from a file and converts it to NMEA AIS messages. I think this is the cleanest way to have multiple targets appear in OpenCPN with their correct position and speed. It also shows a nice track for each object. It is a simple matter to make one change to OpenCPN to have the AIS tracks be as long as you want from any practical standpoint.

If there is interest I think I can dig up the code although it is probably written in Python. But python is ok because all you really need is a utility to consume the raw data, convert to NMEA AIS and spit out the data to an IP/port and OpenCPN will accept it. So with this approach you don't have to modify OpenCPN at all.
Hi, I would greatly appreciate this if you have it handy. I have some familiarity with python. Thank-you in advance.
__________________
BrianCarrollr is offline   Reply With Quote
Old 21-11-2016, 12:22   #19
Registered User

Join Date: May 2011
Posts: 847
Re: Tracking and plotting multiple GPS devices

Quote:
Originally Posted by Littlechay View Post
Well GPS won't work underwater so that is a problem.

If you are going to attach a surface buoy then that could have GPS position, using wifi or some other form of data link. A class B AIS beacon will likely update too slowly.

Sounds like your doing some kind of surveying. The simpler systems that I have worked on use a highly accurate GPS on the vessel and then the length of tether and depth sensors if fitted, or estimated, and some simple trig to calculate the position of the fish.

If you let us know what it is that you are working on we may be able to offer more specific help.
Or are you using some form of inertial nav with rate gyros etc.?
__________________
Littlechay is offline   Reply With Quote
Old 21-11-2016, 12:33   #20
Registered User

Join Date: Nov 2016
Posts: 10
Re: Tracking and plotting multiple GPS devices

Quote:
Originally Posted by Littlechay View Post
Or are you using some form of inertial nav with rate gyros etc.?
Indeed, an INS. Sorry for the confusion.
__________________
BrianCarrollr is offline   Reply With Quote
Old 21-11-2016, 12:44   #21
Senior Cruiser

Cruisers Forum Supporter

Join Date: Aug 2009
Location: between the devil and the deep blue sea
Boat: a sailing boat
Posts: 17,148
Re: Tracking and plotting multiple GPS devices

The discussion here reminds me of something I have read in Kahnemann's book: we take a 100% correct DIFFICULT question and "reply" by giving a 100% correct answer to ... a similar, EASIER, question.

Effective, but not truly moving the world forward.

So let me reiterate and reformulate the original query. (Hoping not to induce any thread drift in the process.)

So.

Is it possible, using (one) OpenCPN, to plot two gps signals at once?

If not, can such a function get implemented in future versions?

For the purists, on 'why': Imagine you are in your boat (gps 1, or 'own ship') while your partner is in the dinghy, carrying a gps tracker in their pocket (gps 2, or 'a mobile gps'). Now you want to see where your partner is on your OpnenCPN plotter, in reference to your own position. The same applies to a towed object with a tracker. Etc.

PLS do not reply with 'use a portable ais device' as this is another story and portable ais devices are far more expensive and more difficult to build at home. A gps tracker can be built of a simple puck usb gps plugged into a travel router. Or you can use your smartphone as a tracker.

A good work around (by substituting nmea headers???) could be a fine solution too, except I think we do not get and ais sentence by simply swapping the header on say rmc. (Or do we?)

Big kiss for keeping the whole thing alive and kicking.

barnakiel
__________________
barnakiel is offline   Reply With Quote
Old 21-11-2016, 13:23   #22
Registered User

Join Date: May 2011
Posts: 847
Re: Tracking and plotting multiple GPS devices

Quote:
Originally Posted by barnakiel View Post
So let me reiterate and reformulate the original query. (Hoping not to induce any thread drift in the process.)

So.

Is it possible, using (one) OpenCPN, to plot two gps signals at once?

If not, can such a function get implemented in future versions?
Well that is one end of the stick

On the other hand the OP it seems does not want to plot two GPS positions but one GPS position and one position coming from an INS and that took some getting to.

These will have different talker IDs. Doesn't solve the problem but does allow us to more easily differentiate the two sources.

Spoofing MARPA, or AIS, using the INS data as source would be the way to deal with it for OCPN I think. Perhaps using the NMEA converter plugin but I'm not sure that notes the source ID either. Otherwise on a separate COM port there is no need to filter on the talker ID and the plugin should handle it.
__________________
Littlechay is offline   Reply With Quote
Old 21-11-2016, 13:32   #23
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 3,899
Re: Tracking and plotting multiple GPS devices

Quote:
Originally Posted by BrianCarrollr View Post
Hi, I would greatly appreciate this if you have it handy. I have some familiarity with python. Thank-you in advance.
Brian,

Find my Python script and sample data set here:

https://github.com/transmitterdan/AISconverter

This reads a text file with various data elements in each line such as MMSI, speed, course, position, etc. and then formats that into valid AIS messages and sends them out a UDP or TCP port. On Windows this CMD command will send the sample data set in AIS format to OpenCPN assuming you have OpenCPN configured to listen on port 10110. The ship will appear along with its track. You can query it using the AIS query dialog.

python AISconverter.py DataSet2.txt localhost 10110 .1

It should be a simple matter to convert the file reading portion to some other method of ingesting the needed data. The rest should just work as is. If you have problems let me know. I tested an earlier version on Linux and it works but this exact version has only been tested on Windows.

Be aware that the sample data is for a ship somewhere between Taiwan and mainland China so look there to see the track appear as it moves around.
__________________
transmitterdan is offline   Reply With Quote
Old 21-11-2016, 15:33   #24
Senior Cruiser

Cruisers Forum Supporter

Join Date: Aug 2009
Location: between the devil and the deep blue sea
Boat: a sailing boat
Posts: 17,148
Re: Tracking and plotting multiple GPS devices

Quote:
Originally Posted by Littlechay View Post

... Otherwise on a separate COM port there is no need to filter on the talker ID and the plugin should handle it.
COM or Net port (Ethernet/IP etc.).

Exactly.

b.
__________________
barnakiel is offline   Reply With Quote
Old 22-11-2016, 05:04   #25
Registered User

Join Date: Nov 2016
Posts: 10
Re: Tracking and plotting multiple GPS devices

First of all a correction (which shouldn't change the discussion), the ship uses GPS and the towed body a USBL.

Using the NMEA converter, would that create two point on the chart to track and plot their course? I would be giving them separate data connections on separate data ports.

And thanks transmitterdan for the attachment.
__________________
BrianCarrollr is offline   Reply With Quote
Old 22-11-2016, 05:20   #26
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 3,991
Re: Tracking and plotting multiple GPS devices

Quote:
Originally Posted by BrianCarrollr View Post
First of all a correction (which shouldn't change the discussion), the ship uses GPS and the towed body a USBL.

Using the NMEA converter, would that create two point on the chart to track and plot their course? I would be giving them separate data connections on separate data ports.

And thanks transmitterdan for the attachment.
Forget about feeding OpenCPN with two different GPS streams and getting what you want - it is designed from the ground up to use this data for own vessel only. Do the conversion to AIS, APRS position report (WPL sentence) or (M)ARPA (TLL/TTM sentences, I don't recommend to use this though) outside of OpenCPN and you are done - will have your ship and the other target shown and will be able to record tracks of both.
If you decide for AIS, you will also be able to use any other plotting software to get similar results, APRS and (M)ARPA are not as widely supported AFAICT.


Pavel
__________________
nohal is offline   Reply With Quote
Old 22-11-2016, 05:44   #27
Registered User

Join Date: Nov 2016
Posts: 10
Re: Tracking and plotting multiple GPS devices

Quote:
Originally Posted by nohal View Post
Forget about feeding OpenCPN with two different GPS streams and getting what you want - it is designed from the ground up to use this data for own vessel only. Do the conversion to AIS, APRS position report (WPL sentence) or (M)ARPA (TLL/TTM sentences, I don't recommend to use this though) outside of OpenCPN and you are done - will have your ship and the other target shown and will be able to record tracks of both.
If you decide for AIS, you will also be able to use any other plotting software to get similar results, APRS and (M)ARPA are not as widely supported AFAICT.


Pavel
Thanks, and very "straight-to-the-point". I think this will be a good point now to give this a try and relay to you folks how I make out in the coming weeks. Very helpful thread.
__________________
BrianCarrollr is offline   Reply With Quote
Old 22-11-2016, 09:57   #28
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 3,899
Tracking and plotting multiple GPS devices

I agree with Pavel. AIS data is the way to track other vessels or gear that can generate position/course/SOG data. AIS format gives a unique ID as well.

OpenCPN will show a track for each AIS target and also the own ship if you turn that on. So you will see exactly the track of the towed device for each AIS position report received.
__________________
transmitterdan is offline   Reply With Quote
Old 29-11-2016, 02:24   #29
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,993
Re: Tracking and plotting multiple GPS devices

One first thought:
Quote:
It would be nice if the nmea0183 input signal for a second gps device could be converted to a unique symbol and plotted, without interfering with the primary gps. I wonder if the plugin NmeaConverter would be any help in this regard?
..and after a number of very good points, ..treat the barge device as AIS object! There are many ways to solve a problem, ..but this sounds like the best way to handle it in this case!
__________________
rgleason is offline   Reply With Quote
Old 29-11-2016, 04:09   #30
Registered User

Join Date: Sep 2012
Location: Baikal
Posts: 269
Re: Tracking and plotting multiple GPS devices

I support the idea of connecting the second position of the vessel.
Application can be to track the location of the boat tender via Wifi to the base ship. And if there is still Tender boat and depth sounder you can remotely inspect a strange place and in real-time information transfer depth measurements to the base vehicle (plug hydrographic surveying)
Here is a video as it has already been implemented
__________________

__________________
Baikal is offline   Reply With Quote
Reply

Tags
gps

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
GPS For Multiple Devices Via Bluetooth Jd1 Marine Electronics 19 19-09-2016 06:24
Best marine tracking software/devices? sail2bluesue Marine Electronics 15 13-04-2013 07:50
Multiple Batteries, Multiple Banks, Single Charger dakno Electrical: Batteries, Generators & Solar 3 06-06-2010 10:45
Plotting a Course Using GPS sharkus Navigation 13 03-06-2010 09:32



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 12:02.


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.