Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 15-06-2014, 01:08   #1
Registered User

Join Date: Nov 2010
Posts: 11
Naming Different Connections for Tracking other Vessels (Buddy)

Hi,
I am using open CPN to monitor the locations and tracks of our rescue vessels. They each transmit their gps data via the internet (UDP) to the Operations Centre which currently display their locations and names on Google Earth, but I would like to display them on Open CPN. I can add each feed on the connection manager easily, but I would like each vessel to have its name alongside it so I can see which rescue vessel is where. Sorry if this is covered elsewhere but the search function didn't locate anything similar for me.

Thanks
__________________

__________________
sea_rescue is offline   Reply With Quote
Old 15-06-2014, 02:20   #2
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 2,751
Re: Naming different connections for tracking other vessels (buddy)

Which data do you receive via UDP?
The AIS related messages AIVDM and AIVDO?

And have a look at Options|Ships|AIS targets:
here you can select to show ships names, defining the scale from which on this happens. (Helps to unclutter the screen)

bcn
__________________

__________________
bcn is offline   Reply With Quote
Old 15-06-2014, 19:05   #3
Registered User

Join Date: Nov 2010
Posts: 11
Re: Naming different connections for tracking other vessels (buddy)

Hi,
Thanks for the reply. I currently transmit the GPS NMEA stream from the vessels laptops over the internet using the GPSGate software and receive it at the Ops Centre via the GPS Gate software. It then takes each vessels NMEA stream and outputs them on different Virtual Com Ports, which OpenCPN plots via Connection Manager.
Cheers
__________________
sea_rescue is offline   Reply With Quote
Old 15-06-2014, 20:33   #4
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
Re: Naming different connections for tracking other vessels (buddy)

sea_rescue...
The important question is what does it output in the NMEA stream...

