visualizer-components 0.1.0

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.
Files changed (259) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +90 -0
  3. package/dist/assets/RudderIcon.d.ts +23 -0
  4. package/dist/assets/RudderIcon.d.ts.map +1 -0
  5. package/dist/assets/RudderIcon.js +23 -0
  6. package/dist/assets/RudderIcon.js.map +1 -0
  7. package/dist/assets/svgSources.d.ts +18 -0
  8. package/dist/assets/svgSources.d.ts.map +1 -0
  9. package/dist/assets/svgSources.js +18 -0
  10. package/dist/assets/svgSources.js.map +1 -0
  11. package/dist/components/Joystick.d.ts +23 -0
  12. package/dist/components/Joystick.d.ts.map +1 -0
  13. package/dist/components/Joystick.js +114 -0
  14. package/dist/components/Joystick.js.map +1 -0
  15. package/dist/components/TelemetryDashboard.d.ts +31 -0
  16. package/dist/components/TelemetryDashboard.d.ts.map +1 -0
  17. package/dist/components/TelemetryDashboard.js +127 -0
  18. package/dist/components/TelemetryDashboard.js.map +1 -0
  19. package/dist/components/controls/ControlOverlay.d.ts +64 -0
  20. package/dist/components/controls/ControlOverlay.d.ts.map +1 -0
  21. package/dist/components/controls/ControlOverlay.js +88 -0
  22. package/dist/components/controls/ControlOverlay.js.map +1 -0
  23. package/dist/components/controls/ControlsDrawer.d.ts +37 -0
  24. package/dist/components/controls/ControlsDrawer.d.ts.map +1 -0
  25. package/dist/components/controls/ControlsDrawer.js +93 -0
  26. package/dist/components/controls/ControlsDrawer.js.map +1 -0
  27. package/dist/components/controls/ForceVectorsPanel.d.ts +37 -0
  28. package/dist/components/controls/ForceVectorsPanel.d.ts.map +1 -0
  29. package/dist/components/controls/ForceVectorsPanel.js +76 -0
  30. package/dist/components/controls/ForceVectorsPanel.js.map +1 -0
  31. package/dist/components/controls/InfoPopover.d.ts +34 -0
  32. package/dist/components/controls/InfoPopover.d.ts.map +1 -0
  33. package/dist/components/controls/InfoPopover.js +41 -0
  34. package/dist/components/controls/InfoPopover.js.map +1 -0
  35. package/dist/components/controls/Legend.d.ts +29 -0
  36. package/dist/components/controls/Legend.d.ts.map +1 -0
  37. package/dist/components/controls/Legend.js +74 -0
  38. package/dist/components/controls/Legend.js.map +1 -0
  39. package/dist/components/controls/MobileBottomNav.d.ts +17 -0
  40. package/dist/components/controls/MobileBottomNav.d.ts.map +1 -0
  41. package/dist/components/controls/MobileBottomNav.js +46 -0
  42. package/dist/components/controls/MobileBottomNav.js.map +1 -0
  43. package/dist/components/hud/SceneHUD.d.ts +100 -0
  44. package/dist/components/hud/SceneHUD.d.ts.map +1 -0
  45. package/dist/components/hud/SceneHUD.js +216 -0
  46. package/dist/components/hud/SceneHUD.js.map +1 -0
  47. package/dist/components/hud/telemetry/Batteries.d.ts +40 -0
  48. package/dist/components/hud/telemetry/Batteries.d.ts.map +1 -0
  49. package/dist/components/hud/telemetry/Batteries.js +137 -0
  50. package/dist/components/hud/telemetry/Batteries.js.map +1 -0
  51. package/dist/components/hud/telemetry/Compass.d.ts +2 -0
  52. package/dist/components/hud/telemetry/Compass.d.ts.map +1 -0
  53. package/dist/components/hud/telemetry/Compass.js +147 -0
  54. package/dist/components/hud/telemetry/Compass.js.map +1 -0
  55. package/dist/components/hud/telemetry/Log.d.ts +2 -0
  56. package/dist/components/hud/telemetry/Log.d.ts.map +1 -0
  57. package/dist/components/hud/telemetry/Log.js +65 -0
  58. package/dist/components/hud/telemetry/Log.js.map +1 -0
  59. package/dist/components/hud/telemetry/Map.d.ts +4 -0
  60. package/dist/components/hud/telemetry/Map.d.ts.map +1 -0
  61. package/dist/components/hud/telemetry/Map.js +293 -0
  62. package/dist/components/hud/telemetry/Map.js.map +1 -0
  63. package/dist/components/hud/telemetry/PowerRudderPanel.d.ts +2 -0
  64. package/dist/components/hud/telemetry/PowerRudderPanel.d.ts.map +1 -0
  65. package/dist/components/hud/telemetry/PowerRudderPanel.js +115 -0
  66. package/dist/components/hud/telemetry/PowerRudderPanel.js.map +1 -0
  67. package/dist/components/hud/telemetry/RadiusVisualizer.d.ts +63 -0
  68. package/dist/components/hud/telemetry/RadiusVisualizer.d.ts.map +1 -0
  69. package/dist/components/hud/telemetry/RadiusVisualizer.js +139 -0
  70. package/dist/components/hud/telemetry/RadiusVisualizer.js.map +1 -0
  71. package/dist/components/hud/telemetry/RadiusVisualizerPanel.d.ts +31 -0
  72. package/dist/components/hud/telemetry/RadiusVisualizerPanel.d.ts.map +1 -0
  73. package/dist/components/hud/telemetry/RadiusVisualizerPanel.js +37 -0
  74. package/dist/components/hud/telemetry/RadiusVisualizerPanel.js.map +1 -0
  75. package/dist/components/hud/telemetry/ShipRudderVisualizer.d.ts +43 -0
  76. package/dist/components/hud/telemetry/ShipRudderVisualizer.d.ts.map +1 -0
  77. package/dist/components/hud/telemetry/ShipRudderVisualizer.js +121 -0
  78. package/dist/components/hud/telemetry/ShipRudderVisualizer.js.map +1 -0
  79. package/dist/components/hud/telemetry/ShipRudderVisualizerPanel.d.ts +26 -0
  80. package/dist/components/hud/telemetry/ShipRudderVisualizerPanel.d.ts.map +1 -0
  81. package/dist/components/hud/telemetry/ShipRudderVisualizerPanel.js +29 -0
  82. package/dist/components/hud/telemetry/ShipRudderVisualizerPanel.js.map +1 -0
  83. package/dist/components/hud/telemetry/SignalLog.d.ts +7 -0
  84. package/dist/components/hud/telemetry/SignalLog.d.ts.map +1 -0
  85. package/dist/components/hud/telemetry/SignalLog.js +28 -0
  86. package/dist/components/hud/telemetry/SignalLog.js.map +1 -0
  87. package/dist/components/hud/telemetry/SignalStrength.d.ts +9 -0
  88. package/dist/components/hud/telemetry/SignalStrength.d.ts.map +1 -0
  89. package/dist/components/hud/telemetry/SignalStrength.js +53 -0
  90. package/dist/components/hud/telemetry/SignalStrength.js.map +1 -0
  91. package/dist/components/hud/telemetry/Speedometer.d.ts +2 -0
  92. package/dist/components/hud/telemetry/Speedometer.d.ts.map +1 -0
  93. package/dist/components/hud/telemetry/Speedometer.js +70 -0
  94. package/dist/components/hud/telemetry/Speedometer.js.map +1 -0
  95. package/dist/components/hud/telemetry/Task.d.ts +2 -0
  96. package/dist/components/hud/telemetry/Task.d.ts.map +1 -0
  97. package/dist/components/hud/telemetry/Task.js +61 -0
  98. package/dist/components/hud/telemetry/Task.js.map +1 -0
  99. package/dist/components/hud/telemetry/TaskData.d.ts +2 -0
  100. package/dist/components/hud/telemetry/TaskData.d.ts.map +1 -0
  101. package/dist/components/hud/telemetry/TaskData.js +62 -0
  102. package/dist/components/hud/telemetry/TaskData.js.map +1 -0
  103. package/dist/components/hud/telemetry/index.d.ts +40 -0
  104. package/dist/components/hud/telemetry/index.d.ts.map +1 -0
  105. package/dist/components/hud/telemetry/index.js +40 -0
  106. package/dist/components/hud/telemetry/index.js.map +1 -0
  107. package/dist/components/hud/telemetry/powerColor.d.ts +16 -0
  108. package/dist/components/hud/telemetry/powerColor.d.ts.map +1 -0
  109. package/dist/components/hud/telemetry/powerColor.js +15 -0
  110. package/dist/components/hud/telemetry/powerColor.js.map +1 -0
  111. package/dist/components/scenes/MappingScene.d.ts +19 -0
  112. package/dist/components/scenes/MappingScene.d.ts.map +1 -0
  113. package/dist/components/scenes/MappingScene.js +353 -0
  114. package/dist/components/scenes/MappingScene.js.map +1 -0
  115. package/dist/components/scenes/SceneCanvas.d.ts +96 -0
  116. package/dist/components/scenes/SceneCanvas.d.ts.map +1 -0
  117. package/dist/components/scenes/SceneCanvas.js +151 -0
  118. package/dist/components/scenes/SceneCanvas.js.map +1 -0
  119. package/dist/components/scenes/SceneRenderer.d.ts +16 -0
  120. package/dist/components/scenes/SceneRenderer.d.ts.map +1 -0
  121. package/dist/components/scenes/SceneRenderer.js +60 -0
  122. package/dist/components/scenes/SceneRenderer.js.map +1 -0
  123. package/dist/components/scenes/TelemetryScene.d.ts +6 -0
  124. package/dist/components/scenes/TelemetryScene.d.ts.map +1 -0
  125. package/dist/components/scenes/TelemetryScene.js +6 -0
  126. package/dist/components/scenes/TelemetryScene.js.map +1 -0
  127. package/dist/components/svg/CompassRose.d.ts +129 -0
  128. package/dist/components/svg/CompassRose.d.ts.map +1 -0
  129. package/dist/components/svg/CompassRose.js +221 -0
  130. package/dist/components/svg/CompassRose.js.map +1 -0
  131. package/dist/connection/config.d.ts +41 -0
  132. package/dist/connection/config.d.ts.map +1 -0
  133. package/dist/connection/config.js +44 -0
  134. package/dist/connection/config.js.map +1 -0
  135. package/dist/contexts/SceneContext.d.ts +35 -0
  136. package/dist/contexts/SceneContext.d.ts.map +1 -0
  137. package/dist/contexts/SceneContext.js +24 -0
  138. package/dist/contexts/SceneContext.js.map +1 -0
  139. package/dist/hooks/useAutoPathAnimation.d.ts +22 -0
  140. package/dist/hooks/useAutoPathAnimation.d.ts.map +1 -0
  141. package/dist/hooks/useAutoPathAnimation.js +102 -0
  142. package/dist/hooks/useAutoPathAnimation.js.map +1 -0
  143. package/dist/hooks/useLayoutConfig.d.ts +29 -0
  144. package/dist/hooks/useLayoutConfig.d.ts.map +1 -0
  145. package/dist/hooks/useLayoutConfig.js +30 -0
  146. package/dist/hooks/useLayoutConfig.js.map +1 -0
  147. package/dist/hooks/useSceneContext.d.ts +64 -0
  148. package/dist/hooks/useSceneContext.d.ts.map +1 -0
  149. package/dist/hooks/useSceneContext.js +37 -0
  150. package/dist/hooks/useSceneContext.js.map +1 -0
  151. package/dist/index.d.ts +44 -0
  152. package/dist/index.d.ts.map +1 -0
  153. package/dist/index.js +57 -0
  154. package/dist/index.js.map +1 -0
  155. package/dist/providers/TelemetryProvider.d.ts +27 -0
  156. package/dist/providers/TelemetryProvider.d.ts.map +1 -0
  157. package/dist/providers/TelemetryProvider.js +50 -0
  158. package/dist/providers/TelemetryProvider.js.map +1 -0
  159. package/dist/providers/TelemetryThemeProvider.d.ts +25 -0
  160. package/dist/providers/TelemetryThemeProvider.d.ts.map +1 -0
  161. package/dist/providers/TelemetryThemeProvider.js +54 -0
  162. package/dist/providers/TelemetryThemeProvider.js.map +1 -0
  163. package/dist/store/actions/connectionActions.d.ts +39 -0
  164. package/dist/store/actions/connectionActions.d.ts.map +1 -0
  165. package/dist/store/actions/connectionActions.js +162 -0
  166. package/dist/store/actions/connectionActions.js.map +1 -0
  167. package/dist/store/actions/fetchTelemetry.d.ts +51 -0
  168. package/dist/store/actions/fetchTelemetry.d.ts.map +1 -0
  169. package/dist/store/actions/fetchTelemetry.js +135 -0
  170. package/dist/store/actions/fetchTelemetry.js.map +1 -0
  171. package/dist/store/index.d.ts +23 -0
  172. package/dist/store/index.d.ts.map +1 -0
  173. package/dist/store/index.js +22 -0
  174. package/dist/store/index.js.map +1 -0
  175. package/dist/store/slices/connectionSlice.d.ts +15 -0
  176. package/dist/store/slices/connectionSlice.d.ts.map +1 -0
  177. package/dist/store/slices/connectionSlice.js +39 -0
  178. package/dist/store/slices/connectionSlice.js.map +1 -0
  179. package/dist/store/slices/discoveredGridSlice.d.ts +168 -0
  180. package/dist/store/slices/discoveredGridSlice.d.ts.map +1 -0
  181. package/dist/store/slices/discoveredGridSlice.js +146 -0
  182. package/dist/store/slices/discoveredGridSlice.js.map +1 -0
  183. package/dist/store/slices/sceneSlice.d.ts +185 -0
  184. package/dist/store/slices/sceneSlice.d.ts.map +1 -0
  185. package/dist/store/slices/sceneSlice.js +95 -0
  186. package/dist/store/slices/sceneSlice.js.map +1 -0
  187. package/dist/store/slices/simulationSlice.d.ts +87 -0
  188. package/dist/store/slices/simulationSlice.d.ts.map +1 -0
  189. package/dist/store/slices/simulationSlice.js +55 -0
  190. package/dist/store/slices/simulationSlice.js.map +1 -0
  191. package/dist/store/slices/telemetrySlice.d.ts +10 -0
  192. package/dist/store/slices/telemetrySlice.d.ts.map +1 -0
  193. package/dist/store/slices/telemetrySlice.js +88 -0
  194. package/dist/store/slices/telemetrySlice.js.map +1 -0
  195. package/dist/store/slices/videoSlice.d.ts +12 -0
  196. package/dist/store/slices/videoSlice.d.ts.map +1 -0
  197. package/dist/store/slices/videoSlice.js +27 -0
  198. package/dist/store/slices/videoSlice.js.map +1 -0
  199. package/dist/store/slices/visualizationSlice.d.ts +152 -0
  200. package/dist/store/slices/visualizationSlice.d.ts.map +1 -0
  201. package/dist/store/slices/visualizationSlice.js +58 -0
  202. package/dist/store/slices/visualizationSlice.js.map +1 -0
  203. package/dist/store/store.d.ts +61 -0
  204. package/dist/store/store.d.ts.map +1 -0
  205. package/dist/store/store.js +78 -0
  206. package/dist/store/store.js.map +1 -0
  207. package/dist/theme/index.d.ts +14 -0
  208. package/dist/theme/index.d.ts.map +1 -0
  209. package/dist/theme/index.js +14 -0
  210. package/dist/theme/index.js.map +1 -0
  211. package/dist/theme/lightTheme.d.ts +151 -0
  212. package/dist/theme/lightTheme.d.ts.map +1 -0
  213. package/dist/theme/lightTheme.js +194 -0
  214. package/dist/theme/lightTheme.js.map +1 -0
  215. package/dist/theme/telemetryTheme.d.ts +90 -0
  216. package/dist/theme/telemetryTheme.d.ts.map +1 -0
  217. package/dist/theme/telemetryTheme.js +157 -0
  218. package/dist/theme/telemetryTheme.js.map +1 -0
  219. package/dist/types/detectedObjectsTypes.d.ts +18 -0
  220. package/dist/types/detectedObjectsTypes.d.ts.map +1 -0
  221. package/dist/types/detectedObjectsTypes.js +8 -0
  222. package/dist/types/detectedObjectsTypes.js.map +1 -0
  223. package/dist/types/index.d.ts +16 -0
  224. package/dist/types/index.d.ts.map +1 -0
  225. package/dist/types/index.js +16 -0
  226. package/dist/types/index.js.map +1 -0
  227. package/dist/types/ros.d.ts +87 -0
  228. package/dist/types/ros.d.ts.map +1 -0
  229. package/dist/types/ros.js +17 -0
  230. package/dist/types/ros.js.map +1 -0
  231. package/dist/types/statusTypes.d.ts +81 -0
  232. package/dist/types/statusTypes.d.ts.map +1 -0
  233. package/dist/types/statusTypes.js +52 -0
  234. package/dist/types/statusTypes.js.map +1 -0
  235. package/dist/types/taskTypes.d.ts +65 -0
  236. package/dist/types/taskTypes.d.ts.map +1 -0
  237. package/dist/types/taskTypes.js +18 -0
  238. package/dist/types/taskTypes.js.map +1 -0
  239. package/dist/types/telemetryInterfaces.d.ts +81 -0
  240. package/dist/types/telemetryInterfaces.d.ts.map +1 -0
  241. package/dist/types/telemetryInterfaces.js +30 -0
  242. package/dist/types/telemetryInterfaces.js.map +1 -0
  243. package/dist/utils/basestation.d.ts +7 -0
  244. package/dist/utils/basestation.d.ts.map +1 -0
  245. package/dist/utils/basestation.js +49 -0
  246. package/dist/utils/basestation.js.map +1 -0
  247. package/dist/utils/batteryUtil.d.ts +8 -0
  248. package/dist/utils/batteryUtil.d.ts.map +1 -0
  249. package/dist/utils/batteryUtil.js +32 -0
  250. package/dist/utils/batteryUtil.js.map +1 -0
  251. package/dist/utils/telemetry/index.d.ts +13 -0
  252. package/dist/utils/telemetry/index.d.ts.map +1 -0
  253. package/dist/utils/telemetry/index.js +13 -0
  254. package/dist/utils/telemetry/index.js.map +1 -0
  255. package/dist/utils/telemetry/telemetryFactory.d.ts +48 -0
  256. package/dist/utils/telemetry/telemetryFactory.d.ts.map +1 -0
  257. package/dist/utils/telemetry/telemetryFactory.js +390 -0
  258. package/dist/utils/telemetry/telemetryFactory.js.map +1 -0
  259. package/package.json +91 -0
