@mappedin/blue-dot 6.17.1-beta.0 → 6.18.0-beta.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/README.md +5 -0
- package/lib/esm/chunk-IPNIME5I.js +1 -0
- package/lib/esm/{chunk-UZOPCEME.js → chunk-QFCRWBSD.js} +1 -1
- package/lib/esm/debug/index.d.ts +25 -6
- package/lib/esm/debug/index.js +1 -1
- package/lib/esm/index.d.ts +25 -6
- package/lib/esm/index.js +1 -1
- package/lib/esm/react/index.d.ts +25 -6
- package/lib/esm/react/index.js +1 -1
- package/lib/rn/fusion/algorithms/heading-filter.d.ts +9 -0
- package/lib/rn/index-rn.js +2 -2
- package/lib/rn/types.d.ts +16 -0
- package/lib/rn/utils.d.ts +17 -2
- package/package.json +6 -6
- package/lib/esm/chunk-NUHGT3O3.js +0 -1
package/lib/esm/index.d.ts
CHANGED
|
@@ -1291,6 +1291,12 @@ type BlueDotEventPayloads = {
|
|
|
1291
1291
|
};
|
|
1292
1292
|
type BlueDotEvents = keyof BlueDotEventPayloads;
|
|
1293
1293
|
type BlueDotState = {
|
|
1294
|
+
/**
|
|
1295
|
+
* Whether the BlueDot core element is visible. When false, the dot is hidden but the accuracy ring
|
|
1296
|
+
* and heading cone may still render based on their own visibility settings.
|
|
1297
|
+
* @default true
|
|
1298
|
+
*/
|
|
1299
|
+
visible: boolean;
|
|
1294
1300
|
/**
|
|
1295
1301
|
* The radius of the BlueDot in pixels. The BlueDot will maintain this size clamped to a minimum of 0.35 metres.
|
|
1296
1302
|
* @default 10
|
|
@@ -1310,6 +1316,11 @@ type BlueDotState = {
|
|
|
1310
1316
|
* Options for the accuracy ring around the BlueDot.
|
|
1311
1317
|
*/
|
|
1312
1318
|
accuracyRing: {
|
|
1319
|
+
/**
|
|
1320
|
+
* Whether the accuracy ring is visible.
|
|
1321
|
+
* @default true
|
|
1322
|
+
*/
|
|
1323
|
+
visible: boolean;
|
|
1313
1324
|
/**
|
|
1314
1325
|
* The color of the accuracy ring.
|
|
1315
1326
|
* @default #2266ff
|
|
@@ -1325,6 +1336,11 @@ type BlueDotState = {
|
|
|
1325
1336
|
* Options for the heading directional indicator.
|
|
1326
1337
|
*/
|
|
1327
1338
|
heading: {
|
|
1339
|
+
/**
|
|
1340
|
+
* Whether the heading cone is visible.
|
|
1341
|
+
* @default true
|
|
1342
|
+
*/
|
|
1343
|
+
visible: boolean;
|
|
1328
1344
|
/**
|
|
1329
1345
|
* The color of the heading cone.
|
|
1330
1346
|
* @default #2266ff
|
|
@@ -1461,12 +1477,6 @@ declare class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EV
|
|
|
1461
1477
|
* AbortController for managing lifecycle and cleanup
|
|
1462
1478
|
*/
|
|
1463
1479
|
private _abortController;
|
|
1464
|
-
/**
|
|
1465
|
-
* @protected
|
|
1466
|
-
* @internal
|
|
1467
|
-
* Tracks all cleanup functions for subscriptions made via on()
|
|
1468
|
-
*/
|
|
1469
|
-
protected _cleanupFunctions: Array<() => void>;
|
|
1470
1480
|
/**
|
|
1471
1481
|
* Returns the AbortSignal for this PubSub instance.
|
|
1472
1482
|
* Use this signal with APIs that support cancellation (fetch, addEventListener, etc.)
|
|
@@ -2022,6 +2032,8 @@ interface HeadingFilterConfig {
|
|
|
2022
2032
|
magneticGatingEnabled: boolean;
|
|
2023
2033
|
/** Minimum heading delta to emit updates (degrees). */
|
|
2024
2034
|
deltaThreshold: number;
|
|
2035
|
+
/** Calibration offset applied to all compass readings (degrees). Set from VPS ground truth. */
|
|
2036
|
+
calibrationOffset: number;
|
|
2025
2037
|
}
|
|
2026
2038
|
/**
|
|
2027
2039
|
* Complementary filter for heading fusion.
|
|
@@ -2074,6 +2086,13 @@ declare class HeadingFusionFilter implements HeadingFusionAlgorithm {
|
|
|
2074
2086
|
* @param confidence GPS confidence (0-1), affects how much GPS heading influences result
|
|
2075
2087
|
*/
|
|
2076
2088
|
correctWithGps(gpsHeading: number, speed: number, confidence?: number): void;
|
|
2089
|
+
/**
|
|
2090
|
+
* Set a calibration offset derived from a known ground-truth heading (e.g. VPS).
|
|
2091
|
+
* The offset is applied to all subsequent compass readings to correct systematic
|
|
2092
|
+
* magnetic bias at the calibration location.
|
|
2093
|
+
* @param offsetDegrees Offset in degrees (groundTruthHeading - deviceCompassHeading)
|
|
2094
|
+
*/
|
|
2095
|
+
setCalibrationOffset(offsetDegrees: number): void;
|
|
2077
2096
|
/**
|
|
2078
2097
|
* Configure the filter parameters at runtime.
|
|
2079
2098
|
* @param config Partial configuration to apply
|
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t,b as e,c as s,d as n}from"./chunk-
|
|
1
|
+
import{a as t,b as e,c as s,d as n}from"./chunk-IPNIME5I.js";import{m as o}from"./chunk-QFCRWBSD.js";o();export{t as BaseSensor,n as BlueDot,e as ManualSensor,s as SensorRegistry};
|
package/lib/esm/react/index.d.ts
CHANGED
|
@@ -1291,6 +1291,12 @@ type BlueDotEventPayloads = {
|
|
|
1291
1291
|
};
|
|
1292
1292
|
type BlueDotEvents = keyof BlueDotEventPayloads;
|
|
1293
1293
|
type BlueDotState = {
|
|
1294
|
+
/**
|
|
1295
|
+
* Whether the BlueDot core element is visible. When false, the dot is hidden but the accuracy ring
|
|
1296
|
+
* and heading cone may still render based on their own visibility settings.
|
|
1297
|
+
* @default true
|
|
1298
|
+
*/
|
|
1299
|
+
visible: boolean;
|
|
1294
1300
|
/**
|
|
1295
1301
|
* The radius of the BlueDot in pixels. The BlueDot will maintain this size clamped to a minimum of 0.35 metres.
|
|
1296
1302
|
* @default 10
|
|
@@ -1310,6 +1316,11 @@ type BlueDotState = {
|
|
|
1310
1316
|
* Options for the accuracy ring around the BlueDot.
|
|
1311
1317
|
*/
|
|
1312
1318
|
accuracyRing: {
|
|
1319
|
+
/**
|
|
1320
|
+
* Whether the accuracy ring is visible.
|
|
1321
|
+
* @default true
|
|
1322
|
+
*/
|
|
1323
|
+
visible: boolean;
|
|
1313
1324
|
/**
|
|
1314
1325
|
* The color of the accuracy ring.
|
|
1315
1326
|
* @default #2266ff
|
|
@@ -1325,6 +1336,11 @@ type BlueDotState = {
|
|
|
1325
1336
|
* Options for the heading directional indicator.
|
|
1326
1337
|
*/
|
|
1327
1338
|
heading: {
|
|
1339
|
+
/**
|
|
1340
|
+
* Whether the heading cone is visible.
|
|
1341
|
+
* @default true
|
|
1342
|
+
*/
|
|
1343
|
+
visible: boolean;
|
|
1328
1344
|
/**
|
|
1329
1345
|
* The color of the heading cone.
|
|
1330
1346
|
* @default #2266ff
|
|
@@ -1461,12 +1477,6 @@ declare class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EV
|
|
|
1461
1477
|
* AbortController for managing lifecycle and cleanup
|
|
1462
1478
|
*/
|
|
1463
1479
|
private _abortController;
|
|
1464
|
-
/**
|
|
1465
|
-
* @protected
|
|
1466
|
-
* @internal
|
|
1467
|
-
* Tracks all cleanup functions for subscriptions made via on()
|
|
1468
|
-
*/
|
|
1469
|
-
protected _cleanupFunctions: Array<() => void>;
|
|
1470
1480
|
/**
|
|
1471
1481
|
* Returns the AbortSignal for this PubSub instance.
|
|
1472
1482
|
* Use this signal with APIs that support cancellation (fetch, addEventListener, etc.)
|
|
@@ -2022,6 +2032,8 @@ interface HeadingFilterConfig {
|
|
|
2022
2032
|
magneticGatingEnabled: boolean;
|
|
2023
2033
|
/** Minimum heading delta to emit updates (degrees). */
|
|
2024
2034
|
deltaThreshold: number;
|
|
2035
|
+
/** Calibration offset applied to all compass readings (degrees). Set from VPS ground truth. */
|
|
2036
|
+
calibrationOffset: number;
|
|
2025
2037
|
}
|
|
2026
2038
|
/**
|
|
2027
2039
|
* Complementary filter for heading fusion.
|
|
@@ -2074,6 +2086,13 @@ declare class HeadingFusionFilter implements HeadingFusionAlgorithm {
|
|
|
2074
2086
|
* @param confidence GPS confidence (0-1), affects how much GPS heading influences result
|
|
2075
2087
|
*/
|
|
2076
2088
|
correctWithGps(gpsHeading: number, speed: number, confidence?: number): void;
|
|
2089
|
+
/**
|
|
2090
|
+
* Set a calibration offset derived from a known ground-truth heading (e.g. VPS).
|
|
2091
|
+
* The offset is applied to all subsequent compass readings to correct systematic
|
|
2092
|
+
* magnetic bias at the calibration location.
|
|
2093
|
+
* @param offsetDegrees Offset in degrees (groundTruthHeading - deviceCompassHeading)
|
|
2094
|
+
*/
|
|
2095
|
+
setCalibrationOffset(offsetDegrees: number): void;
|
|
2077
2096
|
/**
|
|
2078
2097
|
* Configure the filter parameters at runtime.
|
|
2079
2098
|
* @param config Partial configuration to apply
|
package/lib/esm/react/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as f}from"../chunk-
|
|
1
|
+
import{d as f}from"../chunk-IPNIME5I.js";import{c as n,m as u}from"../chunk-QFCRWBSD.js";u();u();import{useCallback as c,useState as p}from"react";import{useMap as D,useMapViewExtension as m}from"@mappedin/react-sdk";function B(){let[,t]=p({});return c(()=>t({}),[])}n(B,"useForceUpdate");function l(){let{mapView:t}=D(),o=B(),{register:r}=m("blue-dot",{onRegister:n(()=>{let e=new f(t);return e.on("position-update",o),e.on("status-change",o),e.on("follow-change",o),e.on("error",o),e},"onRegister"),onDeregister:n(e=>{e.off("position-update",o),e.off("status-change",o),e.off("follow-change",o),e.off("error",o),e.destroy()},"onDeregister")}),s=r();if(!s)throw new Error("BlueDot failed to initialize.");return s}n(l,"useBlueDot");u();import{useCallback as d,useEffect as E,useRef as g}from"react";function w(t,o){let r=l(),s=g(o);s.current=o;let e=d(i=>{s.current(i)},[]);E(()=>{if(r!=null)return r.on(t,e),()=>{r!=null&&r.off(t,e)}},[r,t,e])}n(w,"useBlueDotEvent");export{l as useBlueDot,w as useBlueDotEvent};
|
|
@@ -13,6 +13,8 @@ export interface HeadingFilterConfig {
|
|
|
13
13
|
magneticGatingEnabled: boolean;
|
|
14
14
|
/** Minimum heading delta to emit updates (degrees). */
|
|
15
15
|
deltaThreshold: number;
|
|
16
|
+
/** Calibration offset applied to all compass readings (degrees). Set from VPS ground truth. */
|
|
17
|
+
calibrationOffset: number;
|
|
16
18
|
}
|
|
17
19
|
/**
|
|
18
20
|
* Complementary filter for heading fusion.
|
|
@@ -65,6 +67,13 @@ export declare class HeadingFusionFilter implements HeadingFusionAlgorithm {
|
|
|
65
67
|
* @param confidence GPS confidence (0-1), affects how much GPS heading influences result
|
|
66
68
|
*/
|
|
67
69
|
correctWithGps(gpsHeading: number, speed: number, confidence?: number): void;
|
|
70
|
+
/**
|
|
71
|
+
* Set a calibration offset derived from a known ground-truth heading (e.g. VPS).
|
|
72
|
+
* The offset is applied to all subsequent compass readings to correct systematic
|
|
73
|
+
* magnetic bias at the calibration location.
|
|
74
|
+
* @param offsetDegrees Offset in degrees (groundTruthHeading - deviceCompassHeading)
|
|
75
|
+
*/
|
|
76
|
+
setCalibrationOffset(offsetDegrees: number): void;
|
|
68
77
|
/**
|
|
69
78
|
* Configure the filter parameters at runtime.
|
|
70
79
|
* @param config Partial configuration to apply
|