Integration finished

This commit is contained in:
2025-07-03 21:22:06 +02:00
parent 8952aba12d
commit 09397edef9
15 changed files with 678 additions and 611 deletions
@@ -1,10 +1,8 @@
export const ImportFlightPlanKH = async (
plan: any,
maxZFW: number,
maxTOW: number,
maxFuel: number,
isImperial: boolean
) => {
import { SimBrief } from '../types/general';
export const ImportFlightPlanKH = (plan: any, maxZFW: number, maxTOW: number, maxFuel: number, isImperial: boolean) => {
if (!plan) return { type: 'error', message: 'Empty plan' };
let convFactor = 1;
if (plan.params.units === 'kgs' && isImperial) convFactor = 2.20462262185;
if (plan.params.units === 'lbs' && !isImperial) convFactor = 1 / 2.20462262185;
@@ -17,6 +15,6 @@ export const ImportFlightPlanKH = async (
pax: plan.weights.pax_count_actual,
cargo: Math.round(plan.weights.freight_added * convFactor),
fuel: Math.min(maxFuel, Math.round(plan.fuel.plan_ramp * convFactor)),
},
} as SimBrief,
};
};