import { EventDispatcher } from "three";
import { KalmanFilter } from "../../utils/kalman-filter";
interface SensorEventMap {
    start: {};
    stop: {};
    compass: {
        value: number;
    };
}
interface CompassData {
    timestamp: number;
    res: number;
}
/**
 * 监听compass 在获取到视觉定位的角度之后，计算视觉和compass的误差，保存一下这个误差，在后续定位中不断的调整这个误差
 */
export declare class Compass extends EventDispatcher<SensorEventMap> {
    compassData: CompassData[];
    delta: number | null;
    deltas: number[];
    kalmanFilter: KalmanFilter;
    deltaExcessesCount: number;
    constructor();
    start(): void;
    deviceOrientationAbsHandler: (e: DeviceOrientationEvent) => void;
    /**
     * 设置一个根据视觉定位返回的绝对角度 校准delta
     * @param compass
     * @param time
     */
    setAbsoluteCompass(compass: number, time: number): void;
    emitCompass(compass: number): void;
    /**
     * 获取 compass 和 deviceMotion
     */
    listenDeviceOrientation(): void;
    checkSensor(): Promise<{
        deviceOrientation: boolean;
    }>;
    checkDeviceOrientation(): Promise<boolean>;
    stop(): void;
}
export {};
