Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

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 26-05-2024, 09:12   #1
Registered User
 
Antipole's Avatar

Join Date: Oct 2019
Location: Emsworth, UK
Boat: Alubat Ovni 395
Posts: 309
WhoGoesThere - a script for exploring connections

The Connections tab of the Settings panel includes the option to display NMEA traffic. This is useful but can be difficult to use. Data rushes by. You can pause this stream but then only see a small snapshot of what is happening.

The WhoGoesThere JavaScript provides more useable insights.

It starts by listing the active connections as seen through the plugins API.

It then listens to the traffic for 10 seconds (configurable) and reports.

OpenCPN messages

It displays a list of the OpenCPN messages received since the plugin was started.

NMEA0183 data

It displays one sample of each type of NMEA0183 sentence, prefaced by the count of that sentence type.

On my system I see
Code:
Counts	        Sentence
10		$SDDBT,13.88,f,4.23,M,2.31,F
10		$SDDPT,4.23,-0.18,
10		$GPGGA,081055,6212.0259,N,00525.3855,E,1,11,0.78,49.56,M,43.97,M,,
10		$GPGLL,6212.0259,N,00525.3855,E,081055,A,A
10		$GPGNS,081055,6212.0259,N,00525.3855,E,A,11,0.78,49.6,44,,,V
10		$GPGRS,081055,1,0.0,-0.0,0.0,-0.0,-0.0,0.0,0.0,0.0,-0.0,0.0,0.0,,,
12		$GPGSV,3,3,12,11,23,040,41,28,46,213,43,26,41,280,41,09,08,000,39
20		$HCHDM,174.4,M
10		$IIMDA,,I,,B,8.3,C,4.5,C,,,,C,,T,,M,,N,,M
10		$IIMTW,4.5,C
10		$WIMWV,29.26,R,17.26,N,A
10		$GPRMC,081055,A,6212.0259,N,00525.3855,E,0.02,0,230904,,,A,V
10		$TIROT,-1.82,A
10		$IIRSA,0.8,A,,V
10		$IIVHW,,T,174.4,M,0,N,0,K
11		$IIVLW,16223.57,N,16223.57,N,,N,,N
11		$GPVTG,0,T,,M,0.04,N,0.07,K,A
11		$WIVWR,29.4,R,17.3,N,8.9,M,32,K
10		$GPZDA,081055,23,09,2004,,
NMEA2000 devices

If you have an NMEA2000 connection, the script will have sent PGN59904 to all stations, requesting them to send PGN126996. The responses are displayed.

This reveals which devices are on the network and at which address. (Some complex devices have more than one presence and give more than one response for a given address.)

