chore: add OSRM-related type definitions for GPS routes
Adds distanceMethod to DriverStatsDto and LocationHistoryResponse interface to support the OSRM road-snapping feature. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -33,6 +33,7 @@ export class DriverStatsDto {
|
|||||||
averageSpeedMph: number;
|
averageSpeedMph: number;
|
||||||
totalTrips: number;
|
totalTrips: number;
|
||||||
totalDrivingMinutes: number;
|
totalDrivingMinutes: number;
|
||||||
|
distanceMethod?: string; // 'osrm' or 'haversine'
|
||||||
};
|
};
|
||||||
recentLocations: LocationDataDto[];
|
recentLocations: LocationDataDto[];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,3 +106,12 @@ export interface MyGpsStatus {
|
|||||||
lastActive?: string;
|
lastActive?: string;
|
||||||
message?: string;
|
message?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface LocationHistoryResponse {
|
||||||
|
matched: boolean;
|
||||||
|
coordinates?: [number, number][]; // road-snapped [lat, lng] pairs
|
||||||
|
distance?: number; // road distance in meters
|
||||||
|
duration?: number; // duration in seconds
|
||||||
|
confidence?: number; // 0-1 confidence score
|
||||||
|
rawPositions?: Array<{ latitude: number; longitude: number; speed: number; timestamp: Date }>;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user