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
How does Pypilot use nmea?
#1
Hi,

I see a thread about supporting nmea 2000 for Pypilot and and in the shop "USBN - €25 (+20% VAT) - Isolated NMEA0183-to-USB converter"

What I am wondering is how this gets used by pypilot.

1. Does Pypilot output information onto nmea that for example that my opencpn chartplotter will show?

2. Does Pypilot input data from nmea (gps? compass? or ...)

Thanks

Dave
Reply
#2
For nmea0183 yes, it can have nmea0183 for both inputs and outputs.

It can also do this through the network to opencpn rather than over the usb converter.
Reply
#3
Thanks Sean,

(2026-06-06, 11:28 PM)seandepagnier Wrote: For nmea0183 yes, it can have nmea0183 for both inputs and outputs.

It can also do this through the network to opencpn rather than over the usb converter.

I assume that it is only possible to set the Pypilot to steer in wind mode if it is receiving wind data from nmea (either by cable or from opencpn).

If a pypilot is steering in compass mode does the algorithm make any use of nmea wind data?

Dave
Reply
#4
Only in the very recently tested wind pilot.

So basically there are multiple "pilots" pypilot can use. This allows for alternate algorithms. The basic pilot uses compass steering primary, and adjusts the compass course in other modes gradually to hold the desired gps or wind angle. The wind pilot does the opposite, so in wind mode it completely ignores the compass, but in compass mode, the wind pilot will gradually adjust the wind angle to hold the compass course. This has limited testing but I did try it a bit.

In any case, how would you use the wind data in compass mode? Perhaps you would be curious enough to implement your own pilot with alternate logic?
Reply
#5
Thanks Sean,

(2026-06-07, 06:25 PM)seandepagnier Wrote: Only in the very recently tested wind pilot.

So basically there are multiple "pilots" pypilot can use.  This allows for alternate algorithms.  The basic pilot uses compass steering primary, and adjusts the compass course in other modes gradually to hold the desired gps or wind angle.    The wind pilot does the opposite, so in wind mode it completely ignores the compass, but in compass mode, the wind pilot will gradually adjust the wind angle to hold the compass course.  This has limited testing but I did try it a bit.

In any case, how would you use the wind data in compass mode?  Perhaps you would be curious enough to implement your own pilot with alternate logic?

I'm asking for a couple of reasons.

1. I have a Calypso Ultrasonic wind sensor (wireless, solar powered, bluetooth and no moving parts). I'm not sure about it's accuracy yet. It comes with limited options for connection. I don't want to reply on a mobile phone to get the signal and display the data. So I have been learning bluetooth and practising Rust coding to create an application for a Pi zero that will send the data initially to a display for testing and in future to be a SignalK plugin or to nmea. I wanted to check if there would be much difference if I run the pypilot in compass or gps mode without wind data initially.

2. In terms of wind data in compass or gps mode I was wondering if wind data might be used to influence the logic eg
- to react more rapidly with more wind
- to be careful to avoid gibes if running deep downwind by correcting more rapidly if the angle swerves closer to the gibe.
- to sound an alarm if the course takes you too close to the wind

Am I correct that the code for the different pilots is in pypilot/pypilot/pilots ? So for example I could add a gps_wind.py or something that would be based on gps.py but in some way adjust according to the wind?

Regards

Dave
Reply
#6
Yes, you can simply add a new pilot based on an existing one.

Currently the things you mention have not really been explored. Sounding an alarm was implemented in the watchdog plugin of opencpn for example but this is outside of the autopilot.

The ultrasonic wind sensors might not be very accurate especially in low wind speed or heavy rain.
Reply
#7
I think Sean also raised the issue of ultrasonic sensors when heeled.

When heeled, conventional sensors always indicate the angle between the wind and the sails because the rotation axis of the wind vane and that of the mast are parallel.

However, with an ultrasonic wind vane, it's really unpredictable.

I tried to get information from a manufacturer, explaining that I wanted to use one of their ultrasonic sensors on a boat that heeled between 30 and 45 degrees. I wanted to get an idea of ​​the error when heeled. They refused to answer me.

I preferred to trust Sean and refrain from connecting such a wind vane to the autopilot.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)