On my system I see:
Code:
NMEA2000 stations responding to PGN126996 request
Source ProdCode   ModelId                    SoftwareVersionCode  ModelSerialCode  Certification  LoadEquivalency
0      11369      NMEA 2000<->0183 Gateway ( 1.100, 2.191         115619           0              1
2      6643       NMEA 2000 Wi-Fi Gateway (W x.xxx, 1.084         239208           2              2
3      6643       NMEA 2000 Wi-Fi Gateway (W x.xxx, 1.084         239208           2              2
4      6643       NMEA 2000 Wi-Fi Gateway (W x.xxx, 1.084         239208           2              2
5      2545       Reactor 40                 3.40                 3415516878       2              4
6      17032      GPS17x-NMEA2000            2.80                 3807192399       1              3
7      23020      AIS600                     2.10                 0000001233       1              2
8      10467      GMI10                      3.40                 3805431112       1              6
9      10467      GMI10                      3.40                 3817816629       1              6
10     14190      GWS10                      2.80                 3841963403       1              2
35     14367      DST200                     1.000,1.011          1441531          1              4
The script then lists the PGNs it has seen, including their count and originating address. Using the earlier table, you can see which device is sending which PGN.

ON my system I see
Code:
Counts	        Source	         PGN
9		5		61184	Seatalk: Wireless Keypad Light Control
8004		5		126720	Seatalk1: Pilot Mode
20		6		126992	System Time
11		35		126996	Product Information
102		5		127245	Rudder
102		5		127250	Vessel Heading
102		5		127251	Rate of Turn
51		5		127257	Attitude
7		2		127508	Battery Status
10		35		128259	Speed
10		35		128267	Water Depth
9		35		128275	Distance Log
202		2		129025	Position, Rapid Update
82		2		129026	COG & SOG, Rapid Update
20		6		129029	GNSS Position Data
10		2		129033	Time & Date
14		7		129038	AIS Class A Position Report
1		7		129039	AIS Class B Position Report
10		6		129539	GNSS DOPs
10		6		129540	GNSS Sats in View
102		10		130306	Wind Data
21		35		130311	Environmental Parameters
5		10		130312	Temperature
5		10		130314	Actual Pressure
10		2		130577	Direction Data
NMEA2000 data

The script includes the statement

Code:
var NMEA2000Decode = false;
If this is changed to

Code:
var NMEA2000Decode = true;
then the script will also decode the samples and display them as JSON.
Examples from my system are:
Code:
4	127508	Battery Status
{
	"PGN": 127508,
	"id": "batteryStatus",
	"description": "Battery Status",
	"timestamp": 10365030,
	"priority": 6,
	"desination": 255,
	"origin": 2,
	"instance": 0,
	"voltage": "12.4700000"
}
6	128259	Speed
{
	"PGN": 128259,
	"id": "speed",
	"description": "Speed",
	"timestamp": 10365155,
	"priority": 2,
	"desination": 255,
	"origin": 35,
	"sid": 1,
	"speedWaterReferenced": "0.0000000",
	"speedWaterReferencedType": "undefined"
}
6	128267	Water Depth
{
	"PGN": 128267,
	"id": "waterDepth",
	"description": "Water Depth",
	"timestamp": 10365153,
	"priority": 3,
	"desination": 255,
	"origin": 35,
	"sid": 250,
	"depth": "4.5500000",
	"offset": "-0.1800000"
}
The script has its own repository here, where you can find installation instructions.

The repository has a Discussions forum for detailed discussion of it.

NB There are a few issues with the script, which are listed in the repository. Check there before raising new ones.
__________________
If all else fails, read the instructions.
Antipole is offline   Reply With Quote
Old 26-05-2024, 13:16   #2
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,202
Re: WhoGoesThere - a script for exploring connections

Funny tool!
Thanks
Hakan is online now   Reply With Quote
Old 27-05-2024, 16:29   #3
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,697
Images: 2
Re: WhoGoesThere - a script for exploring connections

Tony this looks very interesting to me. Why wouldn't it help Users with Connections?
rgleason is online now   Reply With Quote
Old 28-05-2024, 06:38   #4
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,697
Images: 2
Re: WhoGoesThere - a script for exploring connections

Tony, I have added it as a resource to the bottom of
https://opencpn.org/wiki/dokuwiki/do...t_whogoesthere
rgleason is online now   Reply With Quote
Old 28-05-2024, 08:55   #5
Registered User

Join Date: Nov 2014
Location: Savannah GA USA
Boat: Chris White Atlantic 47
Posts: 225
Re: WhoGoesThere - a script for exploring connections

Tony,

Very interesting script! I've run it for a variety of N2K, N183 and Signal K sources.

I ran into 1 Limitation (logged on Github):
- Decoding Signal K not supported.

1 issue, don't know the reason, may be Actisense's raw protocol:
- choked on Actisense NGT-1 raw (N2K) output.

1 issue, probably related to not having bi-directional ports setup:
- no response to PGN 126996

1 improvement in display:
- use leading 0's in the message counts to keep vertical alignments, e.g. 001, 023.

Several suggestions:
1. convert counts to rate of messages/second (actually easy in your head since the duration is 10 sec)
2. group messages by function, e.g. Wind, Environment, Steering
torrmundi is offline   Reply With Quote
Old 28-05-2024, 23:57   #6
Registered User
 
Antipole's Avatar

Join Date: Oct 2019
Location: Emsworth, UK
Boat: Alubat Ovni 395
Posts: 309
Re: WhoGoesThere - a script for exploring connections

@torrmundi please raise issues for points not already raised there. Thus we can keep track of resolution

Am sailing so there will be delays in responses. .
__________________
If all else fails, read the instructions.
Antipole is offline   Reply With Quote
Old 29-05-2024, 16:54   #7
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,697
Images: 2
Re: WhoGoesThere - a script for exploring connections

Tony, John may not know the drill and details.
John, he is talking about raising the issues here under his repository.
https://github.com/antipole2/WhoGoesThere/issues


I believe you have a git account, right?
rgleason is online now   Reply With Quote
Old 31-05-2024, 14:20   #8
Registered User

Join Date: Nov 2014
Location: Savannah GA USA
Boat: Chris White Atlantic 47
Posts: 225
Re: WhoGoesThere - a script for exploring connections

Rick, yes I have a git account. Looks like Tony created a bug issue associated with YDWG-02 devices.
torrmundi is offline   Reply With Quote
Old 01-06-2024, 03:18   #9
Registered User
 
Antipole's Avatar

Join Date: Oct 2019
Location: Emsworth, UK
Boat: Alubat Ovni 395
Posts: 309
SignalK

WhoGoesThere has been updated to v0.2.
It now listens for SignalK data and displays counts and samples.

Thanks to @torrmundi for help with this.
__________________
If all else fails, read the instructions.
Antipole is offline   Reply With Quote
Reply


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
Script to Convert MaxSea Routes to GPX scotte OpenCPN 8 12-03-2020 05:49
Free Weather Download Script from s/v Jedi s/v Jedi General Sailing Forum 48 01-12-2009 23:18
Phishing & Script errors Jerry Forum Tech Support & Site Help 2 18-10-2006 11:30

Advertise Here


All times are GMT -7. The time now is 07:50.


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.