Posts: 21
Threads: 5
Joined: Mar 2024
Reputation:
0
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).
Posts: 2,417
Threads: 21
Joined: Jun 2016
Reputation:
76
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)
Posts: 21
Threads: 5
Joined: Mar 2024
Reputation:
0
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.
Posts: 2,417
Threads: 21
Joined: Jun 2016
Reputation:
76
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.
Posts: 21
Threads: 5
Joined: Mar 2024
Reputation:
0
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.
Posts: 1,290
Threads: 107
Joined: Mar 2016
Reputation:
80
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.