View Single Post
Old 31-10-2009, 15:55   #150
jonasaberg
Registered User
 
jonasaberg's Avatar

Join Date: Jul 2008
Location: Kristiansand, Norway
Boat: Wasa 410
Posts: 309
Dave,
I dont know how you are testing OpenCPN as you are programming it. I guess you have programmed something that sends NMEA sequenses to simulate a GPS?

Anyway, I did the same using my Nexus NX2 Race software.

Further down in this post there are instructions how to download, install and run NX2 Race using pre-recorded data. It an then be used to relay NMEA data to OpenCPN.
I have also attached a kap (very crude) file covering the area of the recorded data to make it nicer to view.

One reason I do this is that on my machine I get crashes. It is possible to vary the speed of the simulated data sent to OpenCPN. If the speed is increased OpenCPN crashes.
I understand this is somewhat artificial - but I guess there is something strange since OpenCPN should not crash just because we feed it "bad" or "unlikely" data.

Back to the problem regarding getting the instruments to show DTW/BTW/XTE:

I tried to simulate according to your suggestion but my setup does not work for this, or at least the test is not conclusive (it doesnt work but neither do Seaclear in my setup). I need to try it in the boat.

I recorded the NMEA out strings from Seaclear, they look like this:
**
$OCAPA,A,A,0.15,R,N,V,V,217,M,04-
$OCAPB,A,A,0.148,R,N,V,V,216.8,M,04-,254.5,M,306.8,M*2C
$OCRMB,A,0.148,R,03-,04-,5916.379,N,01858.031,E,0.24,259.7,-0.9,V*12
$OCBOD,222.0,T,216.8,M,04-,03-*54
$OCBWC,112352,5916.379,N,01858.031,E,259.7,T,254.5 ,M,0.24,N,04-*0E
$OCRTE,1,1,w,SEACLEAR,03-,04-*31
**
As you see I left the OC header.

It turns out that Seaclear is configurable to send up to these five NMEA sentences and they are all marked to be sent. I am not sure if it is by default or if I have triggered them to make it work earlier.

Anyway - it would be nice if OpenCPN could do something similar - and that it is possible to turn on/off different NMEA sentences. I guess this would make it work with different systems. It is good to be able to configure which sentences are sent since NMEA is a bit restricted on the transmission rate. If to many sentences are sent the update frequency will suffer.

To the problem with crashing:
NX2 Race can be downloaded here:
SILVA Marine FDX
It runs for 20 minutes before closing down without registering. The reg is free using the form here:
Sign up for the NX2 Race Software - www.nexusmarine.se
After starting click on the "connector" icon and then choose use pre recorded data. use the attached file.
Rename it from .kml to .zip
Unpack the two files.

In the same dialogue choose "enable secondary connection" and choose a port.

After this, start openCPN, set it to talk to the same port and watch the yacht sail around.
You can open virtual instruments of your liking...

If you increase the speed of the playback of data to go through the recorde data quickly my OpenCPN crashes. (File->open Playback dialogue)

I have also attached a small .kap of the area, change the name of sandhamn.doc to sandhamn.kap.

/J
Attached Files
File Type: kml IMS race3.kml (429.3 KB, 117 views)
File Type: doc sandhamn.doc (208.4 KB, 132 views)
jonasaberg is offline   Reply With Quote