Detail planovace, verejne planovain
This commit is contained in:
@@ -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 = () => {
|
||||
|
||||
Reference in New Issue
Block a user