Detail planovace, verejne planovain

This commit is contained in:
Michal Kváček
2024-06-11 22:03:53 +02:00
parent 852d00b932
commit e01bafee73
10 changed files with 157 additions and 14 deletions
+2 -2
View File
@@ -32,13 +32,13 @@ export const useFlightPlanCalculations = () => {
return Math.round(flightPlan.track.map(t => t.distance).reduce((a, b) => a + b));
}
const getTotalTime = (flightPlan, plannedSpeed) => {
const getTotalDuration = (flightPlan, plannedSpeed) => {
if (!flightPlan.track.length) return null;
return flightPlan.track.map(t => getDuration(t.distance, plannedSpeed)).reduce((a, b) => a + b)
}
return {getDuration, getTotalDistance, getTotalTime}
return {getDuration, getTotalDistance, getTotalDuration}
}
export const useFlightPlanObjects = () => {