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.
- package/LICENSE +21 -0
- package/README.md +90 -0
- package/dist/assets/RudderIcon.d.ts +23 -0
- package/dist/assets/RudderIcon.d.ts.map +1 -0
- package/dist/assets/RudderIcon.js +23 -0
- package/dist/assets/RudderIcon.js.map +1 -0
- package/dist/assets/svgSources.d.ts +18 -0
- package/dist/assets/svgSources.d.ts.map +1 -0
- package/dist/assets/svgSources.js +18 -0
- package/dist/assets/svgSources.js.map +1 -0
- package/dist/components/Joystick.d.ts +23 -0
- package/dist/components/Joystick.d.ts.map +1 -0
- package/dist/components/Joystick.js +114 -0
- package/dist/components/Joystick.js.map +1 -0
- package/dist/components/TelemetryDashboard.d.ts +31 -0
- package/dist/components/TelemetryDashboard.d.ts.map +1 -0
- package/dist/components/TelemetryDashboard.js +127 -0
- package/dist/components/TelemetryDashboard.js.map +1 -0
- package/dist/components/controls/ControlOverlay.d.ts +64 -0
- package/dist/components/controls/ControlOverlay.d.ts.map +1 -0
- package/dist/components/controls/ControlOverlay.js +88 -0
- package/dist/components/controls/ControlOverlay.js.map +1 -0
- package/dist/components/controls/ControlsDrawer.d.ts +37 -0
- package/dist/components/controls/ControlsDrawer.d.ts.map +1 -0
- package/dist/components/controls/ControlsDrawer.js +93 -0
- package/dist/components/controls/ControlsDrawer.js.map +1 -0
- package/dist/components/controls/ForceVectorsPanel.d.ts +37 -0
- package/dist/components/controls/ForceVectorsPanel.d.ts.map +1 -0
- package/dist/components/controls/ForceVectorsPanel.js +76 -0
- package/dist/components/controls/ForceVectorsPanel.js.map +1 -0
- package/dist/components/controls/InfoPopover.d.ts +34 -0
- package/dist/components/controls/InfoPopover.d.ts.map +1 -0
- package/dist/components/controls/InfoPopover.js +41 -0
- package/dist/components/controls/InfoPopover.js.map +1 -0
- package/dist/components/controls/Legend.d.ts +29 -0
- package/dist/components/controls/Legend.d.ts.map +1 -0
- package/dist/components/controls/Legend.js +74 -0
- package/dist/components/controls/Legend.js.map +1 -0
- package/dist/components/controls/MobileBottomNav.d.ts +17 -0
- package/dist/components/controls/MobileBottomNav.d.ts.map +1 -0
- package/dist/components/controls/MobileBottomNav.js +46 -0
- package/dist/components/controls/MobileBottomNav.js.map +1 -0
- package/dist/components/hud/SceneHUD.d.ts +100 -0
- package/dist/components/hud/SceneHUD.d.ts.map +1 -0
- package/dist/components/hud/SceneHUD.js +216 -0
- package/dist/components/hud/SceneHUD.js.map +1 -0
- package/dist/components/hud/telemetry/Batteries.d.ts +40 -0
- package/dist/components/hud/telemetry/Batteries.d.ts.map +1 -0
- package/dist/components/hud/telemetry/Batteries.js +137 -0
- package/dist/components/hud/telemetry/Batteries.js.map +1 -0
- package/dist/components/hud/telemetry/Compass.d.ts +2 -0
- package/dist/components/hud/telemetry/Compass.d.ts.map +1 -0
- package/dist/components/hud/telemetry/Compass.js +147 -0
- package/dist/components/hud/telemetry/Compass.js.map +1 -0
- package/dist/components/hud/telemetry/Log.d.ts +2 -0
- package/dist/components/hud/telemetry/Log.d.ts.map +1 -0
- package/dist/components/hud/telemetry/Log.js +65 -0
- package/dist/components/hud/telemetry/Log.js.map +1 -0
- package/dist/components/hud/telemetry/Map.d.ts +4 -0
- package/dist/components/hud/telemetry/Map.d.ts.map +1 -0
- package/dist/components/hud/telemetry/Map.js +293 -0
- package/dist/components/hud/telemetry/Map.js.map +1 -0
- package/dist/components/hud/telemetry/PowerRudderPanel.d.ts +2 -0
- package/dist/components/hud/telemetry/PowerRudderPanel.d.ts.map +1 -0
- package/dist/components/hud/telemetry/PowerRudderPanel.js +115 -0
- package/dist/components/hud/telemetry/PowerRudderPanel.js.map +1 -0
- package/dist/components/hud/telemetry/RadiusVisualizer.d.ts +63 -0
- package/dist/components/hud/telemetry/RadiusVisualizer.d.ts.map +1 -0
- package/dist/components/hud/telemetry/RadiusVisualizer.js +139 -0
- package/dist/components/hud/telemetry/RadiusVisualizer.js.map +1 -0
- package/dist/components/hud/telemetry/RadiusVisualizerPanel.d.ts +31 -0
- package/dist/components/hud/telemetry/RadiusVisualizerPanel.d.ts.map +1 -0
- package/dist/components/hud/telemetry/RadiusVisualizerPanel.js +37 -0
- package/dist/components/hud/telemetry/RadiusVisualizerPanel.js.map +1 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizer.d.ts +43 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizer.d.ts.map +1 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizer.js +121 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizer.js.map +1 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizerPanel.d.ts +26 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizerPanel.d.ts.map +1 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizerPanel.js +29 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizerPanel.js.map +1 -0
- package/dist/components/hud/telemetry/SignalLog.d.ts +7 -0
- package/dist/components/hud/telemetry/SignalLog.d.ts.map +1 -0
- package/dist/components/hud/telemetry/SignalLog.js +28 -0
- package/dist/components/hud/telemetry/SignalLog.js.map +1 -0
- package/dist/components/hud/telemetry/SignalStrength.d.ts +9 -0
- package/dist/components/hud/telemetry/SignalStrength.d.ts.map +1 -0
- package/dist/components/hud/telemetry/SignalStrength.js +53 -0
- package/dist/components/hud/telemetry/SignalStrength.js.map +1 -0
- package/dist/components/hud/telemetry/Speedometer.d.ts +2 -0
- package/dist/components/hud/telemetry/Speedometer.d.ts.map +1 -0
- package/dist/components/hud/telemetry/Speedometer.js +70 -0
- package/dist/components/hud/telemetry/Speedometer.js.map +1 -0
- package/dist/components/hud/telemetry/Task.d.ts +2 -0
- package/dist/components/hud/telemetry/Task.d.ts.map +1 -0
- package/dist/components/hud/telemetry/Task.js +61 -0
- package/dist/components/hud/telemetry/Task.js.map +1 -0
- package/dist/components/hud/telemetry/TaskData.d.ts +2 -0
- package/dist/components/hud/telemetry/TaskData.d.ts.map +1 -0
- package/dist/components/hud/telemetry/TaskData.js +62 -0
- package/dist/components/hud/telemetry/TaskData.js.map +1 -0
- package/dist/components/hud/telemetry/index.d.ts +40 -0
- package/dist/components/hud/telemetry/index.d.ts.map +1 -0
- package/dist/components/hud/telemetry/index.js +40 -0
- package/dist/components/hud/telemetry/index.js.map +1 -0
- package/dist/components/hud/telemetry/powerColor.d.ts +16 -0
- package/dist/components/hud/telemetry/powerColor.d.ts.map +1 -0
- package/dist/components/hud/telemetry/powerColor.js +15 -0
- package/dist/components/hud/telemetry/powerColor.js.map +1 -0
- package/dist/components/scenes/MappingScene.d.ts +19 -0
- package/dist/components/scenes/MappingScene.d.ts.map +1 -0
- package/dist/components/scenes/MappingScene.js +353 -0
- package/dist/components/scenes/MappingScene.js.map +1 -0
- package/dist/components/scenes/SceneCanvas.d.ts +96 -0
- package/dist/components/scenes/SceneCanvas.d.ts.map +1 -0
- package/dist/components/scenes/SceneCanvas.js +151 -0
- package/dist/components/scenes/SceneCanvas.js.map +1 -0
- package/dist/components/scenes/SceneRenderer.d.ts +16 -0
- package/dist/components/scenes/SceneRenderer.d.ts.map +1 -0
- package/dist/components/scenes/SceneRenderer.js +60 -0
- package/dist/components/scenes/SceneRenderer.js.map +1 -0
- package/dist/components/scenes/TelemetryScene.d.ts +6 -0
- package/dist/components/scenes/TelemetryScene.d.ts.map +1 -0
- package/dist/components/scenes/TelemetryScene.js +6 -0
- package/dist/components/scenes/TelemetryScene.js.map +1 -0
- package/dist/components/svg/CompassRose.d.ts +129 -0
- package/dist/components/svg/CompassRose.d.ts.map +1 -0
- package/dist/components/svg/CompassRose.js +221 -0
- package/dist/components/svg/CompassRose.js.map +1 -0
- package/dist/connection/config.d.ts +41 -0
- package/dist/connection/config.d.ts.map +1 -0
- package/dist/connection/config.js +44 -0
- package/dist/connection/config.js.map +1 -0
- package/dist/contexts/SceneContext.d.ts +35 -0
- package/dist/contexts/SceneContext.d.ts.map +1 -0
- package/dist/contexts/SceneContext.js +24 -0
- package/dist/contexts/SceneContext.js.map +1 -0
- package/dist/hooks/useAutoPathAnimation.d.ts +22 -0
- package/dist/hooks/useAutoPathAnimation.d.ts.map +1 -0
- package/dist/hooks/useAutoPathAnimation.js +102 -0
- package/dist/hooks/useAutoPathAnimation.js.map +1 -0
- package/dist/hooks/useLayoutConfig.d.ts +29 -0
- package/dist/hooks/useLayoutConfig.d.ts.map +1 -0
- package/dist/hooks/useLayoutConfig.js +30 -0
- package/dist/hooks/useLayoutConfig.js.map +1 -0
- package/dist/hooks/useSceneContext.d.ts +64 -0
- package/dist/hooks/useSceneContext.d.ts.map +1 -0
- package/dist/hooks/useSceneContext.js +37 -0
- package/dist/hooks/useSceneContext.js.map +1 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +57 -0
- package/dist/index.js.map +1 -0
- package/dist/providers/TelemetryProvider.d.ts +27 -0
- package/dist/providers/TelemetryProvider.d.ts.map +1 -0
- package/dist/providers/TelemetryProvider.js +50 -0
- package/dist/providers/TelemetryProvider.js.map +1 -0
- package/dist/providers/TelemetryThemeProvider.d.ts +25 -0
- package/dist/providers/TelemetryThemeProvider.d.ts.map +1 -0
- package/dist/providers/TelemetryThemeProvider.js +54 -0
- package/dist/providers/TelemetryThemeProvider.js.map +1 -0
- package/dist/store/actions/connectionActions.d.ts +39 -0
- package/dist/store/actions/connectionActions.d.ts.map +1 -0
- package/dist/store/actions/connectionActions.js +162 -0
- package/dist/store/actions/connectionActions.js.map +1 -0
- package/dist/store/actions/fetchTelemetry.d.ts +51 -0
- package/dist/store/actions/fetchTelemetry.d.ts.map +1 -0
- package/dist/store/actions/fetchTelemetry.js +135 -0
- package/dist/store/actions/fetchTelemetry.js.map +1 -0
- package/dist/store/index.d.ts +23 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +22 -0
- package/dist/store/index.js.map +1 -0
- package/dist/store/slices/connectionSlice.d.ts +15 -0
- package/dist/store/slices/connectionSlice.d.ts.map +1 -0
- package/dist/store/slices/connectionSlice.js +39 -0
- package/dist/store/slices/connectionSlice.js.map +1 -0
- package/dist/store/slices/discoveredGridSlice.d.ts +168 -0
- package/dist/store/slices/discoveredGridSlice.d.ts.map +1 -0
- package/dist/store/slices/discoveredGridSlice.js +146 -0
- package/dist/store/slices/discoveredGridSlice.js.map +1 -0
- package/dist/store/slices/sceneSlice.d.ts +185 -0
- package/dist/store/slices/sceneSlice.d.ts.map +1 -0
- package/dist/store/slices/sceneSlice.js +95 -0
- package/dist/store/slices/sceneSlice.js.map +1 -0
- package/dist/store/slices/simulationSlice.d.ts +87 -0
- package/dist/store/slices/simulationSlice.d.ts.map +1 -0
- package/dist/store/slices/simulationSlice.js +55 -0
- package/dist/store/slices/simulationSlice.js.map +1 -0
- package/dist/store/slices/telemetrySlice.d.ts +10 -0
- package/dist/store/slices/telemetrySlice.d.ts.map +1 -0
- package/dist/store/slices/telemetrySlice.js +88 -0
- package/dist/store/slices/telemetrySlice.js.map +1 -0
- package/dist/store/slices/videoSlice.d.ts +12 -0
- package/dist/store/slices/videoSlice.d.ts.map +1 -0
- package/dist/store/slices/videoSlice.js +27 -0
- package/dist/store/slices/videoSlice.js.map +1 -0
- package/dist/store/slices/visualizationSlice.d.ts +152 -0
- package/dist/store/slices/visualizationSlice.d.ts.map +1 -0
- package/dist/store/slices/visualizationSlice.js +58 -0
- package/dist/store/slices/visualizationSlice.js.map +1 -0
- package/dist/store/store.d.ts +61 -0
- package/dist/store/store.d.ts.map +1 -0
- package/dist/store/store.js +78 -0
- package/dist/store/store.js.map +1 -0
- package/dist/theme/index.d.ts +14 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +14 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/lightTheme.d.ts +151 -0
- package/dist/theme/lightTheme.d.ts.map +1 -0
- package/dist/theme/lightTheme.js +194 -0
- package/dist/theme/lightTheme.js.map +1 -0
- package/dist/theme/telemetryTheme.d.ts +90 -0
- package/dist/theme/telemetryTheme.d.ts.map +1 -0
- package/dist/theme/telemetryTheme.js +157 -0
- package/dist/theme/telemetryTheme.js.map +1 -0
- package/dist/types/detectedObjectsTypes.d.ts +18 -0
- package/dist/types/detectedObjectsTypes.d.ts.map +1 -0
- package/dist/types/detectedObjectsTypes.js +8 -0
- package/dist/types/detectedObjectsTypes.js.map +1 -0
- package/dist/types/index.d.ts +16 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +16 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/ros.d.ts +87 -0
- package/dist/types/ros.d.ts.map +1 -0
- package/dist/types/ros.js +17 -0
- package/dist/types/ros.js.map +1 -0
- package/dist/types/statusTypes.d.ts +81 -0
- package/dist/types/statusTypes.d.ts.map +1 -0
- package/dist/types/statusTypes.js +52 -0
- package/dist/types/statusTypes.js.map +1 -0
- package/dist/types/taskTypes.d.ts +65 -0
- package/dist/types/taskTypes.d.ts.map +1 -0
- package/dist/types/taskTypes.js +18 -0
- package/dist/types/taskTypes.js.map +1 -0
- package/dist/types/telemetryInterfaces.d.ts +81 -0
- package/dist/types/telemetryInterfaces.d.ts.map +1 -0
- package/dist/types/telemetryInterfaces.js +30 -0
- package/dist/types/telemetryInterfaces.js.map +1 -0
- package/dist/utils/basestation.d.ts +7 -0
- package/dist/utils/basestation.d.ts.map +1 -0
- package/dist/utils/basestation.js +49 -0
- package/dist/utils/basestation.js.map +1 -0
- package/dist/utils/batteryUtil.d.ts +8 -0
- package/dist/utils/batteryUtil.d.ts.map +1 -0
- package/dist/utils/batteryUtil.js +32 -0
- package/dist/utils/batteryUtil.js.map +1 -0
- package/dist/utils/telemetry/index.d.ts +13 -0
- package/dist/utils/telemetry/index.d.ts.map +1 -0
- package/dist/utils/telemetry/index.js +13 -0
- package/dist/utils/telemetry/index.js.map +1 -0
- package/dist/utils/telemetry/telemetryFactory.d.ts +48 -0
- package/dist/utils/telemetry/telemetryFactory.d.ts.map +1 -0
- package/dist/utils/telemetry/telemetryFactory.js +390 -0
- package/dist/utils/telemetry/telemetryFactory.js.map +1 -0
- package/package.json +91 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file telemetryInterfaces.ts
|
|
3
|
+
* @description This module defines the TypeScript interfaces and types used in the telemetry slice of the Redux store for the ASV dashboard.
|
|
4
|
+
* @author Carson Fujita
|
|
5
|
+
* @license MIT
|
|
6
|
+
|
|
7
|
+
*/
|
|
8
|
+
import type { Status } from "./statusTypes";
|
|
9
|
+
/**
|
|
10
|
+
* Action type for fetching telemetry data
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* - These constants represent the action types for fetching telemetry data from the basestation.
|
|
14
|
+
* - They are used in the Redux actions and reducers to handle the state changes related to telemetry data fetching.
|
|
15
|
+
* - The FETCH_TELEMETRY_SUCCESS action is dispatched when telemetry data is successfully received,
|
|
16
|
+
* while the FETCH_TELEMETRY_FAILURE action is dispatched when there is an error in fetching telemetry data.
|
|
17
|
+
*
|
|
18
|
+
* @value FETCH_TELEMETRY_SUCCESS - Action type for successful telemetry data fetch
|
|
19
|
+
* @value FETCH_TELEMETRY_FAILURE - Action type for failed telemetry data fetch
|
|
20
|
+
*
|
|
21
|
+
* @author Carson Fujita
|
|
22
|
+
*/
|
|
23
|
+
declare const FETCH_TELEMETRY_SUCCESS = "FETCH_TELEMETRY_SUCCESS";
|
|
24
|
+
/**
|
|
25
|
+
* Action type for handling errors when fetching telemetry data
|
|
26
|
+
*
|
|
27
|
+
* @author Carson Fujita
|
|
28
|
+
*/
|
|
29
|
+
declare const FETCH_TELEMETRY_FAILURE = "FETCH_TELEMETRY_FAILURE";
|
|
30
|
+
/**
|
|
31
|
+
* Action interfaces for fetching telemetry data
|
|
32
|
+
*
|
|
33
|
+
* @author Carson Fujita
|
|
34
|
+
*
|
|
35
|
+
* @value extraProps - Allows for any additional properties that may be included in the action,
|
|
36
|
+
* providing flexibility for future extensions of the action payload.
|
|
37
|
+
* @value type - The type of the action, which can be either FETCH_TELEMETRY_SUCCESS or FETCH_TELEMETRY_FAILURE.
|
|
38
|
+
* @value payload - The payload of the action, which contains the telemetry data for
|
|
39
|
+
* success actions or an error message for failure actions.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* - Redux action
|
|
43
|
+
*/
|
|
44
|
+
interface FetchTelemetrySuccessAction {
|
|
45
|
+
[extraProps: string]: unknown;
|
|
46
|
+
type: typeof FETCH_TELEMETRY_SUCCESS;
|
|
47
|
+
payload: Status;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Action interface for handling errors when fetching telemetry data
|
|
51
|
+
*
|
|
52
|
+
* @author Carson Fujita
|
|
53
|
+
*
|
|
54
|
+
* @value extraProps - Allows for any additional properties that may be included in the action,
|
|
55
|
+
* providing flexibility for future extensions of the action payload.
|
|
56
|
+
* @value type - The type of the action, which is FETCH_TELEMETRY_FAILURE.
|
|
57
|
+
* @value payload - The payload of the action, which contains an error message describing the failure.
|
|
58
|
+
*
|
|
59
|
+
* @remarks
|
|
60
|
+
* - Redux action
|
|
61
|
+
*/
|
|
62
|
+
interface FetchTelemetryFailureAction {
|
|
63
|
+
[extraProps: string]: unknown;
|
|
64
|
+
type: typeof FETCH_TELEMETRY_FAILURE;
|
|
65
|
+
payload: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Union type for telemetry action types
|
|
69
|
+
*
|
|
70
|
+
* @author Carson Fujita
|
|
71
|
+
* @remarks
|
|
72
|
+
* - This type represents the union of all possible action types related to fetching telemetry data,
|
|
73
|
+
* including both success and failure actions.
|
|
74
|
+
* - It is used in the Redux reducer to handle state changes based on the type of action dispatched.
|
|
75
|
+
* - By defining this union type, we can ensure type safety and proper handling of telemetry-related actions in the Redux store.
|
|
76
|
+
* @see {@link TelemetryActionTypes}
|
|
77
|
+
*/
|
|
78
|
+
type TelemetryActionTypes = FetchTelemetrySuccessAction | FetchTelemetryFailureAction;
|
|
79
|
+
export type { TelemetryActionTypes };
|
|
80
|
+
export { FETCH_TELEMETRY_SUCCESS, FETCH_TELEMETRY_FAILURE };
|
|
81
|
+
//# sourceMappingURL=telemetryInterfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetryInterfaces.d.ts","sourceRoot":"","sources":["../../src/types/telemetryInterfaces.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA0BH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,uBAAuB,4BAA4B,CAAC;AAE1D;;;;GAIG;AACH,QAAA,MAAM,uBAAuB,4BAA4B,CAAC;AAE1D;;;;;;;;;;;;;GAaG;AACH,UAAU,2BAA2B;IACjC,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,IAAI,EAAE,OAAO,uBAAuB,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;GAYG;AACH,UAAU,2BAA2B;IACjC,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,IAAI,EAAE,OAAO,uBAAuB,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;GAUG;AACH,KAAK,oBAAoB,GAAG,2BAA2B,GAAG,2BAA2B,CAAC;AAEtF,YAAY,EAAE,oBAAoB,EAAE,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file telemetryInterfaces.ts
|
|
3
|
+
* @description This module defines the TypeScript interfaces and types used in the telemetry slice of the Redux store for the ASV dashboard.
|
|
4
|
+
* @author Carson Fujita
|
|
5
|
+
* @license MIT
|
|
6
|
+
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Action type for fetching telemetry data
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* - These constants represent the action types for fetching telemetry data from the basestation.
|
|
13
|
+
* - They are used in the Redux actions and reducers to handle the state changes related to telemetry data fetching.
|
|
14
|
+
* - The FETCH_TELEMETRY_SUCCESS action is dispatched when telemetry data is successfully received,
|
|
15
|
+
* while the FETCH_TELEMETRY_FAILURE action is dispatched when there is an error in fetching telemetry data.
|
|
16
|
+
*
|
|
17
|
+
* @value FETCH_TELEMETRY_SUCCESS - Action type for successful telemetry data fetch
|
|
18
|
+
* @value FETCH_TELEMETRY_FAILURE - Action type for failed telemetry data fetch
|
|
19
|
+
*
|
|
20
|
+
* @author Carson Fujita
|
|
21
|
+
*/
|
|
22
|
+
const FETCH_TELEMETRY_SUCCESS = 'FETCH_TELEMETRY_SUCCESS';
|
|
23
|
+
/**
|
|
24
|
+
* Action type for handling errors when fetching telemetry data
|
|
25
|
+
*
|
|
26
|
+
* @author Carson Fujita
|
|
27
|
+
*/
|
|
28
|
+
const FETCH_TELEMETRY_FAILURE = 'FETCH_TELEMETRY_FAILURE';
|
|
29
|
+
export { FETCH_TELEMETRY_SUCCESS, FETCH_TELEMETRY_FAILURE };
|
|
30
|
+
//# sourceMappingURL=telemetryInterfaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetryInterfaces.js","sourceRoot":"","sources":["../../src/types/telemetryInterfaces.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA4BH;;;;;;;;;;;;;GAaG;AACH,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAE1D;;;;GAIG;AACH,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AAuD1D,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks whether the ASV basestation HTTP server is reachable.
|
|
3
|
+
* Hits the /health endpoint (CORS-enabled) with a 2-second timeout.
|
|
4
|
+
* Returns false on any error — network failure, CORS, timeout, or non-2xx.
|
|
5
|
+
*/
|
|
6
|
+
export declare function isBasestationOnline(): Promise<boolean>;
|
|
7
|
+
//# sourceMappingURL=basestation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basestation.d.ts","sourceRoot":"","sources":["../../src/utils/basestation.ts"],"names":[],"mappings":"AA2BA;;;;GAIG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,OAAO,CAAC,CAe5D"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
MIT License
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2026 HumberASV
|
|
5
|
+
Copyright (c) 2026 Carson Fujita
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
import { getTelemetryConnectionConfig } from '../connection/config';
|
|
26
|
+
/**
|
|
27
|
+
* Checks whether the ASV basestation HTTP server is reachable.
|
|
28
|
+
* Hits the /health endpoint (CORS-enabled) with a 2-second timeout.
|
|
29
|
+
* Returns false on any error — network failure, CORS, timeout, or non-2xx.
|
|
30
|
+
*/
|
|
31
|
+
export async function isBasestationOnline() {
|
|
32
|
+
const { httpBase } = getTelemetryConnectionConfig();
|
|
33
|
+
const controller = new AbortController();
|
|
34
|
+
const timer = setTimeout(() => controller.abort(), 2000);
|
|
35
|
+
try {
|
|
36
|
+
const res = await fetch(`${httpBase}/health`, {
|
|
37
|
+
signal: controller.signal,
|
|
38
|
+
mode: 'cors',
|
|
39
|
+
});
|
|
40
|
+
return res.ok;
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
finally {
|
|
46
|
+
clearTimeout(timer);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=basestation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basestation.js","sourceRoot":"","sources":["../../src/utils/basestation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AAEF,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAEpE;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB;IACrC,MAAM,EAAE,QAAQ,EAAE,GAAG,4BAA4B,EAAE,CAAC;IACpD,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IACzC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,CAAC;IACzD,IAAI,CAAC;QACD,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,QAAQ,SAAS,EAAE;YAC1C,MAAM,EAAE,UAAU,CAAC,MAAM;YACzB,IAAI,EAAE,MAAM;SACf,CAAC,CAAC;QACH,OAAO,GAAG,CAAC,EAAE,CAAC;IAClB,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,KAAK,CAAC;IACjB,CAAC;YAAS,CAAC;QACP,YAAY,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
*/
|
|
4
|
+
declare const batteryIconFor: (level: number) => import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
5
|
+
muiName: string;
|
|
6
|
+
};
|
|
7
|
+
export { batteryIconFor };
|
|
8
|
+
//# sourceMappingURL=batteryUtil.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batteryUtil.d.ts","sourceRoot":"","sources":["../../src/utils/batteryUtil.ts"],"names":[],"mappings":"AAAA;;GAEG;AAaH,QAAA,MAAM,cAAc,GAAI,OAAO,MAAM;;CASpC,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
*/
|
|
4
|
+
// Battery icons from MUI
|
|
5
|
+
import Battery0BarIcon from "@mui/icons-material/Battery0Bar";
|
|
6
|
+
import Battery1BarIcon from "@mui/icons-material/Battery1Bar";
|
|
7
|
+
import Battery2BarIcon from "@mui/icons-material/Battery2Bar";
|
|
8
|
+
import Battery3BarIcon from "@mui/icons-material/Battery3Bar";
|
|
9
|
+
import Battery4BarIcon from "@mui/icons-material/Battery4Bar";
|
|
10
|
+
import Battery5BarIcon from "@mui/icons-material/Battery5Bar";
|
|
11
|
+
import Battery6BarIcon from "@mui/icons-material/Battery6Bar";
|
|
12
|
+
import BatteryFullIcon from "@mui/icons-material/BatteryFull";
|
|
13
|
+
//Not a switch statement for brevity.
|
|
14
|
+
const batteryIconFor = (level) => {
|
|
15
|
+
if (level >= 95)
|
|
16
|
+
return BatteryFullIcon;
|
|
17
|
+
if (level >= 85)
|
|
18
|
+
return Battery6BarIcon;
|
|
19
|
+
if (level >= 75)
|
|
20
|
+
return Battery5BarIcon;
|
|
21
|
+
if (level >= 60)
|
|
22
|
+
return Battery4BarIcon;
|
|
23
|
+
if (level >= 45)
|
|
24
|
+
return Battery3BarIcon;
|
|
25
|
+
if (level >= 30)
|
|
26
|
+
return Battery2BarIcon;
|
|
27
|
+
if (level >= 15)
|
|
28
|
+
return Battery1BarIcon;
|
|
29
|
+
return Battery0BarIcon;
|
|
30
|
+
};
|
|
31
|
+
export { batteryIconFor };
|
|
32
|
+
//# sourceMappingURL=batteryUtil.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batteryUtil.js","sourceRoot":"","sources":["../../src/utils/batteryUtil.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,yBAAyB;AACzB,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAE9D,qCAAqC;AACrC,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,EAAE;IACrC,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,eAAe,CAAC;IACxC,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,eAAe,CAAC;IACxC,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,eAAe,CAAC;IACxC,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,eAAe,CAAC;IACxC,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,eAAe,CAAC;IACxC,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,eAAe,CAAC;IACxC,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,eAAe,CAAC;IACxC,OAAO,eAAe,CAAC;AAC3B,CAAC,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file src/utils/telemetry/index.ts
|
|
3
|
+
* @description
|
|
4
|
+
* This file serves as the main entry point for the telemetry utilities in the ASV telemetry application.
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* @author Carson Fujita
|
|
8
|
+
* @license MIT
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
import * as telemetryFactory from './telemetryFactory';
|
|
12
|
+
export { telemetryFactory, };
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/telemetry/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EACH,gBAAgB,GACnB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file src/utils/telemetry/index.ts
|
|
3
|
+
* @description
|
|
4
|
+
* This file serves as the main entry point for the telemetry utilities in the ASV telemetry application.
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* @author Carson Fujita
|
|
8
|
+
* @license MIT
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
import * as telemetryFactory from './telemetryFactory';
|
|
12
|
+
export { telemetryFactory, };
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/telemetry/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EACH,gBAAgB,GACnB,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file telemetryFactory.ts
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
* Factory functions for generating random telemetry data for testing and development purposes.
|
|
6
|
+
* This includes functions to create random telemetry states, as well as utilities for generating random values within specified ranges.
|
|
7
|
+
* @author Carson Fujita
|
|
8
|
+
* @license MIT
|
|
9
|
+
* @remarks
|
|
10
|
+
* - The `generateRandomTelemetry` function creates a complete telemetry state with random values for all parameters, including speed, heading, battery levels, task data, and more.
|
|
11
|
+
* - The `generateMockTelemetryUpdate` function takes a previous telemetry state and generates a new state with small random variations to simulate real-time updates.
|
|
12
|
+
* - These factory functions are useful for testing the application's UI and functionality without needing a live connection to the basestation or actual telemetry data.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import { generateRandomTelemetry } from './telemetryFactory';
|
|
17
|
+
*
|
|
18
|
+
* const randomTelemetry = generateRandomTelemetry();
|
|
19
|
+
* console.log(randomTelemetry);
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* import { generateMockTelemetryUpdate } from './telemetryFactory';
|
|
25
|
+
*
|
|
26
|
+
* let currentTelemetry = generateRandomTelemetry();
|
|
27
|
+
* setInterval(() => {
|
|
28
|
+
* currentTelemetry = generateMockTelemetryUpdate(currentTelemetry);
|
|
29
|
+
* console.log(currentTelemetry);
|
|
30
|
+
* }, 1000);
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
import type { Status, Grid } from "../../types";
|
|
35
|
+
export declare function generateRandomState(): {
|
|
36
|
+
status: Status;
|
|
37
|
+
fineGrid: Grid;
|
|
38
|
+
};
|
|
39
|
+
export declare function generateMockVideoUrl(): string;
|
|
40
|
+
/**
|
|
41
|
+
* Generates a new state by applying small random variations to the previous state, simulating real-time updates.
|
|
42
|
+
* @param previous the previous State to base the new state on.
|
|
43
|
+
* @returns a new State object with updated values based on the previous state,
|
|
44
|
+
* with random variations applied to simulate changes over time.
|
|
45
|
+
*/
|
|
46
|
+
export declare function generateMockStateUpdate(previous: Status): Status;
|
|
47
|
+
export default generateRandomState;
|
|
48
|
+
//# sourceMappingURL=telemetryFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetryFactory.d.ts","sourceRoot":"","sources":["../../../src/utils/telemetry/telemetryFactory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AA2BH,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAgC,MAAM,aAAa,CAAC;AAuT9E,wBAAgB,mBAAmB,IAAI;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,IAAI,CAAA;CAAE,CA2DxE;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAwBhE;AAED,eAAe,mBAAmB,CAAC"}
|