2020-08-22, 04:14 AM
Quote:You say it doesn't make sense to provide wind angle in the same field as a gps course, but it is just a number. So what are you gaining by having separate keys besides making all of the clients have to have extra logic? If there is a single key and target, the +10 button can just add 10 to the target instead of having to check which mode it's in and then update that specific key even though none of the other keys can be used in that mode. What am I missing?
I understand your point about clients having to re-implement logic, but:
- I don't think it's that much work to look in a different sub-key for different modes, and
- I think the biggest risk here is a client (control interface) providing an invalid value as target because of a bug / bad implementation. One example scenario I'm imagining is the "current mode" not updating properly on a control screen, and it sending a wind angle when the pilot is following a GPS course. This could easily happen with multiple control screens. Having separate keys for different "kinds" of targets helps prevent that kind of issue.
Quote:Also missing the true-wind mode.
Let's add it, then!
Quote:autopilot.portLock
autopilot.starboardLock
I don't understand why there are two unless the boat is assymetrical. pypilot has just rudder.range
They'd probably be the same value on most boats, that's true. I'm guessing they want to support the case where the rudder goes a but further on one side, probably.
As for the rest of your points, I agree with you. I wasn't there for the initial implementation, but I suspect the other parameters were there to support a specific autopilot that had these options over NMEA. We can / should probably sweep them under autopilot.nmea2000 if that's indeed the case.