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 21-06-2019, 02:36   #31
Registered User
 
Canne's Avatar

Join Date: Aug 2014
Posts: 246
Re: NMEA Instrument emulation (streaming)

Quote:
Originally Posted by RonSouthworth View Post
Polar plots I have found about 3 styles of file layout file type is either xml or CSV so some way of converting between would be handy I think.
Hi Ron, I understand your priorities. Indeed, it would nice to have a converter incorporated or to have a workable external tool for that.

For the record, a few words about the .pol file since I am using them a lot.

FYI, myself and many other of us, I am sure, are using Sean's excellent weather_routing_pi: It has a default XML-file, too but it is just referring to a .pol file (!) in a big catalog of .pol files : Test-TWS-0-20+60.pol (i.e. XML @Sean is not defining any values itself, it is ). The polar files in his directory are like CSV files, some space-char separated, others with other separators, like ';'.

If we look at the polar_pi/Polar.cpp available formats for saving the .pol file, we can see OCPN/QTVlm, Expedition, Maxsea and CSV-Formats.

My suggestion is that you accept, without a conversion, to use OCPN/QTVlm compatible .pol files. That format is already accepted by weather_routing_pi, polar_pi and Tactics.

But if you decide to go with *.xml-file contained mark-up language structure, maybe you would also like to create a XMLSchema for it. Here is a good example of an aerodynamics polar and its XMLSchema .xsd-file.

IMO, without an external description of the document type in the file, a polar file in an application specific XML-format has no added value compared to a plain text format, OCPN/QTVlm compatible .pol file.

Having an XMLSchema would make possible the validation in the XML parser and thus assure the interoperability. Your work would perhaps take off in the community since such a definition does not exist for boat polars that I know.

Sorry for the long rant, I must have been suffering a lot in the past from the wild west polar-formats...

Quote:
Originally Posted by RonSouthworth View Post
I found an open source repo of plot data i will post the link when i am back in the office
Thank you in advance, as a owner of a racer, I am always interested in how well the others are performing!
Canne is offline   Reply With Quote
Old 21-06-2019, 05:03   #32
Registered User

Join Date: Dec 2012
Posts: 180
Re: NMEA Instrument emulation (streaming)

Thanks for the info Canne,

I have more than one machine just no windows box i will sort that out soon so i can test on the three platforms.

The o comms config lets you config - send messages externally so effectively you can have a stand alone tester just a fancy one

Rick expressed a desire to have something stand alone so I will look into that once i have the plugin working.

the GUI as i say i will look at the config pages for dashboard tactics and see what colours have been used with it and amend the plugin to those as they look ok on macOS i presume the colours ect for that are ok on win.

Ive not seen a cross platform lib that is not quirky between os

Hopefully i will be well enough tomorrow to work on it while i convalesce.
RonSouthworth is offline   Reply With Quote
Old 21-06-2019, 05:14   #33
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,808
Images: 2
Re: NMEA Instrument emulation (streaming)

Ron Quote:
Quote:
There is a polar performance xml file. I renamed it LoftyPerch.xml.
Petri wrote:

Hmmm... Tactics is still using .pol polar performance file (maybe there is room for improvement) and I see that your plugin, polar plugin and weather routing plugin of Sean d'Epagnier are using XML. Well, I have both, but are they compatible with yours? Should I take my boat's XML-polar file (the same I use in weather routing) and override with it your LoftyPerch.xml?

In windows, if you look at C:\ProgramData\opencpn\plugins\weather_routing\pol ars

You will see that all polar files have .pol or .txt files and not XML. This is purposeful, to avoid confusion with other Boat.xml configuration files which may contain multiple polar files, and the main settings weatherroutingconfiguration.xml file.

I believe it would not be a good idea to change polar files to be xml.
rgleason is offline   Reply With Quote
Old 21-06-2019, 13:42   #34
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,808
Images: 2
Re: NMEA Instrument emulation (streaming)

Petri wrote:
Quote:
The polar files in his directory are like CSV files, some space-char separated, others with other separators, like ';'.
Exactly. The reason is that users do not know or care about that, they just expect their polar file to work, so Sean and Peter Tulp have made some special efforts to be able to interprete polars files with several types of delimiters and formats. It does not always work as expected but it mostly works.


