Cruisers Forum
 


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 16-02-2020, 16:15   #1351
Registered User

Join Date: May 2012
Posts: 6
Re: OpenCPN General

Awesome!! Thank you Dsanduril. The manual fix in the command line worked. We'll look at installing OpenPlotter and also a real-time clock but, in the meantime, we're up and running, which is great news.
Nicky Barker is offline   Reply With Quote
Old 16-02-2020, 16:29   #1352
Registered User
 
LeaseOnLife's Avatar

Join Date: Apr 2008
Location: out cruising again, currently in Fiji
Boat: Sailboat
Posts: 1,466
Re: OpenCPN General

Quote:
Originally Posted by Nicky Barker View Post
Awesome!! Thank you Dsanduril. The manual fix in the command line worked. We'll look at installing OpenPlotter and also a real-time clock but, in the meantime, we're up and running, which is great news.

Another more automated option: You can run gpsd and ntpd on the PI. GPS serial input to gpsd, that feeds opencpn the gps position as well as the gps time to ntpd, which does synchronize the clock on the PI. This works well enough with USB-serial connected GPS receivers to be accurate within a second. It took me a while to get ntp working, the trick in /etc/ntp.conf was the following lines:
Code:
# GPS Serial data reference, 
server 127.127.28.0 minpoll 4 maxpoll 4 iburst prefer
fudge 127.127.28.0 time1 0.420 stratum 1 refid GPS0
# no pps available here, no 127.127.28.1
the USB-gps 'jitters' a bit, it will take ntp a while to accept the date/time, but it will since it is the only clock source:
Code:
 ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 *SHM(0)          .GPS0.           1 l   13   16  377    0.000    5.137   3.711
the star at the before SHM indicates a valid time source.


Cheers!
LeaseOnLife is offline   Reply With Quote
Old 16-02-2020, 16:52   #1353
Registered User

Join Date: May 2012
Posts: 6
Re: OpenCPN General

Hi LeaseofLife. Thank you for this. However, you are assuming a level of knowledge that I just don't have! Do I just type in your code:

# GPS Serial data reference,
server 127.127.28.0 minpoll 4 maxpoll 4 iburst prefer
fudge 127.127.28.0 time1 0.420 stratum 1 refid GPS0
# no pps available here, no 127.127.28.1

at the ~$:

or do I need to upload gpsd and ntpd programmes to the Raspberry Pi first?
Nicky Barker is offline   Reply With Quote
Old 16-02-2020, 17:01   #1354
Registered User
 
Dsanduril's Avatar

Join Date: Aug 2011
Location: Petersburg, AK
Boat: Outremer 50S
Posts: 4,229
Re: OpenCPN General

Do you have a GPS connected directly to the Pi? Or do you get GPS data over NMEA? If the former then you can install gpsd and have it read the GPS information and then forward it to OpenCPN.

If the latter then you will need to configure OpenCPN with a new network connection of type gpsd to re-transmit the GPS info to the system.

So, which way do you have things set up?
Dsanduril is offline   Reply With Quote
Old 16-02-2020, 17:20   #1355
Registered User

Join Date: May 2012
Posts: 6
Re: OpenCPN General

Hi Dsanduril, We have a multiplexer that takes the GPS and AIS feeds and sends them to the Raspberry Pi via the Pi's USB 3.0 port. On the OpenCPN v5.0.0 Options-Connections page this shows as Serial type, input, NMEA 0183 protocol, serial port /dev/ttyUSB0. So, I assume that this means we get the GPS data over NMEA. Assuming this is correct, how do I reconfigure OpenCPN with a gpsd network connection?
Nicky Barker is offline   Reply With Quote
Old 16-02-2020, 17:27   #1356
Registered User
 
LeaseOnLife's Avatar

Join Date: Apr 2008
Location: out cruising again, currently in Fiji
Boat: Sailboat
Posts: 1,466
Re: OpenCPN General

Code:
sudo apt-get install gpsd
:-)


the default options for gpsd should autodetect your NMEA input via USB, but I like to force/fix that to a specific input


The lines I typed above need to go into the configuration file for ntpd, in /etc/ntp.conf


Then ntpd can read from gpsd via shared memory and gets the time that way.
LeaseOnLife is offline   Reply With Quote
Old 16-02-2020, 17:40   #1357
Registered User
 
Dsanduril's Avatar

Join Date: Aug 2011
Location: Petersburg, AK
Boat: Outremer 50S
Posts: 4,229
Re: OpenCPN General

Hmm, I'd have to spend some time playing with this. I had thought O could output on gpsd, but it can only take input.

If the GPS was connected directly to the Pi you could then connect that to gpsd, and then connect O to gpsd to get the position information.

But, with the multiplexer adding AIS info I don't think that will work because the port would be captured by gpsd and I don't think gpsd would forward the AIS.

As I said, not a particular configuration I've tried so I'd have to play at it, maybe LoL can provide some more insight.
Dsanduril is offline   Reply With Quote
Old 16-02-2020, 18:15   #1358
Registered User

Join Date: May 2012
Posts: 6
Re: OpenCPN General

Thank you both Dsanduril and LeaseOnLife. We tried

sudo apt-get install gpsd

