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
pypilot update rate
#1
First, thanks to those who helped me resolve my gpsd issues.

Second, is there a way to control the rate at which pypilot sends data to SignalK? It appears to be updating once every 2 seconds, and I would like to get more frequent updates (maybe up to 10Hz) on specific paths (navigation.headingMagnetic).
Reply
#2
Yes it is possible to adjust the rate. You would change the signalk.period setting which is by default 0.5 (2hz) to 0.1 (10hz)

It is not possible for specific paths (unless you hack signalk.py)
Reply
#3
(2024-05-01, 10:56 PM)barnaclebill22 Wrote: First, thanks to those who helped me resolve my gpsd issues.

Second, is there a way to control the rate at which pypilot sends data to SignalK? It appears to be updating once every 2 seconds, and I would like to get more frequent updates (maybe up to 10Hz) on specific paths (navigation.headingMagnetic).

SignalK data viewer updates every 2 sec from memory.
Why do you want such high rate for heading?
Reply
#4
Thanks. 2Hz is probably OK for now.
I am experimenting with combining heading information from pypilot and relative heading from a mast-mounted compass (ESP32 with BNO080) to get mast rotation on my Farrier trimaran. pypilot heading goes to SK; SK sends it on N2K, and the ESP32 combines the masthead AWA with the difference in heading to transmit a corrected AWA on N2K.
So far it's working pretty well...certainly good enough for hand steering to wind, but it remains to be seen whether it's accurate enough for autopilot steer-to-wind, or (more importantly, for me) to use the data to determine optimum wind angles and build polar charts for my boat.
Reply
#5
I would be suspicious of dual compass in this way as the errors compound.

What I mean, is that different angles relative to north could give different mast rotation readings even if the mast were fixed.

If possible it would be better to use an angular hall sensor attached to the mast, similar to rudder feedback.
Reply
#6
I actually do have a sort of angular Hall sensor: a Honeywell rotation sensor. It's analog and works with a magnet on the mast. It works well but the sensor costs $600 and I'm investigating ways to do the same thing for less money.
I also tried Hall effect sensors, but I found that they are more or less "binary": the sensor's output is near zero when the magnet is far, and climbs exponentially to Vin when the magnet approaches. So it would require around 50 sensors to detect a range of 100 degrees of motion.
I tried TOF sensors (don't work outside in daylight) and ultrasonic sensors (far too much noise and narrow beam).
For now, the dual compass solution seems to be working, and over time I will compare it to the output from the Honeywell to see if it's good enough for polars. Since the two sensors are physically close, and my boat has almost no ferrous metals, I'm hoping any distortions will affect each the same. Accuracy of 5 degrees is fine for steering, but if I could get down to a couple of degrees of error it would be ideal because then I could log data for effective VMG.
Reply
#7
I had a quick look in node red, nmea0183 sentences from pypilot came in approx every 600mS. On a Pi4 running openplotter 4 & playing some music at the same time.
Reply
#8
(2024-05-03, 03:32 AM)barnaclebill22 Wrote: I actually do have a sort of angular Hall sensor: a Honeywell rotation sensor. It's analog and works with a magnet on the mast. It works well but the sensor costs $600 and I'm investigating ways to do the same thing for less money.
I also tried Hall effect sensors, but I found that they are more or less "binary": the sensor's output is near zero when the magnet is far, and climbs exponentially to Vin when the magnet approaches. So it would require around 50 sensors to detect a range of 100 degrees of motion.
I tried TOF sensors (don't work outside in daylight) and ultrasonic sensors (far too much noise and narrow beam).
For now, the dual compass solution seems to be working, and over time I will compare it to the output from the Honeywell to see if it's good enough for polars. Since the two sensors are physically close, and my boat has almost no ferrous metals, I'm hoping any distortions will affect each the same. Accuracy of 5 degrees is fine for steering, but if I could get down to a couple of degrees of error it would be ideal because then I could log data for effective VMG.

I make rudder feedback sensors on my store (https://pypilot.org/opencart/index.php?r...duct_id=60)  One of these would certainly work for a mast rotation sensor.

Yes, what you need is an angular hall sensor.   The one I am using is mlx90316, but I also am developing sensors with a fully digital sensor using SPI.    The angle measured is to 0.1 degrees.     You said something about  $600 I have no idea about this, these sensors are $1.50 for the chinese version and up to $4 for other brands.    The magnet itself might cost $1 and so forth, and making everything with delrin bushings and 3d printing parts and potting compoud etc cost a lot more than the sensor itself but still not $600.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)