@@ -0,0 +1,115 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /*
3
+ MIT License
4
+
5
+ Copyright (c) 2026 HumberASV
6
+ Copyright (c) 2026 Carson Fujita
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in all
16
+ copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ SOFTWARE.
25
+ */
26
+ import { useSelector } from "react-redux";
27
+ import { Box, Typography, useTheme } from "@mui/material";
28
+ import { useSpring, animated } from "@react-spring/web";
29
+ import { RudderIcon } from "../../../assets/RudderIcon";
30
+ import { getPowerColor } from "./powerColor";
31
+ const Panel = ({ label, content, value, width }) => {
32
+ const theme = useTheme();
33
+ return (_jsxs(Box, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: 0.5, width: width || "100%" }, children: [_jsx(Typography, { variant: "caption", sx: { color: theme.palette.text.primary, fontSize: "10px", fontWeight: 600 }, children: label }), _jsx(Box, { sx: { width: "100%", display: "flex", flexDirection: "column", height: "100%", justifyContent: "center", alignItems: "center" }, children: content }), value !== undefined && (_jsxs(Typography, { variant: "caption", sx: { color: getPowerColor(theme, value), fontSize: "14px", fontWeight: 600 }, children: [Math.round(value), "%"] }))] }));
34
+ };
35
+ const PowerBar = ({ value }) => {
36
+ const theme = useTheme();
37
+ return (_jsx(Box, { sx: { width: "50%", height: "100%", flex: 1, flexShrink: 1, display: "flex", flexDirection: "column", justifyContent: "flex-end", alignItems: "center", gap: 0.5 }, children: _jsx(Box, { sx: {
38
+ flex: 0,
39
+ flexGrow: 1,
40
+ height: "100%",
41
+ width: "100%",
42
+ borderRadius: 999,
43
+ backgroundColor: "#dbe4ee",
44
+ position: "relative",
45
+ overflow: "hidden",
46
+ mx: "auto",
47
+ border: "1px solid #cbd5e1",
48
+ }, children: _jsx(Box, { sx: {
49
+ position: "absolute",
50
+ left: 0,
51
+ right: 0,
52
+ bottom: 0,
53
+ height: `${Math.max(0, Math.min(100, value))}%`,
54
+ backgroundColor: getPowerColor(theme, value),
55
+ transition: "height 0.25s ease-out",
56
+ } }) }) }));
57
+ };
58
+ // height is focal point of the rudder image: 50% centers it, 100 = top, 0 = bottom
59
+ const RudderDisplay = ({ height, angle }) => {
60
+ const { rot } = useSpring({ rot: angle, config: { tension: 300, friction: 30 } });
61
+ return (_jsxs(Box, { sx: {
62
+ flex: 2,
63
+ flexGrow: 1,
64
+ backgroundColor: "#d7ebff",
65
+ border: "2px solid #86bff2",
66
+ overflow: "hidden",
67
+ borderRadius: 2,
68
+ width: "100%",
69
+ minHeight: 130,
70
+ position: "relative",
71
+ }, children: [_jsx(Box, { sx: {
72
+ position: "absolute",
73
+ top: "50%",
74
+ left: "50%",
75
+ width: "2px",
76
+ height: "100%",
77
+ backgroundColor: "#86bff2",
78
+ transform: "translate(-50%, -50%)",
79
+ } }), _jsx(Box, { sx: {
80
+ position: "absolute",
81
+ top: `${height - 5}%`,
82
+ left: "50%",
83
+ width: "100%",
84
+ height: "2px",
85
+ backgroundColor: "#86bff2",
86
+ transform: `translate(-50%, -${height - 5}%)`,
87
+ } }), _jsx(animated.div, { style: {
88
+ position: "absolute",
89
+ top: `${height - 55}%`,
90
+ left: "50%",
91
+ height: "100%",
92
+ transformOrigin: "center center",
93
+ transform: rot.to((r) => `translateX(-50%) rotate(${r}deg)`),
94
+ }, children: _jsx(RudderIcon, { title: "Rudder Angle", style: { display: "block", width: "auto", height: "100%" } }) })] }));
95
+ };
96
+ export default function PowerRudderPanel() {
97
+ const theme = useTheme();
98
+ const motor1Power = useSelector((state) => state.telemetry.motors.left);
99
+ const motor2Power = useSelector((state) => state.telemetry.motors.right);
100
+ const rudderAngle = useSelector((state) => state.telemetry.rudder.angle);
101
+ const displayAngle = Math.max(-90, Math.min(90, rudderAngle));
102
+ return (_jsxs(Box, { sx: {
103
+ width: "100%",
104
+ height: "100%",
105
+ backgroundColor: theme.palette.telemetry?.background.primary,
106
+ border: `2px solid ${theme.palette.telemetry?.border.light}`,
107
+ borderRadius: "8px",
108
+ padding: "12px",
109
+ display: "flex",
110
+ flexDirection: "column",
111
+ gap: "12px",
112
+ minHeight: "120px",
113
+ }, children: [_jsx(Typography, { variant: "caption", sx: { fontWeight: 700, color: "#6b7280", fontSize: "10px", textTransform: "uppercase", textAlign: "center" }, children: "Propulsion" }), _jsxs(Box, { sx: { display: "flex", flexDirection: "row", gap: 1, height: "100%" }, children: [_jsx(Panel, { label: "L", content: _jsx(PowerBar, { value: motor1Power }), value: motor1Power, width: "40%" }), _jsx(Panel, { label: "R", content: _jsx(PowerBar, { value: motor2Power }), value: motor2Power, width: "40%" }), _jsx(Panel, { label: "Rudder Angle", content: _jsx(RudderDisplay, { height: 40, angle: displayAngle }), value: displayAngle, width: "100%" })] })] }));
114
+ }
115
+ //# sourceMappingURL=PowerRudderPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PowerRudderPanel.js","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/PowerRudderPanel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AAEF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,KAAK,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAA+E,EAAE,EAAE;IAC/H,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,OAAO,CACN,MAAC,GAAG,IAAC,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,U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,KAAK,EAAC,KAAK,GAAG,EAC9F,KAAC,KAAK,IAAC,KAAK,EAAC,cAAc,EAAC,OAAO,EAAE,KAAC,aAAa,IAAC,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,YAAY,GAAI,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAC,MAAM,GAAG,IACxH,IACD,CACN,CAAC;AACH,CAAC"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * @file RadiusVisualizer.tsx
3
+ * @description Circular radar/minimap HUD showing nearby obstacles around the ASV.
4
+ *
5
+ * @remarks
6
+ * - Presentational component: obstacle positions are **boat-relative offsets in
7
+ * meters** (x = east, y = north); the Redux-connected wrapper
8
+ * {@link RadiusVisualizerPanel} feeds it ZED detections.
9
+ * - The display is heading-up: the environment is rotated by the vessel heading
10
+ * so the boat marker always points straight up.
11
+ * - Obstacles glide to their new positions with springs, and a looping sonar
12
+ * ping sweeps outward — both driven by @react-spring/web.
13
+ * - All colors come from the active MUI theme (telemetry/status palette groups),
14
+ * with graceful fallbacks when a group is not defined by the theme.
15
+ *
16
+ * @author Carson Fujita
17
+ * @license MIT
18
+ *
19
+ * @example
20
+ * <RadiusVisualizer
21
+ * heading={heading}
22
+ * latitude={lat}
23
+ * longitude={lon}
24
+ * obstacles={[{ id: 'buoy-1', x: 12.5, y: -3.2 }]}
25
+ * />
26
+ */
27
+ import React from 'react';
28
+ /** A single obstacle plotted on the radar, positioned relative to the vessel in meters. */
29
+ export interface RadarObstacle {
30
+ /** Stable identity — keys the obstacle's position spring across updates. */
31
+ id: string | number;
32
+ /** Offset east of the vessel in meters. */
33
+ x: number;
34
+ /** Offset north of the vessel in meters. */
35
+ y: number;
36
+ }
37
+ /** Properties for the {@link RadiusVisualizer} component. */
38
+ export interface RadiusVisualizerProps {
39
+ /** Vessel heading in degrees (0° = North, clockwise). */
40
+ heading: number;
41
+ /** Vessel latitude for the readout beneath the radar. */
42
+ latitude?: number;
43
+ /** Vessel longitude for the readout beneath the radar. */
44
+ longitude?: number;
45
+ /** Obstacles relative to the vessel, in meters. */
46
+ obstacles: RadarObstacle[];
47
+ /** Radar range in meters (obstacles beyond it are hidden). Defaults to 40. */
48
+ rangeM?: number;
49
+ /** Diameter of the radar circle in pixels. Defaults to 120. */
50
+ size?: number;
51
+ /** Panel title. Defaults to "MINIMAP". */
52
+ title?: string;
53
+ /** Optional click handler for the whole panel (e.g. to open a full map). */
54
+ onClick?: () => void;
55
+ }
56
+ /**
57
+ * @function RadiusVisualizer
58
+ * @description Heading-up radar showing obstacles within range of the vessel,
59
+ * with a sonar ping animation and a latitude/longitude readout.
60
+ */
61
+ export declare const RadiusVisualizer: React.FC<RadiusVisualizerProps>;
62
+ export default RadiusVisualizer;
63
+ //# sourceMappingURL=RadiusVisualizer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadiusVisualizer.d.ts","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/RadiusVisualizer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,2FAA2F;AAC3F,MAAM,WAAW,aAAa;IAC1B,4EAA4E;IAC5E,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,2CAA2C;IAC3C,CAAC,EAAE,MAAM,CAAC;IACV,4CAA4C;IAC5C,CAAC,EAAE,MAAM,CAAC;CACb;AAED,6DAA6D;AAC7D,MAAM,WAAW,qBAAqB;IAClC,yDAAyD;IACzD,OAAO,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAqDD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAsL5D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,139 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * @file RadiusVisualizer.tsx
4
+ * @description Circular radar/minimap HUD showing nearby obstacles around the ASV.
5
+ *
6
+ * @remarks
7
+ * - Presentational component: obstacle positions are **boat-relative offsets in
8
+ * meters** (x = east, y = north); the Redux-connected wrapper
9
+ * {@link RadiusVisualizerPanel} feeds it ZED detections.
10
+ * - The display is heading-up: the environment is rotated by the vessel heading
11
+ * so the boat marker always points straight up.
12
+ * - Obstacles glide to their new positions with springs, and a looping sonar
13
+ * ping sweeps outward — both driven by @react-spring/web.
14
+ * - All colors come from the active MUI theme (telemetry/status palette groups),
15
+ * with graceful fallbacks when a group is not defined by the theme.
16
+ *
17
+ * @author Carson Fujita
18
+ * @license MIT
19
+ *
20
+ * @example
21
+ * <RadiusVisualizer
22
+ * heading={heading}
23
+ * latitude={lat}
24
+ * longitude={lon}
25
+ * obstacles={[{ id: 'buoy-1', x: 12.5, y: -3.2 }]}
26
+ * />
27
+ */
28
+ import React from 'react';
29
+ import { Box, Typography, useTheme } from '@mui/material';
30
+ import { alpha } from '@mui/material/styles';
31
+ import { useSpring, animated } from '@react-spring/web';
32
+ const OBSTACLE_SPRING = { tension: 170, friction: 26 };
33
+ const PING_DURATION_MS = 2000;
34
+ /**
35
+ * Rotates a boat-relative (east, north) offset into heading-up display space.
36
+ * With the vessel facing `heading`, whatever is dead ahead ends up pointing up.
37
+ */
38
+ const rotateHeadingUp = (x, y, headingDeg) => {
39
+ const rad = (headingDeg * Math.PI) / 180;
40
+ return {
41
+ x: x * Math.cos(rad) - y * Math.sin(rad),
42
+ y: x * Math.sin(rad) + y * Math.cos(rad),
43
+ };
44
+ };
45
+ /** One radar dot; its own spring glides it between positions. Keyed by obstacle id. */
46
+ const ObstacleDot = ({ cx, cy, color }) => {
47
+ const spring = useSpring({ cx, cy, config: OBSTACLE_SPRING });
48
+ return (_jsx(animated.circle, { cx: spring.cx, cy: spring.cy, r: 3, fill: color, style: { filter: `drop-shadow(0 0 3px ${color})` } }));
49
+ };
50
+ /** Expanding, fading sonar ping — loops forever. */
51
+ const SonarPing = ({ center, maxR, color }) => {
52
+ const spring = useSpring({
53
+ from: { r: 0, opacity: 0.55 },
54
+ to: { r: maxR, opacity: 0 },
55
+ loop: true,
56
+ config: { duration: PING_DURATION_MS },
57
+ });
58
+ return (_jsx(animated.circle, { cx: center, cy: center, r: spring.r, opacity: spring.opacity, fill: "none", stroke: color, strokeWidth: 2, pointerEvents: "none" }));
59
+ };
60
+ /**
61
+ * @function RadiusVisualizer
62
+ * @description Heading-up radar showing obstacles within range of the vessel,
63
+ * with a sonar ping animation and a latitude/longitude readout.
64
+ */
65
+ export const RadiusVisualizer = ({ heading, latitude, longitude, obstacles, rangeM = 40, size = 120, title = 'MINIMAP', onClick, }) => {
66
+ const theme = useTheme();
67
+ const telemetry = theme.palette.telemetry;
68
+ const compass = theme.palette.compass;
69
+ const ringColor = telemetry?.status.online ?? theme.palette.success.main;
70
+ const pingColor = telemetry?.accent ?? theme.palette.primary.light;
71
+ const obstacleColor = telemetry?.status.error ?? theme.palette.error.main;
72
+ const boatColor = telemetry?.accent ?? theme.palette.primary.light;
73
+ const textPrimary = telemetry?.text.primary ?? theme.palette.text.primary;
74
+ const textSecondary = telemetry?.text.secondary ?? theme.palette.text.secondary;
75
+ const borderLight = telemetry?.border.light ?? theme.palette.divider;
76
+ const center = size / 2;
77
+ const scalePx = center / rangeM; // px per meter
78
+ // Instance-unique ids so multiple radars on one page don't cross-reference defs.
79
+ const uid = React.useId();
80
+ const bgId = `radius-bg${uid}`;
81
+ const clipId = `radius-clip${uid}`;
82
+ // Filter to range, then rotate into heading-up display space.
83
+ const visible = React.useMemo(() => obstacles
84
+ .filter((obs) => Math.hypot(obs.x, obs.y) < rangeM)
85
+ .map((obs) => {
86
+ const rotated = rotateHeadingUp(obs.x, obs.y, heading);
87
+ return {
88
+ id: obs.id,
89
+ // SVG y grows downward; our y grows northward/up.
90
+ cx: center + rotated.x * scalePx,
91
+ cy: center - rotated.y * scalePx,
92
+ };
93
+ }), [obstacles, heading, rangeM, center, scalePx]);
94
+ // Cardinal markers rotate opposite the heading so they stay geographically true.
95
+ const cardinals = React.useMemo(() => {
96
+ const entries = [
97
+ { label: 'N', deg: 0, color: compass?.north },
98
+ { label: 'E', deg: 90, color: compass?.east },
99
+ { label: 'S', deg: 180, color: compass?.south },
100
+ { label: 'W', deg: 270, color: compass?.west },
101
+ ];
102
+ return entries.map(({ label, deg, color }) => {
103
+ const rad = ((deg - heading - 90) * Math.PI) / 180;
104
+ const r = center - 8;
105
+ return {
106
+ label,
107
+ x: center + Math.cos(rad) * r,
108
+ y: center + Math.sin(rad) * r,
109
+ color: color ?? textSecondary,
110
+ };
111
+ });
112
+ }, [heading, center, compass, textSecondary]);
113
+ return (_jsxs(Box, { "data-testid": "radius-visualizer", onClick: onClick, sx: {
114
+ display: 'flex',
115
+ flexDirection: 'column',
116
+ alignItems: 'center',
117
+ p: '12px 15px',
118
+ backgroundColor: telemetry?.background.primary,
119
+ border: `1px solid ${borderLight}`,
120
+ borderRadius: 2,
121
+ backdropFilter: 'blur(10px)',
122
+ width: size + 60,
123
+ color: textPrimary,
124
+ fontFamily: 'monospace',
125
+ boxShadow: '0 4px 15px rgba(0, 0, 0, 0.5)',
126
+ cursor: onClick ? 'pointer' : 'default',
127
+ transition: 'border-color 0.2s',
128
+ '&:hover': onClick ? { borderColor: theme.palette.primary.light } : undefined,
129
+ }, children: [_jsx(Typography, { variant: "caption", sx: {
130
+ fontWeight: 700,
131
+ fontSize: '11px',
132
+ mb: 1,
133
+ textTransform: 'uppercase',
134
+ letterSpacing: '1px',
135
+ color: textSecondary,
136
+ }, children: title }), _jsxs(Box, { component: "svg", viewBox: `0 0 ${size} ${size}`, sx: { width: size, height: size, display: 'block' }, children: [_jsxs("defs", { children: [_jsxs("radialGradient", { id: bgId, children: [_jsx("stop", { offset: "0%", stopColor: alpha(pingColor, 0.05) }), _jsx("stop", { offset: "100%", stopColor: "rgba(0,0,0,0.7)" })] }), _jsx("clipPath", { id: clipId, children: _jsx("circle", { cx: center, cy: center, r: center - 1 }) })] }), _jsx("circle", { cx: center, cy: center, r: center - 1, fill: `url(#${bgId})`, stroke: alpha(ringColor, 0.3), strokeWidth: 1 }), _jsxs("g", { clipPath: `url(#${clipId})`, children: [_jsx("line", { x1: center, y1: 0, x2: center, y2: size, stroke: alpha(ringColor, 0.15), strokeWidth: 1 }), _jsx("line", { x1: 0, y1: center, x2: size, y2: center, stroke: alpha(ringColor, 0.15), strokeWidth: 1 }), _jsx("circle", { cx: center, cy: center, r: center * 0.7, fill: "none", stroke: alpha(ringColor, 0.1), strokeWidth: 1, strokeDasharray: "3 3" }), _jsx("circle", { cx: center, cy: center, r: center * 0.4, fill: "none", stroke: alpha(ringColor, 0.15), strokeWidth: 1, strokeDasharray: "3 3" }), _jsx(SonarPing, { center: center, maxR: center, color: pingColor }), visible.map((obs) => (_jsx(ObstacleDot, { cx: obs.cx, cy: obs.cy, color: obstacleColor }, obs.id))), cardinals.map(({ label, x, y, color }) => (_jsx("text", { x: x, y: y, fill: color, fontSize: 7, fontWeight: 700, textAnchor: "middle", dominantBaseline: "central", pointerEvents: "none", children: label }, label))), _jsx("g", { transform: `translate(${center - 5}, ${center - 9})`, children: _jsx("path", { d: "M5 0 L10 5 L8.4 15 L1.6 15 L0 5 Z", fill: boatColor, stroke: textPrimary, strokeWidth: 1 }) })] })] }), _jsxs(Box, { sx: { mt: 1, textAlign: 'center', lineHeight: 1.4 }, children: [_jsxs(Typography, { variant: "caption", component: "div", sx: { fontSize: '10px', color: textSecondary }, children: ["LAT: ", latitude !== undefined ? latitude.toFixed(6) : 'N/A'] }), _jsxs(Typography, { variant: "caption", component: "div", sx: { fontSize: '10px', color: textSecondary }, children: ["LON: ", longitude !== undefined ? longitude.toFixed(6) : 'N/A'] })] })] }));
137
+ };
138
+ export default RadiusVisualizer;
139
+ //# sourceMappingURL=RadiusVisualizer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadiusVisualizer.js","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/RadiusVisualizer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAgCxD,MAAM,eAAe,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;AACvD,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAE9B;;;GAGG;AACH,MAAM,eAAe,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,UAAkB,EAAE,EAAE;IACjE,MAAM,GAAG,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;IACzC,OAAO;QACH,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;QACxC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;KAC3C,CAAC;AACN,CAAC,CAAC;AAEF,uFAAuF;AACvF,MAA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V,CAAC,EAGF,YAAG,SAAS,EAAE,aAAa,MAAM,GAAG,CAAC,KAAK,MAAM,GAAG,CAAC,GAAG,YACnD,eACI,CAAC,EAAC,mCAAmC,EACrC,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,WAAW,EACnB,WAAW,EAAE,CAAC,GAChB,GACF,IACJ,IACF,EAEN,MAAC,GAAG,IAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,aACpD,MAAC,UAAU,IAAC,OAAO,EAAC,SAAS,EAAC,SAAS,EAAC,KAAK,EAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,sBAClF,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,IACjD,EACb,MAAC,UAAU,IAAC,OAAO,EAAC,SAAS,EAAC,SAAS,EAAC,KAAK,EAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,sBAClF,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,IACnD,IACX,IACJ,CACT,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @file RadiusVisualizerPanel.tsx
3
+ * @description Redux-connected wrapper around {@link RadiusVisualizer}.
4
+ *
5
+ * @remarks
6
+ * Selects the vessel heading and GPS position from `telemetry.asv` and maps the
7
+ * ZED camera's detected objects (`telemetry.zed.objects`, boat-relative meters)
8
+ * into radar obstacles. Follows the same panel pattern as the other
9
+ * hud/telemetry components.
10
+ *
11
+ * @author Carson Fujita
12
+ * @license MIT
13
+ */
14
+ import React from 'react';
15
+ /** Properties for the {@link RadiusVisualizerPanel} component. */
16
+ export interface RadiusVisualizerPanelProps {
17
+ /** Radar range in meters. Defaults to 40. */
18
+ rangeM?: number;
19
+ /** Diameter of the radar circle in pixels. Defaults to 120. */
20
+ size?: number;
21
+ /** Optional click handler passed through to the radar panel. */
22
+ onClick?: () => void;
23
+ }
24
+ /**
25
+ * @function RadiusVisualizerPanel
26
+ * @description Feeds live telemetry (heading, GPS, ZED detections) into the
27
+ * presentational {@link RadiusVisualizer}.
28
+ */
29
+ export declare const RadiusVisualizerPanel: React.FC<RadiusVisualizerPanelProps>;
30
+ export default RadiusVisualizerPanel;
31
+ //# sourceMappingURL=RadiusVisualizerPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadiusVisualizerPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/RadiusVisualizerPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,kEAAkE;AAClE,MAAM,WAAW,0BAA0B;IACvC,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CA4BtE,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * @file RadiusVisualizerPanel.tsx
4
+ * @description Redux-connected wrapper around {@link RadiusVisualizer}.
5
+ *
6
+ * @remarks
7
+ * Selects the vessel heading and GPS position from `telemetry.asv` and maps the
8
+ * ZED camera's detected objects (`telemetry.zed.objects`, boat-relative meters)
9
+ * into radar obstacles. Follows the same panel pattern as the other
10
+ * hud/telemetry components.
11
+ *
12
+ * @author Carson Fujita
13
+ * @license MIT
14
+ */
15
+ import React from 'react';
16
+ import { useSelector } from 'react-redux';
17
+ import RadiusVisualizer, {} from './RadiusVisualizer';
18
+ /**
19
+ * @function RadiusVisualizerPanel
20
+ * @description Feeds live telemetry (heading, GPS, ZED detections) into the
21
+ * presentational {@link RadiusVisualizer}.
22
+ */
23
+ export const RadiusVisualizerPanel = ({ rangeM, size, onClick }) => {
24
+ const heading = useSelector((state) => state.telemetry.asv.heading);
25
+ const latitude = useSelector((state) => state.telemetry.asv.latitude);
26
+ const longitude = useSelector((state) => state.telemetry.asv.longitude);
27
+ const detectedObjects = useSelector((state) => state.telemetry.zed.objects);
28
+ // ZED detections are boat-relative (meters): x = right/east-ish, y = forward/north-ish.
29
+ const obstacles = React.useMemo(() => (detectedObjects ?? []).map((obj, index) => ({
30
+ id: `${obj.label}-${obj.label_id}-${index}`,
31
+ x: obj.position.x,
32
+ y: obj.position.y,
33
+ })), [detectedObjects]);
34
+ return (_jsx(RadiusVisualizer, { heading: heading, latitude: latitude, longitude: longitude, obstacles: obstacles, rangeM: rangeM, size: size, onClick: onClick }));
35
+ };
36
+ export default RadiusVisualizerPanel;
37
+ //# sourceMappingURL=RadiusVisualizerPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadiusVisualizerPanel.js","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/RadiusVisualizerPanel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,gBAAgB,EAAE,EAAsB,MAAM,oBAAoB,CAAC;AAY1E;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAyC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IACrG,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC/E,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACjF,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACnF,MAAM,eAAe,GAAG,WAAW,CAAC,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAEvF,wFAAwF;IACxF,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAC3B,GAAG,EAAE,CACD,CAAC,eAAe,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;QACzC,EAAE,EAAE,GAAG,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,QAAQ,IAAI,KAAK,EAAE;QAC3C,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;QACjB,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;KACpB,CAAC,CAAC,EACP,CAAC,eAAe,CAAC,CACpB,CAAC;IAEF,OAAO,CACH,KAAC,gBAAgB,IACb,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,GAClB,CACL,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @file ShipRudderVisualizer.tsx
3
+ * @description Propulsion HUD: port/starboard thruster power bars flanking a
4
+ * top-down catamaran with animated twin rudders, plus a rudder position track.
5
+ *
6
+ * @remarks
7
+ * - Presentational component; the Redux-connected wrapper
8
+ * {@link ShipRudderVisualizerPanel} feeds it motor power and rudder angle.
9
+ * - Power-bar heights, bar colors and rudder rotation are driven by
10
+ * @react-spring/web springs.
11
+ * - The rudder angle is clamped to ±`maxRudderDeg` (30° by default).
12
+ * - Bar colors reuse the shared {@link getPowerColor} thresholds so this panel
13
+ * matches {@link PowerRudderPanel}; chrome colors come from the telemetry
14
+ * palette with graceful fallbacks.
15
+ *
16
+ * @author Carson Fujita
17
+ * @license MIT
18
+ *
19
+ * @example
20
+ * <ShipRudderVisualizer portPower={45} stbdPower={52} rudderAngle={-12} />
21
+ */
22
+ import React from 'react';
23
+ /** Properties for the {@link ShipRudderVisualizer} component. */
24
+ export interface ShipRudderVisualizerProps {
25
+ /** Port (left) thruster power, 0–100%. */
26
+ portPower: number;
27
+ /** Starboard (right) thruster power, 0–100%. */
28
+ stbdPower: number;
29
+ /** Rudder angle in degrees; positive = starboard. Clamped to ±maxRudderDeg. */
30
+ rudderAngle: number;
31
+ /** Maximum rudder deflection in degrees. Defaults to 30. */
32
+ maxRudderDeg?: number;
33
+ /** Panel title. Defaults to "PROPULSION". */
34
+ title?: string;
35
+ }
36
+ /**
37
+ * @function ShipRudderVisualizer
38
+ * @description Twin-hull propulsion visualizer: power bars, catamaran with
39
+ * spring-animated rudders, and a ±maxRudderDeg rudder position track.
40
+ */
41
+ export declare const ShipRudderVisualizer: React.FC<ShipRudderVisualizerProps>;
42
+ export default ShipRudderVisualizer;
43
+ //# sourceMappingURL=ShipRudderVisualizer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShipRudderVisualizer.d.ts","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/ShipRudderVisualizer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,iEAAiE;AACjE,MAAM,WAAW,yBAAyB;IACtC,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,+EAA+E;IAC/E,WAAW,EAAE,MAAM,CAAC;IACpB,4DAA4D;IAC5D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAwDD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAyJpE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,121 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * @file ShipRudderVisualizer.tsx
4
+ * @description Propulsion HUD: port/starboard thruster power bars flanking a
5
+ * top-down catamaran with animated twin rudders, plus a rudder position track.
6
+ *
7
+ * @remarks
8
+ * - Presentational component; the Redux-connected wrapper
9
+ * {@link ShipRudderVisualizerPanel} feeds it motor power and rudder angle.
10
+ * - Power-bar heights, bar colors and rudder rotation are driven by
11
+ * @react-spring/web springs.
12
+ * - The rudder angle is clamped to ±`maxRudderDeg` (30° by default).
13
+ * - Bar colors reuse the shared {@link getPowerColor} thresholds so this panel
14
+ * matches {@link PowerRudderPanel}; chrome colors come from the telemetry
15
+ * palette with graceful fallbacks.
16
+ *
17
+ * @author Carson Fujita
18
+ * @license MIT
19
+ *
20
+ * @example
21
+ * <ShipRudderVisualizer portPower={45} stbdPower={52} rudderAngle={-12} />
22
+ */
23
+ import React from 'react';
24
+ import { Box, Typography, useTheme } from '@mui/material';
25
+ import { alpha } from '@mui/material/styles';
26
+ import { useSpring, animated } from '@react-spring/web';
27
+ import { getPowerColor } from './powerColor';
28
+ const RUDDER_SPRING = { tension: 300, friction: 30 };
29
+ const BAR_SPRING = { tension: 210, friction: 24 };
30
+ const clamp = (value, min, max) => Math.max(min, Math.min(max, value));
31
+ /** Vertical thruster power bar with sprung fill height and threshold color. */
32
+ const ThrusterBar = ({ label, power }) => {
33
+ const theme = useTheme();
34
+ const telemetry = theme.palette.telemetry;
35
+ const clamped = clamp(power, 0, 100);
36
+ const color = getPowerColor(theme, clamped);
37
+ const spring = useSpring({ h: clamped, config: BAR_SPRING });
38
+ return (_jsxs(Box, { sx: { display: 'flex', flexDirection: 'column', alignItems: 'center' }, children: [_jsxs(Typography, { variant: "caption", sx: { minWidth: '4ch', textAlign: 'center', fontSize: '10px', color, fontWeight: 700, mb: '3px' }, children: [Math.round(clamped), "%"] }), _jsx(Box, { sx: {
39
+ width: 10,
40
+ height: 70,
41
+ backgroundColor: telemetry?.background.tertiary ?? alpha(theme.palette.common.white, 0.1),
42
+ border: `1px solid ${telemetry?.border.lighter ?? theme.palette.divider}`,
43
+ borderRadius: '2px',
44
+ position: 'relative',
45
+ overflow: 'hidden',
46
+ }, children: _jsx(animated.div, { style: {
47
+ position: 'absolute',
48
+ bottom: 0,
49
+ left: 0,
50
+ width: '100%',
51
+ height: spring.h.to((v) => `${v}%`),
52
+ backgroundColor: color,
53
+ transition: 'background-color 0.3s ease',
54
+ } }) }), _jsx(Typography, { variant: "caption", sx: { fontSize: '8px', color: telemetry?.text.secondary ?? theme.palette.text.secondary, mt: '3px' }, children: label })] }));
55
+ };
56
+ /**
57
+ * @function ShipRudderVisualizer
58
+ * @description Twin-hull propulsion visualizer: power bars, catamaran with
59
+ * spring-animated rudders, and a ±maxRudderDeg rudder position track.
60
+ */
61
+ export const ShipRudderVisualizer = ({ portPower, stbdPower, rudderAngle, maxRudderDeg = 30, title = 'PROPULSION', }) => {
62
+ const theme = useTheme();
63
+ const telemetry = theme.palette.telemetry;
64
+ const hullFill = telemetry?.background.headerAlt ?? 'rgba(0, 0, 0, 0.5)';
65
+ const hullStroke = theme.palette.primary.light;
66
+ const deckStroke = telemetry?.text.secondary ?? theme.palette.text.secondary;
67
+ const cabinFill = telemetry?.background.secondary ?? 'rgba(0, 0, 0, 0.35)';
68
+ const lightColor = telemetry?.accent ?? theme.palette.secondary.main;
69
+ const textPrimary = telemetry?.text.primary ?? theme.palette.text.primary;
70
+ const textSecondary = telemetry?.text.secondary ?? theme.palette.text.secondary;
71
+ const borderLight = telemetry?.border.light ?? theme.palette.divider;
72
+ const trackBg = telemetry?.background.tertiary ?? alpha(theme.palette.common.white, 0.15);
73
+ const constrained = clamp(rudderAngle, -maxRudderDeg, maxRudderDeg);
74
+ const { rot } = useSpring({ rot: constrained, config: RUDDER_SPRING });
75
+ // Marker position along the track: 0% = full port, 100% = full starboard.
76
+ const markerSpring = useSpring({
77
+ pct: ((constrained + maxRudderDeg) / (2 * maxRudderDeg)) * 100,
78
+ config: RUDDER_SPRING,
79
+ });
80
+ // Rudder pivots (in the 80×110 catamaran viewBox) — one per hull.
81
+ const rudder = (pivotX, pivotY) => (_jsxs(animated.g, { transform: rot.to((r) => `translate(${pivotX} ${pivotY}) rotate(${-r}) translate(${-pivotX} ${-pivotY})`), children: [_jsx("rect", { x: pivotX - 2, y: pivotY - 2, width: 4, height: 4, fill: deckStroke, stroke: hullStroke, strokeWidth: 0.5 }), _jsx("rect", { x: pivotX - 3, y: pivotY + 2, width: 6, height: 10, rx: 1, fill: hullFill, stroke: hullStroke, strokeWidth: 0.5 }), _jsx("line", { x1: pivotX - 6, y1: pivotY + 10, x2: pivotX + 6, y2: pivotY + 10, stroke: lightColor, strokeWidth: 1.5 })] }));
82
+ return (_jsxs(Box, { "data-testid": "rudder-visualizer", sx: {
83
+ display: 'flex',
84
+ flexDirection: 'column',
85
+ alignItems: 'center',
86
+ p: '12px 15px',
87
+ backgroundColor: telemetry?.background.primary,
88
+ border: `1px solid ${borderLight}`,
89
+ borderRadius: 2,
90
+ backdropFilter: 'blur(10px)',
91
+ width: 230,
92
+ color: textPrimary,
93
+ fontFamily: 'monospace',
94
+ boxShadow: '0 4px 15px rgba(0, 0, 0, 0.5)',
95
+ }, children: [_jsx(Typography, { variant: "caption", sx: {
96
+ fontWeight: 700,
97
+ fontSize: '11px',
98
+ mb: 1,
99
+ textTransform: 'uppercase',
100
+ letterSpacing: '1px',
101
+ color: textSecondary,
102
+ }, children: title }), _jsxs(Box, { sx: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', width: '100%', height: 110, px: '5px' }, children: [_jsx(ThrusterBar, { label: "PORT", power: portPower }), _jsxs(Box, { component: "svg", viewBox: "0 0 80 110", sx: { width: 70, height: 95, opacity: 0.85 }, children: [_jsx("path", { d: "M 16 5 C 10 5, 8 20, 8 45 C 8 70, 8 85, 12 90 C 14 93, 18 93, 20 90 C 22 85, 22 75, 22 65 L 22 25 C 22 15, 20 5, 16 5 Z", fill: hullFill, stroke: hullStroke, strokeWidth: 1 }), _jsx("path", { d: "M 64 5 C 70 5, 72 20, 72 45 C 72 70, 72 85, 68 90 C 66 93, 62 93, 60 90 C 58 85, 58 75, 58 65 L 58 25 C 58 15, 60 5, 64 5 Z", fill: hullFill, stroke: hullStroke, strokeWidth: 1 }), _jsx("rect", { x: 21, y: 20, width: 38, height: 4, fill: cabinFill, stroke: deckStroke, strokeWidth: 1 }), _jsx("rect", { x: 21, y: 70, width: 38, height: 4, fill: cabinFill, stroke: deckStroke, strokeWidth: 1 }), _jsx("path", { d: "M 26 24 C 23 35, 23 60, 26 70", fill: "none", stroke: deckStroke, strokeWidth: 1.5 }), _jsx("path", { d: "M 54 24 C 57 35, 57 60, 54 70", fill: "none", stroke: deckStroke, strokeWidth: 1.5 }), _jsx("path", { d: "M 28 32 C 26 45, 26 50, 28 62 L 52 62 C 54 50, 54 45, 52 32 Z", fill: cabinFill, stroke: deckStroke, strokeWidth: 1.5 }), _jsx("rect", { x: 33, y: 38, width: 14, height: 18, rx: 2, fill: "none", stroke: hullStroke, strokeWidth: 1 }), _jsx("circle", { cx: 35, cy: 40, r: 1, fill: lightColor }), _jsx("circle", { cx: 45, cy: 40, r: 1, fill: lightColor }), _jsx("circle", { cx: 35, cy: 54, r: 1, fill: lightColor }), _jsx("circle", { cx: 45, cy: 54, r: 1, fill: lightColor }), rudder(16, 90), rudder(64, 90)] }), _jsx(ThrusterBar, { label: "STBD", power: stbdPower })] }), _jsxs(Box, { sx: { width: '100%', mt: 1, display: 'flex', flexDirection: 'column', alignItems: 'center' }, children: [_jsxs(Box, { sx: { display: 'flex', justifyContent: 'space-between', width: '100%', mb: '2px' }, children: [_jsx(Typography, { variant: "caption", sx: { fontSize: '9px', color: textSecondary }, children: "PORT" }), _jsxs(Typography, { variant: "caption", sx: { minWidth: '12ch', textAlign: 'center', fontSize: '9px', fontWeight: 700, color: theme.palette.text.disabled }, children: ["RUDDER: ", Math.round(constrained), "\u00B0"] }), _jsx(Typography, { variant: "caption", sx: { fontSize: '9px', color: textSecondary }, children: "STBD" })] }), _jsxs(Box, { sx: { width: '100%', height: 5, backgroundColor: trackBg, borderRadius: '2px', position: 'relative' }, children: [_jsx(Box, { sx: {
103
+ position: 'absolute',
104
+ left: '50%',
105
+ top: 0,
106
+ width: '1.5px',
107
+ height: '100%',
108
+ backgroundColor: alpha(textPrimary, 0.4),
109
+ } }), _jsx(animated.div, { style: {
110
+ position: 'absolute',
111
+ left: markerSpring.pct.to((v) => `${v}%`),
112
+ top: -3.5,
113
+ width: 4,
114
+ height: 12,
115
+ background: textPrimary,
116
+ borderRadius: 1.5,
117
+ transform: 'translateX(-50%)',
118
+ } })] })] })] }));
119
+ };
120
+ export default ShipRudderVisualizer;
121
+ //# sourceMappingURL=ShipRudderVisualizer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShipRudderVisualizer.js","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/ShipRudderVisualizer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,QAAQ,E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