import type { TimeBasedLocation, TimeBasedOptions, GpsStrength, LocationSubscription } from './types'; type TickCallback = (location: TimeBasedLocation) => void; type GpsStrengthCallback = (strength: GpsStrength) => void; type StationaryChangeCallback = (isStationary: boolean) => void; /** * Time-based location tracker — polls GPS at a fixed interval (default 3s) * regardless of distance traveled. Designed for fitness route recording. * * Unlike watchPosition (which fires when distanceFilter is exceeded), * TimeBasedTracker gives you a point every N seconds — perfect for * drawing smooth route lines and calculating accurate pacing. */ export declare class TimeBasedTracker { private watchId; private intervalMs; private stationaryIntervalMs; private adaptiveInterval; private maxAccuracy; private isPaused; private _isStationary; private _gpsStrength; private _cumulativeDistance; private _lastLocation; private tickSub; private tickListeners; private gpsStrengthListeners; private stationaryListeners; /** Whether the tracker is currently active */ get isTracking(): boolean; /** Current GPS signal strength */ get gpsStrength(): GpsStrength; /** Whether the device is currently estimated as stationary */ get isStationary(): boolean; /** Cumulative distance tracked in meters */ get cumulativeDistance(): number; /** Current tracking interval in ms */ get interval(): number; /** * Start time-based location tracking. * Returns a promise that resolves when the first valid fix is obtained. */ start(options?: TimeBasedOptions): Promise; /** Stop time-based tracking */ stop(): void; /** Pause location updates (keeps session alive, stops GPS) */ pause(): void; /** Resume location updates after pause */ resume(): void; /** Change the tracking interval dynamically */ setInterval(ms: number): void; /** Subscribe to location tick events */ onTick(callback: TickCallback): LocationSubscription; /** Subscribe to GPS strength changes */ onGpsStrengthChange(callback: GpsStrengthCallback): LocationSubscription; /** Subscribe to stationary/moving state changes */ onStationaryChange(callback: StationaryChangeCallback): LocationSubscription; /** Get the last known location */ getLastLocation(): TimeBasedLocation | null; /** Reset cumulative distance to 0 */ resetDistance(): void; private parseLocation; } /** Singleton instance for easy import */ export declare const timeBasedTracker: TimeBasedTracker; export default TimeBasedTracker; //# sourceMappingURL=TimeBasedTracker.d.ts.map