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:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting wind data into Pypilot
#1
    Hi all.

I have now managed to set up pypilot to work (perfectly! Thanks Sean) in compass and GPS mode.
But I am struggling with the wind modes (apparent and true).

I'm trying to set up the correct connections in OpenCPN (see screenshot). My signalK connection works for transferring navigational data (GPS/AIS data), and displaying them in OpenCPN, but it seems like the NMEA debug stream does not discover any data from SignalK.

Likeways, the pypilot client parameters wind.xxx are all unavailable (see screenshot)

Any ideas where to start?

Thanks,
Leif


Attached Files Image(s)
   
Reply
#2
Do you have wind instruments, and how are they connected?

Do you get wind data in signalk, or opencpn dashboard?

pypilot can get wind from either signalk or nmea0183.

As for "true wind" it is not very well tested and probably needs better filters (I am working on it). apparent wind mode has been working for years.
Reply
#3
You might first want to verify the assumption that you already have proper wind information in signalk by showing the relevant portion (environment.wind.*) of the signalk data browser screen?

Indeed for incoming signalk traffic you don't see anything in the opencpn nmea debug window - because it is not nmea! Bit of a bummer because the debug window was a handy tool, which does not have its equivalent for signalk. To be frank, I have not felt a strong need for debugging the signalk interface, because when data is available in signalk data browser, so far the assumption that is also available in opencpn has held up pretty much always.

Now if the pypilot's port 20220 is the only connection to pypilot, I can imagine your pypilot lacks wind because opencpn does not generate MWV messages out of signalk data. These MWV messages are the ones that pypilot needs to enable the Wind modes. You might have luck checking Forward NMEA in the OpenCPN Pypilot plugin, but I don't think so because it's supposed to forward and not generate messages.

With modern versions of pypilot, I'd suggest hooking pypilot straight to signalk, and bypass the link through OpenCPN altogether. This requires a few actions, all of which are in https://github.com/pypilot/workbook/wiki...k-zeroconf.
Reply
#4
(2022-08-12, 04:40 PM)seandepagnier Wrote: Do you have wind instruments, and how are they connected?

Do you get wind data in signalk, or opencpn dashboard?

pypilot can get wind from either signalk or nmea0183.

As for "true wind"  it is not very well tested and probably needs better filters (I am working on it).   apparent wind mode has been working for years.

Hi Sean. Yes, I do have wind data into signalK. See screenshot

(2022-08-13, 10:40 AM)ironman Wrote: You might first want to verify the assumption that you already have proper wind information in signalk by showing the relevant portion (environment.wind.*) of the signalk data browser screen?

Indeed for incoming signalk traffic you don't see anything in the opencpn nmea debug window - because it is not nmea! Bit of a bummer because the debug window was a handy tool, which does not have its equivalent for signalk. To be frank, I have not felt a strong need for debugging the signalk interface, because when data is available in signalk data browser, so far the assumption that is also available in opencpn has held up pretty much always.

Now if the pypilot's port 20220 is the only connection to pypilot, I can imagine your pypilot lacks wind because opencpn does not generate MWV messages out of signalk data. These MWV messages are the ones that pypilot needs to enable the Wind modes. You might have luck checking Forward NMEA in the OpenCPN Pypilot plugin, but I don't think so because it's supposed to forward and not generate messages.

With modern versions of pypilot, I'd suggest hooking pypilot straight to signalk, and bypass the link through OpenCPN altogether. This requires a few actions, all of which are in https://github.com/pypilot/workbook/wiki...k-zeroconf.

I did look into the modern solution of letting pypilot connect directly to SignalK. See screenshot for some debug info. However, the wind data is still not available in Pypilot...


Attached Files Image(s)
       
Reply
#5
I see two signalk servers (.242 and .243) and pypilot connects to one of them (.243). You sure that's the right one?
Reply
#6
(2022-08-15, 04:38 PM)ironman Wrote: I see two signalk servers (.242 and .243) and pypilot connects to one of them (.243). You sure that's the right one?

Hi. Yes, the RPI where I have signalK installed has two IP-addresses, one for wifi and one for LAN. I have now disabled the wifi, and the debug messages refer only to the .242. 
But still no wind data, unfortunately...

Some more screenshots of my system...


Attached Files Image(s)
               
Reply
#7
Cannot find any flaw; I checked your output with mine here in the lab at home and they seem to match. I will try to check this setup on my boat next time.

