Summary
The autopilot widget's rudder angle indicator is displayed on the wrong side for a Signal K–compliant steering.rudderAngle source: rudder-to-starboard shows as port and vice-versa. Control is unaffected — the +1/+10 buttons move the physical rudder to the correct side. This is purely the indicator.
Tested on KIP 4.8.5, with a Raymarine rudder reference feeding steering.rudderAngle over PGN 127245 → n2k-signalk.
Signal K convention
Per the spec, steering.rudderAngle is "Current rudder angle, +ve is rudder to Starboard" (radians). So a positive value must render on the starboard side.
Root cause: two sign inversions in series
The value is negated twice on the way to the SVG:
-
Widget option — widget-autopilot.component.ts:771:
this.rudder.set(this.runtime.options()?.autopilot?.invertRudder ? -newValue.data.value : newValue.data.value);
and the shipped default is invertRudder: true (widget-autopilot.component.ts:272).
-
SVG component — svg-autopilot.component.ts:149 negates again:
this.updateRudderAngle(-rudderAngle);
updateRudderAngle() then maps angle > 0 → port bar, angle ≤ 0 → starboard bar (svg-autopilot.component.ts:219-276).
Tracing a starboard rudder (SK +):
invertRudder |
after widget (:771) |
after SVG negation (:149) |
bar filled |
result |
true (default) |
− |
+ |
port |
❌ mirrored |
false |
+ |
− |
starboard |
✅ correct |
So the SVG's hardcoded -rudderAngle already provides the one inversion the bar mapping needs; the invertRudder option then adds a second, and because its default is true, a spec-compliant rudder renders mirrored out of the box. The option's "off" state (false) is the one that's actually correct.
Impact
Any install whose steering.rudderAngle follows the SK sign convention shows the rudder indicator reversed until the user finds and toggles "Invert Rudder Angle Indicator" in the widget options. (Toggling it does fix it — that's the workaround.)
Suggested fix
Two options, in increasing tidiness:
- Minimal: change the default to
invertRudder: false (widget-autopilot.component.ts:272) so a spec-compliant source is correct out of the box; the option still lets anyone with a reversed sender flip it.
- Cleaner: drop the hardcoded negation at
svg-autopilot.component.ts:149 (pass rudderAngle through) and swap the bar mapping so angle > 0 → starboard, ≤ 0 → port. Then invertRudder becomes a single, pure user override, default false, with the spec as the baseline — one inversion point instead of two.
Trade-off worth calling out: either change flips the indicator for existing users who currently sit on the default true and have (unknowingly) come to rely on it, so it may deserve a release note. Happy to open a PR for whichever direction you prefer.
Summary
The autopilot widget's rudder angle indicator is displayed on the wrong side for a Signal K–compliant
steering.rudderAnglesource: rudder-to-starboard shows as port and vice-versa. Control is unaffected — the +1/+10 buttons move the physical rudder to the correct side. This is purely the indicator.Tested on KIP 4.8.5, with a Raymarine rudder reference feeding
steering.rudderAngleover PGN 127245 →n2k-signalk.Signal K convention
Per the spec,
steering.rudderAngleis "Current rudder angle, +ve is rudder to Starboard" (radians). So a positive value must render on the starboard side.Root cause: two sign inversions in series
The value is negated twice on the way to the SVG:
Widget option —
widget-autopilot.component.ts:771:and the shipped default is
invertRudder: true(widget-autopilot.component.ts:272).SVG component —
svg-autopilot.component.ts:149negates again:updateRudderAngle()then mapsangle > 0 → port bar,angle ≤ 0 → starboard bar(svg-autopilot.component.ts:219-276).Tracing a starboard rudder (SK
+):invertRudder:771):149)true(default)−+false+−So the SVG's hardcoded
-rudderAnglealready provides the one inversion the bar mapping needs; theinvertRudderoption then adds a second, and because its default istrue, a spec-compliant rudder renders mirrored out of the box. The option's "off" state (false) is the one that's actually correct.Impact
Any install whose
steering.rudderAnglefollows the SK sign convention shows the rudder indicator reversed until the user finds and toggles "Invert Rudder Angle Indicator" in the widget options. (Toggling it does fix it — that's the workaround.)Suggested fix
Two options, in increasing tidiness:
invertRudder: false(widget-autopilot.component.ts:272) so a spec-compliant source is correct out of the box; the option still lets anyone with a reversed sender flip it.svg-autopilot.component.ts:149(passrudderAnglethrough) and swap the bar mapping soangle > 0 → starboard,≤ 0 → port. TheninvertRudderbecomes a single, pure user override, defaultfalse, with the spec as the baseline — one inversion point instead of two.Trade-off worth calling out: either change flips the indicator for existing users who currently sit on the default
trueand have (unknowingly) come to rely on it, so it may deserve a release note. Happy to open a PR for whichever direction you prefer.