import type { BlueDotPositionUpdateWithFloor, BlueDotState, BlueDotUpdateState, GeolocationPositionExtended } from './types'; import { PartialDeep } from 'type-fest'; import { BlueDotStatus } from './status/types'; export declare function deepMergeState(existing: BlueDotState, update?: BlueDotUpdateState): BlueDotState; /** * Finds the intersection of a geographic line segment and a point. * * @param start - The start coordinate of the line segment. * @param end - The end coordinate of the line segment. * @param position - The position to check for intersection with the line segment. */ export declare function getPointLineIntersection([startLongitude, startLatitude]: number[], [endLongitude, endLatitude]: number[], [positionLongitude, positionLatitude]: number[]): { proportion: number; intersection: [number, number]; distance: number; } | undefined; /** * Finds the nearest segment of two coordinates on a path which the BlueDot position is closest to. * * @param pathCoordinates - The coordinates of the path to check. * @param position - The position of the BlueDot. */ export declare function findBlueDotOnPath(pathCoordinates: number[][], position: number[]): { intersection: [number, number]; distance: number; segmentIndex: number; proportion: number; } | undefined; export declare function getPositionWithOverrides(update: BlueDotPositionUpdateWithFloor | undefined, overrides: BlueDotPositionUpdateWithFloor | undefined): BlueDotPositionUpdateWithFloor | undefined; /** * Compute whether a position is within circular pan bounds. * @param positionLongitude The longitude to test * @param positionLatitude The latitude to test * @param radius The radius in meters * @param center The center coordinate * @returns True if within bounds, false otherwise */ export declare function isWithinPanBounds({ longitude: positionLongitude, latitude: positionLatitude }: { longitude: number; latitude: number; }, { radius, center }: { radius: number; center: { longitude: number; latitude: number; }; }): boolean; /** * Compute BlueDot model scale from desired pixel radius and current meters-per-pixel. * * The BlueDot GLB model has a base radius of 0.35m. This function calculates * the scale factor needed to display the dot at the desired pixel size on screen. * * Formula: scale = (desiredPixels * metersPerPixel) / modelRadius * * @param radius Desired BlueDot radius in pixels * @param metersPerPixel Current meters-per-pixel ratio from the camera * @returns Scale factor to apply to the model (minimum 1) */ export declare function computeBlueDotScale(radius: number, metersPerPixel: number): number; /** * Determines whether the heading cone should be visible. * @param state - The current BlueDot status * @param heading - The current heading value * @param displayWhenInactive - Whether to show the cone when inactive * @param visible - Whether the heading cone visibility is enabled by configuration * @returns true if the heading cone should be rendered */ export declare function shouldShowHeadingCone(state: BlueDotStatus, heading: GeolocationPositionExtended['coords']['heading'] | undefined, displayWhenInactive: boolean, visible?: boolean): boolean; /** * Determines whether the BlueDot core element should be visible. * @param status - The current BlueDot status * @param visible - Whether the dot visibility is enabled by configuration * @returns true if the dot should be rendered */ export declare function shouldShowBlueDot(status: BlueDotStatus, visible?: boolean): boolean; export declare function shouldShowAccuracyRing(state: BlueDotStatus, accuracy: GeolocationPositionExtended['coords']['accuracy'] | undefined, visible?: boolean): boolean; export declare function isStaleTimestamp(currentTimestamp: number | undefined, lastTimestamp: number | undefined, options?: Pick, 'discardStaleUpdates' | 'debug'>): boolean;