@fleet-frontend/mower-maps
Version:
a mower maps in google maps
35 lines • 1.9 kB
TypeScript
import { RealTimeLocationType, RealTimePartitionType, RealTimeProcessType } from '../types/realTime';
import { PathData } from '../types';
import { HandleRealTimeDataProps } from '../types/utils';
export declare const isPointInPartition: (partitionBoundary: any[], postureX?: number, postureY?: number) => boolean;
export declare const getPartitionId: (partitionBoundary: any[], postureX?: number, postureY?: number) => any;
/**
* 处理实时数据的消息,这里的实时数据消息有两种,一种是实时轨迹,一种是割草进度,其中这两种下发的时间频次不一样
* 实时轨迹的路径需要依靠割草进度时候的割草状态判断,目前只能根据上一次获取到的割草进度的状态来处理,如果一开始没有割草的状态,则默认为不割草,后续会根据割草进度来更新
* 割草所在的分区id,是根据坐标点和分区之间的关系判断(射线法),如果不在分区里,则不画
* @param param0
* @returns
*/
declare const handleMultipleRealTimeData: ({ realTimeData, isMowing, pathData, currentMowingPartition, }: HandleRealTimeDataProps) => {
pathData: PathData;
isMowing: boolean;
currentMowingPartition: string;
};
/**
* 根据实时数据,获取到割草状态
* @param realTimeData 实时数据
* @param isMowing 上一次的割草状态
* @returns 新的割草状态
*/
declare const getProcessMowingDataFromRealTimeData: ({ realTimeData, isMowing, pathData, currentMowingPartition, }: {
realTimeData: (RealTimeLocationType | RealTimeProcessType | RealTimePartitionType)[];
isMowing?: boolean;
pathData?: PathData;
currentMowingPartition?: string;
}) => {
isMowing: boolean;
pathData: PathData;
currentMowingPartition: string;
};
export { handleMultipleRealTimeData, getProcessMowingDataFromRealTimeData };
//# sourceMappingURL=handleRealTime.d.ts.map