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 and Signal K
#9
It has taken me a while.. I rewritten pypilot data handling to make it more efficient/flexible and added initial support for signalk node.

The signalk node server is discovered and connected by a websocket and messages are translated in both directions depending on what data is available.   For example, if rudder feedback comes from the motor controller of pypilot, then it outputs on signalk, but if not, and it is found on signalk, then it will use this as input to pypilot.  The same is true of wind sensor.. if nmea0183 sensor is plugged directly into usb of tinypilot it is going to use that and output wind to signalk, but otherwise it can read wind from signalk.   This should eliminate the need to use nmea0183 over tcp sockets completely (but still supported)

The subscriptions to signalk-node are managed by pypilot to minimize network traffic.   It would be really interesting to do various latency tests such as routing wind over wifi through signalk. if the latency is more than 100 milliseconds compared to a direct connection it will have performance implications to the autopilot, but at least it's going to be supported.   For gps this probably doesn't matter.


What I would really like to see in signalk in the future is the server sending subscriptions to clients.    pypilot now has a bi-directional format using subscriptions so clients do not need to produce data faster than needed.   It also allows various processes to produce data (such as automatic compass calibration or machine learning background training) without interfering with the critical control loop.  Without this the cpu and data use can be very high.   This also makes it possible to link servers quite easily while maintaining the minimum data traffic.   Once signalk node supports this, the full pypilot values tree can be "mounted" into signalk providing more than 100 values such as:

vessels.self.pypilot.ap.heading_error
vessels.self.pypilot.servo.amp_hours
vessels.self.pypilot.rudder.range

These could be accessible by signalk programs to subscribe or set these values, node red alarms etc...    The current translation would be used to convert units (pypilot uses degrees not radians) for generic keys not specific to pypilot, but these would benefit from subscriptions as well to reduce data and cpu load.  For example, pypilot is always producing signalk navigation.attitude and navigation.headingMagnetic even if there are no clients to signalk-node that consume these.

I think the change is fairly straightforward.  I just need signalk-node-server to set the period minperiod and policy for subscriptions in a way that allows it to provide the subscriptions it receives.   This would support connecting two signalk-node servers to be linked by a connection maintaining minimal bandwidth and processing load.
Reply


Messages In This Thread
Pypilot and Signal K - by tkurki - 2020-01-25, 11:20 AM
RE: Pypilot and Signal K - by seandepagnier - 2020-01-25, 08:06 PM
RE: Pypilot and Signal K - by tkurki - 2020-01-26, 10:02 PM
RE: Pypilot and Signal K - by seandepagnier - 2020-01-26, 05:17 AM
RE: Pypilot and Signal K - by seandepagnier - 2020-01-27, 02:19 AM
RE: Pypilot and Signal K - by seandepagnier - 2020-02-01, 06:04 PM
RE: Pypilot and Signal K - by tkurki - 2020-02-02, 10:20 AM
RE: Pypilot and Signal K - by seandepagnier - 2020-02-03, 02:35 AM
RE: Pypilot and Signal K - by seandepagnier - 2020-03-13, 12:49 AM
RE: Pypilot and Signal K - by seandepagnier - 2020-05-24, 03:42 PM
RE: Pypilot and Signal K - by johnm - 2020-06-02, 09:13 PM
RE: Pypilot and Signal K - by ddelorme - 2020-06-05, 06:51 PM
RE: Pypilot and Signal K - by seandepagnier - 2020-06-06, 12:45 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)