@oicl/openbridge-webcomponents 2.0.0-next.111 → 2.0.0-next.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/openbridge-webcomponents.bundle.js +73 -16
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +79 -7
- package/dist/navigation-instruments/compass/compass.d.ts +1 -1
- package/dist/navigation-instruments/compass/compass.d.ts.map +1 -1
- package/dist/navigation-instruments/compass/compass.js +1 -1
- package/dist/navigation-instruments/compass/compass.js.map +1 -1
- package/dist/navigation-instruments/current/current.d.ts +25 -0
- package/dist/navigation-instruments/current/current.d.ts.map +1 -1
- package/dist/navigation-instruments/current/current.js +25 -4
- package/dist/navigation-instruments/current/current.js.map +1 -1
- package/dist/navigation-instruments/heading/heading.js +1 -1
- package/dist/navigation-instruments/heading/heading.js.map +1 -1
- package/dist/navigation-instruments/pitch-roll-heave/pitch-roll-heave.d.ts +6 -0
- package/dist/navigation-instruments/pitch-roll-heave/pitch-roll-heave.d.ts.map +1 -1
- package/dist/navigation-instruments/pitch-roll-heave/pitch-roll-heave.js +8 -1
- package/dist/navigation-instruments/pitch-roll-heave/pitch-roll-heave.js.map +1 -1
- package/dist/navigation-instruments/rate-of-turn/rate-of-turn.d.ts +5 -2
- package/dist/navigation-instruments/rate-of-turn/rate-of-turn.d.ts.map +1 -1
- package/dist/navigation-instruments/rate-of-turn/rate-of-turn.js.map +1 -1
- package/dist/navigation-instruments/top-view-propulsion/top-view-propulsion.d.ts +6 -0
- package/dist/navigation-instruments/top-view-propulsion/top-view-propulsion.d.ts.map +1 -1
- package/dist/navigation-instruments/top-view-propulsion/top-view-propulsion.js +19 -4
- package/dist/navigation-instruments/top-view-propulsion/top-view-propulsion.js.map +1 -1
- package/dist/navigation-instruments/watch/environment.d.ts +8 -0
- package/dist/navigation-instruments/watch/environment.d.ts.map +1 -1
- package/dist/navigation-instruments/watch/environment.js +3 -0
- package/dist/navigation-instruments/watch/environment.js.map +1 -1
- package/dist/navigation-instruments/watch/force-pattern.d.ts +20 -2
- package/dist/navigation-instruments/watch/force-pattern.d.ts.map +1 -1
- package/dist/navigation-instruments/watch/force-pattern.js +12 -5
- package/dist/navigation-instruments/watch/force-pattern.js.map +1 -1
- package/dist/navigation-instruments/watch/watch.d.ts.map +1 -1
- package/dist/navigation-instruments/watch/watch.js +6 -4
- package/dist/navigation-instruments/watch/watch.js.map +1 -1
- package/dist/navigation-instruments/wind/wind.d.ts +5 -2
- package/dist/navigation-instruments/wind/wind.d.ts.map +1 -1
- package/dist/navigation-instruments/wind/wind.js +5 -1
- package/dist/navigation-instruments/wind/wind.js.map +1 -1
- package/package.json +1 -1
package/custom-elements.json
CHANGED
|
@@ -77021,7 +77021,7 @@
|
|
|
77021
77021
|
"text": "boolean"
|
|
77022
77022
|
},
|
|
77023
77023
|
"default": "false",
|
|
77024
|
-
"description": "Show compass NSEW labels
|
|
77024
|
+
"description": "Show compass NSEW labels. The north arrow is always shown, independent of this flag.",
|
|
77025
77025
|
"attribute": "showLabels"
|
|
77026
77026
|
},
|
|
77027
77027
|
{
|
|
@@ -77427,7 +77427,7 @@
|
|
|
77427
77427
|
"text": "boolean"
|
|
77428
77428
|
},
|
|
77429
77429
|
"default": "false",
|
|
77430
|
-
"description": "Show compass NSEW labels
|
|
77430
|
+
"description": "Show compass NSEW labels. The north arrow is always shown, independent of this flag.",
|
|
77431
77431
|
"fieldName": "showLabels"
|
|
77432
77432
|
},
|
|
77433
77433
|
{
|
|
@@ -77521,7 +77521,7 @@
|
|
|
77521
77521
|
"declarations": [
|
|
77522
77522
|
{
|
|
77523
77523
|
"kind": "class",
|
|
77524
|
-
"description": "`<obc-current>` – Water-current instrument with direction chevrons and a\nforce-graphics band pattern.\n\nRenders the current's from-direction and strength on a circular watch\nface. Two layouts are available via `type`: `vessel` (default) shows a\nvessel silhouette on a double-ring track face with a chevron icon at the\nperiphery pointing with the flow; `direction` shows a single-ring face\nwith a large centered chevron icon. In both, a soft band pattern fills the\nface, rotated perpendicular to the flow.\n\n## Features\n\n- **Types**: `vessel` (track face + vessel + peripheral icon) or\n `direction` (single ring + large centered icon) via `type`.\n- **Strength buckets**: `currentSpeed` selects the chevron icon\n (`0`–`4` = number of chevrons); values are rounded and clamped.\n- **Color priority**: `priority=enhanced` switches the pattern and icon to\n the enhanced (blue) palette.\n- **Vessel image**: configurable silhouette rotating with\n `vesselHeadingDeg` (vessel type).\n\n## Usage Guidelines\n\nSet `currentSpeed` and `currentFromDirection` to the sensor values. Use\n`obc-wind` for the analogous wind instrument; use `obc-compass` when the\ncurrent indicator should overlay a full compass.\n\n## Example\n\n```html\n<obc-current\n currentSpeed=\"3\"\n currentFromDirection=\"330\"\n vesselHeadingDeg=\"15\"\n></obc-current>\n```",
|
|
77524
|
+
"description": "`<obc-current>` – Water-current instrument with direction chevrons and a\nforce-graphics band pattern.\n\nRenders the current's from-direction and strength on a circular watch\nface. Two layouts are available via `type`: `vessel` (default) shows a\nvessel silhouette on a double-ring track face with a chevron icon at the\nperiphery pointing with the flow; `direction` shows a single-ring face\nwith a large centered chevron icon. In both, a soft band pattern fills the\nface, rotated perpendicular to the flow.\n\n## Features\n\n- **Types**: `vessel` (track face + vessel + peripheral icon) or\n `direction` (single ring + large centered icon) via `type`.\n- **Strength buckets**: `currentSpeed` selects the chevron icon\n (`0`–`4` = number of chevrons); values are rounded and clamped.\n- **Color priority**: `priority=enhanced` switches the pattern and icon to\n the enhanced (blue) palette.\n- **Vessel image**: configurable silhouette rotating with\n `vesselHeadingDeg` (vessel type).\n- **Pattern toggle & wave tuning**: `hasPattern` switches the band pattern\n off; `waveLength`, `waveHeight` and `waveSpeed` tune the band spacing,\n intensity and drift motion.\n\n## Usage Guidelines\n\nSet `currentSpeed` and `currentFromDirection` to the sensor values. Use\n`obc-wind` for the analogous wind instrument; use `obc-compass` when the\ncurrent indicator should overlay a full compass.\n\n## Example\n\n```html\n<obc-current\n currentSpeed=\"3\"\n currentFromDirection=\"330\"\n vesselHeadingDeg=\"15\"\n></obc-current>\n```",
|
|
77525
77525
|
"name": "ObcCurrent",
|
|
77526
77526
|
"members": [
|
|
77527
77527
|
{
|
|
@@ -77562,6 +77562,45 @@
|
|
|
77562
77562
|
"description": "Color priority: `Priority.enhanced` uses the blue/enhanced palette (default: `Priority.regular`).",
|
|
77563
77563
|
"attribute": "priority"
|
|
77564
77564
|
},
|
|
77565
|
+
{
|
|
77566
|
+
"kind": "field",
|
|
77567
|
+
"name": "hasPattern",
|
|
77568
|
+
"type": {
|
|
77569
|
+
"text": "boolean"
|
|
77570
|
+
},
|
|
77571
|
+
"default": "true",
|
|
77572
|
+
"description": "Show the force-graphics band pattern behind the watch face."
|
|
77573
|
+
},
|
|
77574
|
+
{
|
|
77575
|
+
"kind": "field",
|
|
77576
|
+
"name": "waveLength",
|
|
77577
|
+
"type": {
|
|
77578
|
+
"text": "number"
|
|
77579
|
+
},
|
|
77580
|
+
"default": "1",
|
|
77581
|
+
"description": "Wavelength of the pattern bands as a multiplier on the design spacing\n(1 = design, 0.5 = twice as dense).",
|
|
77582
|
+
"attribute": "waveLength"
|
|
77583
|
+
},
|
|
77584
|
+
{
|
|
77585
|
+
"kind": "field",
|
|
77586
|
+
"name": "waveHeight",
|
|
77587
|
+
"type": {
|
|
77588
|
+
"text": "number"
|
|
77589
|
+
},
|
|
77590
|
+
"default": "1",
|
|
77591
|
+
"description": "Wave intensity: the peak opacity the pattern bands fade up to (0–1).",
|
|
77592
|
+
"attribute": "waveHeight"
|
|
77593
|
+
},
|
|
77594
|
+
{
|
|
77595
|
+
"kind": "field",
|
|
77596
|
+
"name": "waveSpeed",
|
|
77597
|
+
"type": {
|
|
77598
|
+
"text": "number"
|
|
77599
|
+
},
|
|
77600
|
+
"default": "0",
|
|
77601
|
+
"description": "Drift speed of the pattern in wavelengths per second, moving with the\nflow (negative drifts against it); 0 keeps the pattern static.",
|
|
77602
|
+
"attribute": "waveSpeed"
|
|
77603
|
+
},
|
|
77565
77604
|
{
|
|
77566
77605
|
"kind": "field",
|
|
77567
77606
|
"name": "vesselImage",
|
|
@@ -77648,6 +77687,33 @@
|
|
|
77648
77687
|
"description": "Color priority: `Priority.enhanced` uses the blue/enhanced palette (default: `Priority.regular`).",
|
|
77649
77688
|
"fieldName": "priority"
|
|
77650
77689
|
},
|
|
77690
|
+
{
|
|
77691
|
+
"name": "waveLength",
|
|
77692
|
+
"type": {
|
|
77693
|
+
"text": "number"
|
|
77694
|
+
},
|
|
77695
|
+
"default": "1",
|
|
77696
|
+
"description": "Wavelength of the pattern bands as a multiplier on the design spacing\n(1 = design, 0.5 = twice as dense).",
|
|
77697
|
+
"fieldName": "waveLength"
|
|
77698
|
+
},
|
|
77699
|
+
{
|
|
77700
|
+
"name": "waveHeight",
|
|
77701
|
+
"type": {
|
|
77702
|
+
"text": "number"
|
|
77703
|
+
},
|
|
77704
|
+
"default": "1",
|
|
77705
|
+
"description": "Wave intensity: the peak opacity the pattern bands fade up to (0–1).",
|
|
77706
|
+
"fieldName": "waveHeight"
|
|
77707
|
+
},
|
|
77708
|
+
{
|
|
77709
|
+
"name": "waveSpeed",
|
|
77710
|
+
"type": {
|
|
77711
|
+
"text": "number"
|
|
77712
|
+
},
|
|
77713
|
+
"default": "0",
|
|
77714
|
+
"description": "Drift speed of the pattern in wavelengths per second, moving with the\nflow (negative drifts against it); 0 keeps the pattern static.",
|
|
77715
|
+
"fieldName": "waveSpeed"
|
|
77716
|
+
},
|
|
77651
77717
|
{
|
|
77652
77718
|
"name": "vesselImage",
|
|
77653
77719
|
"type": {
|
|
@@ -87967,7 +88033,7 @@
|
|
|
87967
88033
|
"text": "SVGTemplateResult"
|
|
87968
88034
|
}
|
|
87969
88035
|
},
|
|
87970
|
-
"description": "Crosshair drawn on the overlay rather than through `obc-watch`'s own\n`crosshairEnabled`: the design has the arc bands covering the arms, but\n`obc-watch` renders its crosshair after the bands, i.e. on top of them.\nDrawing it here puts it under the watch layer, so the bands and the heave\ncolumn mask it naturally."
|
|
88036
|
+
"description": "Crosshair drawn on the overlay rather than through `obc-watch`'s own\n`crosshairEnabled`: the design has the arc bands covering the arms, but\n`obc-watch` renders its crosshair after the bands, i.e. on top of them.\nDrawing it here puts it under the watch layer, so the bands and the heave\ncolumn mask it naturally.\n\nIn `single-scale` nothing frames the segment above the vessel (the other\nthree arms end under the pitch band, roll band and heave column), so the\nvertical arm stops at the centre instead of continuing upward. In\n`dual-scale` the top roll band gives it a natural endpoint, so the full\narm is kept."
|
|
87971
88037
|
},
|
|
87972
88038
|
{
|
|
87973
88039
|
"kind": "method",
|
|
@@ -90661,7 +90727,7 @@
|
|
|
90661
90727
|
"declarations": [
|
|
90662
90728
|
{
|
|
90663
90729
|
"kind": "class",
|
|
90664
|
-
"description": "`<obc-rate-of-turn>` — Standalone rate-of-turn indicator rendered on a circular watch face.\n\nWraps `<obc-watch>` to display a spinning-dot or arc-bar ROT visualization\nwithout any additional instrument overlays. Useful for isolating the ROT\nindicator in layouts where heading/compass elements are handled separately.\n\n## Features\n\n- **Dot mode** (`rotType=\"dots\"`): Five evenly-spaced dots spin at the\n resolved rotations-per-minute (derived from\n `rateOfTurnDegreesPerMinute × rotDotAnimationFactor / 360`).\n- **Bar mode** (`rotType=\"bar\"`): A banana-shaped arc from `barStartAngle`\n to `barEndAngle` with clipped spinning dots inside.\n- **Track position**: Place the indicator on the outer scale ring\n (`rotPosition=\"scale\"`) or the inner circle\n (`rotPosition=\"innerCircle\"`).\n- **Track bar** (`hasTrackBar`): A bar in the ring band growing from the\n twelve o'clock position to the measured rate of turn, with a needle\n marker at its end and sector tickmarks (pairs with\n `watchCircleType=\"double\"` for the banded face).\n- **Center readout** (`hasReadout`): A centered readout showing the\n measured rate of turn (label `ROT`, unit `DEG/min` by default).\n- **Color priority**: Uses `priority` to select regular or enhanced color\n palette; `rotPortStarboard` colors the track bar and needle by turn\n direction.\n\n## Usage Guidelines\n\n- Set `rateOfTurnDegreesPerMinute` to the current sensor value in degrees\n per minute (the maritime/AIS convention). Sign controls direction\n (positive = starboard / clockwise).\n- Tune `rotDotAnimationFactor` to amplify the dot animation independently\n of the physical value (default `18` ≈ 1 rpm at 20°/min).\n- In bar mode, `barStartAngle` and `barEndAngle` define the static arc\n span (0° = 12 o'clock, clockwise).\n- Change `watchCircleType` to match the surrounding instrument ring style\n (e.g. `triple` for compass contexts).",
|
|
90730
|
+
"description": "`<obc-rate-of-turn>` — Standalone rate-of-turn indicator rendered on a circular watch face.\n\nWraps `<obc-watch>` to display a spinning-dot or arc-bar ROT visualization\nwithout any additional instrument overlays. Useful for isolating the ROT\nindicator in layouts where heading/compass elements are handled separately.\n\n## Features\n\n- **Dot mode** (`rotType=\"dots\"`): Five evenly-spaced dots spin at the\n resolved rotations-per-minute (derived from\n `rateOfTurnDegreesPerMinute × rotDotAnimationFactor / 360`).\n- **Bar mode** (`rotType=\"bar\"`): A banana-shaped arc from `barStartAngle`\n to `barEndAngle` with clipped spinning dots inside.\n- **Track position**: Place the indicator on the outer scale ring\n (`rotPosition=\"scale\"`) or the inner circle\n (`rotPosition=\"innerCircle\"`).\n- **Track bar** (`hasTrackBar`): A bar in the ring band growing from the\n twelve o'clock position to the measured rate of turn, with a needle\n marker at its end and sector tickmarks (pairs with\n `watchCircleType=\"double\"` for the banded face, or `\"triple\"` when the\n ROT dots sit on the inner circle).\n- **Center readout** (`hasReadout`): A centered readout showing the\n measured rate of turn (label `ROT`, unit `DEG/min` by default).\n- **Color priority**: Uses `priority` to select regular or enhanced color\n palette; `rotPortStarboard` colors the track bar and needle by turn\n direction.\n\n## Usage Guidelines\n\n- Set `rateOfTurnDegreesPerMinute` to the current sensor value in degrees\n per minute (the maritime/AIS convention). Sign controls direction\n (positive = starboard / clockwise).\n- Tune `rotDotAnimationFactor` to amplify the dot animation independently\n of the physical value (default `18` ≈ 1 rpm at 20°/min).\n- In bar mode, `barStartAngle` and `barEndAngle` define the static arc\n span (0° = 12 o'clock, clockwise).\n- Change `watchCircleType` to match the surrounding instrument ring style\n (e.g. `triple` for compass contexts).",
|
|
90665
90731
|
"name": "ObcRateOfTurn",
|
|
90666
90732
|
"members": [
|
|
90667
90733
|
{
|
|
@@ -90768,7 +90834,7 @@
|
|
|
90768
90834
|
"text": "boolean"
|
|
90769
90835
|
},
|
|
90770
90836
|
"default": "false",
|
|
90771
|
-
"description": "When `true`, shows a bar in the ring band from the twelve o'clock\nposition to the measured rate of turn, with a needle marker at its end\nand sector tickmarks. Pairs with `watchCircleType=\"double\"` for the\nbanded face. Driven by `rateOfTurnDegreesPerMinute
|
|
90837
|
+
"description": "When `true`, shows a bar in the ring band from the twelve o'clock\nposition to the measured rate of turn, with a needle marker at its end\nand sector tickmarks. Pairs with `watchCircleType=\"double\"` for the\nbanded face — or `\"triple\"` when `rotPosition` is `innerCircle`, so the\ndots get their inner track too. Driven by `rateOfTurnDegreesPerMinute`\nonly.",
|
|
90772
90838
|
"attribute": "hasTrackBar"
|
|
90773
90839
|
},
|
|
90774
90840
|
{
|
|
@@ -90961,7 +91027,7 @@
|
|
|
90961
91027
|
"text": "boolean"
|
|
90962
91028
|
},
|
|
90963
91029
|
"default": "false",
|
|
90964
|
-
"description": "When `true`, shows a bar in the ring band from the twelve o'clock\nposition to the measured rate of turn, with a needle marker at its end\nand sector tickmarks. Pairs with `watchCircleType=\"double\"` for the\nbanded face. Driven by `rateOfTurnDegreesPerMinute
|
|
91030
|
+
"description": "When `true`, shows a bar in the ring band from the twelve o'clock\nposition to the measured rate of turn, with a needle marker at its end\nand sector tickmarks. Pairs with `watchCircleType=\"double\"` for the\nbanded face — or `\"triple\"` when `rotPosition` is `innerCircle`, so the\ndots get their inner track too. Driven by `rateOfTurnDegreesPerMinute`\nonly.",
|
|
90965
91031
|
"fieldName": "hasTrackBar"
|
|
90966
91032
|
},
|
|
90967
91033
|
{
|
|
@@ -98661,6 +98727,12 @@
|
|
|
98661
98727
|
"name": "renderLoadingArc",
|
|
98662
98728
|
"privacy": "private"
|
|
98663
98729
|
},
|
|
98730
|
+
{
|
|
98731
|
+
"kind": "method",
|
|
98732
|
+
"name": "renderInnerRingLine",
|
|
98733
|
+
"privacy": "private",
|
|
98734
|
+
"description": "Thin outline on the track band's inner edge, always shown per the\ndesign's track face. Drawn on the overlay because the watch paints its\nband bars over the ring circles, which would swallow a watch-side line."
|
|
98735
|
+
},
|
|
98664
98736
|
{
|
|
98665
98737
|
"kind": "method",
|
|
98666
98738
|
"name": "renderPropeller",
|
|
@@ -220,7 +220,7 @@ export declare class ObcCompass extends LitElement {
|
|
|
220
220
|
priority: Priority;
|
|
221
221
|
/** @availableWhen priority==enhanced */
|
|
222
222
|
priorityElements: CompassPriorityElement[];
|
|
223
|
-
/** Show compass NSEW labels
|
|
223
|
+
/** Show compass NSEW labels. The north arrow is always shown, independent of this flag. */
|
|
224
224
|
showLabels: boolean;
|
|
225
225
|
/** When true, labels and north arrow are placed inside the outer ring. */
|
|
226
226
|
tickmarksInside: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compass.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/compass/compass.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,cAAc,EAAqB,MAAM,KAAK,CAAC;AAEnE,OAAO,mBAAmB,CAAC;AAE3B,OAAO,EACL,aAAa,EACb,aAAa,EAGd,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EAIrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAc,WAAW,EAAiB,MAAM,oBAAoB,CAAC;AAU5E,OAAO,EACL,WAAW,EAGX,OAAO,EACP,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAC,MAAM,aAAa,CAAC;AACtD,OAAO,EAAC,OAAO,EAAC,CAAC;AACjB,OAAO,EAAC,aAAa,EAAE,aAAa,EAAC,CAAC;AACtC,OAAO,EAAC,oBAAoB,EAAC,CAAC;AAC9B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AED;;;;;;;OAOG;IACH,OAAO,CAAC,iBAAiB;IAOzB,oEAAoE;IACpE,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,MAAM,CAA0B;IAE/B,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAS/C,OAAO,KAAK,cAAc,GAUzB;IAED,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,kBAAkB;IAW1B,OAAO,KAAK,iBAAiB,GAE5B;IAED,OAAO,CAAC,WAAW;IAWV,MAAM;IAiGf,OAAgB,MAAM,4BAkCpB;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
|
@@ -204,7 +204,7 @@ let ObcCompass = class extends LitElement {
|
|
|
204
204
|
.tickmarksInside=${this.tickmarksInside}
|
|
205
205
|
.crosshairEnabled=${true}
|
|
206
206
|
.crosshairCenterCutout=${this.hasCenterReadouts}
|
|
207
|
-
.northArrow=${
|
|
207
|
+
.northArrow=${true}
|
|
208
208
|
.angleSetpoint=${this.headingSetpoint ?? void 0}
|
|
209
209
|
.newAngleSetpoint=${this.newHeadingSetpoint}
|
|
210
210
|
.atAngleSetpoint=${this._headingSp.computeAtSetpoint(this.heading)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compass.js","sources":["../../../src/navigation-instruments/compass/compass.ts"],"sourcesContent":["import {LitElement, PropertyValues, css, html, nothing} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport '../watch/watch.js';\nimport {Tickmark, TickmarkType} from '../watch/tickmark.js';\nimport {\n CogArrowStyle,\n HdgArrowStyle,\n cogArrow,\n hdgArrow,\n} from '../course-arrows/course-arrows.js';\nimport {\n CompassCenterReadout,\n CompassReadoutSource,\n centerReadoutStyles,\n renderCenterReadouts,\n resolveCompassCenterReadouts,\n} from '../readout/center-readout.js';\nimport {AdviceState, AngleAdvice, AngleAdviceRaw} from '../watch/advice.js';\nimport {ResizeController} from '@lit-labs/observers/resize-controller.js';\nimport {\n applyPinnedHostSize,\n computeRadialFrame,\n measureContainerPx,\n NORTH_ARROW_WIDTH_PX,\n NSWE_LABEL_WIDTH_PX,\n type RadialFrame,\n} from '../../svghelpers/radial-frame.js';\nimport {\n VesselImage,\n VesselImageSize,\n WatchCircleType,\n RotType,\n RotPosition,\n} from '../watch/watch.js';\nimport {SetpointBundle} from '../../svghelpers/setpoint-bundle.js';\nimport {ROT_ZERO_DEADBAND_DEG} from '../rate-of-turn/rot-renderer.js';\nimport {customElement} from '../../decorator.js';\nimport {InstrumentState, Priority} from '../types.js';\nexport {RotType};\nexport {HdgArrowStyle, CogArrowStyle};\nexport {CompassReadoutSource};\nexport type {CompassCenterReadout};\n\nexport enum CompassDirection {\n NorthUp = 'northUp',\n HeadingUp = 'headingUp',\n CourseUp = 'courseUp',\n}\n\nexport enum CompassPriorityElement {\n hdg = 'hdg',\n cog = 'cog',\n rot = 'rot',\n wind = 'wind',\n current = 'current',\n}\n\n/**\n * `<obc-compass>` – Full-featured compass with HDG/COG arrows, rate-of-turn indicator, and environmental overlays.\n *\n * Renders a circular compass instrument that displays heading (HDG) and\n * course-over-ground (COG) as rotating arrows over a triple-ring watch face.\n * It supports wind and current indicators, a vessel silhouette, heading\n * setpoint with auto at-setpoint detection, advice zones, and a rate-of-turn\n * (ROT) dot indicator. The compass can be oriented north-up, heading-up, or\n * course-up.\n *\n * ## Features\n *\n * - **Direction modes**: `northUp` (default), `headingUp`, or `courseUp`\n * via the `direction` property.\n * - **HDG / COG arrows**: Two styled arrows overlay the watch face,\n * rotating independently.\n * - **Heading setpoint**: Optional setpoint marker with auto at-setpoint\n * detection via `headingSetpoint`, `atHeadingSetpoint`, and deadband\n * tuning properties.\n * - **Advice zones**: Pass `headingAdvices` to render caution/alert arcs;\n * triggered state is derived from whether the current heading falls\n * inside the advice range.\n * - **Rate of turn**: Animated ROT indicator driven by\n * `rateOfTurnDegreesPerMinute` (deg/min, the maritime / AIS convention).\n * Supports spinning dots (`rotType=\"dots\"`) — the dot animation is\n * amplified by `rotDotAnimationFactor` so small physical values still\n * read at a glance — and a banana-shaped arc bar (`rotType=\"bar\"`)\n * showing the rate of turn as an arc anchored at the current heading.\n * Bar extent is driven by the physical value only (gain is not applied).\n * Position on the outer scale ring or inner circle via `rotPosition`.\n * - **Environmental overlays**: Wind speed/direction and current\n * speed/direction indicators on the watch face.\n * - **Vessel image**: Configurable vessel silhouette centered on the\n * compass, rotating with heading.\n * - **Arrow styles**: The HDG and COG arrows each select their look via\n * `hdgArrowStyle` (`arrowHead` default, `needle`, `vector`, `beamLine`)\n * and `cogArrowStyle` (`arrowHead` default, `needle`, `vector`,\n * `velocityVector`).\n * - **Center readouts**: `centerReadouts` replaces the vessel with up to\n * three readouts (first on top, the rest below a horizontal divider);\n * values bind to the instrument's own inputs per entry `source`.\n * - **Color priority**: Set `priority` to `Priority.enhanced` to use the\n * blue/enhanced color palette instead of the default gray/regular palette\n * (default: `Priority.regular`).\n *\n * ## Usage Guidelines\n *\n * - Set `heading` and `courseOverGround` to the current sensor values\n * in degrees.\n * - Use `direction` to control the compass orientation mode.\n * - Use `headingSetpoint` to show a target heading marker.\n * - Pass `headingAdvices` as an array of `AngleAdvice` objects for\n * caution/alert zones.\n * - Set `currentWindSpeedKnots` / `windFromDirection` and `currentSpeed` /\n * `currentFromDirection` to display environmental indicators.\n *\n * ## Example\n *\n * ```html\n * <obc-compass\n * heading=\"45\"\n * courseOverGround=\"50\"\n * direction=\"northUp\"\n * headingSetpoint=\"90\"\n * priority=\"regular\"\n * vesselImage=\"genericTop\"\n * ></obc-compass>\n * ```\n *\n *\n * @ignition-base-height: 512px\n * @ignition-base-width: 512px\n * @stable\n */\n@customElement('obc-compass')\nexport class ObcCompass extends LitElement {\n /** The current heading of the vessel in degrees. */\n @property({type: Number}) heading = 0;\n /** The current course over ground in degrees. */\n @property({type: Number}) courseOverGround = 0;\n\n /** The set point for the heading in degrees. */\n @property({type: Number}) headingSetpoint: number | null = null;\n /** @availableWhen headingSetpoint!=null */\n @property({type: Number}) newHeadingSetpoint: number | undefined;\n /**\n * Indicates if the vessel is at the heading set point.\n * @availableWhen headingSetpoint!=null && autoAtHeadingSetpoint==false\n */\n @property({type: Boolean}) atHeadingSetpoint: boolean = false;\n /** @availableWhen headingSetpoint!=null */\n @property({type: Number}) headingSetpointAtZeroDeadband: number = 0.5;\n /** @availableWhen headingSetpoint!=null */\n @property({type: Boolean}) headingSetpointOverride: boolean = false;\n /**\n * Enables automatic at heading set point calculation.\n * @availableWhen headingSetpoint!=null\n */\n @property({type: Boolean, attribute: false}) autoAtHeadingSetpoint: boolean =\n true;\n /**\n * The deadband for the heading set point in degrees.\n * @availableWhen headingSetpoint!=null && autoAtHeadingSetpoint==true\n */\n @property({type: Number}) autoAtHeadingSetpointDeadband: number = 2;\n /** @availableWhen headingSetpoint!=null */\n @property({type: Boolean}) animateSetpoint: boolean = false;\n /**\n * Indicates if the compass is being touched.\n * @availableWhen headingSetpoint!=null\n */\n @property({type: Boolean}) touching: boolean = false;\n /** An array of angle advices for the compass. */\n @property({type: Array, attribute: false}) headingAdvices: AngleAdvice[] = [];\n /**\n * The wind speed in knots.\n * @availableWhen windFromDirection!=null\n */\n @property({type: Number}) currentWindSpeedKnots: number | null = null;\n /**\n * The direction the wind is coming from in degrees.\n * @availableWhen currentWindSpeedKnots!=null\n */\n @property({type: Number}) windFromDirection: number | null = null;\n /**\n * The current speed, number of arrows.\n * @availableWhen currentFromDirection!=null\n */\n @property({type: Number}) currentSpeed: number | null = null;\n /**\n * The direction the current is coming from in degrees.\n * @availableWhen currentSpeed!=null\n */\n @property({type: Number}) currentFromDirection: number | null = null;\n /**\n * The image of the vessel. Hidden while `centerReadouts` is non-empty.\n * @availableWhen centerReadouts==[]\n */\n @property({type: String}) vesselImage: VesselImage = VesselImage.genericTop;\n /**\n * Center readouts replacing the vessel: the first entry renders on top,\n * the rest side by side below a horizontal divider. Values bind per entry\n * `source` (`hdg` → `heading`, `cog` → `courseOverGround`, `rot` →\n * `rateOfTurnDegreesPerMinute`, a dash when unset) and colors follow\n * `priorityElements`. While non-empty, the crosshair's center is cut out\n * so the readouts sit on a clean face.\n */\n @property({type: Array, attribute: false})\n centerReadouts: CompassCenterReadout[] = [];\n /** HDG arrow style: `arrowHead` (default), `needle`, `vector`, or `beamLine`. */\n @property({type: String}) hdgArrowStyle: HdgArrowStyle =\n HdgArrowStyle.arrowHead;\n /** COG arrow style: `arrowHead` (default), `needle`, `vector`, or `velocityVector`. */\n @property({type: String}) cogArrowStyle: CogArrowStyle =\n CogArrowStyle.arrowHead;\n /**\n * Measured rate of turn in degrees per minute (positive = starboard).\n * Drives both the bar extent and (after multiplication by\n * `rotDotAnimationFactor`) the spinning dot animation.\n * When `undefined`, falls back to the deprecated `rotationsPerMinute`.\n */\n @property({type: Number}) rateOfTurnDegreesPerMinute: number | undefined;\n /**\n * Visual amplification applied only to the spinning dot animation\n * (not to the bar extent). Default `18` keeps the legacy visual feel\n * (≈1 rpm at 20°/min).\n * @availableWhen rotType==dots\n */\n @property({type: Number}) rotDotAnimationFactor: number = 18;\n /**\n * Legacy rate-of-turn input, in rotations per minute. When\n * `rateOfTurnDegreesPerMinute` is `undefined`, this value is used\n * (unconverted) as the fallback ROT, driving both the spinning dot ring\n * and the bar extent.\n * @deprecated Use `rateOfTurnDegreesPerMinute` (and optionally\n * `rotDotAnimationFactor`) instead. Takes effect only when\n * `rateOfTurnDegreesPerMinute` is `undefined`.\n */\n @property({type: Number}) rotationsPerMinute: number = 1;\n /** ROT display mode: `'dots'` (spinning dots, default) or `'bar'` (a rate-of-turn arc anchored at the current heading, its length proportional to the rate of turn). */\n @property({type: String}) rotType: RotType = RotType.dots;\n /** ROT track position: `'innerCircle'` (default) or `'scale'` (on the outer ring). */\n @property({type: String}) rotPosition: RotPosition = RotPosition.innerCircle;\n /**\n * Bar-extent reference value in **degrees per minute**. The bar fills the\n * full ±`rotArcExtent` arc when the measured ROT equals ±`rotMaxValue`.\n * Default `60` aligns with ES-TRIN 2025/1 Art. 3.02.\n *\n * Note: prior to the introduction of `rateOfTurnDegreesPerMinute` this\n * property was interpreted in rotations per minute. The unit changed when\n * the physical ROT API was introduced.\n * @availableWhen rotType==bar\n */\n @property({type: Number}) rotMaxValue: number = 60;\n /** @availableWhen rotType==bar */\n @property({type: Number}) rotArcExtent: number = 60;\n @property({type: Boolean}) rotPortStarboard: boolean = false;\n /** @availableWhen rotType==bar */\n @property({type: Number}) rotAtZeroDeadband: number = ROT_ZERO_DEADBAND_DEG;\n @property({type: String}) direction: CompassDirection =\n CompassDirection.NorthUp;\n @property({type: String}) state: InstrumentState = InstrumentState.active;\n /** Color priority: `Priority.enhanced` uses the blue/enhanced color palette, `Priority.regular` (default) uses the standard palette. */\n @property({type: String}) priority: Priority = Priority.regular;\n /** @availableWhen priority==enhanced */\n @property({type: Array, attribute: false})\n priorityElements: CompassPriorityElement[] = [CompassPriorityElement.hdg];\n /** Show compass NSEW labels and north arrow. */\n @property({type: Boolean}) showLabels: boolean = false;\n /** When true, labels and north arrow are placed inside the outer ring. */\n @property({type: Boolean}) tickmarksInside: boolean = false;\n /**\n * Outer-ring diameter in CSS pixels. When set, the instrument renders at a\n * fixed intrinsic size derived from the ring, arc shape and label reserve —\n * so instruments sharing the same value have identical ring circumference\n * regardless of label width or arc extent (like obc-donut-chart's\n * fixedHeight). When unset (default), the instrument fills its container.\n */\n @property({type: Number, attribute: 'face-diameter'})\n faceDiameter: number | undefined;\n\n private _headingSp = new SetpointBundle({\n angularWraparound: true,\n onAnimationEnd: () => this.requestUpdate(),\n });\n\n override willUpdate(changed: PropertyValues): void {\n super.willUpdate(changed);\n this._headingSp.sync({\n setpoint: this.headingSetpoint ?? undefined,\n newSetpoint: this.newHeadingSetpoint,\n atSetpoint: this.atHeadingSetpoint,\n touching: this.touching,\n autoAtSetpoint: this.autoAtHeadingSetpoint,\n autoAtSetpointDeadband: this.autoAtHeadingSetpointDeadband,\n setpointAtZeroDeadband: this.headingSetpointAtZeroDeadband,\n setpointOverride: this.headingSetpointOverride,\n animateSetpoint: this.animateSetpoint,\n });\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this._headingSp.dispose();\n }\n\n // @ts-expect-error TS6133: The controller ensures that the render\n // function is called on resize of the element\n private _resizeController = new ResizeController(this, {});\n\n /**\n * Resolved rate of turn in degrees per minute, used to compute the bar\n * extent. Prefers the new physical API; falls back to the deprecated\n * `rotationsPerMinute` so existing consumers keep their visuals during\n * the deprecation window.\n */\n private get _effectiveRotDegPerMin(): number {\n return this.rateOfTurnDegreesPerMinute ?? this.rotationsPerMinute;\n }\n\n /**\n * Pixel cost of the outside decor: the always-rendered north-arrow glyph\n * plus, only while shown, the NSWE labels (both keep a constant on-screen\n * size via `1/scale` terms). Feeds the frame's width-aware reserve,\n * replacing the former empirical `72 + delta(clientSize)` padding.\n * Wind/current symbols at their default radius are covered by the base\n * padding of 72.\n */\n private getOutsideDecorPx(): number {\n if (this.tickmarksInside) {\n return 0;\n }\n return NORTH_ARROW_WIDTH_PX + (this.showLabels ? NSWE_LABEL_WIDTH_PX : 0);\n }\n\n /** Whether the host size styles were set by applyPinnedHostSize. */\n private _hostSizePinned = false;\n private _frame: RadialFrame | undefined;\n\n override updated(changed: PropertyValues): void {\n super.updated(changed);\n this._hostSizePinned = applyPinnedHostSize(\n this,\n this._frame,\n this._hostSizePinned\n );\n }\n\n private get angleAdviceRaw(): AngleAdviceRaw[] {\n return this.headingAdvices.map(({minAngle, maxAngle, hinted, type}) => {\n const state =\n this.heading >= minAngle && this.heading <= maxAngle\n ? AdviceState.triggered\n : hinted\n ? AdviceState.hinted\n : AdviceState.regular;\n return {minAngle, maxAngle, type, state};\n });\n }\n\n private priorityFor(element: CompassPriorityElement): Priority {\n const selected = Array.isArray(this.priorityElements)\n ? this.priorityElements\n : [];\n return selected.includes(element) ? this.priority : Priority.regular;\n }\n\n private colorFor(element: CompassPriorityElement): string | undefined {\n return this.priorityFor(element) === Priority.enhanced\n ? 'var(--instrument-enhanced-secondary-color)'\n : undefined;\n }\n\n private readoutPriorityFor(source: CompassReadoutSource): Priority {\n switch (source) {\n case CompassReadoutSource.hdg:\n return this.priorityFor(CompassPriorityElement.hdg);\n case CompassReadoutSource.cog:\n return this.priorityFor(CompassPriorityElement.cog);\n case CompassReadoutSource.rot:\n return this.priorityFor(CompassPriorityElement.rot);\n }\n }\n\n private get hasCenterReadouts(): boolean {\n return this.centerReadouts.length > 0;\n }\n\n private getRotation(): number | undefined {\n if (this.direction === CompassDirection.NorthUp) {\n return undefined;\n } else if (this.direction === CompassDirection.HeadingUp) {\n return -this.heading;\n } else if (this.direction === CompassDirection.CourseUp) {\n return -this.courseOverGround;\n }\n return undefined;\n }\n\n override render() {\n const tickmarks: Tickmark[] = [\n {angle: 0, type: TickmarkType.main},\n {angle: 90, type: TickmarkType.main},\n {angle: 180, type: TickmarkType.main},\n {angle: 270, type: TickmarkType.main},\n ];\n\n const frame = computeRadialFrame({\n basePadding: 72,\n labelWidthPx: this.getOutsideDecorPx(),\n containerPx: measureContainerPx(this),\n faceDiameter: this.faceDiameter,\n });\n this._frame = frame;\n const viewBox = frame.viewBox;\n\n return html`\n <div class=\"container\">\n <obc-watch\n .touching=${this.touching}\n .arcFrame=${frame}\n .advices=${this.angleAdviceRaw}\n .tickmarks=${tickmarks}\n .state=${this.state}\n .watchCircleType=${WatchCircleType.triple}\n .showLabels=${this.showLabels && !frame.labelsHidden}\n .tickmarksInside=${this.tickmarksInside}\n .crosshairEnabled=${true}\n .crosshairCenterCutout=${this.hasCenterReadouts}\n .northArrow=${!frame.labelsHidden}\n .angleSetpoint=${this.headingSetpoint ?? undefined}\n .newAngleSetpoint=${this.newHeadingSetpoint}\n .atAngleSetpoint=${this._headingSp.computeAtSetpoint(this.heading)}\n .angleSetpointAtZeroDeadband=${this.headingSetpointAtZeroDeadband}\n .setpointOverride=${this.headingSetpointOverride}\n .priority=${this.priority}\n .animateSetpoint=${this.animateSetpoint}\n .vessels=${this.hasCenterReadouts\n ? []\n : [\n {\n size: VesselImageSize.medium,\n vesselImage: this.vesselImage,\n transform: `rotate(${this.heading}deg)`,\n },\n ]}\n .windKnots=${this.currentWindSpeedKnots}\n .windFromDirectionDeg=${this.windFromDirection}\n .windColor=${this.colorFor(CompassPriorityElement.wind)}\n .current=${this.currentSpeed}\n .currentFromDirectionDeg=${this.currentFromDirection}\n .currentColor=${this.colorFor(CompassPriorityElement.current)}\n .rotation=${this.getRotation()}\n .rotType=${this.rotType}\n .rotPosition=${this.rotPosition}\n .rotStartAngle=${this.heading + (this.getRotation() ?? 0)}\n .rotEndAngle=${this.heading +\n (this._effectiveRotDegPerMin / (this.rotMaxValue || 1)) *\n this.rotArcExtent +\n (this.getRotation() ?? 0)}\n .rotPriority=${this.priorityFor(CompassPriorityElement.rot)}\n .rotPortStarboard=${this.rotPortStarboard}\n .rotAtZeroDeadband=${this.rotAtZeroDeadband}\n .rateOfTurnDegreesPerMinute=${this.rateOfTurnDegreesPerMinute}\n .rotDotAnimationFactor=${this.rotDotAnimationFactor}\n .rotationsPerMinute=${this.rotationsPerMinute}\n >\n </obc-watch>\n <svg viewBox=\"${viewBox}\">\n ${hdgArrow(\n this.hdgArrowStyle,\n this.heading + (this.getRotation() ?? 0),\n this.priorityFor(CompassPriorityElement.hdg)\n )}\n ${cogArrow(\n this.cogArrowStyle,\n this.courseOverGround + (this.getRotation() ?? 0),\n this.priorityFor(CompassPriorityElement.cog)\n )}\n </svg>\n ${this.hasCenterReadouts\n ? html`<div class=\"center-readout-overlay\">\n ${renderCenterReadouts(\n resolveCompassCenterReadouts(this.centerReadouts, {\n heading: this.heading,\n courseOverGround: this.courseOverGround,\n rateOfTurnDegreesPerMinute: this.rateOfTurnDegreesPerMinute,\n priorityFor: (source) => this.readoutPriorityFor(source),\n })\n )}\n </div>`\n : nothing}\n </div>\n `;\n }\n\n static override styles = [\n centerReadoutStyles,\n css`\n * {\n box-sizing: border-box;\n }\n\n .container {\n position: relative;\n width: 100%;\n height: 100%;\n }\n\n .container > * {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n .center-readout-overlay {\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: none;\n }\n\n :host {\n display: block;\n width: 100%;\n height: 100%;\n }\n `,\n ];\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-compass': ObcCompass;\n }\n}\n"],"names":["CompassDirection","CompassPriorityElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA2CO,IAAK,qCAAAA,sBAAL;AACLA,oBAAA,SAAA,IAAU;AACVA,oBAAA,WAAA,IAAY;AACZA,oBAAA,UAAA,IAAW;AAHD,SAAAA;AAAA,GAAA,oBAAA,CAAA,CAAA;AAML,IAAK,2CAAAC,4BAAL;AACLA,0BAAA,KAAA,IAAM;AACNA,0BAAA,KAAA,IAAM;AACNA,0BAAA,KAAA,IAAM;AACNA,0BAAA,MAAA,IAAO;AACPA,0BAAA,SAAA,IAAU;AALA,SAAAA;AAAA,GAAA,0BAAA,CAAA,CAAA;AAmFL,IAAM,aAAN,cAAyB,WAAW;AAAA,EAApC,cAAA;AAAA,UAAA,GAAA,SAAA;AAEqB,SAAA,UAAU;AAEV,SAAA,mBAAmB;AAGnB,SAAA,kBAAiC;AAOhC,SAAA,oBAA6B;AAE9B,SAAA,gCAAwC;AAEvC,SAAA,0BAAmC;AAKjB,SAAA,wBAC3C;AAKwB,SAAA,gCAAwC;AAEvC,SAAA,kBAA2B;AAK3B,SAAA,WAAoB;AAEJ,SAAA,iBAAgC,CAAA;AAKjD,SAAA,wBAAuC;AAKvC,SAAA,oBAAmC;AAKnC,SAAA,eAA8B;AAK9B,SAAA,uBAAsC;AAKtC,SAAA,cAA2B,YAAY;AAUjE,SAAA,iBAAyC,CAAA;AAEf,SAAA,gBACxB,cAAc;AAEU,SAAA,gBACxB,cAAc;AAcU,SAAA,wBAAgC;AA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;"}
|
|
1
|
+
{"version":3,"file":"compass.js","sources":["../../../src/navigation-instruments/compass/compass.ts"],"sourcesContent":["import {LitElement, PropertyValues, css, html, nothing} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport '../watch/watch.js';\nimport {Tickmark, TickmarkType} from '../watch/tickmark.js';\nimport {\n CogArrowStyle,\n HdgArrowStyle,\n cogArrow,\n hdgArrow,\n} from '../course-arrows/course-arrows.js';\nimport {\n CompassCenterReadout,\n CompassReadoutSource,\n centerReadoutStyles,\n renderCenterReadouts,\n resolveCompassCenterReadouts,\n} from '../readout/center-readout.js';\nimport {AdviceState, AngleAdvice, AngleAdviceRaw} from '../watch/advice.js';\nimport {ResizeController} from '@lit-labs/observers/resize-controller.js';\nimport {\n applyPinnedHostSize,\n computeRadialFrame,\n measureContainerPx,\n NORTH_ARROW_WIDTH_PX,\n NSWE_LABEL_WIDTH_PX,\n type RadialFrame,\n} from '../../svghelpers/radial-frame.js';\nimport {\n VesselImage,\n VesselImageSize,\n WatchCircleType,\n RotType,\n RotPosition,\n} from '../watch/watch.js';\nimport {SetpointBundle} from '../../svghelpers/setpoint-bundle.js';\nimport {ROT_ZERO_DEADBAND_DEG} from '../rate-of-turn/rot-renderer.js';\nimport {customElement} from '../../decorator.js';\nimport {InstrumentState, Priority} from '../types.js';\nexport {RotType};\nexport {HdgArrowStyle, CogArrowStyle};\nexport {CompassReadoutSource};\nexport type {CompassCenterReadout};\n\nexport enum CompassDirection {\n NorthUp = 'northUp',\n HeadingUp = 'headingUp',\n CourseUp = 'courseUp',\n}\n\nexport enum CompassPriorityElement {\n hdg = 'hdg',\n cog = 'cog',\n rot = 'rot',\n wind = 'wind',\n current = 'current',\n}\n\n/**\n * `<obc-compass>` – Full-featured compass with HDG/COG arrows, rate-of-turn indicator, and environmental overlays.\n *\n * Renders a circular compass instrument that displays heading (HDG) and\n * course-over-ground (COG) as rotating arrows over a triple-ring watch face.\n * It supports wind and current indicators, a vessel silhouette, heading\n * setpoint with auto at-setpoint detection, advice zones, and a rate-of-turn\n * (ROT) dot indicator. The compass can be oriented north-up, heading-up, or\n * course-up.\n *\n * ## Features\n *\n * - **Direction modes**: `northUp` (default), `headingUp`, or `courseUp`\n * via the `direction` property.\n * - **HDG / COG arrows**: Two styled arrows overlay the watch face,\n * rotating independently.\n * - **Heading setpoint**: Optional setpoint marker with auto at-setpoint\n * detection via `headingSetpoint`, `atHeadingSetpoint`, and deadband\n * tuning properties.\n * - **Advice zones**: Pass `headingAdvices` to render caution/alert arcs;\n * triggered state is derived from whether the current heading falls\n * inside the advice range.\n * - **Rate of turn**: Animated ROT indicator driven by\n * `rateOfTurnDegreesPerMinute` (deg/min, the maritime / AIS convention).\n * Supports spinning dots (`rotType=\"dots\"`) — the dot animation is\n * amplified by `rotDotAnimationFactor` so small physical values still\n * read at a glance — and a banana-shaped arc bar (`rotType=\"bar\"`)\n * showing the rate of turn as an arc anchored at the current heading.\n * Bar extent is driven by the physical value only (gain is not applied).\n * Position on the outer scale ring or inner circle via `rotPosition`.\n * - **Environmental overlays**: Wind speed/direction and current\n * speed/direction indicators on the watch face.\n * - **Vessel image**: Configurable vessel silhouette centered on the\n * compass, rotating with heading.\n * - **Arrow styles**: The HDG and COG arrows each select their look via\n * `hdgArrowStyle` (`arrowHead` default, `needle`, `vector`, `beamLine`)\n * and `cogArrowStyle` (`arrowHead` default, `needle`, `vector`,\n * `velocityVector`).\n * - **Center readouts**: `centerReadouts` replaces the vessel with up to\n * three readouts (first on top, the rest below a horizontal divider);\n * values bind to the instrument's own inputs per entry `source`.\n * - **Color priority**: Set `priority` to `Priority.enhanced` to use the\n * blue/enhanced color palette instead of the default gray/regular palette\n * (default: `Priority.regular`).\n *\n * ## Usage Guidelines\n *\n * - Set `heading` and `courseOverGround` to the current sensor values\n * in degrees.\n * - Use `direction` to control the compass orientation mode.\n * - Use `headingSetpoint` to show a target heading marker.\n * - Pass `headingAdvices` as an array of `AngleAdvice` objects for\n * caution/alert zones.\n * - Set `currentWindSpeedKnots` / `windFromDirection` and `currentSpeed` /\n * `currentFromDirection` to display environmental indicators.\n *\n * ## Example\n *\n * ```html\n * <obc-compass\n * heading=\"45\"\n * courseOverGround=\"50\"\n * direction=\"northUp\"\n * headingSetpoint=\"90\"\n * priority=\"regular\"\n * vesselImage=\"genericTop\"\n * ></obc-compass>\n * ```\n *\n *\n * @ignition-base-height: 512px\n * @ignition-base-width: 512px\n * @stable\n */\n@customElement('obc-compass')\nexport class ObcCompass extends LitElement {\n /** The current heading of the vessel in degrees. */\n @property({type: Number}) heading = 0;\n /** The current course over ground in degrees. */\n @property({type: Number}) courseOverGround = 0;\n\n /** The set point for the heading in degrees. */\n @property({type: Number}) headingSetpoint: number | null = null;\n /** @availableWhen headingSetpoint!=null */\n @property({type: Number}) newHeadingSetpoint: number | undefined;\n /**\n * Indicates if the vessel is at the heading set point.\n * @availableWhen headingSetpoint!=null && autoAtHeadingSetpoint==false\n */\n @property({type: Boolean}) atHeadingSetpoint: boolean = false;\n /** @availableWhen headingSetpoint!=null */\n @property({type: Number}) headingSetpointAtZeroDeadband: number = 0.5;\n /** @availableWhen headingSetpoint!=null */\n @property({type: Boolean}) headingSetpointOverride: boolean = false;\n /**\n * Enables automatic at heading set point calculation.\n * @availableWhen headingSetpoint!=null\n */\n @property({type: Boolean, attribute: false}) autoAtHeadingSetpoint: boolean =\n true;\n /**\n * The deadband for the heading set point in degrees.\n * @availableWhen headingSetpoint!=null && autoAtHeadingSetpoint==true\n */\n @property({type: Number}) autoAtHeadingSetpointDeadband: number = 2;\n /** @availableWhen headingSetpoint!=null */\n @property({type: Boolean}) animateSetpoint: boolean = false;\n /**\n * Indicates if the compass is being touched.\n * @availableWhen headingSetpoint!=null\n */\n @property({type: Boolean}) touching: boolean = false;\n /** An array of angle advices for the compass. */\n @property({type: Array, attribute: false}) headingAdvices: AngleAdvice[] = [];\n /**\n * The wind speed in knots.\n * @availableWhen windFromDirection!=null\n */\n @property({type: Number}) currentWindSpeedKnots: number | null = null;\n /**\n * The direction the wind is coming from in degrees.\n * @availableWhen currentWindSpeedKnots!=null\n */\n @property({type: Number}) windFromDirection: number | null = null;\n /**\n * The current speed, number of arrows.\n * @availableWhen currentFromDirection!=null\n */\n @property({type: Number}) currentSpeed: number | null = null;\n /**\n * The direction the current is coming from in degrees.\n * @availableWhen currentSpeed!=null\n */\n @property({type: Number}) currentFromDirection: number | null = null;\n /**\n * The image of the vessel. Hidden while `centerReadouts` is non-empty.\n * @availableWhen centerReadouts==[]\n */\n @property({type: String}) vesselImage: VesselImage = VesselImage.genericTop;\n /**\n * Center readouts replacing the vessel: the first entry renders on top,\n * the rest side by side below a horizontal divider. Values bind per entry\n * `source` (`hdg` → `heading`, `cog` → `courseOverGround`, `rot` →\n * `rateOfTurnDegreesPerMinute`, a dash when unset) and colors follow\n * `priorityElements`. While non-empty, the crosshair's center is cut out\n * so the readouts sit on a clean face.\n */\n @property({type: Array, attribute: false})\n centerReadouts: CompassCenterReadout[] = [];\n /** HDG arrow style: `arrowHead` (default), `needle`, `vector`, or `beamLine`. */\n @property({type: String}) hdgArrowStyle: HdgArrowStyle =\n HdgArrowStyle.arrowHead;\n /** COG arrow style: `arrowHead` (default), `needle`, `vector`, or `velocityVector`. */\n @property({type: String}) cogArrowStyle: CogArrowStyle =\n CogArrowStyle.arrowHead;\n /**\n * Measured rate of turn in degrees per minute (positive = starboard).\n * Drives both the bar extent and (after multiplication by\n * `rotDotAnimationFactor`) the spinning dot animation.\n * When `undefined`, falls back to the deprecated `rotationsPerMinute`.\n */\n @property({type: Number}) rateOfTurnDegreesPerMinute: number | undefined;\n /**\n * Visual amplification applied only to the spinning dot animation\n * (not to the bar extent). Default `18` keeps the legacy visual feel\n * (≈1 rpm at 20°/min).\n * @availableWhen rotType==dots\n */\n @property({type: Number}) rotDotAnimationFactor: number = 18;\n /**\n * Legacy rate-of-turn input, in rotations per minute. When\n * `rateOfTurnDegreesPerMinute` is `undefined`, this value is used\n * (unconverted) as the fallback ROT, driving both the spinning dot ring\n * and the bar extent.\n * @deprecated Use `rateOfTurnDegreesPerMinute` (and optionally\n * `rotDotAnimationFactor`) instead. Takes effect only when\n * `rateOfTurnDegreesPerMinute` is `undefined`.\n */\n @property({type: Number}) rotationsPerMinute: number = 1;\n /** ROT display mode: `'dots'` (spinning dots, default) or `'bar'` (a rate-of-turn arc anchored at the current heading, its length proportional to the rate of turn). */\n @property({type: String}) rotType: RotType = RotType.dots;\n /** ROT track position: `'innerCircle'` (default) or `'scale'` (on the outer ring). */\n @property({type: String}) rotPosition: RotPosition = RotPosition.innerCircle;\n /**\n * Bar-extent reference value in **degrees per minute**. The bar fills the\n * full ±`rotArcExtent` arc when the measured ROT equals ±`rotMaxValue`.\n * Default `60` aligns with ES-TRIN 2025/1 Art. 3.02.\n *\n * Note: prior to the introduction of `rateOfTurnDegreesPerMinute` this\n * property was interpreted in rotations per minute. The unit changed when\n * the physical ROT API was introduced.\n * @availableWhen rotType==bar\n */\n @property({type: Number}) rotMaxValue: number = 60;\n /** @availableWhen rotType==bar */\n @property({type: Number}) rotArcExtent: number = 60;\n @property({type: Boolean}) rotPortStarboard: boolean = false;\n /** @availableWhen rotType==bar */\n @property({type: Number}) rotAtZeroDeadband: number = ROT_ZERO_DEADBAND_DEG;\n @property({type: String}) direction: CompassDirection =\n CompassDirection.NorthUp;\n @property({type: String}) state: InstrumentState = InstrumentState.active;\n /** Color priority: `Priority.enhanced` uses the blue/enhanced color palette, `Priority.regular` (default) uses the standard palette. */\n @property({type: String}) priority: Priority = Priority.regular;\n /** @availableWhen priority==enhanced */\n @property({type: Array, attribute: false})\n priorityElements: CompassPriorityElement[] = [CompassPriorityElement.hdg];\n /** Show compass NSEW labels. The north arrow is always shown, independent of this flag. */\n @property({type: Boolean}) showLabels: boolean = false;\n /** When true, labels and north arrow are placed inside the outer ring. */\n @property({type: Boolean}) tickmarksInside: boolean = false;\n /**\n * Outer-ring diameter in CSS pixels. When set, the instrument renders at a\n * fixed intrinsic size derived from the ring, arc shape and label reserve —\n * so instruments sharing the same value have identical ring circumference\n * regardless of label width or arc extent (like obc-donut-chart's\n * fixedHeight). When unset (default), the instrument fills its container.\n */\n @property({type: Number, attribute: 'face-diameter'})\n faceDiameter: number | undefined;\n\n private _headingSp = new SetpointBundle({\n angularWraparound: true,\n onAnimationEnd: () => this.requestUpdate(),\n });\n\n override willUpdate(changed: PropertyValues): void {\n super.willUpdate(changed);\n this._headingSp.sync({\n setpoint: this.headingSetpoint ?? undefined,\n newSetpoint: this.newHeadingSetpoint,\n atSetpoint: this.atHeadingSetpoint,\n touching: this.touching,\n autoAtSetpoint: this.autoAtHeadingSetpoint,\n autoAtSetpointDeadband: this.autoAtHeadingSetpointDeadband,\n setpointAtZeroDeadband: this.headingSetpointAtZeroDeadband,\n setpointOverride: this.headingSetpointOverride,\n animateSetpoint: this.animateSetpoint,\n });\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this._headingSp.dispose();\n }\n\n // @ts-expect-error TS6133: The controller ensures that the render\n // function is called on resize of the element\n private _resizeController = new ResizeController(this, {});\n\n /**\n * Resolved rate of turn in degrees per minute, used to compute the bar\n * extent. Prefers the new physical API; falls back to the deprecated\n * `rotationsPerMinute` so existing consumers keep their visuals during\n * the deprecation window.\n */\n private get _effectiveRotDegPerMin(): number {\n return this.rateOfTurnDegreesPerMinute ?? this.rotationsPerMinute;\n }\n\n /**\n * Pixel cost of the outside decor: the always-rendered north-arrow glyph\n * plus, only while shown, the NSWE labels (both keep a constant on-screen\n * size via `1/scale` terms). Feeds the frame's width-aware reserve,\n * replacing the former empirical `72 + delta(clientSize)` padding.\n * Wind/current symbols at their default radius are covered by the base\n * padding of 72.\n */\n private getOutsideDecorPx(): number {\n if (this.tickmarksInside) {\n return 0;\n }\n return NORTH_ARROW_WIDTH_PX + (this.showLabels ? NSWE_LABEL_WIDTH_PX : 0);\n }\n\n /** Whether the host size styles were set by applyPinnedHostSize. */\n private _hostSizePinned = false;\n private _frame: RadialFrame | undefined;\n\n override updated(changed: PropertyValues): void {\n super.updated(changed);\n this._hostSizePinned = applyPinnedHostSize(\n this,\n this._frame,\n this._hostSizePinned\n );\n }\n\n private get angleAdviceRaw(): AngleAdviceRaw[] {\n return this.headingAdvices.map(({minAngle, maxAngle, hinted, type}) => {\n const state =\n this.heading >= minAngle && this.heading <= maxAngle\n ? AdviceState.triggered\n : hinted\n ? AdviceState.hinted\n : AdviceState.regular;\n return {minAngle, maxAngle, type, state};\n });\n }\n\n private priorityFor(element: CompassPriorityElement): Priority {\n const selected = Array.isArray(this.priorityElements)\n ? this.priorityElements\n : [];\n return selected.includes(element) ? this.priority : Priority.regular;\n }\n\n private colorFor(element: CompassPriorityElement): string | undefined {\n return this.priorityFor(element) === Priority.enhanced\n ? 'var(--instrument-enhanced-secondary-color)'\n : undefined;\n }\n\n private readoutPriorityFor(source: CompassReadoutSource): Priority {\n switch (source) {\n case CompassReadoutSource.hdg:\n return this.priorityFor(CompassPriorityElement.hdg);\n case CompassReadoutSource.cog:\n return this.priorityFor(CompassPriorityElement.cog);\n case CompassReadoutSource.rot:\n return this.priorityFor(CompassPriorityElement.rot);\n }\n }\n\n private get hasCenterReadouts(): boolean {\n return this.centerReadouts.length > 0;\n }\n\n private getRotation(): number | undefined {\n if (this.direction === CompassDirection.NorthUp) {\n return undefined;\n } else if (this.direction === CompassDirection.HeadingUp) {\n return -this.heading;\n } else if (this.direction === CompassDirection.CourseUp) {\n return -this.courseOverGround;\n }\n return undefined;\n }\n\n override render() {\n const tickmarks: Tickmark[] = [\n {angle: 0, type: TickmarkType.main},\n {angle: 90, type: TickmarkType.main},\n {angle: 180, type: TickmarkType.main},\n {angle: 270, type: TickmarkType.main},\n ];\n\n const frame = computeRadialFrame({\n basePadding: 72,\n labelWidthPx: this.getOutsideDecorPx(),\n containerPx: measureContainerPx(this),\n faceDiameter: this.faceDiameter,\n });\n this._frame = frame;\n const viewBox = frame.viewBox;\n\n return html`\n <div class=\"container\">\n <obc-watch\n .touching=${this.touching}\n .arcFrame=${frame}\n .advices=${this.angleAdviceRaw}\n .tickmarks=${tickmarks}\n .state=${this.state}\n .watchCircleType=${WatchCircleType.triple}\n .showLabels=${this.showLabels && !frame.labelsHidden}\n .tickmarksInside=${this.tickmarksInside}\n .crosshairEnabled=${true}\n .crosshairCenterCutout=${this.hasCenterReadouts}\n .northArrow=${true}\n .angleSetpoint=${this.headingSetpoint ?? undefined}\n .newAngleSetpoint=${this.newHeadingSetpoint}\n .atAngleSetpoint=${this._headingSp.computeAtSetpoint(this.heading)}\n .angleSetpointAtZeroDeadband=${this.headingSetpointAtZeroDeadband}\n .setpointOverride=${this.headingSetpointOverride}\n .priority=${this.priority}\n .animateSetpoint=${this.animateSetpoint}\n .vessels=${this.hasCenterReadouts\n ? []\n : [\n {\n size: VesselImageSize.medium,\n vesselImage: this.vesselImage,\n transform: `rotate(${this.heading}deg)`,\n },\n ]}\n .windKnots=${this.currentWindSpeedKnots}\n .windFromDirectionDeg=${this.windFromDirection}\n .windColor=${this.colorFor(CompassPriorityElement.wind)}\n .current=${this.currentSpeed}\n .currentFromDirectionDeg=${this.currentFromDirection}\n .currentColor=${this.colorFor(CompassPriorityElement.current)}\n .rotation=${this.getRotation()}\n .rotType=${this.rotType}\n .rotPosition=${this.rotPosition}\n .rotStartAngle=${this.heading + (this.getRotation() ?? 0)}\n .rotEndAngle=${this.heading +\n (this._effectiveRotDegPerMin / (this.rotMaxValue || 1)) *\n this.rotArcExtent +\n (this.getRotation() ?? 0)}\n .rotPriority=${this.priorityFor(CompassPriorityElement.rot)}\n .rotPortStarboard=${this.rotPortStarboard}\n .rotAtZeroDeadband=${this.rotAtZeroDeadband}\n .rateOfTurnDegreesPerMinute=${this.rateOfTurnDegreesPerMinute}\n .rotDotAnimationFactor=${this.rotDotAnimationFactor}\n .rotationsPerMinute=${this.rotationsPerMinute}\n >\n </obc-watch>\n <svg viewBox=\"${viewBox}\">\n ${hdgArrow(\n this.hdgArrowStyle,\n this.heading + (this.getRotation() ?? 0),\n this.priorityFor(CompassPriorityElement.hdg)\n )}\n ${cogArrow(\n this.cogArrowStyle,\n this.courseOverGround + (this.getRotation() ?? 0),\n this.priorityFor(CompassPriorityElement.cog)\n )}\n </svg>\n ${this.hasCenterReadouts\n ? html`<div class=\"center-readout-overlay\">\n ${renderCenterReadouts(\n resolveCompassCenterReadouts(this.centerReadouts, {\n heading: this.heading,\n courseOverGround: this.courseOverGround,\n rateOfTurnDegreesPerMinute: this.rateOfTurnDegreesPerMinute,\n priorityFor: (source) => this.readoutPriorityFor(source),\n })\n )}\n </div>`\n : nothing}\n </div>\n `;\n }\n\n static override styles = [\n centerReadoutStyles,\n css`\n * {\n box-sizing: border-box;\n }\n\n .container {\n position: relative;\n width: 100%;\n height: 100%;\n }\n\n .container > * {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n .center-readout-overlay {\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: none;\n }\n\n :host {\n display: block;\n width: 100%;\n height: 100%;\n }\n `,\n ];\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-compass': ObcCompass;\n }\n}\n"],"names":["CompassDirection","CompassPriorityElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA2CO,IAAK,qCAAAA,sBAAL;AACLA,oBAAA,SAAA,IAAU;AACVA,oBAAA,WAAA,IAAY;AACZA,oBAAA,UAAA,IAAW;AAHD,SAAAA;AAAA,GAAA,oBAAA,CAAA,CAAA;AAML,IAAK,2CAAAC,4BAAL;AACLA,0BAAA,KAAA,IAAM;AACNA,0BAAA,KAAA,IAAM;AACNA,0BAAA,KAAA,IAAM;AACNA,0BAAA,MAAA,IAAO;AACPA,0BAAA,SAAA,IAAU;AALA,SAAAA;AAAA,GAAA,0BAAA,CAAA,CAAA;AAmFL,IAAM,aAAN,cAAyB,WAAW;AAAA,EAApC,cAAA;AAAA,UAAA,GAAA,SAAA;AAEqB,SAAA,UAAU;AAEV,SAAA,mBAAmB;AAGnB,SAAA,kB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AmIX,WAAA,oBAAA,CAAA;AAE2B,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GArId,WAqIgB,WAAA,cAAA,CAAA;AAEA,gBAAA;AAAA,EAA1B,SAAS,EAAC,MAAM,QAAA,CAAQ;AAAA,GAvId,WAuIgB,WAAA,mBAAA,CAAA;AAS3B,gBAAA;AAAA,EADC,SAAS,EAAC,MAAM,QAAQ,WAAW,iBAAgB;AAAA,GA/IzC,WAgJX,WAAA,gBAAA,CAAA;AAhJW,aAAN,gBAAA;AAAA,EADN,cAAc,aAAa;AAAA,GACf,UAAA;"}
|
|
@@ -32,6 +32,9 @@ export declare function clampCurrentSpeed(value: number | null): number | null;
|
|
|
32
32
|
* the enhanced (blue) palette.
|
|
33
33
|
* - **Vessel image**: configurable silhouette rotating with
|
|
34
34
|
* `vesselHeadingDeg` (vessel type).
|
|
35
|
+
* - **Pattern toggle & wave tuning**: `hasPattern` switches the band pattern
|
|
36
|
+
* off; `waveLength`, `waveHeight` and `waveSpeed` tune the band spacing,
|
|
37
|
+
* intensity and drift motion.
|
|
35
38
|
*
|
|
36
39
|
* ## Usage Guidelines
|
|
37
40
|
*
|
|
@@ -64,6 +67,28 @@ export declare class ObcCurrent extends LitElement {
|
|
|
64
67
|
currentFromDirection: number | null;
|
|
65
68
|
/** Color priority: `Priority.enhanced` uses the blue/enhanced palette (default: `Priority.regular`). */
|
|
66
69
|
priority: Priority;
|
|
70
|
+
/**
|
|
71
|
+
* Show the force-graphics band pattern behind the watch face.
|
|
72
|
+
* @availableWhen currentFromDirection!=null
|
|
73
|
+
*/
|
|
74
|
+
hasPattern: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Wavelength of the pattern bands as a multiplier on the design spacing
|
|
77
|
+
* (1 = design, 0.5 = twice as dense).
|
|
78
|
+
* @availableWhen hasPattern==true && currentFromDirection!=null
|
|
79
|
+
*/
|
|
80
|
+
waveLength: number;
|
|
81
|
+
/**
|
|
82
|
+
* Wave intensity: the peak opacity the pattern bands fade up to (0–1).
|
|
83
|
+
* @availableWhen hasPattern==true && currentFromDirection!=null
|
|
84
|
+
*/
|
|
85
|
+
waveHeight: number;
|
|
86
|
+
/**
|
|
87
|
+
* Drift speed of the pattern in wavelengths per second, moving with the
|
|
88
|
+
* flow (negative drifts against it); 0 keeps the pattern static.
|
|
89
|
+
* @availableWhen hasPattern==true && currentFromDirection!=null
|
|
90
|
+
*/
|
|
91
|
+
waveSpeed: number;
|
|
67
92
|
/**
|
|
68
93
|
* The image of the vessel.
|
|
69
94
|
* @availableWhen type==vessel
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"current.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/current/current.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,KAAK,CAAC;AAGzD,OAAO,EACL,WAAW,EAIZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AAGrC,oBAAY,WAAW;IACrB,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;
|
|
1
|
+
{"version":3,"file":"current.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/current/current.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA2B,MAAM,KAAK,CAAC;AAGzD,OAAO,EACL,WAAW,EAIZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AAGrC,oBAAY,WAAW;IACrB,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAeD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAKrE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,qBACa,UAAW,SAAQ,UAAU;IACxC,2FAA2F;IACjE,IAAI,EAAE,WAAW,CAAsB;IACjE;;;;OAIG;IACuB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC7D,2DAA2D;IACjC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAQ;IACrE,wGAAwG;IAC9E,QAAQ,EAAE,QAAQ,CAAoB;IAChE;;;OAGG;IAC0C,UAAU,UAAQ;IAC/D;;;;OAIG;IACuB,UAAU,SAAK;IACzC;;;OAGG;IACuB,UAAU,SAAK;IACzC;;;;OAIG;IACuB,SAAS,SAAK;IACxC;;;OAGG;IACuB,WAAW,EAAE,WAAW,CAA0B;IAC5E;;;OAGG;IACuB,gBAAgB,EAAE,MAAM,CAAK;IAEvD,OAAO,KAAK,YAAY,GAEvB;IAED,OAAO,KAAK,QAAQ,GAEnB;IAEQ,MAAM;IAuCf,OAAO,CAAC,kBAAkB;IAuB1B,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { unsafeCSS, LitElement, html, nothing } from "lit";
|
|
2
2
|
import { property } from "lit/decorators.js";
|
|
3
3
|
import compentStyle from "./current.css.js";
|
|
4
|
-
import {
|
|
4
|
+
import { innerRingRadiusFor, WatchCircleType } from "../watch/watch.js";
|
|
5
5
|
import { renderCurrentForcePattern } from "../watch/force-pattern.js";
|
|
6
6
|
import { Priority } from "../types.js";
|
|
7
7
|
import { customElement } from "../../decorator.js";
|
|
@@ -23,7 +23,9 @@ var CurrentType = /* @__PURE__ */ ((CurrentType2) => {
|
|
|
23
23
|
})(CurrentType || {});
|
|
24
24
|
const CURRENT_PATTERN_SCALE_VESSEL = 1.39;
|
|
25
25
|
const CURRENT_PATTERN_SCALE_DIRECTION = 2;
|
|
26
|
-
const CURRENT_ICON_PERIPHERY_RADIUS =
|
|
26
|
+
const CURRENT_ICON_PERIPHERY_RADIUS = innerRingRadiusFor(
|
|
27
|
+
WatchCircleType.double
|
|
28
|
+
);
|
|
27
29
|
const CURRENT_DIRECTION_ICON_SCALE = 7;
|
|
28
30
|
function clampCurrentSpeed(value) {
|
|
29
31
|
if (value == null || !Number.isFinite(value)) {
|
|
@@ -38,6 +40,10 @@ let ObcCurrent = class extends LitElement {
|
|
|
38
40
|
this.currentSpeed = null;
|
|
39
41
|
this.currentFromDirection = null;
|
|
40
42
|
this.priority = Priority.regular;
|
|
43
|
+
this.hasPattern = true;
|
|
44
|
+
this.waveLength = 1;
|
|
45
|
+
this.waveHeight = 1;
|
|
46
|
+
this.waveSpeed = 0;
|
|
41
47
|
this.vesselImage = VesselImage.genericTop;
|
|
42
48
|
this.vesselHeadingDeg = 0;
|
|
43
49
|
}
|
|
@@ -80,7 +86,7 @@ let ObcCurrent = class extends LitElement {
|
|
|
80
86
|
`;
|
|
81
87
|
}
|
|
82
88
|
renderForcePattern(watchCircleType) {
|
|
83
|
-
if (this.currentFromDirection == null) {
|
|
89
|
+
if (!this.hasPattern || this.currentFromDirection == null) {
|
|
84
90
|
return nothing;
|
|
85
91
|
}
|
|
86
92
|
return html`
|
|
@@ -89,7 +95,10 @@ let ObcCurrent = class extends LitElement {
|
|
|
89
95
|
fromDirectionDeg: this.currentFromDirection,
|
|
90
96
|
radius: innerRingRadiusFor(watchCircleType),
|
|
91
97
|
patternScale: this.isVesselType ? CURRENT_PATTERN_SCALE_VESSEL : CURRENT_PATTERN_SCALE_DIRECTION,
|
|
92
|
-
color: this.enhanced ? "var(--instrument-enhanced-tertiary-color)" : void 0
|
|
98
|
+
color: this.enhanced ? "var(--instrument-enhanced-tertiary-color)" : void 0,
|
|
99
|
+
waveLength: this.waveLength,
|
|
100
|
+
waveHeight: this.waveHeight,
|
|
101
|
+
waveSpeed: this.waveSpeed
|
|
93
102
|
})}
|
|
94
103
|
</svg>
|
|
95
104
|
`;
|
|
@@ -108,6 +117,18 @@ __decorateClass([
|
|
|
108
117
|
__decorateClass([
|
|
109
118
|
property({ type: String })
|
|
110
119
|
], ObcCurrent.prototype, "priority", 2);
|
|
120
|
+
__decorateClass([
|
|
121
|
+
property({ type: Boolean, attribute: false })
|
|
122
|
+
], ObcCurrent.prototype, "hasPattern", 2);
|
|
123
|
+
__decorateClass([
|
|
124
|
+
property({ type: Number })
|
|
125
|
+
], ObcCurrent.prototype, "waveLength", 2);
|
|
126
|
+
__decorateClass([
|
|
127
|
+
property({ type: Number })
|
|
128
|
+
], ObcCurrent.prototype, "waveHeight", 2);
|
|
129
|
+
__decorateClass([
|
|
130
|
+
property({ type: Number })
|
|
131
|
+
], ObcCurrent.prototype, "waveSpeed", 2);
|
|
111
132
|
__decorateClass([
|
|
112
133
|
property({ type: String })
|
|
113
134
|
], ObcCurrent.prototype, "vesselImage", 2);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"current.js","sources":["../../../src/navigation-instruments/current/current.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport compentStyle from './current.css?inline';\nimport {\n VesselImage,\n VesselImageSize,\n WatchCircleType,\n innerRingRadiusFor,\n} from '../watch/watch.js';\nimport {renderCurrentForcePattern} from '../watch/force-pattern.js';\nimport {Priority} from '../types.js';\nimport {customElement} from '../../decorator.js';\n\nexport enum CurrentType {\n vessel = 'vessel',\n direction = 'direction',\n}\n\nconst CURRENT_PATTERN_SCALE_VESSEL = 1.39;\nconst CURRENT_PATTERN_SCALE_DIRECTION = 2.0;\n/** Chevron-tip anchor radius for the peripheral icon (vessel type), from Figma. */\nconst CURRENT_ICON_PERIPHERY_RADIUS = 116;\n/** Scale of the centered 24-unit chevron glyph (direction type), from Figma (168/24). */\nconst CURRENT_DIRECTION_ICON_SCALE = 7;\n\n/**\n * Round a current speed to the nearest chevron bucket (`current-0` …\n * `current-4` icons) and clamp it into that range. Non-finite input maps to\n * `null` (no icon).\n */\nexport function clampCurrentSpeed(value: number | null): number | null {\n if (value == null || !Number.isFinite(value)) {\n return null;\n }\n return Math.min(4, Math.max(0, Math.round(value)));\n}\n\n/**\n * `<obc-current>` – Water-current instrument with direction chevrons and a\n * force-graphics band pattern.\n *\n * Renders the current's from-direction and strength on a circular watch\n * face. Two layouts are available via `type`: `vessel` (default) shows a\n * vessel silhouette on a double-ring track face with a chevron icon at the\n * periphery pointing with the flow; `direction` shows a single-ring face\n * with a large centered chevron icon. In both, a soft band pattern fills the\n * face, rotated perpendicular to the flow.\n *\n * ## Features\n *\n * - **Types**: `vessel` (track face + vessel + peripheral icon) or\n * `direction` (single ring + large centered icon) via `type`.\n * - **Strength buckets**: `currentSpeed` selects the chevron icon\n * (`0`–`4` = number of chevrons); values are rounded and clamped.\n * - **Color priority**: `priority=enhanced` switches the pattern and icon to\n * the enhanced (blue) palette.\n * - **Vessel image**: configurable silhouette rotating with\n * `vesselHeadingDeg` (vessel type).\n *\n * ## Usage Guidelines\n *\n * Set `currentSpeed` and `currentFromDirection` to the sensor values. Use\n * `obc-wind` for the analogous wind instrument; use `obc-compass` when the\n * current indicator should overlay a full compass.\n *\n * ## Example\n *\n * ```html\n * <obc-current\n * currentSpeed=\"3\"\n * currentFromDirection=\"330\"\n * vesselHeadingDeg=\"15\"\n * ></obc-current>\n * ```\n *\n * @experimental\n */\n@customElement('obc-current')\nexport class ObcCurrent extends LitElement {\n /** Layout type: `vessel` (track face with vessel) or `direction` (large centered icon). */\n @property({type: String}) type: CurrentType = CurrentType.vessel;\n /**\n * The current strength as a chevron bucket (0–4 = number of chevrons);\n * rounded and clamped. `null` hides the icon.\n * @availableWhen currentFromDirection!=null\n */\n @property({type: Number}) currentSpeed: number | null = null;\n /** The direction the current is coming from in degrees. */\n @property({type: Number}) currentFromDirection: number | null = null;\n /** Color priority: `Priority.enhanced` uses the blue/enhanced palette (default: `Priority.regular`). */\n @property({type: String}) priority: Priority = Priority.regular;\n /**\n * The image of the vessel.\n * @availableWhen type==vessel\n */\n @property({type: String}) vesselImage: VesselImage = VesselImage.genericTop;\n /**\n * Vessel heading in degrees.\n * @availableWhen type==vessel\n */\n @property({type: Number}) vesselHeadingDeg: number = 0;\n\n private get isVesselType(): boolean {\n return this.type !== CurrentType.direction;\n }\n\n private get enhanced(): boolean {\n return this.priority === Priority.enhanced;\n }\n\n override render() {\n const isVessel = this.isVesselType;\n const watchCircleType = isVessel\n ? WatchCircleType.double\n : WatchCircleType.single;\n const vessels = isVessel\n ? [\n {\n size: VesselImageSize.medium,\n transform: `rotate(${this.vesselHeadingDeg}deg)`,\n vesselImage: this.vesselImage,\n },\n ]\n : [];\n return html`\n <div class=\"wrapper\">\n ${this.renderForcePattern(watchCircleType)}\n <obc-watch\n .watchCircleType=${watchCircleType}\n .priority=${this.priority}\n .vessels=${vessels}\n .current=${clampCurrentSpeed(this.currentSpeed)}\n .currentFromDirectionDeg=${this.currentFromDirection}\n .currentSymbolRadius=${CURRENT_ICON_PERIPHERY_RADIUS}\n .currentIconCentered=${!isVessel}\n .scaleCurrentIcon=${isVessel ? 1 : CURRENT_DIRECTION_ICON_SCALE}\n .currentColor=${this.enhanced\n ? 'var(--instrument-enhanced-secondary-color)'\n : undefined}\n .showLabels=${true}\n .insideLabelsFlush=${true}\n crosshairEnabled\n northArrow\n tickmarksInside\n ></obc-watch>\n </div>\n `;\n }\n\n private renderForcePattern(watchCircleType: WatchCircleType) {\n if (this.currentFromDirection == null) {\n return nothing;\n }\n return html`\n <svg width=\"100%\" height=\"100%\" viewBox=\"-200 -200 400 400\">\n ${renderCurrentForcePattern({\n fromDirectionDeg: this.currentFromDirection,\n radius: innerRingRadiusFor(watchCircleType),\n patternScale: this.isVesselType\n ? CURRENT_PATTERN_SCALE_VESSEL\n : CURRENT_PATTERN_SCALE_DIRECTION,\n color: this.enhanced\n ? 'var(--instrument-enhanced-tertiary-color)'\n : undefined,\n })}\n </svg>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-current': ObcCurrent;\n }\n}\n"],"names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"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport compentStyle from './current.css?inline';\nimport {\n VesselImage,\n VesselImageSize,\n WatchCircleType,\n innerRingRadiusFor,\n} from '../watch/watch.js';\nimport {renderCurrentForcePattern} from '../watch/force-pattern.js';\nimport {Priority} from '../types.js';\nimport {customElement} from '../../decorator.js';\n\nexport enum CurrentType {\n vessel = 'vessel',\n direction = 'direction',\n}\n\nconst CURRENT_PATTERN_SCALE_VESSEL = 1.39;\nconst CURRENT_PATTERN_SCALE_DIRECTION = 2.0;\n/**\n * Chevron-tip anchor radius for the peripheral icon (vessel type): the tip\n * sits on the track band's inner edge (112), so the 48-unit glyph box fills\n * the band (112–160) exactly, per the OpenBridge 6.1 design.\n */\nconst CURRENT_ICON_PERIPHERY_RADIUS = innerRingRadiusFor(\n WatchCircleType.double\n);\n/** Scale of the centered 24-unit chevron glyph (direction type), from Figma (168/24). */\nconst CURRENT_DIRECTION_ICON_SCALE = 7;\n\n/**\n * Round a current speed to the nearest chevron bucket (`current-0` …\n * `current-4` icons) and clamp it into that range. Non-finite input maps to\n * `null` (no icon).\n */\nexport function clampCurrentSpeed(value: number | null): number | null {\n if (value == null || !Number.isFinite(value)) {\n return null;\n }\n return Math.min(4, Math.max(0, Math.round(value)));\n}\n\n/**\n * `<obc-current>` – Water-current instrument with direction chevrons and a\n * force-graphics band pattern.\n *\n * Renders the current's from-direction and strength on a circular watch\n * face. Two layouts are available via `type`: `vessel` (default) shows a\n * vessel silhouette on a double-ring track face with a chevron icon at the\n * periphery pointing with the flow; `direction` shows a single-ring face\n * with a large centered chevron icon. In both, a soft band pattern fills the\n * face, rotated perpendicular to the flow.\n *\n * ## Features\n *\n * - **Types**: `vessel` (track face + vessel + peripheral icon) or\n * `direction` (single ring + large centered icon) via `type`.\n * - **Strength buckets**: `currentSpeed` selects the chevron icon\n * (`0`–`4` = number of chevrons); values are rounded and clamped.\n * - **Color priority**: `priority=enhanced` switches the pattern and icon to\n * the enhanced (blue) palette.\n * - **Vessel image**: configurable silhouette rotating with\n * `vesselHeadingDeg` (vessel type).\n * - **Pattern toggle & wave tuning**: `hasPattern` switches the band pattern\n * off; `waveLength`, `waveHeight` and `waveSpeed` tune the band spacing,\n * intensity and drift motion.\n *\n * ## Usage Guidelines\n *\n * Set `currentSpeed` and `currentFromDirection` to the sensor values. Use\n * `obc-wind` for the analogous wind instrument; use `obc-compass` when the\n * current indicator should overlay a full compass.\n *\n * ## Example\n *\n * ```html\n * <obc-current\n * currentSpeed=\"3\"\n * currentFromDirection=\"330\"\n * vesselHeadingDeg=\"15\"\n * ></obc-current>\n * ```\n *\n * @experimental\n */\n@customElement('obc-current')\nexport class ObcCurrent extends LitElement {\n /** Layout type: `vessel` (track face with vessel) or `direction` (large centered icon). */\n @property({type: String}) type: CurrentType = CurrentType.vessel;\n /**\n * The current strength as a chevron bucket (0–4 = number of chevrons);\n * rounded and clamped. `null` hides the icon.\n * @availableWhen currentFromDirection!=null\n */\n @property({type: Number}) currentSpeed: number | null = null;\n /** The direction the current is coming from in degrees. */\n @property({type: Number}) currentFromDirection: number | null = null;\n /** Color priority: `Priority.enhanced` uses the blue/enhanced palette (default: `Priority.regular`). */\n @property({type: String}) priority: Priority = Priority.regular;\n /**\n * Show the force-graphics band pattern behind the watch face.\n * @availableWhen currentFromDirection!=null\n */\n @property({type: Boolean, attribute: false}) hasPattern = true;\n /**\n * Wavelength of the pattern bands as a multiplier on the design spacing\n * (1 = design, 0.5 = twice as dense).\n * @availableWhen hasPattern==true && currentFromDirection!=null\n */\n @property({type: Number}) waveLength = 1;\n /**\n * Wave intensity: the peak opacity the pattern bands fade up to (0–1).\n * @availableWhen hasPattern==true && currentFromDirection!=null\n */\n @property({type: Number}) waveHeight = 1;\n /**\n * Drift speed of the pattern in wavelengths per second, moving with the\n * flow (negative drifts against it); 0 keeps the pattern static.\n * @availableWhen hasPattern==true && currentFromDirection!=null\n */\n @property({type: Number}) waveSpeed = 0;\n /**\n * The image of the vessel.\n * @availableWhen type==vessel\n */\n @property({type: String}) vesselImage: VesselImage = VesselImage.genericTop;\n /**\n * Vessel heading in degrees.\n * @availableWhen type==vessel\n */\n @property({type: Number}) vesselHeadingDeg: number = 0;\n\n private get isVesselType(): boolean {\n return this.type !== CurrentType.direction;\n }\n\n private get enhanced(): boolean {\n return this.priority === Priority.enhanced;\n }\n\n override render() {\n const isVessel = this.isVesselType;\n const watchCircleType = isVessel\n ? WatchCircleType.double\n : WatchCircleType.single;\n const vessels = isVessel\n ? [\n {\n size: VesselImageSize.medium,\n transform: `rotate(${this.vesselHeadingDeg}deg)`,\n vesselImage: this.vesselImage,\n },\n ]\n : [];\n return html`\n <div class=\"wrapper\">\n ${this.renderForcePattern(watchCircleType)}\n <obc-watch\n .watchCircleType=${watchCircleType}\n .priority=${this.priority}\n .vessels=${vessels}\n .current=${clampCurrentSpeed(this.currentSpeed)}\n .currentFromDirectionDeg=${this.currentFromDirection}\n .currentSymbolRadius=${CURRENT_ICON_PERIPHERY_RADIUS}\n .currentIconCentered=${!isVessel}\n .scaleCurrentIcon=${isVessel ? 1 : CURRENT_DIRECTION_ICON_SCALE}\n .currentColor=${this.enhanced\n ? 'var(--instrument-enhanced-secondary-color)'\n : undefined}\n .showLabels=${true}\n .insideLabelsFlush=${true}\n crosshairEnabled\n northArrow\n tickmarksInside\n ></obc-watch>\n </div>\n `;\n }\n\n private renderForcePattern(watchCircleType: WatchCircleType) {\n if (!this.hasPattern || this.currentFromDirection == null) {\n return nothing;\n }\n return html`\n <svg width=\"100%\" height=\"100%\" viewBox=\"-200 -200 400 400\">\n ${renderCurrentForcePattern({\n fromDirectionDeg: this.currentFromDirection,\n radius: innerRingRadiusFor(watchCircleType),\n patternScale: this.isVesselType\n ? CURRENT_PATTERN_SCALE_VESSEL\n : CURRENT_PATTERN_SCALE_DIRECTION,\n color: this.enhanced\n ? 'var(--instrument-enhanced-tertiary-color)'\n : undefined,\n waveLength: this.waveLength,\n waveHeight: this.waveHeight,\n waveSpeed: this.waveSpeed,\n })}\n </svg>\n `;\n }\n\n static override styles = unsafeCSS(compentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-current': ObcCurrent;\n }\n}\n"],"names":["CurrentType"],"mappings":";;;;;;;;;;;;;;;;;;AAaO,IAAK,gCAAAA,iBAAL;AACLA,eAAA,QAAA,IAAS;AACTA,eAAA,WAAA,IAAY;AAFF,SAAAA;AAAA,GAAA,eAAA,CAAA,CAAA;AAKZ,MAAM,+BAA+B;AACrC,MAAM,kCAAkC;AAMxC,MAAM,gCAAgC;AAAA,EACpC,gBAAgB;AAClB;AAEA,MAAM,+BAA+B;AAO9B,SAAS,kBAAkB,OAAqC;AACrE,MAAI,SAAS,QAAQ,CAAC,OAAO,SAAS,KAAK,GAAG;AAC5C,WAAO;AAAA,EACT;AACA,SAAO,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,KAAK,MAAM,KAAK,CAAC,CAAC;AACnD;AA8CO,IAAM,aAAN,cAAyB,WAAW;AAAA,EAApC,cAAA;AAAA,UAAA,GAAA,SAAA;AAEqB,SAAA,OAAoB;AAMpB,SAAA,eAA8B;AAE9B,SAAA,uBAAsC;AAEtC,SAAA,WAAqB,SAAS;AAKX,SAAA,aAAa;AAMhC,SAAA,aAAa;AAKb,SAAA,aAAa;AAMb,SAAA,YAAY;AAKZ,SAAA,cAA2B,YAAY;AAKvC,SAAA,mBAA2B;AAAA,EAAA;AAAA,EAErD,IAAY,eAAwB;AAClC,WAAO,KAAK,SAAS;AAAA,EACvB;AAAA,EAEA,IAAY,WAAoB;AAC9B,WAAO,KAAK,aAAa,SAAS;AAAA,EACpC;AAAA,EAES,SAAS;AAChB,UAAM,WAAW,KAAK;AACtB,UAAM,kBAAkB,WACpB,gBAAgB,SAChB,gBAAgB;AACpB,UAAM,UAAU,WACZ;AAAA,MACE;AAAA,QACE,MAAM,gBAAgB;AAAA,QACtB,WAAW,UAAU,KAAK,gBAAgB;A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A,GAZb,WAYe,WAAA,YAAA,CAAA;AAKmB,gBAAA;AAAA,EAA5C,SAAS,EAAC,MAAM,SAAS,WAAW,OAAM;AAAA,GAjBhC,WAiBkC,WAAA,cAAA,CAAA;AAMnB,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAvBb,WAuBe,WAAA,cAAA,CAAA;AAKA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GA5Bb,WA4Be,WAAA,cAAA,CAAA;AAMA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAlCb,WAkCe,WAAA,aAAA,CAAA;AAKA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GAvCb,WAuCe,WAAA,eAAA,CAAA;AAKA,gBAAA;AAAA,EAAzB,SAAS,EAAC,MAAM,OAAA,CAAO;AAAA,GA5Cb,WA4Ce,WAAA,oBAAA,CAAA;AA5Cf,aAAN,gBAAA;AAAA,EADN,cAAc,aAAa;AAAA,GACf,UAAA;"}
|
|
@@ -181,7 +181,7 @@ let ObcHeading = class extends LitElement {
|
|
|
181
181
|
.tickmarksInside=${this.tickmarksInside}
|
|
182
182
|
.crosshairEnabled=${true}
|
|
183
183
|
.crosshairCenterCutout=${this.hasCenterReadouts}
|
|
184
|
-
.northArrow=${
|
|
184
|
+
.northArrow=${true}
|
|
185
185
|
.angleSetpoint=${this.headingSetpoint ?? void 0}
|
|
186
186
|
.newAngleSetpoint=${this.newHeadingSetpoint}
|
|
187
187
|
.atAngleSetpoint=${this._headingSp.computeAtSetpoint(this.heading)}
|