If it is FRPOS with the buddy data, there should (or could? - I really don't know and just read the code in https://github.com/OpenCPN/OpenCPN/b...coder.cpp#L678) be the name of the vessel and you can use the standard features to show the AIS target names.

Same if it sends the AIS data.

If it sends GP* sentences, then everything will be a total mess and a completely different approach is needed.

Can you record a bit of the data using the VDR plugin or otherwise and post it here?

Pavel
__________________
nohal is offline   Reply With Quote
Old 17-06-2014, 02:15   #5
Registered User

Join Date: Nov 2010
Posts: 11
Re: Naming different connections for tracking other vessels (buddy)

Hi, it is $gp sentences but will get some on the weekend and post
__________________
sea_rescue is offline   Reply With Quote
Old 17-06-2014, 02:31   #6
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 2,751
Re: Naming different connections for tracking other vessels (buddy)

In case you receive just the $GP sentence how will you identify the sender?

There is no reference to the MMSI (or the name of the vessel) in the $GP NMEA messages (GGA, GLL).

bcn
__________________
bcn is offline   Reply With Quote
Old 17-06-2014, 02:35   #7
Registered User

Join Date: Nov 2010
Posts: 11
Re: Naming different connections for tracking other vessels (buddy)

Yeah, that is pretty much my question. When entering the source of data in connections, there is no where to name it. I can view multiple gps sources on google earth currently, but wanted to on OpenCPN if it could. No biggie, just wondering if it did. Thanks.
__________________
sea_rescue is offline   Reply With Quote
Old 17-06-2014, 02:48   #8
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 2,751
Re: Naming different connections for tracking other vessels (buddy)

So just let's see your data after the weekend. If there are just the plain $GP sentences and nothing else there will be no easy solution.

bcn
__________________
bcn is offline   Reply With Quote
Old 17-06-2014, 02:48   #9
Registered User

Join Date: Nov 2010
Posts: 11
Re: Naming different connections for tracking other vessels (buddy)

Great, thanks
__________________
sea_rescue is offline   Reply With Quote
Old 17-06-2014, 03:42   #10
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,802
Re: Naming different connections for tracking other vessels (buddy)

Maybe you can make a small program which translates the gps sentences into ais sentences and appends vessel information.
__________________
boat_alexandra is offline   Reply With Quote
Old 17-06-2014, 04:34   #11
Registered User

Join Date: Feb 2010
Posts: 619
Re: Naming different connections for tracking other vessels (buddy)

Such a program is attached in the recent thread on Flight Simulator as NMEA generator...

The Python script at2vdm.py takes a stream of GPRMC and outputs a stream of AIVDM, assuming an MMSI value given as option. Another option selects, if a Type 9 (SAR Aircraft) or Type 1 (Ship position report) is produced.

I use it with multiple computers, each producing a stream for a separate SAR aircraft...
__________________
PjotrC is offline   Reply With Quote
Old 17-06-2014, 05:54   #12
Registered User

Join Date: Nov 2010
Posts: 11
Re: Naming different connections for tracking other vessels (buddy)

Hi, I have been looking for something that will convert the NMEA to AIS if I add some details to make it AIS. How can I run this program please? It looks like any NMEA coming in via a certain port can me assigned a MMSI which will allow it to be separated...
__________________
sea_rescue is offline   Reply With Quote
Old 17-06-2014, 06:00   #13
Registered User

Join Date: Nov 2010
Posts: 11
Re: Naming different connections for tracking other vessels (buddy)

OK, google has pointed me in the right direction for Python.... thanks
__________________
sea_rescue is offline   Reply With Quote
Old 17-06-2014, 07:32   #14
Registered User

Join Date: Nov 2010
Posts: 11
Re: Naming Different Connections for Tracking other Vessels (Buddy)

Hmmmmm having trouble getting it to happen for me. Have installed Python, save the script as .py but can't get the udp data coming in to go back out as AIS....
__________________
sea_rescue is offline   Reply With Quote
Old 17-06-2014, 09:59   #15
Registered User

Join Date: Feb 2010
Posts: 619
Re: Naming Different Connections for Tracking other Vessels (Buddy)

sea_rescue...

Not sure what your platform is...

One thing that is easily missed is that in order to have the options evaluated in Python, one should call the script as
Code:
python at2vdm.py -listen....
Just calling it as
Code:
at2vdm.py -listen...
will run, but only with default option values.

You have 3 methods:

1. change the address/port number/etc options defaults in the source

2. make a link/shortcut to the .py script, and set the options in the properties window of this link

3. open a command line window and type the calling command starting with "python at2vdm.py -listen...."

You might set the "-verbose 3" and/or "-loglevel 3" to see if the data is coming through.

You will then see something like that:

Code:
C:\Python33\python.exe E:\Dokumenty\at2vdm.py -listen 127.0.0.1:5500 -forward 127.0.0.1:5501 -seconds 2 -mmsi 111303123 -loglevel 3 -verbose 3

listening on 127.0.0.1:5500
loglevel: 3
logging to file: rmc2vdm.log
forwarding to 127.0.0.1:5501
including static data :
$GPRMC,122228,A,0000.000,N,00000.000,E,000.0,000.0,1706114,0.000,E*4B
$GPGGA,122228,0000.000,N,00000.000,E,1,,,00,F,,,,*13
altitude = 0
$GPRMC,122228,A,0000.000,N,00000.000,E,000.0,000.0,1706114,0.000,E*4B
$GPGGA,122228,0000.000,N,00000.000,E,1,,,00,F,,,,*13
altitude = 0
$GPRMC,122228,A,0000.000,N,00000.000,E,000.0,000.0,1706114,0.000,E*4B
$GPGGA,122228,0000.000,N,00000.000,E,1,,,00,F,,,,*13
altitude = 0

(...)

$GPRMC,122229,A,3609.094,N,00520.375,W,003.1,267.6,1706114,0.000,E*58
$GPGGA,122229,3609.094,N,00520.375,W,1,,,09,F,,,,*0E
altitude = 2
$GPRMC,122230,A,3609.094,N,00520.375,W,003.0,267.6,1706114,0.000,E*51
lat = 36.1515666667
lon = -5.33958333333
sog = 3
cog = 267.6
a_cog = 2680
!AIVDM,1,1,,A,91b9Ilh0P3wWSbnDcr?:N2P20000,0*5A
$GPGGA,122230,3609.094,N,00520.375,W,1,,,09,F,,,,*06
altitude = 2
$GPRMC,122230,A,3609.094,N,00520.376,W,003.0,267.5,1706114,0.000,E*51
$GPGGA,122230,3609.094,N,00520.376,W,1,,,09,F,,,,*05
altitude = 2

(...)

$GPRMC,122231,A,3609.094,N,00520.376,W,003.0,267.5,1706114,0.000,E*50
$GPGGA,122231,3609.094,N,00520.376,W,1,,,09,F,,,,*04
altitude = 2
$GPRMC,122231,A,3609.094,N,00520.376,W,003.0,267.5,1706114,0.000,E*50
$GPGGA,122231,3609.094,N,00520.376,W,1,,,09,F,,,,*04
altitude = 2
$GPRMC,122232,A,3609.094,N,00520.376,W,003.0,267.5,1706114,0.000,E*53
lat = 36.1515666667
lon = -5.3396
sog = 3
cog = 267.5
a_cog = 2680
!AIVDM,1,1,,A,91b9Ilh0P3wWSbPDcr?:N3P20000,0*65
Since in my setup I receive 5 GPRMC statements per second, I skip some of these, producing an AIVDM only every so many seconds (here: 2, set by option)

Works fine for me on Windows, Python 3.3.

Good luck, and please check the options for correct address/port number etc.

There is also an option "-serial" to direct the output to a COM rather than UDP.

PS: Please download and use the "fg2vdm.zip" toolkit. It includes the latest version of RMC to VDM converter, called at2vdm.py. It is an enhanced version of rmc2vdm.py mentioned in the first post of the thread. It also includes a tool to produce static Type 5 sentences, which one might need to properly identify the vessels by name/callsign etc.
__________________

__________________
PjotrC is offline   Reply With Quote
Reply

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
can I mix different rudder angle indicator and different autopilots awab Marine Electronics 11 24-04-2013 15:25
gps and other devices via network connections? armido OpenCPN 2 08-12-2012 18:40
Tracking Vessels with AIS Ex-Calif Off Topic Forum 0 18-08-2009 01:36
Boat naming question Guzzi General Sailing Forum 16 25-10-2008 11:26
Naming the boat? Janny Off Topic Forum 40 08-12-2007 23:26



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

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


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.