Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 31-05-2011, 23:38   #1
Registered User

Join Date: Mar 2010
Location: Göteborg, Sweden
Boat: Seamaster 700
Posts: 96
Send a message via Skype™ to balp
Serial Port Handling Redesign

From the Autopilot thread, the need to redesign the handling of the serial ports came up.


At the moment three NMEA serial ports are configured.
GPS, Autopilot and AIS. The AIS is on a separate panel but can be combined with the GPS, The GPS and and Autopilot on the same page but can't be combined.

The idea is to set up a number of NMEA (serial) ports.
  • Each port should have it's own speed.
  • Each port should have a input filter
  • Each port should have a output filter
  • Each port should be able to repeat messages from any other port
  • Each port should have an user defined name.

This should make it possible to easy set up many different situations.

I have two ports, one to Garamin plotter, one to AIS. Just set up the two ports one 4800 one 38400. And all is working.

RythmDoctor, sets up one port for GPS one for Autopilot, marks the RMC message form the GPS to repeat.

I think the code design could be quite easy. The problem is the user interface, to get that understandable, and easy and still flexible.
Attached Thumbnails
Click image for larger version

Name:	opencpn_design_ports.png
Views:	167
Size:	24.5 KB
ID:	27940  
__________________

__________________
balp is offline   Reply With Quote
Old 01-06-2011, 02:46   #2
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 335
Re: Serial port handling redesign

Don't forget plugin input.