and our system said that the most up-to-date was already installed (though, having searched we can't see it anywhere in the file structure). Similarly, we can't find /etc/ntp.conf in the file structure. So, for the time being, we'll work on manually updating the time when we switch on the Raspberry Pi, which will be good enough for our needs. When we have a good internet connection we may revisit the issue. Thank you for your help.
Nicky Barker is offline   Reply With Quote
Old 16-02-2020, 19:27   #1359
Registered User
 
LeaseOnLife's Avatar

Join Date: Apr 2008
Location: out cruising again, currently in Fiji
Boat: Sailboat
Posts: 1,466
Re: OpenCPN General

Quote:
Originally Posted by Dsanduril View Post
...

But, with the multiplexer adding AIS info I don't think that will work because the port would be captured by gpsd and I don't think gpsd would forward the AIS.
...

gpsd does forward AIS messages too!

https://gpsd.gitlab.io/gpsd/
LeaseOnLife is offline   Reply With Quote
Old 16-02-2020, 19:28   #1360
Registered User
 
Dsanduril's Avatar

Join Date: Aug 2011
Location: Petersburg, AK
Boat: Outremer 50S
Posts: 4,229
Re: OpenCPN General

etc should be way back at the root of your filesystem. You're likely starting at the user directory (the Linux default), so from a command line:

Quote:
cd /etc
should get you there (if you're using a GUI sometimes getting back lower than the user directory is hard to find, but it is there somewhere).

You don't actually even have to change to that directory, you can call the file from wherever you are. Run an editor to change the config file. Depends on what editor you have.

Quote:
sudo nano /etc/ntp.conf
or
sudo vi /etc/ntp.conf
I use sudo because that usually provides write privileges to /etc. I prefer nano, but vi is probably more prevalent in default installs. Then put in the lines shown by LoL, your default file probably looks something like this:

Quote:
# You do need to talk to an NTP server or two (or three).
#server ntp.your-provider.example
server 127.127.28.0 minpoll 4 maxpoll 4 iburst prefer
fudge 127.127.28.0 time1 0.420 stratum 1 refid GPS0

# pool.ntp.org maps to about 1000 low-stratum NTP servers. Your server will
# pick a different set every time it starts up. Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>
pool 0.debian.pool.ntp.org iburst
pool 1.debian.pool.ntp.org iburst
pool 2.debian.pool.ntp.org iburst
pool 3.debian.pool.ntp.org iburst
if using vi then

Quote:
ESC
:wq
to save and quit

nano

Quote:
Ctrl-o (letter 'o', not zero)
Ctrl-x
you'll probably still need to start gpsd/configure it to run on startup. That depends on how your initial system was set up.

To check if gpsd is running:

Quote:
systemctl status gpsd
Dsanduril is offline   Reply With Quote
Old 16-02-2020, 19:29   #1361
Registered User
 
LeaseOnLife's Avatar

Join Date: Apr 2008
Location: out cruising again, currently in Fiji
Boat: Sailboat
Posts: 1,466
Re: OpenCPN General

Quote:
Originally Posted by Nicky Barker View Post
Thank you both Dsanduril and LeaseOnLife. We tried

sudo apt-get install gpsd

and our system said that the most up-to-date was already installed (though, having searched we can't see it anywhere in the file structure). Similarly, we can't find /etc/ntp.conf in the file structure. So, for the time being, we'll work on manually updating the time when we switch on the Raspberry Pi, which will be good enough for our needs. When we have a good internet connection we may revisit the issue. Thank you for your help.

don't give up yet!


ps ax |grep gpsd



that should tell whether gpsd is running.



if it is, the try the command



cgps


that then should show your current position and several messages scrolling thru
LeaseOnLife is offline   Reply With Quote
Old 16-02-2020, 19:29   #1362
Registered User
 
Dsanduril's Avatar

Join Date: Aug 2011
Location: Petersburg, AK
Boat: Outremer 50S
Posts: 4,229
Re: OpenCPN General

Quote:
Originally Posted by LeaseOnLife View Post
gpsd does forward AIS messages too!

https://gpsd.gitlab.io/gpsd/
Cool! Thanks for that
Dsanduril is offline   Reply With Quote
Old 18-02-2020, 22:09   #1363
Registered User

Join Date: May 2014
Location: British Colombia Canada
Boat: Corbin 39
Posts: 37
Re: OpenCPN General

I am running OpenCPN ver 5.0 with CM93-2011 charts and I need help with what shows up on the vector charts. At the moment I can only see depths and light beacons, I do not see any country names, harbour names or city names. I remember on previous versions this was all there using the same charts.
Advice, please
MalteseFalcon is offline   Reply With Quote
Old 18-02-2020, 23:03   #1364
Registered User
 
Reefmagnet's Avatar

Join Date: May 2008
Location: puɐןsuǝǝnb 'ʎɐʞɔɐɯ
Boat: Nantucket Island 33
Posts: 4,864
Re: OpenCPN General

Quote:
Originally Posted by MalteseFalcon View Post
I am running OpenCPN ver 5.0 with CM93-2011 charts and I need help with what shows up on the vector charts. At the moment I can only see depths and light beacons, I do not see any country names, harbour names or city names. I remember on previous versions this was all there using the same charts.
Advice, please

Your get this clicking the 3 horizontal bars icon at the lower right of the chart window and selecting the "Show Text" option under "Vector Charts". It isn't selected by default.
Reefmagnet is offline   Reply With Quote
Old 18-02-2020, 23:16   #1365
Marine Service Provider

Join Date: Feb 2012
Location: Vienna, Austria
Boat: Vagabond 47
Posts: 928
Re: OpenCPN General

Same with Keyboard T
Me too... always searching... I do always forget it....


Maybe it would be better to change the defaults....
moseriw 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
OpenCPN bdbcat OpenCPN 1343 19-09-2009 15:59
Hi - Just a Few Brief General Questions valley Meets & Greets 5 26-08-2009 12:19
OpenCPN with BSB v4 selkie Navigation 4 03-08-2009 11:32

Advertise Here


All times are GMT -7. The time now is 03:43.


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.