This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AvNav implementation in OP2
AvNav really needs the AIS data as NMEA0183 - so to send this from SK you need some plugin doing the conversion from SK to NMEA0183.
If the data already comes in as 0183 SK will simply forward it.
For diagnosis BlackSea already gave you the command for checking the AIS data that is coming out from SK on NMEA0183.
(2022-03-19, 02:39 PM)wellenvogel Wrote: AvNav really needs the AIS data as NMEA0183 - so to send this from SK you need some plugin doing the conversion from SK to NMEA0183.

Thanks @wellenvogel, that was the key I was missing!

And thanks @BlackSea, that will be helpful.

I found this plugin which seems to do exactly what I need, but unfortunately is crashing on my side with 
Error: Not supported at fetch (/home/pi/.signalk/node_modules/signalk-vessels-to-ais/index.js:25:49) at Timeout.readData [as _onTimeout] (/home/pi/.signalk/node_modules/signalk-vessels-to-ais/index.js:190:7) at ontimeout (timers.js:438:13) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10)

But this is no longer related to AvNav, so I'll open another thread to avoid polluting this one.
Hm, it's a pity...
The NMEA2000 to 1083 AIS plugin works - but you do not have NMEA2000.
Which kind of data does the simulator send the AIS messages? Maybe there is a different way of handling them.
Anyway the direkt fetching of SK data to AvNav is one of the top priorities on my list right now...
Unfortunate, but not a real issue. I was just writing something for learning purposes, and since your AvNav is the main chart plotter in my setup, i wanted to test if the AIS simulator was working, and therefore noticed this issue. But nothing is preventing to see the boats using other plugins, as I need it only at development time. Ultimately what I'm writing won't require charts at all ^^

But yeah, if you manage to feed AIS list from /signalk/v1/api/vessels instead of nmea0183 sentences that would be cool!
If you want to try - you could check the newest daily build of AvNav - it can now directly fetch from SK.
Still a couple of things to be finalized...
Hey there. I just tried the last daily build I found, but i think i did something wrong because i get a number of errors:

pi@openplotter:~/Downloads $ sudo dpkg -i avnav-raspi_20220410_all.deb
(Reading database ... 124560 files and directories currently installed.)
Preparing to unpack avnav-raspi_20220410_all.deb ...
Unpacking avnav-raspi (20220410) over (20220328) ...
Setting up avnav-raspi (20220410) ...
Failed to stop check_parts.service: Unit check_parts.service not loaded.
check_parts not running
Failed to stop check_wlan.service: Unit check_wlan.service not loaded.
check_wlan not running
stopping and disabling gpsd
Synchronizing state of gpsd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable gpsd
migrating old config /home/pi/avnav/data/avnav_server.xml
checking existing /etc/wpa_supplicant/wpa_supplicant.conf
country already set
socket setting ok
removing /var/lib/ntp/ntp.conf.dhcp
Failed to disable unit: Unit file dhcpd.service does not exist.
dhcpd not running, dont need to disable
Failed to stop dhcpd.service: Unit dhcpd.service not loaded.
dhcpd not running, dont need to disable
Synchronizing state of dhcpcd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable dhcpcd
Synchronizing state of ntp.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable ntp
Unit /etc/systemd/system/ntp.service is masked, ignoring.
pi@openplotter:~/Downloads $

I also installed avnav_20220410_all.deb just in case the "raspi" one was not the one i was supposed to install.

Now i don't see my own boat, even if COG and SOG is properly displayed. Also AIS targets are not fetched directly from SignalK, the solution is still to forward nmea sentences.

I know is a daily build, so no complains, just letting you know Smile
First: Do NOT! install the -raspi on openplotter. It will potentially break your network settings and other stuff!

For the avnav package itself.
What exactly did you do after installing?
It's just important that you:
(1) restarted AvNav after installing (e.g. using the AvNav installer)
(2) reload the WebPage (just use shift + reload to be sure)
If you did not change the configuration everything should work as before.
To sort things out it would be good to get an understanding what is shown on your browser (and what not).

For the deeper integration with SK:
You would need to configure this at the new AVNSignalKHandler (description is just under work).
It will (intentionally) not do this by it's own.

And BTW: What browser are you using, what layout,...
Whoa what a fast reply, thanks!

So, good to know i don't have to install -raspi version. Noted. Luckily nothings seems to be broken.

As for showing my own boat -> Solved. I had already ctrl+F5 the browser, but most likely i was to fast before AvNav had finished restarting. Did it again and now it works like it used too, indeed.

Also found the SignalKHandler and setup some settings, but i get this AIS error at the end:


main connected at http://localhost:3000/signalk/v1/api/
source avnav-6235dc23-c724-4d97-957d-aacde2a16553
alarms active
websocket connected at ws://localhost:3000/signalk/v1/stream, timeOffset=-0s
authentication successfully retrieved token for pi
write connected at ws://localhost:3000/signalk/v1/stream, timeOffset=-0s
charts read 0 charts

ais error reading ais data from http://openplotter:3000/signalk/v1/api/vessels/:'int' object has no attribute 'partition'

I can confirm that reaching this url http://openplotter:3000/signalk/v1/api/vessels/ actually return a list of vessels. 

Maybe is worth saying that AIS sent via nmea are still shown.

Not sure if it's still relevant but the client runs on chrome v100, on a win10 desktop machine.

I just noticed that my own boat appears as an AIS target
Ok, thanks for reporting this error....
For the own Ship:
At AVNConfig you can set the own MMSI to prevent tracking this.
But maybe the SK integration could determine this by it's own.
Would you be willing to send me a SK response from .../api/vessels/?
Maybe with a private message - or just by mail?
Would help to test...
Ok, after I saw the problem in the json output there is now a new daily that should be more robust against invalid time stamps.

Forum Jump:

Users browsing this thread: 1 Guest(s)