Petri wrote:
Quote:
Having an XMLSchema would make possible the validation in the XML parser and thus assure the interoperability. Your work would perhaps take off in the community since such a definition does not exist for boat polars that I know.
Sorry for the long rant, I must have been suffering a lot in the past from the wild west polar-formats...
Yes, this would be very nice to have, as I have been to the wild west too, but I hope these files do not get confused with the Boat.xml files! Perhaps they will not get confused now because those files are in a separate subdirectory now. (There is no schema submitted for those files either!, so perhaps that should be part of it.)


This is a bit of work too, it would be helpful if it were accepted by others and then a converter made, but everyone has different ideas about these things....


===
PS: I've been trying to find out where I download Ron's plugin, to give it a try...
rgleason is offline   Reply With Quote
Old 21-06-2019, 19:00   #35
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,808
Images: 2
Re: NMEA Instrument emulation (streaming)

Ron, I know you have an ambitious program for this plugin, and you have very quickly become proficient with many new programming details for OpenCPN.

I modified appveyor and made a .gitignore file so the build directory is not uploaded to your repository. Appveyor now builds on my repos and it will probably work on yours.

I ran the built "Artifact Tab" file in Opencpn and tried it out. At one point I had the vessel going 91knots, but I was having some trouble getting things working.

I know that this simulator can be used in a number of ways. Would you mind giving me a broad overview, and then walk me through how you would set it up to test Dashboard-Tactics.

I have tried it several time and enclose some screenshots.
Attached Thumbnails
Click image for larger version

Name:	Screenshot (185).jpg
Views:	76
Size:	411.0 KB
ID:	194465   Click image for larger version

Name:	Screenshot (186).jpg
Views:	75
Size:	403.7 KB
ID:	194466  

Click image for larger version

Name:	Screenshot (187).jpg
Views:	78
Size:	410.2 KB
ID:	194467   Click image for larger version

Name:	Screenshot (188).jpg
Views:	69
Size:	415.3 KB
ID:	194468  

Click image for larger version

Name:	Screenshot (189).jpg
Views:	74
Size:	280.0 KB
ID:	194469  
rgleason is offline   Reply With Quote
Old 22-06-2019, 00:09   #36
Registered User
 
Canne's Avatar

Join Date: Aug 2014
Posts: 246
Re: NMEA Instrument emulation (streaming)