To add TCP input/output for example (maybe bluetooth as well, I don't know how it behaves? emulated serial?). Proprietary input (Garmin)

Should plugins be allowed to disable/lock other inputs? It's requested in the VDR thread: when replaying some nmea recorded stream, it'll interfere with any live input creating strange results... Either create exclusive input or maybe ability to hook a filter to remove specific input (well, it's a corner case, same results would be possible with multiple inputs)
__________________

__________________
SethDart is offline   Reply With Quote
Old 01-06-2011, 03:24   #3
Registered User

Join Date: Feb 2010
Posts: 619
Re: Serial port handling redesign

Quote:
Originally Posted by SethDart View Post
when replaying some nmea recorded stream, it'll interfere with any live input creating strange results...
I know it's not a favoured idea, but isn't it the case for parallel instances? Planning/reviewing and underway watch often are conflicting...
__________________
PjotrC is offline   Reply With Quote
Old 01-06-2011, 04:47   #4
Registered User
 
Netsurfer's Avatar

Join Date: Jan 2010
Location: Cologne, Germany
Boat: Beneteau Oceanis 331
Posts: 557
Re: Serial port handling redesign

Hi all ...
As my C++ programming skills still are very weak I regard things more from a user's point of view with usability (UI) in mind.
Quote:
Originally Posted by balp View Post
From the Autopilot thread, the need to redesign the handling of the serial ports came up.


At the moment three NMEA serial ports are configured.
GPS, Autopilot and AIS. The AIS is on a separate panel but can be combined with the GPS, The GPS and and Autopilot on the same page but can't be combined.

The idea is to set up a number of NMEA (serial) ports.
  • Each port should have it's own speed.
  • Each port should have a input filter
  • Each port should have a output filter
  • Each port should be able to repeat messages from any other port
  • Each port should have an user defined name.
Agreed.
Quote:
The problem is the user interface, to get that understandable, and easy and still flexible.
IMHO we need some kind of "Software Multiplexer".
I am thinking of something like ...
One tab "Connections" with a general differentiation between "Input" and "Output". In each of the two sections one may choose an available port. Additionally (maybe in an additional pop-up window) there needs to be an option for the (advanced) port settings. This has to include things like
  • Baud rate
  • Filter settings
AFAIS filter settings depend on the available data/ NMEA sentences. So therefor we could use e.g. a list of checkboxes with each sentence as an item.

Quote:
Originally Posted by SethDart View Post
Don't forget plugin input.

Should plugins be allowed to disable/lock other inputs?
IMHO they should not (as long as you only may run a single instance of OCPN)! This may lead to unwanted behaviour.

But plugins should absolutely be able to connect to the data flow.

Quote:
Originally Posted by PjotrC View Post
I know it's not a favoured idea, but isn't it the case for parallel instances? Planning/reviewing and underway watch often are conflicting...
I agree. We now already have the situation (VDR plugin) that running only one single instance may cause "problems/ conflicts".
One possible solution I can think of would be
  • to allow only one additional/ second instance
    which is started from within the original instance (so it is asured that it is the same version of OCPN).
  • as this instance is NOT intended for real time navigation it might be useful to NOT connect to the input ports (GPS/ AIS)
  • it may use the same config settings from opencpn.ini and does NOT change them. If other settings are required then they should be added to the config file, e.g. like [OCPN_Simulation]
  • this instance should NOT be allowed to run alone (without the main instance).
  • there should be a large note on the screen that this is the "Offline/ Simulation Mode" instance.
By doing so we probably could circumvent the problems with multiple instances ...?

BTW: I altered the graphic that balp attached as I believe that also some data generated by OCPN (e.g. XTE for routes etc.) should be available for output.

Gunther
Attached Thumbnails
Click image for larger version

Name:	opencpn_design_ports_a.png
Views:	147
Size:	24.1 KB
ID:	27942  
__________________
Deutschsprachige Community- und Support-Website unter OpenCPN.de
Netsurfer is offline   Reply With Quote
Old 01-06-2011, 05:20   #5
Registered User

Join Date: Mar 2011
Posts: 10
Re: Serial port handling redesign

I think some consideration (or a user survey) needs to be undertaken to determine I/O needs.

I myself use a MagicPlex 8 NMEA multiplexor, that has 8 NMEA ports, each of which can be configured as inputs, outoputs or bi-directional, and with filters.

My unit is configured as the following:
Port 1: GPS input
Port 2: Depth input
Port 3: Log input
Port 4: Wind input
Port 5: AIS input
Port 6: VHF/DSC input & output
Port 7: Autopilot output
Port 8: RS232 PC input & output

In addition to a RS232 serial interface to the POC, it also supports a TCP/IP interface (just using emitting the NMEA outputs as text on a TCP stream)

The current UI may be misleading for some users, with different dialogs for AIS,GPS & autopilot.

Just my $0.02
__________________
stevead is offline   Reply With Quote
Old 01-06-2011, 09:51   #6
Moderator
 
Paul Elliott's Avatar

Cruisers Forum Supporter

Join Date: Sep 2006
Posts: 3,863
Images: 4
Re: Serial Port Handling Redesign

You guys might want to look into something like the NMEA router I built into NavMonPc. It routes NMEA based on port # (serial, virtual serial, TCP/IP client, server) and NMEA sentence. There is a three-tier priority scheme, so you can select (for example) which of multiple RMC inputs to use, and the fallback priority. It has default options so the initial configuration works for most folks, but you can remove a default or override it for specific cases. It's pretty flexible, perhaps too flexible, but I haven't had any complaints. I could be the only one who uses it!

Anyway, it wasn't too hard to design, and the flexibility is quite powerful.
__________________
Paul Elliott, S/V VALIS - Pacific Seacraft 44 #16 - Friday Harbor, WA
www.sailvalis.com
Paul Elliott is offline   Reply With Quote
Old 01-06-2011, 10:03   #7
Registered User
 
Netsurfer's Avatar

Join Date: Jan 2010
Location: Cologne, Germany
Boat: Beneteau Oceanis 331
Posts: 557
[OT]: NavMonPc

Hi Paul ...

nice to meet you here in the forum.
Quote:
Originally Posted by Paul Elliott View Post
It has default options so the initial configuration works for most folks, ... . It's pretty flexible, perhaps too flexible, but I haven't had any complaints. I could be the only one who uses it!
I just installed NavMonPc a few days ago because I wanted to use its playback funtionality for AIS simulation.

And at first I couldn't get it to work (on my Win 7 system). No matter what port settings I used none of them were available in OCPN.

The reason simply was that I had not installed the "XP Runtime ..." which is shown on the finish page of the installer.

After installing it a second time and this time also with the Runtime file all worked fine.

I also find some posts about the same problem around the Internet.
So an additional hint/ information might be helpful ...!

Thanks

Gunther
__________________
Deutschsprachige Community- und Support-Website unter OpenCPN.de
Netsurfer is offline   Reply With Quote
Old 01-06-2011, 10:20   #8
Moderator
 
Paul Elliott's Avatar

Cruisers Forum Supporter

Join Date: Sep 2006
Posts: 3,863
Images: 4
Re: Serial Port Handling Redesign

Hi Gunther,

I do mention this in the User's Guide (page 8, in the Installation section), but who reads the User's Guide? I sure don't! The next time I rev the program I will see if I can put a hint on the install screen, and add this issue to the Guide's FAQ section.
__________________
Paul Elliott, S/V VALIS - Pacific Seacraft 44 #16 - Friday Harbor, WA
www.sailvalis.com
Paul Elliott is offline   Reply With Quote
Old 01-06-2011, 11:32   #9
Registered User

Join Date: Mar 2010
Location: Göteborg, Sweden
Boat: Seamaster 700
Posts: 96
Send a message via Skype™ to balp
Re: Serial port handling redesign

Quote:
Originally Posted by SethDart View Post
Don't forget plugin input.

To add TCP input/output for example (maybe bluetooth as well, I don't know how it behaves? emulated serial?). Proprietary input (Garmin)
Bluetooth is just a serial port. Garmin is just special NMEA like sentences.
__________________
balp is offline   Reply With Quote
Old 03-06-2011, 05:48   #10
Registered User

Join Date: Feb 2011
Posts: 488
Re: Serial port handling redesign

[QUOTE=Netsurfer;698490]Hi all ...

I am including a desing that they need to put into the system, and it will be the only way to reach a proper setup for them request of port handling. It is a serie of print screen of another chart program that I have.
See for yourself.
Regards
Pierre
__________________
P_Dub is offline   Reply With Quote
Old 03-06-2011, 07:49   #11
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,877
Re: Serial Port Handling Redesign

P_Dub...

We don't see....

Dave
__________________
bdbcat is offline   Reply With Quote
Old 03-06-2011, 14:18   #12
Registered User

Join Date: Feb 2011
Posts: 488
Re: Serial Port Handling Redesign

Quote:
Originally Posted by bdbcat View Post
P_Dub...

We don't see....

Dave
Did you get what I did send you via email?
Bye
Pierre
__________________
P_Dub is offline   Reply With Quote
Old 18-07-2011, 23:35   #13
Registered User

Join Date: Mar 2010
Location: Göteborg, Sweden
Boat: Seamaster 700
Posts: 96
Send a message via Skype™ to balp
Re: Serial Port Handling Redesign

I got one more problem that this design should be able to solve. i have two usb to rsr232 converters. in a usb hub to connect to plotter and AIS now. when i connect the hub which one gets ttyUSB0 or ttyUSB1 differs so I often have to use the configurations to swap the ports.

Setting ports up to auto-detect incomming speed, and use the data should make it much easier.
__________________

__________________
balp is offline   Reply With Quote
Reply

Tags
serial

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
Electrical Redesign Advice StringBimini Electrical: Batteries, Generators & Solar 32 16-03-2012 17:04
Garmin Serial Port to USB Cable and Driver bvimatelot Navigation 22 22-11-2010 16:53
Main Sheet & Traveller Redesign serah Deck hardware: Rigging, Sails & Hoisting 6 08-11-2010 17:28
Garmin 4208 serial port settings janders Marine Electronics 2 04-05-2010 06:25



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 19:53.


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.