Allow GSX state reset
Fix KG rounding of pax
This commit is contained in:
parent
d75518517a
commit
9000d516ae
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tfdidesign-md11-load-manager",
|
"name": "tfdidesign-md11-load-manager",
|
||||||
"version": "0.1.116",
|
"version": "0.1.122",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@ -31,6 +31,7 @@ export default {
|
|||||||
plugins: [
|
plugins: [
|
||||||
replace({
|
replace({
|
||||||
'process.env.NODE_ENV': `"${targetEnv}"`,
|
'process.env.NODE_ENV': `"${targetEnv}"`,
|
||||||
|
preventAssignment: true,
|
||||||
}),
|
}),
|
||||||
versionInjector(),
|
versionInjector(),
|
||||||
postcss({
|
postcss({
|
||||||
@ -43,7 +44,9 @@ export default {
|
|||||||
reactSvg(),
|
reactSvg(),
|
||||||
resolve(),
|
resolve(),
|
||||||
json(),
|
json(),
|
||||||
typescript(),
|
typescript({
|
||||||
|
outputToFilesystem: false,
|
||||||
|
}),
|
||||||
commonjs({
|
commonjs({
|
||||||
requireReturnsDefault: 'auto',
|
requireReturnsDefault: 'auto',
|
||||||
}),
|
}),
|
||||||
|
|||||||
@ -21,16 +21,12 @@ const Freighter: FC<FreighterProps> = ({ WASMData, username }) => {
|
|||||||
const [deboardingState, setDeboardingState] = useState(1);
|
const [deboardingState, setDeboardingState] = useState(1);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log('GSX boarding state changed', boardingState, WASMData.GSX.boardingState);
|
|
||||||
|
|
||||||
if (WASMData.GSX.boardingState < GSX_SERVICE_CALLED) return;
|
if (WASMData.GSX.boardingState < GSX_SERVICE_CALLED) return;
|
||||||
|
|
||||||
setBoardingState(WASMData.GSX.boardingState);
|
setBoardingState(WASMData.GSX.boardingState);
|
||||||
setDeboardingState(1);
|
setDeboardingState(1);
|
||||||
}, [WASMData.GSX.boardingState]);
|
}, [WASMData.GSX.boardingState]);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log('GSX deboarding state changed', deboardingState, WASMData.GSX.deboardingState);
|
|
||||||
|
|
||||||
if (WASMData.GSX.deboardingState < GSX_SERVICE_CALLED) return;
|
if (WASMData.GSX.deboardingState < GSX_SERVICE_CALLED) return;
|
||||||
|
|
||||||
setBoardingState(1);
|
setBoardingState(1);
|
||||||
@ -178,7 +174,7 @@ const Freighter: FC<FreighterProps> = ({ WASMData, username }) => {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{((username && selectedTab === 3) || (!username && selectedTab === 2)) && (
|
{((username && selectedTab === 3) || (!username && selectedTab === 2)) && (
|
||||||
<OptionsF WASMData={WASMData} loadingState={loadingState} />
|
<OptionsF WASMData={WASMData} loadingState={loadingState} gsxActive={GSXActive()} />
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import { FC } from 'react';
|
import { FC } from 'react';
|
||||||
import { GSX_SERVICE_CALLED, GSX_SERVICE_FINISHED } from '../../constants';
|
|
||||||
import { LoadingState } from '../../types/general';
|
import { LoadingState } from '../../types/general';
|
||||||
import { WASMDataF } from '../../types/WASMData';
|
import { WASMDataF } from '../../types/WASMData';
|
||||||
import { CoherentCallOptionsSet } from '../../utils/utils';
|
import { CoherentCallOptionsSet } from '../../utils/utils';
|
||||||
@ -8,16 +7,10 @@ import ToggleComponentKH from '../toggleComponent/ToggleComponent';
|
|||||||
interface OptionsFProps {
|
interface OptionsFProps {
|
||||||
WASMData: WASMDataF;
|
WASMData: WASMDataF;
|
||||||
loadingState: LoadingState;
|
loadingState: LoadingState;
|
||||||
|
gsxActive: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const OptionsF: FC<OptionsFProps> = ({ WASMData, loadingState }) => {
|
const OptionsF: FC<OptionsFProps> = ({ WASMData, loadingState, gsxActive }) => {
|
||||||
const GSXActive = () => {
|
|
||||||
return (
|
|
||||||
(WASMData.GSX.boardingState >= GSX_SERVICE_CALLED || WASMData.GSX.deboardingState >= GSX_SERVICE_CALLED) &&
|
|
||||||
WASMData.GSX.deboardingState !== GSX_SERVICE_FINISHED
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
|
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
|
||||||
@ -31,7 +24,7 @@ const OptionsF: FC<OptionsFProps> = ({ WASMData, loadingState }) => {
|
|||||||
setValue={(value) => {
|
setValue={(value) => {
|
||||||
CoherentCallOptionsSet(value);
|
CoherentCallOptionsSet(value);
|
||||||
}}
|
}}
|
||||||
disabled={loadingState !== 'preview' || GSXActive()}
|
disabled={loadingState !== 'preview' || gsxActive}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import { FC, useEffect, useState } from 'react';
|
import { FC, useEffect, useState } from 'react';
|
||||||
import { GSX_SERVICE_CALLED, GSX_SERVICE_FINISHED } from '../../constants';
|
|
||||||
import { LoadingState } from '../../types/general';
|
import { LoadingState } from '../../types/general';
|
||||||
import { WASMDataPax } from '../../types/WASMData';
|
import { WASMDataPax } from '../../types/WASMData';
|
||||||
import { CoherentCallOptionsSet } from '../../utils/utils';
|
import { CoherentCallOptionsSet } from '../../utils/utils';
|
||||||
@ -8,19 +7,13 @@ import ToggleComponentKH from '../toggleComponent/ToggleComponent';
|
|||||||
interface OptionsPaxProps {
|
interface OptionsPaxProps {
|
||||||
WASMData: WASMDataPax;
|
WASMData: WASMDataPax;
|
||||||
loadingState: LoadingState;
|
loadingState: LoadingState;
|
||||||
|
gsxActive: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const OptionsPax: FC<OptionsPaxProps> = ({ WASMData, loadingState }) => {
|
const OptionsPax: FC<OptionsPaxProps> = ({ WASMData, loadingState, gsxActive }) => {
|
||||||
const [paxWeight, setPaxWeight] = useState(WASMData.options.paxWeight);
|
const [paxWeight, setPaxWeight] = useState(WASMData.options.paxWeight);
|
||||||
const [bagWeight, setBagWeight] = useState(WASMData.options.bagWeight);
|
const [bagWeight, setBagWeight] = useState(WASMData.options.bagWeight);
|
||||||
|
|
||||||
const GSXActive = () => {
|
|
||||||
return (
|
|
||||||
(WASMData.GSX.boardingState >= GSX_SERVICE_CALLED || WASMData.GSX.deboardingState >= GSX_SERVICE_CALLED) &&
|
|
||||||
WASMData.GSX.deboardingState !== GSX_SERVICE_FINISHED
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const updateData = () => {
|
const updateData = () => {
|
||||||
CoherentCallOptionsSet(undefined, paxWeight, bagWeight);
|
CoherentCallOptionsSet(undefined, paxWeight, bagWeight);
|
||||||
};
|
};
|
||||||
@ -54,7 +47,7 @@ const OptionsPax: FC<OptionsPaxProps> = ({ WASMData, loadingState }) => {
|
|||||||
setValue={(value) => {
|
setValue={(value) => {
|
||||||
CoherentCallOptionsSet(value);
|
CoherentCallOptionsSet(value);
|
||||||
}}
|
}}
|
||||||
disabled={loadingState !== 'preview' || GSXActive()}
|
disabled={loadingState !== 'preview' || gsxActive}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -69,7 +62,7 @@ const OptionsPax: FC<OptionsPaxProps> = ({ WASMData, loadingState }) => {
|
|||||||
className="w-1/2 rounded-lg border border-white bg-zinc-700 px-3 py-2 text-right focus:border-blue-600 focus:ring-blue-600"
|
className="w-1/2 rounded-lg border border-white bg-zinc-700 px-3 py-2 text-right focus:border-blue-600 focus:ring-blue-600"
|
||||||
value={paxWeight}
|
value={paxWeight}
|
||||||
onChange={(e) => handleInput(e.target.value, Number.MAX_VALUE, setPaxWeight)}
|
onChange={(e) => handleInput(e.target.value, Number.MAX_VALUE, setPaxWeight)}
|
||||||
disabled={loadingState !== 'preview' || GSXActive()}
|
disabled={loadingState !== 'preview' || gsxActive}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -82,7 +75,7 @@ const OptionsPax: FC<OptionsPaxProps> = ({ WASMData, loadingState }) => {
|
|||||||
className="w-1/2 rounded-lg border border-white bg-zinc-700 px-3 py-2 text-right focus:border-blue-600 focus:ring-blue-600"
|
className="w-1/2 rounded-lg border border-white bg-zinc-700 px-3 py-2 text-right focus:border-blue-600 focus:ring-blue-600"
|
||||||
value={bagWeight}
|
value={bagWeight}
|
||||||
onChange={(e) => handleInput(e.target.value, Number.MAX_VALUE, setBagWeight)}
|
onChange={(e) => handleInput(e.target.value, Number.MAX_VALUE, setBagWeight)}
|
||||||
disabled={loadingState !== 'preview' || GSXActive()}
|
disabled={loadingState !== 'preview' || gsxActive}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FC, useEffect, useState } from 'react';
|
import { FC, useEffect, useMemo, useState } from 'react';
|
||||||
import { GSX_SERVICE_CALLED, GSX_SERVICE_FINISHED } from '../../constants';
|
import { GSX_SERVICE_CALLED, GSX_SERVICE_FINISHED } from '../../constants';
|
||||||
import { LoadingState } from '../../types/general';
|
import { LoadingState } from '../../types/general';
|
||||||
import { WASMDataPax } from '../../types/WASMData';
|
import { WASMDataPax } from '../../types/WASMData';
|
||||||
@ -21,17 +21,13 @@ const Pax: FC<PaxProps> = ({ WASMData, username }) => {
|
|||||||
const [deboardingState, setDeboardingState] = useState(1);
|
const [deboardingState, setDeboardingState] = useState(1);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log('GSX boarding state changed', boardingState, WASMData.GSX.boardingState);
|
if (WASMData.GSX.boardingState > 1 && WASMData.GSX.boardingState < GSX_SERVICE_CALLED) return;
|
||||||
|
|
||||||
if (WASMData.GSX.boardingState < GSX_SERVICE_CALLED) return;
|
|
||||||
|
|
||||||
setBoardingState(WASMData.GSX.boardingState);
|
setBoardingState(WASMData.GSX.boardingState);
|
||||||
setDeboardingState(1);
|
setDeboardingState(1);
|
||||||
}, [WASMData.GSX.boardingState]);
|
}, [WASMData.GSX.boardingState]);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log('GSX deboarding state changed', deboardingState, WASMData.GSX.deboardingState);
|
if (WASMData.GSX.deboardingState > 1 && WASMData.GSX.deboardingState < GSX_SERVICE_CALLED) return;
|
||||||
|
|
||||||
if (WASMData.GSX.deboardingState < GSX_SERVICE_CALLED) return;
|
|
||||||
|
|
||||||
setBoardingState(1);
|
setBoardingState(1);
|
||||||
setDeboardingState(WASMData.GSX.deboardingState);
|
setDeboardingState(WASMData.GSX.deboardingState);
|
||||||
@ -58,27 +54,27 @@ const Pax: FC<PaxProps> = ({ WASMData, username }) => {
|
|||||||
return WASMData.livePayload.economy2;
|
return WASMData.livePayload.economy2;
|
||||||
};
|
};
|
||||||
const lower1 = () => {
|
const lower1 = () => {
|
||||||
if (loadingState !== 'loaded' && !GSXActive()) return Math.round(WASMData.targetPayload.forwardCargo);
|
if (loadingState !== 'loaded' && !GSXActive) return Math.round(WASMData.targetPayload.forwardCargo);
|
||||||
|
|
||||||
return Math.round(WASMData.livePayload.forwardCargo);
|
return Math.round(WASMData.livePayload.forwardCargo);
|
||||||
};
|
};
|
||||||
const lower2 = () => {
|
const lower2 = () => {
|
||||||
if (loadingState !== 'loaded' && !GSXActive()) return Math.round(WASMData.targetPayload.rearCargo);
|
if (loadingState !== 'loaded' && !GSXActive) return Math.round(WASMData.targetPayload.rearCargo);
|
||||||
|
|
||||||
return Math.round(WASMData.livePayload.rearCargo);
|
return Math.round(WASMData.livePayload.rearCargo);
|
||||||
};
|
};
|
||||||
const OEW = () => {
|
const OEW = () => {
|
||||||
if (loadingState !== 'loaded' && !GSXActive()) return Math.round(WASMData.targetPayload.empty);
|
if (loadingState !== 'loaded' && !GSXActive) return Math.round(WASMData.targetPayload.empty);
|
||||||
|
|
||||||
return Math.round(WASMData.livePayload.empty);
|
return Math.round(WASMData.livePayload.empty);
|
||||||
};
|
};
|
||||||
const crew = () => {
|
const crew = () => {
|
||||||
if (loadingState !== 'loaded' && !GSXActive()) return Math.round(WASMData.targetPayload.crew);
|
if (loadingState !== 'loaded' && !GSXActive) return Math.round(WASMData.targetPayload.crew);
|
||||||
|
|
||||||
return Math.round(WASMData.livePayload.crew);
|
return Math.round(WASMData.livePayload.crew);
|
||||||
};
|
};
|
||||||
|
|
||||||
const GSXActive = () => {
|
const GSXActive = useMemo(() => {
|
||||||
// Cases when active:
|
// Cases when active:
|
||||||
// BOARDING called, running or done
|
// BOARDING called, running or done
|
||||||
// DEBOARDING called, running or done
|
// DEBOARDING called, running or done
|
||||||
@ -87,14 +83,20 @@ const Pax: FC<PaxProps> = ({ WASMData, username }) => {
|
|||||||
// DEBOARDING not called, disabled
|
// DEBOARDING not called, disabled
|
||||||
// BOTH done
|
// BOTH done
|
||||||
|
|
||||||
|
console.log(
|
||||||
|
'GSXActive',
|
||||||
|
(boardingState >= GSX_SERVICE_CALLED || deboardingState >= GSX_SERVICE_CALLED) &&
|
||||||
|
deboardingState !== GSX_SERVICE_FINISHED
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
(boardingState >= GSX_SERVICE_CALLED || deboardingState >= GSX_SERVICE_CALLED) &&
|
(boardingState >= GSX_SERVICE_CALLED || deboardingState >= GSX_SERVICE_CALLED) &&
|
||||||
deboardingState !== GSX_SERVICE_FINISHED
|
deboardingState !== GSX_SERVICE_FINISHED
|
||||||
);
|
);
|
||||||
};
|
}, [boardingState, deboardingState]);
|
||||||
|
|
||||||
const CGs = (): [string, boolean, string, boolean] => {
|
const CGs = (): [string, boolean, string, boolean] => {
|
||||||
if (loadingState !== 'loaded' && !GSXActive()) {
|
if (loadingState !== 'loaded' && !GSXActive) {
|
||||||
return [
|
return [
|
||||||
WASMData.targetPayload.ZFWCG.toFixed(1),
|
WASMData.targetPayload.ZFWCG.toFixed(1),
|
||||||
WASMData.targetPayload.ZFWCG < WASMData.limits.minCG || WASMData.targetPayload.ZFWCG > WASMData.limits.maxCG,
|
WASMData.targetPayload.ZFWCG < WASMData.limits.minCG || WASMData.targetPayload.ZFWCG > WASMData.limits.maxCG,
|
||||||
@ -103,7 +105,7 @@ const Pax: FC<PaxProps> = ({ WASMData, username }) => {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (WASMData.options.GSXSync && GSXActive() && boardingState !== GSX_SERVICE_FINISHED) {
|
if (WASMData.options.GSXSync && GSXActive && boardingState !== GSX_SERVICE_FINISHED) {
|
||||||
return [
|
return [
|
||||||
WASMData.targetPayload.ZFWCG.toFixed(1),
|
WASMData.targetPayload.ZFWCG.toFixed(1),
|
||||||
WASMData.targetPayload.ZFWCG < WASMData.limits.minCG || WASMData.targetPayload.ZFWCG > WASMData.limits.maxCG,
|
WASMData.targetPayload.ZFWCG < WASMData.limits.minCG || WASMData.targetPayload.ZFWCG > WASMData.limits.maxCG,
|
||||||
@ -129,20 +131,20 @@ const Pax: FC<PaxProps> = ({ WASMData, username }) => {
|
|||||||
<Profile
|
<Profile
|
||||||
type="PAX"
|
type="PAX"
|
||||||
isER={WASMData.userData.isER}
|
isER={WASMData.userData.isER}
|
||||||
upper1={`${upper1(GSXActive() ? 'loaded' : loadingState)}`}
|
upper1={`${upper1(GSXActive ? 'loaded' : loadingState)}`}
|
||||||
upper1max={loadingState === 'loaded' || GSXActive() ? `${upper1('preview')}` : `${WASMData.limits.business1}`}
|
upper1max={loadingState === 'loaded' || GSXActive ? `${upper1('preview')}` : `${WASMData.limits.business1}`}
|
||||||
upper2={`${upper2(GSXActive() ? 'loaded' : loadingState)}`}
|
upper2={`${upper2(GSXActive ? 'loaded' : loadingState)}`}
|
||||||
upper2max={loadingState === 'loaded' || GSXActive() ? `${upper2('preview')}` : `${WASMData.limits.business2}`}
|
upper2max={loadingState === 'loaded' || GSXActive ? `${upper2('preview')}` : `${WASMData.limits.business2}`}
|
||||||
upper3={`${upper3(GSXActive() ? 'loaded' : loadingState)}`}
|
upper3={`${upper3(GSXActive ? 'loaded' : loadingState)}`}
|
||||||
upper3max={loadingState === 'loaded' || GSXActive() ? `${upper3('preview')}` : `${WASMData.limits.economy1}`}
|
upper3max={loadingState === 'loaded' || GSXActive ? `${upper3('preview')}` : `${WASMData.limits.economy1}`}
|
||||||
upper4={`${upper4(GSXActive() ? 'loaded' : loadingState)}`}
|
upper4={`${upper4(GSXActive ? 'loaded' : loadingState)}`}
|
||||||
upper4max={loadingState === 'loaded' || GSXActive() ? `${upper4('preview')}` : `${WASMData.limits.economy2}`}
|
upper4max={loadingState === 'loaded' || GSXActive ? `${upper4('preview')}` : `${WASMData.limits.economy2}`}
|
||||||
lower1={`${lower1()}`}
|
lower1={`${lower1()}`}
|
||||||
lower2={`${lower2()}`}
|
lower2={`${lower2()}`}
|
||||||
OEW={`${OEW()}`}
|
OEW={`${OEW()}`}
|
||||||
crew={`${crew()}`}
|
crew={`${crew()}`}
|
||||||
unit={WASMData.userData.isImperial ? 'LBS' : 'KG'}
|
unit={WASMData.userData.isImperial ? 'LBS' : 'KG'}
|
||||||
inPreview={loadingState !== 'loaded' && !GSXActive()}
|
inPreview={loadingState !== 'loaded' && !GSXActive}
|
||||||
CGs={CGs()}
|
CGs={CGs()}
|
||||||
done={
|
done={
|
||||||
WASMData.options.GSXSync
|
WASMData.options.GSXSync
|
||||||
@ -162,7 +164,7 @@ const Pax: FC<PaxProps> = ({ WASMData, username }) => {
|
|||||||
WASMData={WASMData}
|
WASMData={WASMData}
|
||||||
loadingState={loadingState}
|
loadingState={loadingState}
|
||||||
setLoadingState={setLoadingState}
|
setLoadingState={setLoadingState}
|
||||||
gsxActive={GSXActive()}
|
gsxActive={GSXActive}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{((username && selectedTab === 1) || (!username && selectedTab === 0)) && (
|
{((username && selectedTab === 1) || (!username && selectedTab === 0)) && (
|
||||||
@ -170,7 +172,7 @@ const Pax: FC<PaxProps> = ({ WASMData, username }) => {
|
|||||||
WASMData={WASMData}
|
WASMData={WASMData}
|
||||||
loadingState={loadingState}
|
loadingState={loadingState}
|
||||||
setLoadingState={setLoadingState}
|
setLoadingState={setLoadingState}
|
||||||
gsxActive={GSXActive()}
|
gsxActive={GSXActive}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{((username && selectedTab === 2) || (!username && selectedTab === 1)) && (
|
{((username && selectedTab === 2) || (!username && selectedTab === 1)) && (
|
||||||
@ -178,11 +180,11 @@ const Pax: FC<PaxProps> = ({ WASMData, username }) => {
|
|||||||
WASMData={WASMData}
|
WASMData={WASMData}
|
||||||
loadingState={loadingState}
|
loadingState={loadingState}
|
||||||
setLoadingState={setLoadingState}
|
setLoadingState={setLoadingState}
|
||||||
gsxActive={GSXActive()}
|
gsxActive={GSXActive}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{((username && selectedTab === 3) || (!username && selectedTab === 2)) && (
|
{((username && selectedTab === 3) || (!username && selectedTab === 2)) && (
|
||||||
<OptionsPax WASMData={WASMData} loadingState={loadingState} />
|
<OptionsPax WASMData={WASMData} loadingState={loadingState} gsxActive={GSXActive} />
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import { FC, useEffect, useState } from 'react';
|
import { FC, useEffect, useState } from 'react';
|
||||||
import { GSX_SERVICE_CALLED, GSX_SERVICE_FINISHED } from '../../constants';
|
|
||||||
import { WASMDataF } from '../../types/WASMData';
|
import { WASMDataF } from '../../types/WASMData';
|
||||||
import { LoadingState } from '../../types/general';
|
import { LoadingState } from '../../types/general';
|
||||||
import { CoherentCallZFWEntry, inRangeOf, loadAircraft, unloadAircraft } from '../../utils/utils';
|
import { CoherentCallZFWEntry, inRangeOf, loadAircraft, unloadAircraft } from '../../utils/utils';
|
||||||
|
|||||||
@ -721,20 +721,20 @@ void sendData () {
|
|||||||
FROM_POUNDS(UserData->isImperial, livePaxPayloadData->cabinCrewRear),
|
FROM_POUNDS(UserData->isImperial, livePaxPayloadData->cabinCrewRear),
|
||||||
allocator);
|
allocator);
|
||||||
livePayload.AddMember("business1",
|
livePayload.AddMember("business1",
|
||||||
(short)(FROM_POUNDS(UserData->isImperial, livePaxPayloadData->business1Left + livePaxPayloadData->business1Center +
|
(short)round((livePaxPayloadData->business1Left + livePaxPayloadData->business1Center +
|
||||||
livePaxPayloadData->business1Right) / PAX_WEIGHT(UserData->isImperial, UserOptions)),
|
livePaxPayloadData->business1Right) / PAX_WEIGHT(true, UserOptions)),
|
||||||
allocator);
|
allocator);
|
||||||
livePayload.AddMember("business2",
|
livePayload.AddMember("business2",
|
||||||
(short)(FROM_POUNDS(UserData->isImperial, livePaxPayloadData->business2Left + livePaxPayloadData->business2Center +
|
(short)round((livePaxPayloadData->business2Left + livePaxPayloadData->business2Center +
|
||||||
livePaxPayloadData->business2Right) / PAX_WEIGHT(UserData->isImperial, UserOptions)),
|
livePaxPayloadData->business2Right) / PAX_WEIGHT(true, UserOptions)),
|
||||||
allocator);
|
allocator);
|
||||||
livePayload.AddMember("economy1",
|
livePayload.AddMember("economy1",
|
||||||
(short)(FROM_POUNDS(UserData->isImperial, livePaxPayloadData->economy1Left + livePaxPayloadData->economy1Center +
|
(short)round((livePaxPayloadData->economy1Left + livePaxPayloadData->economy1Center +
|
||||||
livePaxPayloadData->economy1Right) / PAX_WEIGHT(UserData->isImperial, UserOptions)),
|
livePaxPayloadData->economy1Right) / PAX_WEIGHT(true, UserOptions)),
|
||||||
allocator);
|
allocator);
|
||||||
livePayload.AddMember("economy2",
|
livePayload.AddMember("economy2",
|
||||||
(short)(FROM_POUNDS(UserData->isImperial, livePaxPayloadData->economy2Left + livePaxPayloadData->economy2Center +
|
(short)round((livePaxPayloadData->economy2Left + livePaxPayloadData->economy2Center +
|
||||||
livePaxPayloadData->economy2Right) / PAX_WEIGHT(UserData->isImperial, UserOptions)),
|
livePaxPayloadData->economy2Right) / PAX_WEIGHT(true, UserOptions)),
|
||||||
allocator);
|
allocator);
|
||||||
livePayload.AddMember("forwardCargo", FROM_POUNDS(UserData->isImperial, livePaxPayloadData->forwardCargo), allocator);
|
livePayload.AddMember("forwardCargo", FROM_POUNDS(UserData->isImperial, livePaxPayloadData->forwardCargo), allocator);
|
||||||
livePayload.AddMember("rearCargo", FROM_POUNDS(UserData->isImperial, livePaxPayloadData->rearCargo), allocator);
|
livePayload.AddMember("rearCargo", FROM_POUNDS(UserData->isImperial, livePaxPayloadData->rearCargo), allocator);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user