In the meantime, there's another thing for you to try: have signalk generate the required nmea messages and send them to pypilot's 20220 port. In fact, this is what I seem to have running at the boat.

This requires two components: installation and configuration of the Convert SignalK to NMEA0183 plugin, and adding a TCP Client Data Connection. I hope the following signalk config files are not too cryptic:

Code:
pi@openplotter:~/.signalk $ cat plugin-config-data/sk-to-nmea0183.json
{
 "configuration": {
   "APB": true,
   "APB_throttle": 0,
   "DBK": false,
   "DBK_throttle": 0,
   "DBS": false,
   "DBS_throttle": 0,
   "DBT": false,
   "DBT_throttle": 0,
   "DPT": false,
   "DPT_throttle": 0,
   "GGA": false,
   "GGA_throttle": 0,
   "GLL": false,
   "GLL_throttle": 0,
   "HDG": false,
   "HDG_throttle": 0,
   "HDM": false,
   "HDM_throttle": 0,
   "HDMC": false,
   "HDMC_throttle": 0,
   "HDT": true,
   "HDT_throttle": 0,
   "HDTC": false,
   "HDTC_throttle": 0,
   "MMB": false,
   "MMB_throttle": 0,
   "MTA": false,
   "MTA_throttle": 0,
   "MTW": false,
   "MTW_throttle": 0,
   "MWD": false,
   "MWD_throttle": 0,
   "MWVR": true,
   "MWVR_throttle": 0,
   "MWVT": false,
   "MWVT_throttle": 0,
   "PNKEP01": false,
   "PNKEP01_throttle": 0,
   "PNKEP02": false,
   "PNKEP02_throttle": 0,
   "PNKEP03": false,
   "PNKEP03_throttle": 0,
   "PNKEP99": false,
   "PNKEP99_throttle": 0,
   "PSILCD1": false,
   "PSILCD1_throttle": 0,
   "PSILTBS": false,
   "PSILTBS_throttle": 0,
   "RMB": true,
   "RMB_throttle": 0,
   "RMC": false,
   "RMC_throttle": 0,
   "ROT": false,
   "ROT_throttle": 0,
   "RSA": false,
   "RSA_throttle": 0,
   "VHW": false,
   "VHW_throttle": 0,
   "VLW": false,
   "VLW_throttle": 0,
   "VTG": false,
   "VTG_throttle": 0,
   "VWR": false,
   "VWR_throttle": 0,
   "VWT": false,
   "VWT_throttle": 0,
   "XDRBaro": false,
   "XDRBaro_throttle": 0,
   "XDRNA": false,
   "XDRNA_throttle": 0,
   "XDRTemp": false,
   "XDRTemp_throttle": 0,
   "XTE": false,
   "XTE_throttle": 0,
   "ZDA": false,
   "ZDA_throttle": 0
 },
 "enabled": true
}pi@openplotter:~/.signalk $ cat settings.json

[... omitted]
   {
     "pipeElements": [
       {
         "type": "providers/simple",
         "options": {
           "logging": false,
           "type": "NMEA0183",
           "subOptions": {
             "validateChecksum": true,
             "type": "tcp",
             "suppress0183event": true,
             "sentenceEvent": "",
             "host": "10.10.10.3",
             "port": "20220",
             "toStdout": [
               "nmea0183out"
             ],
             "providerId": "pypilot"
           },
           "providerId": "pypilot"
         }
       }
     ],
     "id": "pypilot",
     "enabled": true
   }
Reply
#8
Ok. Thanks for your guidance. I will try the proposed solution.

BTW, should I go ahead and try to build an updated version of the pypilot software. I don't exacly remember the version i'm running, but it is probably the latest Tinypilot image available online. I have set up for pulling the latest code from github, but I've never been able to actually build a working pypilot from the code...

Secondly, the wind data does not seem to be available in OpenCPN (for polar plotting and trending). Could there be a connection to my problems in pypilot here?
Reply
#9
Does the timestamp of environment.wind.angleApparent update? Is there a steady Connection activity (deltas/second) in the signalk dashboard? Having a value in the dashboard does not mean that the data keeps on flowing... There are instrument panel webapps for signalk available - do you see wind there?

Recompiling pypilot does not seem opportune - your output suggests a recent enough version to me.

Some opencpn plugins did not seem to pick up on the (relatively) new signalk connection. I believe either the dashboard or the tactics dashboard did at least.
Reply
#10
Does gps make it through signalk to pypilot?

Did you grant read/write permissinons or only read?

Do you still get the errors of "nmea client lost connection" ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)