import { BrowserPermissionState } from '@packages/internal/common/browser'; import { BaseSensor } from '../base-sensor'; /** * Options for reporting a manual position update. */ export interface ManualPositionOptions { /** Latitude in degrees */ latitude: number; /** Longitude in degrees */ longitude: number; /** Accuracy in meters */ accuracy?: number; /** Heading in degrees (0-360, clockwise from north) */ heading?: number; /** Floor level (elevation) */ floorLevel?: number; /** * Confidence score (0-1) indicating how much to trust this position. * Higher confidence = more influence on the fused position. * @default 0.5 */ confidence?: number; /** Timestamp in milliseconds. Defaults to Date.now() */ timestamp?: number; } /** * Options for reporting a manual relative displacement. */ export interface ManualDisplacementOptions { /** Displacement in meters along east-west axis (positive = east) */ dx: number; /** Displacement in meters along north-south axis (positive = north) */ dy: number; /** Heading in degrees (optional) */ heading?: number; /** * Confidence score (0-1) indicating how much to trust this displacement. * @default 0.8 */ confidence?: number; /** Timestamp in milliseconds. Defaults to Date.now() */ timestamp?: number; } /** * A manual sensor that allows programmatic position reporting. * * This sensor enables integrating external positioning systems (IPS, beacons, * custom algorithms) into the BlueDot fusion engine. Positions are weighted * by confidence and combined with other sensor data. * * @example Basic IPS integration * ```typescript * const manual = blueDot.Sensors.get('manual'); * * // Report position from your IPS with confidence * myIPS.onPosition((pos) => { * manual.reportPosition({ * latitude: pos.lat, * longitude: pos.lon, * accuracy: pos.accuracy, * confidence: pos.confidence, * }); * }); * ``` */ export declare class ManualSensor extends BaseSensor { #private; readonly id: "manual"; readonly requiresPermission = false; /** * Report an absolute position to the fusion engine. * * The position will be combined with other sensor data based on its * confidence score. Higher confidence = more influence on the result. * * @param options - Position data with confidence * * @example * ```typescript * manualSensor.reportPosition({ * latitude: 43.4723, * longitude: -80.5449, * accuracy: 5, * confidence: 0.9, * }); * ``` */ reportPosition(options: ManualPositionOptions): void; /** * Report a relative displacement to the fusion engine. * * Use this for dead-reckoning style updates where you know the * displacement from the previous position but not the absolute location. * Only meaningful when an anchor is active. * * @param options - Displacement data with confidence * * @example * ```typescript * manualSensor.reportDisplacement({ * dx: 0.5, // 0.5 meters east * dy: 1.0, // 1.0 meters north * confidence: 0.8, * }); * ``` */ reportDisplacement(options: ManualDisplacementOptions): void; /** * Force a position as an anchor, overriding all other sensors for the specified duration. * * This is a convenience method that wraps `setAnchor()` for the manual sensor. * The position will completely dominate the fusion engine until the TTL expires. * * @param options - Position and duration options * * @example * ```typescript * manualSensor.forcePosition({ * latitude: 43.4723, * longitude: -80.5449, * heading: 90, * ttl: 30000, // 30 seconds * }); * ``` */ forcePosition(options: { latitude: number; longitude: number; heading?: number; floorLevel?: number; /** How long the forced position remains active in milliseconds. @default 30000 */ ttl?: number; }): void; /** * Clear the forced position set by this sensor. * After clearing, the fusion engine will fall back to other position sources. */ clearForcedPosition(): void; protected start(): Promise; protected stop(): void; checkPermission(): Promise; requestPermission(): Promise; }