Ron and Rick, great job, this plugin looks really good!!! I have one feature request: to be able to set freely the magnetic variation and then send it either in HDG or in RMC sentences, or both. (to test Dashboard's priority scheme WMM model -> HDG -> RMC.) Thanks!
Canne is offline   Reply With Quote
Old 22-06-2019, 05:58   #37
Registered User

Join Date: Dec 2012
Posts: 180
Re: NMEA Instrument emulation (streaming)

Quote:
Originally Posted by Canne View Post
Ron and Rick, great job, this plugin looks really good!!! I have one feature request: to be able to set freely the magnetic variation and then send it either in HDG or in RMC sentences, or both. (to test Dashboard's priority scheme WMM model -> HDG -> RMC.) Thanks!

Hi i have been working on the test plugin while i have this unplanned hospital visit. One cough too many and a very old hernia injury.

Made me laugh on the bombadier Rick not supposed to at the moment

Before i upload the latest change to what i have been working on i want to review the colour choices on the tactics config page and use the same if i can hoping that will make it more cross platform useable.

Something folks need to be cognisant of is It depends on what instrument setup you have

messages are treated differently

what data message types they support what order messages are sent in and their repeat rate.

This “variability” is consistent to what i found to be evident with the work i did in ‘85 with the stand alone program i developed.

I settled on a sequence that most installs seemed happy sometimes i had to swap things about so OpenCPN is no different.

There is a sequence in the message decoder config on the nmea messaging related plugin includes


I have found no issues with mag var impacting messages selection for example because i am sending a gyro compass message type the true heading seems to be used.

I have what i would call a good set of message types that can be generated now and keep the dashboard tactics plugin busy.

With set point values on most i will work on sorting out how to enable and disable the messages as this will help solve what code is doing what from what i have observed.

Ive thought about suggesting the idea of a patch bay to work around the issue perhaps the style of what is used by audio plugins something to ponder on...

I have tried to include a lot of comments in the code to make it easier to modify and i have stuck with mikes coding structure pretty much

I typed out a quick user walk through Rick for Canne and i haven’t altered that process. The setpoints and messaging formatting is what i have been working on. I think i have the formats correct but need to do a thorough check with The protocol analyser (wireshark)

In the impl.cpp code Canne There is a push instruction and you can comment that out to stop a message and reorder these push statement to change the messaging order sequence.

I am on forced bed rest until monday at least so i am getting a bit of time to look at it, i am slow at coding


Attachment 194486Click image for larger version

Name:	IMG_5312.jpg
Views:	78
Size:	414.3 KB
ID:	194492
RonSouthworth is offline   Reply With Quote
Old 22-06-2019, 07:03   #38
Registered User
 
Canne's Avatar

Join Date: Aug 2014
Posts: 246
Re: NMEA Instrument emulation (streaming)

Ron, sorry to hear, keep it cool, will you. There is no rush and as said, commits in your repo means that I can test the plugin at any time. After a some working experience with final tests, I can continue with my comments if needed (there might be other use cases of which my developer's mind is not aware at all). Anyway, the dialog alone looks awesome! Great job!

Out of curiosity, with Wireshark are you using this https://github.com/kmpm/wireshark-nmea or something else?
Canne is offline   Reply With Quote
Old 22-06-2019, 07:59   #39
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,808
Images: 2
Re: NMEA Instrument emulation (streaming)

Get better Ron!
rgleason is offline   Reply With Quote
Old 22-06-2019, 12:31   #40
Registered User
 
Canne's Avatar

Join Date: Aug 2014
Posts: 246
Re: NMEA Instrument emulation (streaming)

Quote:
Originally Posted by rgleason View Post
I have tried it several time and enclose some screenshots.
Rick, I am puzzled. My own compilation and your AppVeyor artifact build *.exe do not give me the same result as you have got, a dialog with dark fonts on light background. For me, it remains the other way round, grey fonts on very dark background - I cannot read that. Is this a result of a setting in O itself?

Also, my Simulator_pi dialog keeps escaping behind the main O screen, does it the same to you?
Canne is offline   Reply With Quote
Old 22-06-2019, 12:41   #41
Registered User

Join Date: Dec 2012
Posts: 180
Re: NMEA Instrument emulation (streaming)

Sorry for the long rant, I must have been suffering a lot in the past from the wild west polar-formats...

Thank you in advance, as a owner of a racer, I am always interested in how well the others are performing! [/QUOTE]


Accepted standards practices are fine by me Canne re the .pol file I wasn't looking to move away from that. . quite the opposite

I have used polar_pi a bit at times and glad I can use it on Mac now. the graphics looks a lot crisper overall and I am an old unix hack at heart

I haven't given up on parsing that format or using that file type so I don't think your on a rant at all. I was more about thinking on how to capture various sources I have seen and being able to bring them into the open CPN environment.

I am very grateful for OpenCPN and the tactics plugin ov50 has some real potential it gives an avenue to put some science into the tactician's chair along with the other weather forecasting and modelling tools it really makes an awesome environment for optimising under sail or under way for that matter.

I have uncertainty in what instrument values are displayed where the loss of resolution is compared to what is deliverable with NMEA 0183.

It isn't me being picky just being who I am and that is an engineer.

I have sorted out a few quirky things in my career where the original instrumentation precision was lost throughout the process of acquisition to final display. very much SCADA stuff...

The present performance curve for the dynamic speed based on Grib data uses the xml file. the file as you know is presently hard coded.

this tool is really ship driver with a new wrapper and I want that fully acknowledged it gave me a quick way to "port" what I learned and have been using for a while in java when doing stuff on marine automation. I have had fun over the years testing autopilot and turn-key automation.

I would like to change the dynamic speed operation to read the polar file format I think but it is a longer term goal for the simulator at the moment.

the first milestone is to make it a tool that folks can use to test and verify stuff to remove the uncertainty to understand how it works.... I like to know how stuff works

The stand alone tool I developed in 85 and updated recently has been a real handy thing I am so glad I found a backup of it and a way to see it evolve from some other work hopefully bring together a few things to make something that will be really useful.

I'm not a racer. I have worked for one a long while ago during summer vacations - a very wealthy totally down to earth man a very good friend (passed away a few years ago now) loved rum and Italian cars.

I think I I understand your interests / perspective as an owner.

I like to improve and optimise the way I sail to me it is a challenge to myself not against anyone else. Too much into collaborating. He was more that style and it rubbed off on me, he could also very competitive of himself in crossing the line first

Me I want to sail the cat I am looking to buy as fast as I can but it is also my future home for a while and a means to travel too.

rant in reply
RonSouthworth is offline   Reply With Quote
Old 22-06-2019, 13:15   #42
Registered User

Join Date: Dec 2012
Posts: 180
Re: NMEA Instrument emulation (streaming)

Quote:
Originally Posted by Canne View Post
Ron, sorry to hear, keep it cool, will you. There is no rush and as said, commits in your repo means that I can test the plugin at any time. After a some working experience with final tests, I can continue with my comments if needed (there might be other use cases of which my developer's mind is not aware at all). Anyway, the dialog alone looks awesome! Great job!

Out of curiosity, with Wireshark are you using this https://github.com/kmpm/wireshark-nmea or something else?
thanks re the health, very lucky got it just in time...

I am stuck in a bed and healing fast so working on the program is giving me something to do


Yes Wireshark

The LUA script isn't playing nicely for me something to look at as parsing stuff when you can filter on a protocol makes it easy to check stuff.

Wireshark is an app I have used a fair bit handy for protocol stuff. used it a lot on some very odd serial protocols there are a few variations in dissecting tools. used a lot for SCADA stuff...

it is available as a brew repo for macOS and other platforms it has a commercial version but the non commercial is fine for me. it was called ethereal I have some tase2 dissectors written under ethereal.



I just do some capturing and then make certain the frames actually are transported as intended.

As I say I will do a double check on the message formats, one mag variation to the angle to check is correct in a message structure and look at changing colours for Canne a little

the down side of wx widgets.. qt is looking a lot slicker atm. MuseScore dark mode is looking better
RonSouthworth is offline   Reply With Quote
Old 22-06-2019, 13:22   #43
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,808
Images: 2
Re: NMEA Instrument emulation (streaming)

Quote:
Originally Posted by Canne View Post
Rick, I am puzzled. My own compilation and your AppVeyor artifact build *.exe do not give me the same result as you have got, a dialog with dark fonts on light background. For me, it remains the other way round, grey fonts on very dark background - I cannot read that. Is this a result of a setting in O itself?

Also, my Simulator_pi dialog keeps escaping behind the main O screen, does it the same to you?

dialog with dark fonts on light background. For me, it remains the other way round, grey fonts on very dark background - I cannot read that.



--I fiddle with it and turn it off and on, until it changes for some reason.
--Yes I have trouble with it disappearing in the background, then I get it working and stays there ....generally.


We're in beta mode testing Ron's Simulator, so it is inevitable there are some issues.
rgleason is offline   Reply With Quote
Old 22-06-2019, 13:29   #44
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,808
Images: 2
Re: NMEA Instrument emulation (streaming)

Quote:
I was more about thinking on how to capture various sources I have seen and being able to bring them into the open CPN environment.
I like this idea. I have a pile of other polar files to add, but I intended to clean up all the existing formats too.
rgleason is offline   Reply With Quote
Old 22-06-2019, 15:24   #45
Registered User

Join Date: Dec 2012
Posts: 180
Re: NMEA Instrument emulation (streaming)

===
PS: I've been trying to find out where I download Ron's plugin, to give it a try...[/QUOTE]

proof of concept version

which If I can update from here later on today will have a few more messages working....


https://github.com/scadaperspective/Simulator_pi
RonSouthworth is offline   Reply With Quote
Reply

Tags
Message Simulator, nmea


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
Why Would you Blackout the America's Cup Live Streaming in the US Dr. Strangelove General Sailing Forum 54 23-09-2013 18:07
Lowrance HDSG2T NMEA TCP streaming Twisticles OpenCPN 2 14-05-2013 21:27
Streaming live UK TV on board, anywhere in the world! simonmd Fishing, Recreation & Fun 0 17-04-2012 07:54
Windows 7 XP Emulation Mode callistov42 Marine Electronics 13 26-01-2011 09:12
Streaming Music via Internet driven Fishing, Recreation & Fun 12 20-07-2009 16:58

Advertise Here
  Vendor Spotlight
No Threads to Display.


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


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.