Compare commits

...

10 Commits

Author SHA1 Message Date
9da2abdad7 Freighter 2025-06-15 01:57:28 +02:00
cbd7d4e0ae Check prog pax load/unload 2025-06-14 16:47:27 +02:00
c394cd4d7b GSX Synced boarding/deboarding 2025-06-14 03:34:22 +02:00
f7304c5c7b Setting of payload 2025-06-12 14:30:00 +02:00
8975ea17af SB fetch and entry 2025-06-11 23:49:35 +02:00
896a459bba Pax Station Entry 2025-06-11 17:30:36 +02:00
890622453e Cleanup old configs 2025-06-11 00:44:15 +02:00
ee46d0bff1 ZFW Target Set 2025-06-11 00:27:27 +02:00
9224300c85 WASM PAX data export 2025-06-10 01:12:58 +02:00
a34c532484 initial wasm commit 2025-06-09 07:04:32 +02:00
56 changed files with 5693 additions and 2836 deletions

5
.gitignore vendored
View File

@ -4,5 +4,10 @@ PackageSources/js-bundle/__generated__
PackageSources/js-bundle/.rollup.cache
PackageSources/js-bundle/node_modules
PackageSources/html_ui
PackageSources/wasm-module/.vs
PackageSources/wasm-module/MSFS
PackageSources/wasm-module/x64
*.blend1
PackageSources/SimObjects/Airplanes/**/panel/*.wasm

View File

@ -35,6 +35,14 @@
<AssetDir>PackageSources\load-manager-panel\</AssetDir>
<OutputDir>InGamePanels\</OutputDir>
</AssetGroup>
<AssetGroup Name="md-11-panel-config">
<Type>Copy</Type>
<Flags>
<FSXCompatibility>false</FSXCompatibility>
</Flags>
<AssetDir>PackageSources\SimObjects\Airplanes\</AssetDir>
<OutputDir>SimObjects\Airplanes\</OutputDir>
</AssetGroup>
</AssetGroups>
</AssetPackage>

View File

@ -0,0 +1,59 @@
// Panel Configuration File
// TFDi Design MD-11
[VCockpit01]
size_mm=2048,2048
visible=1
pixel_size=2048,2048
texture=$vc1
background_color=0,0,0
htmlgauge00=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=Core, 0,0,509,510
htmlgauge01=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU1,0,0,508,508
htmlgauge02=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU2,514,0,510,510
htmlgauge03=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU3,1027,0,510,510
htmlgauge04=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU4,1539,0,510,508
htmlgauge05=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU5,0,513,511,509
htmlgauge06=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU6,513,512,510,511
htmlgauge07=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=LMCDU, 0,1046,333,287
htmlgauge08=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=RMCDU,0,1386,334,288
htmlgauge09=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=CMCDU,0,1728,333,285
htmlgauge10=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=ISFD,1032,519,544,505
//KH new gauge
htmlgauge11=WasmInstrument/WasmInstrument.html?wasm_module=load-manager.wasm&wasm_gauge=Load_Manager,0,0,509,510
[VIEWS]
VIEW_FORWARD_DIR=2.000, 0.000, 0.000
[Color]
Day=255,255,255
Night=255,255,255
Luminous=201,64,64
[Vcockpit02]
Background_color=0,0,0
size_mm=1024,1024
visible=1
pixel_size=1024,1024
texture=$vc2
htmlgauge00=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=AFS,3,0,1015,185
htmlgauge01=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=FUEL,4,200,1016,196
//above should actually be 3,192,1018,199 - moved due to visual offset
[Vcockpit03]
Background_color=0,0,0
size_mm=1024,1024
visible=1
pixel_size=1024,1024
texture=$RADIOS_XPNDR
htmlgauge00=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=RADIOS_XPNDR,0,5,1019,295
[VCockpit04]
Background_color=0,0,0
size_mm=1536,1024
visible=1
pixel_size=1536,1024
texture=$EFB
htmlgauge00=aircraft_efb/TFDi_MD11_efb/efb.html,0,0,1536,1024

View File

@ -0,0 +1,59 @@
// Panel Configuration File
// TFDi Design MD-11
[VCockpit01]
size_mm=2048,2048
visible=1
pixel_size=2048,2048
texture=$vc1
background_color=0,0,0
htmlgauge00=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=Core, 0,0,509,510,PW
htmlgauge01=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU1,0,0,508,508
htmlgauge02=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU2,514,0,510,510
htmlgauge03=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU3,1027,0,510,510
htmlgauge04=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU4,1539,0,510,508
htmlgauge05=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU5,0,513,511,509
htmlgauge06=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU6,513,512,510,511
htmlgauge07=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=LMCDU, 0,1046,333,287
htmlgauge08=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=RMCDU,0,1386,334,288
htmlgauge09=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=CMCDU,0,1728,333,285
htmlgauge10=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=ISFD,1032,519,544,505
//KH new gauge
htmlgauge11=WasmInstrument/WasmInstrument.html?wasm_module=load-manager.wasm&wasm_gauge=Load_Manager,0,0,509,510
[VIEWS]
VIEW_FORWARD_DIR=2.000, 0.000, 0.000
[Color]
Day=255,255,255
Night=255,255,255
Luminous=201,64,64
[Vcockpit02]
Background_color=0,0,0
size_mm=1024,1024
visible=1
pixel_size=1024,1024
texture=$vc2
htmlgauge00=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=AFS,3,0,1015,185
htmlgauge01=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=FUEL,4,200,1016,196
//above should actually be 3,192,1018,199 - moved due to visual offset
[Vcockpit03]
Background_color=0,0,0
size_mm=1024,1024
visible=1
pixel_size=1024,1024
texture=$RADIOS_XPNDR
htmlgauge00=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=RADIOS_XPNDR,0,5,1019,295
[VCockpit04]
Background_color=0,0,0
size_mm=1536,1024
visible=1
pixel_size=1536,1024
texture=$EFB
htmlgauge00=aircraft_efb/TFDi_MD11_efb/efb.html,0,0,1536,1024

View File

@ -0,0 +1,59 @@
// Panel Configuration File
// TFDi Design MD-11
[VCockpit01]
size_mm=2048,2048
visible=1
pixel_size=2048,2048
texture=$vc1
background_color=0,0,0
htmlgauge00=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=Core, 0,0,509,510
htmlgauge01=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU1,0,0,508,508
htmlgauge02=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU2,514,0,510,510
htmlgauge03=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU3,1027,0,510,510
htmlgauge04=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU4,1539,0,510,508
htmlgauge05=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU5,0,513,511,509
htmlgauge06=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU6,513,512,510,511
htmlgauge07=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=LMCDU, 0,1046,333,287
htmlgauge08=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=RMCDU,0,1386,334,288
htmlgauge09=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=CMCDU,0,1728,333,285
htmlgauge10=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=ISFD,1032,519,544,505
//KH new gauge
htmlgauge11=WasmInstrument/WasmInstrument.html?wasm_module=load-manager.wasm&wasm_gauge=Load_Manager,0,0,509,510
[VIEWS]
VIEW_FORWARD_DIR=2.000, 0.000, 0.000
[Color]
Day=255,255,255
Night=255,255,255
Luminous=201,64,64
[Vcockpit02]
Background_color=0,0,0
size_mm=1024,1024
visible=1
pixel_size=1024,1024
texture=$vc2
htmlgauge00=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=AFS,3,0,1015,185
htmlgauge01=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=FUEL,4,200,1016,196
//above should actually be 3,192,1018,199 - moved due to visual offset
[Vcockpit03]
Background_color=0,0,0
size_mm=1024,1024
visible=1
pixel_size=1024,1024
texture=$RADIOS_XPNDR
htmlgauge00=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=RADIOS_XPNDR,0,5,1019,295
[VCockpit04]
Background_color=0,0,0
size_mm=1536,1024
visible=1
pixel_size=1536,1024
texture=$EFB
htmlgauge00=aircraft_efb/TFDi_MD11_efb/efb.html,0,0,1536,1024

View File

@ -0,0 +1,59 @@
// Panel Configuration File
// TFDi Design MD-11
[VCockpit01]
size_mm=2048,2048
visible=1
pixel_size=2048,2048
texture=$vc1
background_color=0,0,0
htmlgauge00=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=Core, 0,0,509,510,PW
htmlgauge01=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU1,0,0,508,508
htmlgauge02=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU2,514,0,510,510
htmlgauge03=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU3,1027,0,510,510
htmlgauge04=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU4,1539,0,510,508
htmlgauge05=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU5,0,513,511,509
htmlgauge06=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=DU6,513,512,510,511
htmlgauge07=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=LMCDU, 0,1046,333,287
htmlgauge08=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=RMCDU,0,1386,334,288
htmlgauge09=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=CMCDU,0,1728,333,285
htmlgauge10=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=ISFD,1032,519,544,505
//KH new gauge
htmlgauge11=WasmInstrument/WasmInstrument.html?wasm_module=load-manager.wasm&wasm_gauge=Load_Manager,0,0,509,510
[VIEWS]
VIEW_FORWARD_DIR=2.000, 0.000, 0.000
[Color]
Day=255,255,255
Night=255,255,255
Luminous=201,64,64
[Vcockpit02]
Background_color=0,0,0
size_mm=1024,1024
visible=1
pixel_size=1024,1024
texture=$vc2
htmlgauge00=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=AFS,3,0,1015,185
htmlgauge01=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=FUEL,4,200,1016,196
//above should actually be 3,192,1018,199 - moved due to visual offset
[Vcockpit03]
Background_color=0,0,0
size_mm=1024,1024
visible=1
pixel_size=1024,1024
texture=$RADIOS_XPNDR
htmlgauge00=WasmInstrument/WasmInstrument.html?wasm_module=md11host.wasm&wasm_gauge=RADIOS_XPNDR,0,5,1019,295
[VCockpit04]
Background_color=0,0,0
size_mm=1536,1024
visible=1
pixel_size=1536,1024
texture=$EFB
htmlgauge00=aircraft_efb/TFDi_MD11_efb/efb.html,0,0,1536,1024

View File

@ -1 +1,6 @@
/// <reference types="@microsoft/msfs-types/js/common.d.ts" />
/// <reference types="@microsoft/msfs-types/pages/vcockpit/instruments/shared/baseinstrument.d.ts" />
/// <reference types="@microsoft/msfs-types/js/datastorage.d.ts" />
/// <reference types="@microsoft/msfs-types/js/buttons.d.ts" />
/// <reference types="@microsoft/msfs-types/js/services/toolbarpanels.d.ts" />
/// <reference types="@microsoft/msfs-types/js/simvar.d.ts" />

View File

@ -1,6 +1,6 @@
{
"name": "tfdidesign-md11-load-manager",
"version": "0.1.14",
"version": "0.1.21",
"description": "",
"main": "index.js",
"type": "module",
@ -13,7 +13,9 @@
"dev": "npx rollup -c -w",
"clean": "rimraf ../html_ui/InGamePanels/tfdidesign-md11-load-manager-panel/ && rimraf .rollup.cache",
"build": "npm version patch && npx rollup -c",
"release": "pnpm types && pnpm lint && pnpm run licenses && pnpm clean && npm version patch && cross-env NODE_ENV=production npx rollup -c"
"build-efb": "npm version patch && cross-env SPLIT=true npx rollup -c",
"release": "pnpm types && pnpm lint && pnpm run licenses && pnpm clean && npm version patch && cross-env NODE_ENV=production npx rollup -c",
"release-efb": "pnpm types && pnpm lint && pnpm run licenses && pnpm clean && npm version patch && cross-env NODE_ENV=production SPLIT=true npx rollup -c"
},
"engines": {
"node": ">=22"
@ -58,14 +60,9 @@
"typescript": "5.8.3"
},
"dependencies": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.14.16",
"@mui/material": "^5.14.17",
"postcss-import": "^15.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"uuid": "^9.0.1"
"react": "^19.1.0",
"react-dom": "^19.1.0",
"uuid": "^11.1.0"
},
"packageManager": "pnpm@10.11.1+sha512.e519b9f7639869dc8d5c3c5dfef73b3f091094b0a006d7317353c72b124e80e1afd429732e28705ad6bfa1ee879c1fce46c128ccebd3192101f43dd67c667912"
}

File diff suppressed because it is too large Load Diff

View File

@ -27,6 +27,15 @@ export default {
dir: panelDirBase,
format: 'es',
sourcemap: targetEnv !== 'production',
manualChunks: process.env.SPLIT
? (id) => {
if (id.includes('node_modules')) {
return 'vendor';
}
return null;
}
: undefined,
},
plugins: [
replace({

View File

@ -1,126 +1,61 @@
import { FC, StrictMode, useCallback, useEffect, useRef, useState } from 'react';
import Freight from './components/freight/Freight';
import { FC, useCallback, useEffect, useState } from 'react';
import Freighter from './components/freighter/Freighter';
import Pax from './components/pax/Pax';
import { PayloadFreight, calculateCGsFreight, getWeightsFreight } from './configs/freighter';
import { PaxConfig, PayloadPax } from './configs/pax';
import { Fuel, getFuel, initialFuel, initialPayload } from './configs/shared';
import {
COHERENT_COMM_BUS_WASM_CALL,
COMM_BUS_LIVE_DATA_EVENT,
TFDI_SIMBRIEF_USERNAME_CALL,
TFDI_SIMBRIEF_USERNAME_EVENT,
} from './constants';
import { WASMDataF, WASMDataPax } from './types/WASMData';
interface IAppProps {
commBus: ViewListener.ViewListener;
}
const App: FC<IAppProps> = ({ commBus }) => {
// Inferred
const [unit, setUnit] = useState<'lbs' | 'kg'>('lbs');
const [isCargo, setIsCargo] = useState(false);
const [isER, setIsER] = useState(false);
const [SBUsername, setSBUsername] = useState<string>();
// From sim
const [payloadLive, setPayloadLive] = useState<PayloadPax | PayloadFreight>(initialPayload);
const [fuel, setFuel] = useState<Fuel>(initialFuel);
const [GSXPaxNum, setGSXPaxNum] = useState(0);
const [GSXCargoPercent, setGSXCargoPercent] = useState(0);
const [GSXState, setGSXState] = useState<'boarding' | 'deboarding' | 'idle'>('idle');
// Calculated
const [CGs, setCGs] = useState<[number, number]>([0, 0]);
const [WASMData, setWASMData] = useState<WASMDataPax | WASMDataF>();
const [isReady, setIsReady] = useState(false);
const requestRef = useRef<number | undefined>(undefined);
// Main Loop for Live Payload
const mainLoop = () => {
try {
if (SimVar.IsReady()) {
setIsER(SimVar.GetSimVarValue('L:MD11_OPT_ER', 'bool'));
setIsCargo(SimVar.GetSimVarValue('L:MD11_EFB_IS_CARGO', 'bool'));
setUnit((SimVar.GetSimVarValue('L:MD11_EFB_OPTIONS_GENERAL', 'number') & 1) << 0 ? 'lbs' : 'kg');
// GSX
const boardingState = SimVar.GetSimVarValue('L:FSDT_GSX_BOARDING_STATE', 'number');
const deboardingState = SimVar.GetSimVarValue('L:FSDT_GSX_DEBOARDING_STATE', 'number');
setGSXState(boardingState === 5 ? 'boarding' : deboardingState === 5 ? 'deboarding' : 'idle');
setGSXPaxNum(
boardingState === 5
? SimVar.GetSimVarValue('L:FSDT_GSX_NUMPASSENGERS_BOARDING_TOTAL', 'number')
: deboardingState === 5
? SimVar.GetSimVarValue('L:FSDT_GSX_NUMPASSENGERS_DEBOARDING_TOTAL', 'number')
: 0
);
setGSXCargoPercent(
boardingState === 5
? SimVar.GetSimVarValue('L:FSDT_GSX_BOARDING_CARGO_PERCENT', 'number')
: deboardingState === 5
? 100 - SimVar.GetSimVarValue('L:FSDT_GSX_DEBOARDING_CARGO_PERCENT', 'number')
: 0
);
const payload = isCargo ? getWeightsFreight(unit) : PaxConfig.getWeights(unit);
const _fuel = getFuel(unit);
setCGs(
isCargo
? calculateCGsFreight(payload as PayloadFreight, _fuel)
: PaxConfig.calculateCGs(payload as PayloadPax, _fuel)
);
setPayloadLive(payload);
setFuel(_fuel);
}
} catch {}
requestRef.current = requestAnimationFrame(mainLoop);
};
useEffect(() => {
requestRef.current = requestAnimationFrame(mainLoop);
if (requestRef.current !== undefined) return () => cancelAnimationFrame(requestRef.current as number);
}, [unit, isCargo]);
// CommBus
const usernameCallback = useCallback((username: string) => {
setSBUsername(username);
setIsReady(true);
}, []);
const wasmCallback = useCallback((data: string) => {
setWASMData(JSON.parse(data));
}, []);
useEffect(() => {
console.log('Initializing CommBus');
commBus.on('receiveSimBriefUsername', usernameCallback);
commBus.on(TFDI_SIMBRIEF_USERNAME_EVENT, usernameCallback);
commBus.on(COMM_BUS_LIVE_DATA_EVENT, wasmCallback);
setTimeout(() => {
Coherent.call('COMM_BUS_WASM_CALLBACK', 'requestSimBriefUsername', 'null');
Coherent.call(COHERENT_COMM_BUS_WASM_CALL, TFDI_SIMBRIEF_USERNAME_CALL, 'null');
}, 1000);
return () => commBus.off('receiveSimBriefUsername', usernameCallback);
return () => {
commBus.off(TFDI_SIMBRIEF_USERNAME_EVENT, usernameCallback);
commBus.off(COMM_BUS_LIVE_DATA_EVENT, wasmCallback);
};
}, []);
return (
<StrictMode>
<div className="flex w-full justify-center pt-2 bg-zinc-900">
<div className="flex w-3/4 flex-col items-center">
{isReady ? (
isCargo ? (
<Freight isER={isER} unit={unit} OEW={payloadLive.empty} CGs={CGs} />
{isReady && WASMData ? (
WASMData.userData.isCargo ? (
<Freighter WASMData={WASMData as WASMDataF} username={SBUsername} />
) : (
<Pax
isER={isER}
unit={unit}
CGs={CGs}
fuelLive={fuel}
payloadLive={payloadLive as PayloadPax}
username={SBUsername}
GSXPaxNum={GSXPaxNum}
GSXCargoPercent={GSXCargoPercent}
GSXState={GSXState}
/>
<Pax WASMData={WASMData as WASMDataPax} username={SBUsername} />
)
) : (
<h1 className="text-sm font-medium">LOADING</h1>
)}
</div>
</div>
</StrictMode>
);
};

View File

@ -1,44 +1,40 @@
| Department | Related to | Name | License period | Material not material | License type | Link | Remote version | Installed version | Defined version | Author |
| :--------- | :--------- | :------------------------------- | :------------- | :-------------------- | :----------- | :------------------------------------------------------------------------ | :------------- | :---------------- | :-------------- | :---------------------------------------------------------- |
| kessler | stuff | @emotion/react | perpetual | material | MIT | git+https://github.com/emotion-js/emotion.git#main | 11.14.0 | 11.14.0 | ^11.11.1 | Emotion Contributors |
| kessler | stuff | @emotion/styled | perpetual | material | MIT | git+https://github.com/emotion-js/emotion.git#main | 11.14.0 | 11.14.0 | ^11.11.0 | n/a |
| kessler | stuff | @mui/icons-material | perpetual | material | MIT | git+https://github.com/mui/material-ui.git | 5.17.1 | 5.17.1 | ^5.14.16 | MUI Team |
| kessler | stuff | @mui/material | perpetual | material | MIT | git+https://github.com/mui/material-ui.git | 5.17.1 | 5.17.1 | ^5.14.17 | MUI Team |
| kessler | stuff | postcss-import | perpetual | material | MIT | git+https://github.com/postcss/postcss-import.git | 15.1.0 | 15.1.0 | ^15.1.0 | Maxime Thirouin |
| kessler | stuff | react | perpetual | material | MIT | git+https://github.com/facebook/react.git | 18.3.1 | 18.3.1 | ^18.2.0 | n/a |
| kessler | stuff | react-dom | perpetual | material | MIT | git+https://github.com/facebook/react.git | 18.3.1 | 18.3.1 | ^18.2.0 | n/a |
| kessler | stuff | uuid | perpetual | material | MIT | git+https://github.com/uuidjs/uuid.git | 9.0.1 | 9.0.1 | ^9.0.1 | n/a |
| kessler | stuff | react | perpetual | material | MIT | git+https://github.com/facebook/react.git | 19.1.0 | 19.1.0 | ^19.1.0 | n/a |
| kessler | stuff | react-dom | perpetual | material | MIT | git+https://github.com/facebook/react.git | 19.1.0 | 19.1.0 | ^19.1.0 | n/a |
| kessler | stuff | uuid | perpetual | material | MIT | git+https://github.com/uuidjs/uuid.git | 11.1.0 | 11.1.0 | ^11.1.0 | n/a |
| kessler | stuff | @microsoft/msfs-types | perpetual | material | MIT | git+https://github.com/microsoft/msfs-avionics-mirror.git | 1.14.6 | 1.14.6 | ^1.14.6 | Asobo Studio / Working Title Simulations |
| kessler | stuff | @rollup/plugin-commonjs | perpetual | material | MIT | git+https://github.com/rollup/plugins.git | 25.0.8 | 25.0.8 | ^25.0.0 | Rich Harris <richard.a.harris@gmail.com> |
| kessler | stuff | @rollup/plugin-json | perpetual | material | MIT | git+https://github.com/rollup/plugins.git | 6.1.0 | 6.1.0 | ^6.0.0 | rollup |
| kessler | stuff | @rollup/plugin-node-resolve | perpetual | material | MIT | git+https://github.com/rollup/plugins.git | 15.3.1 | 15.3.1 | ^15.1.0 | Rich Harris <richard.a.harris@gmail.com> |
| kessler | stuff | @rollup/plugin-commonjs | perpetual | material | MIT | git+https://github.com/rollup/plugins.git | 28.0.5 | 28.0.3 | ^28.0.3 | Rich Harris <richard.a.harris@gmail.com> |
| kessler | stuff | @rollup/plugin-json | perpetual | material | MIT | git+https://github.com/rollup/plugins.git | 6.1.0 | 6.1.0 | ^6.1.0 | rollup |
| kessler | stuff | @rollup/plugin-node-resolve | perpetual | material | MIT | git+https://github.com/rollup/plugins.git | 16.0.1 | 16.0.1 | ^16.0.1 | Rich Harris <richard.a.harris@gmail.com> |
| kessler | stuff | @rollup/plugin-replace | perpetual | material | MIT | git+https://github.com/rollup/plugins.git | 6.0.2 | 6.0.2 | ^6.0.2 | Rich Harris <richard.a.harris@gmail.com> |
| kessler | stuff | @rollup/plugin-terser | perpetual | material | MIT | git+https://github.com/rollup/plugins.git | 0.4.4 | 0.4.4 | ^0.4.3 | Peter Placzek <peter.placzek1996@gmail.com> |
| kessler | stuff | @rollup/plugin-typescript | perpetual | material | MIT | git+https://github.com/rollup/plugins.git | 11.1.6 | 11.1.6 | ^11.1.1 | Oskar Segersvärd |
| kessler | stuff | @types/react | perpetual | material | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | 18.3.23 | 18.3.23 | ^18.2.8 | n/a |
| kessler | stuff | @types/react-dom | perpetual | material | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | 18.3.7 | 18.3.7 | ^18.2.4 | n/a |
| kessler | stuff | @types/uuid | perpetual | material | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | 9.0.8 | 9.0.8 | ^9.0.7 | n/a |
| kessler | stuff | @typescript-eslint/eslint-plugin | perpetual | material | MIT | git+https://github.com/typescript-eslint/typescript-eslint.git | 6.21.0 | 6.21.0 | ^6.10.0 | n/a |
| kessler | stuff | @typescript-eslint/parser | perpetual | material | BSD-2-Clause | git+https://github.com/typescript-eslint/typescript-eslint.git | 6.21.0 | 6.21.0 | ^6.10.0 | n/a |
| kessler | stuff | autoprefixer | perpetual | material | MIT | git+https://github.com/postcss/autoprefixer.git | 10.4.21 | 10.4.21 | ^10.4.14 | Andrey Sitnik <andrey@sitnik.ru> |
| kessler | stuff | @rollup/plugin-terser | perpetual | material | MIT | git+https://github.com/rollup/plugins.git | 0.4.4 | 0.4.4 | ^0.4.4 | Peter Placzek <peter.placzek1996@gmail.com> |
| kessler | stuff | @rollup/plugin-typescript | perpetual | material | MIT | git+https://github.com/rollup/plugins.git | 12.1.2 | 12.1.2 | ^12.1.2 | Oskar Segersvärd |
| kessler | stuff | @types/react | perpetual | material | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | 19.1.8 | 19.1.6 | ^19.1.6 | n/a |
| kessler | stuff | @types/react-dom | perpetual | material | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | 19.1.6 | 19.1.6 | ^19.1.6 | n/a |
| kessler | stuff | @types/uuid | perpetual | material | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | 10.0.0 | 10.0.0 | ^10.0.0 | n/a |
| kessler | stuff | @typescript-eslint/eslint-plugin | perpetual | material | MIT | git+https://github.com/typescript-eslint/typescript-eslint.git | 6.21.0 | 6.21.0 | ^6.21.0 | n/a |
| kessler | stuff | @typescript-eslint/parser | perpetual | material | BSD-2-Clause | git+https://github.com/typescript-eslint/typescript-eslint.git | 6.21.0 | 6.21.0 | ^6.21.0 | n/a |
| kessler | stuff | autoprefixer | perpetual | material | MIT | git+https://github.com/postcss/autoprefixer.git | 10.4.21 | 10.4.21 | ^10.4.21 | Andrey Sitnik <andrey@sitnik.ru> |
| kessler | stuff | cross-env | perpetual | material | MIT | git+https://github.com/kentcdodds/cross-env.git | 7.0.3 | 7.0.3 | ^7.0.3 | Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com) |
| kessler | stuff | eslint | perpetual | material | MIT | git+https://github.com/eslint/eslint.git | 8.57.1 | 8.57.1 | ^8.42.0 | Nicholas C. Zakas <nicholas+npm@nczconsulting.com> |
| kessler | stuff | eslint-plugin-import | perpetual | material | MIT | git+https://github.com/import-js/eslint-plugin-import.git | 2.31.0 | 2.31.0 | ^2.27.5 | Ben Mosher <me@benmosher.com> |
| kessler | stuff | eslint-plugin-react | perpetual | material | MIT | git+https://github.com/jsx-eslint/eslint-plugin-react.git | 7.37.5 | 7.37.5 | ^7.32.2 | Yannick Croissant <yannick.croissant+npm@gmail.com> |
| kessler | stuff | eslint-plugin-react-hooks | perpetual | material | MIT | git+https://github.com/facebook/react.git | 4.6.2 | 4.6.2 | ^4.6.0 | n/a |
| kessler | stuff | license-report | perpetual | material | MIT | git+https://github.com/kessler/license-report.git | 6.7.2 | 6.7.2 | ^6.5.0 | Yaniv Kessler |
| kessler | stuff | postcss | perpetual | material | MIT | git+https://github.com/postcss/postcss.git | 8.5.4 | 8.5.4 | ^8.4.24 | Andrey Sitnik <andrey@sitnik.ru> |
| kessler | stuff | prettier | perpetual | material | MIT | git+https://github.com/prettier/prettier.git | 3.5.3 | 3.5.3 | ^3.0.3 | James Long |
| kessler | stuff | prettier-plugin-organize-imports | perpetual | material | MIT | git+https://github.com/simonhaenisch/prettier-plugin-organize-imports.git | 3.2.4 | 3.2.4 | ^3.2.4 | Simon Haenisch (https://github.com/simonhaenisch) |
| kessler | stuff | rimraf | perpetual | material | ISC | git://github.com/isaacs/rimraf.git | 5.0.10 | 5.0.10 | ^5.0.1 | Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/) |
| kessler | stuff | rollup | perpetual | material | MIT | git+https://github.com/rollup/rollup.git | 4.41.1 | 4.41.1 | ^4.3.1 | Rich Harris |
| kessler | stuff | rollup-plugin-copy | perpetual | material | MIT | git+https://github.com/vladshcherbin/rollup-plugin-copy.git | 3.5.0 | 3.5.0 | ^3.4.0 | Vlad Shcherbin <vlad.shcherbin@gmail.com> |
| kessler | stuff | eslint | perpetual | material | MIT | git+https://github.com/eslint/eslint.git | 8.57.1 | 8.57.1 | ^8.57.1 | Nicholas C. Zakas <nicholas+npm@nczconsulting.com> |
| kessler | stuff | eslint-plugin-import | perpetual | material | MIT | git+https://github.com/import-js/eslint-plugin-import.git | 2.31.0 | 2.31.0 | ^2.31.0 | Ben Mosher <me@benmosher.com> |
| kessler | stuff | eslint-plugin-react | perpetual | material | MIT | git+https://github.com/jsx-eslint/eslint-plugin-react.git | 7.37.5 | 7.37.5 | ^7.37.5 | Yannick Croissant <yannick.croissant+npm@gmail.com> |
| kessler | stuff | eslint-plugin-react-hooks | perpetual | material | MIT | git+https://github.com/facebook/react.git | 4.6.2 | 4.6.2 | ^4.6.2 | n/a |
| kessler | stuff | license-report | perpetual | material | MIT | git+https://github.com/kessler/license-report.git | 6.8.0 | 6.7.2 | ^6.7.2 | Yaniv Kessler |
| kessler | stuff | postcss | perpetual | material | MIT | git+https://github.com/postcss/postcss.git | 8.5.5 | 8.5.4 | ^8.5.4 | Andrey Sitnik <andrey@sitnik.ru> |
| kessler | stuff | postcss-import | perpetual | material | MIT | git+https://github.com/postcss/postcss-import.git | 16.1.0 | 16.1.0 | ^16.1.0 | Maxime Thirouin |
| kessler | stuff | prettier | perpetual | material | MIT | git+https://github.com/prettier/prettier.git | 3.5.3 | 3.5.3 | ^3.5.3 | James Long |
| kessler | stuff | prettier-plugin-organize-imports | perpetual | material | MIT | git+https://github.com/simonhaenisch/prettier-plugin-organize-imports.git | 4.1.0 | 4.1.0 | ^4.1.0 | Simon Haenisch (https://github.com/simonhaenisch) |
| kessler | stuff | rimraf | perpetual | material | ISC | git://github.com/isaacs/rimraf.git | 6.0.1 | 6.0.1 | ^6.0.1 | Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/) |
| kessler | stuff | rollup | perpetual | material | MIT | git+https://github.com/rollup/rollup.git | 4.43.0 | 4.42.0 | ^4.42.0 | Rich Harris |
| kessler | stuff | rollup-plugin-copy | perpetual | material | MIT | git+https://github.com/vladshcherbin/rollup-plugin-copy.git | 3.5.0 | 3.5.0 | ^3.5.0 | Vlad Shcherbin <vlad.shcherbin@gmail.com> |
| kessler | stuff | rollup-plugin-postcss | perpetual | material | MIT | git+https://github.com/egoist/rollup-plugin-postcss.git | 4.0.2 | 4.0.2 | ^4.0.2 | EGOIST <0x142857@gmail.com> |
| kessler | stuff | rollup-plugin-react-svg | perpetual | material | MIT | git+https://github.com/boopathi/react-svg-loader.git | 3.0.3 | 3.0.3 | ^3.0.3 | boopathi |
| kessler | stuff | rollup-plugin-version-injector | perpetual | material | ISC | git+https://github.com/djhouseknecht/rollup-plugin-version-injector.git | 1.3.3 | 1.3.3 | ^1.3.3 | David Houseknecht <david.j.houseknecht@gmail.com> |
| kessler | stuff | sass | perpetual | material | MIT | git+https://github.com/sass/dart-sass.git | 1.89.1 | 1.89.1 | ^1.89.1 | Natalie Weizenbaum nweiz@google.com https://github.com/nex3 |
| kessler | stuff | sass | perpetual | material | MIT | git+https://github.com/sass/dart-sass.git | 1.89.2 | 1.89.1 | ^1.89.1 | Natalie Weizenbaum nweiz@google.com https://github.com/nex3 |
| kessler | stuff | svg-slim | perpetual | material | MIT | git+https://github.com/benboba/svg-slim.git | 2.0.5 | 2.0.5 | ^2.0.5 | Wang Feng <benboba@gmail.com> |
| kessler | stuff | tslib | perpetual | material | 0BSD | git+https://github.com/Microsoft/tslib.git | 2.8.1 | 2.8.1 | ^2.5.3 | Microsoft Corp. |
| kessler | stuff | typed-scss-modules | perpetual | material | MIT | git+https://github.com/skovy/typed-scss-modules.git | 7.1.4 | 7.1.4 | ^7.1.0 | Spencer Miskoviak <smiskoviak@gmail.com> |
| kessler | stuff | typescript | perpetual | material | Apache-2.0 | git+https://github.com/Microsoft/TypeScript.git | 5.2.2 | 5.2.2 | 5.2.2 | Microsoft Corp. |
| kessler | stuff | tslib | perpetual | material | 0BSD | git+https://github.com/Microsoft/tslib.git | 2.8.1 | 2.8.1 | ^2.8.1 | Microsoft Corp. |
| kessler | stuff | typed-scss-modules | perpetual | material | MIT | git+https://github.com/skovy/typed-scss-modules.git | 8.1.1 | 8.1.1 | ^8.1.1 | Spencer Miskoviak <smiskoviak@gmail.com> |
| kessler | stuff | typescript | perpetual | material | Apache-2.0 | git+https://github.com/microsoft/TypeScript.git | 5.8.3 | 5.8.3 | 5.8.3 | Microsoft Corp. |

View File

@ -1,14 +1,15 @@
import { FC } from 'react';
import { SharedConfig } from '../../configs/shared';
interface CGSelectProps {
minCG: number;
maxCG: number;
value: number;
disabled: boolean;
increase: () => void;
decrease: () => void;
}
const CGSelect: FC<CGSelectProps> = ({ value, disabled, increase, decrease }) => {
const CGSelect: FC<CGSelectProps> = ({ minCG, maxCG, value, disabled, increase, decrease }) => {
return (
<div className="relative">
<input
@ -17,7 +18,7 @@ const CGSelect: FC<CGSelectProps> = ({ value, disabled, increase, decrease }) =>
value={value.toFixed(1)}
/>
<button
disabled={disabled || value <= SharedConfig.CGLimits.min}
disabled={disabled || value <= minCG}
className="absolute right-2 top-0 -mt-[.5px] border-t bg-zinc-700 text-white disabled:text-zinc-400"
onClick={increase}
>
@ -45,7 +46,7 @@ const CGSelect: FC<CGSelectProps> = ({ value, disabled, increase, decrease }) =>
</svg>
</button>
<button
disabled={disabled || value >= SharedConfig.CGLimits.max}
disabled={disabled || value >= maxCG}
className="absolute bottom-0 right-2 -mt-[.5px] border-b bg-zinc-700 text-white disabled:text-zinc-400"
onClick={decrease}
>

View File

@ -0,0 +1,247 @@
import { FC, useEffect, useRef, useState } from 'react';
import {
COHERENT_COMM_BUS_WASM_CALL,
COMM_BUS_UPDATE_TARGET_EVENT,
GSX_SERVICE_CALLED,
GSX_SERVICE_FINISHED,
} from '../../constants';
import { WASMDataF } from '../../types/WASMData';
import { LoadingState } from '../../types/general';
import { ImportFlightPlan } from '../../utils/TFDISBImport';
import { inRangeOf, loadAircraft, unloadAircraft } from '../../utils/utils';
import CGSelect from '../CGSelect/CGSelect';
import ActionBar from '../actionbar/ActionBar';
interface SBEntryProps {
WASMData: WASMDataF;
loadingState: LoadingState;
username: string;
setLoadingState: (newState: LoadingState) => void;
}
const SBEntryF: FC<SBEntryProps> = ({ WASMData, loadingState, username, setLoadingState }) => {
const [CGTarget, setCGTarget] = useState(WASMData.targetPayload.CGTarget);
const [fuel, setFuel] = useState(Math.round(WASMData.livePayload.fuel));
const [fuelEnabled, setFuelEnabled] = useState(true);
//eslint-disable-next-line @typescript-eslint/no-explicit-any
const [SBPlan, setSBPlan] = useState<any>();
const [SBInFlight, setSBInFlight] = useState(false);
const cargo = useRef(0);
const ZFW = () => {
if (loadingState !== 'loaded' && !GSXActive()) return Math.round(WASMData.targetPayload.total);
return Math.round(WASMData.livePayload.total);
};
const ZFWValid = () => {
return ZFW() <= WASMData.limits.maxZFW;
};
const GW = () => {
return fuel + ZFW();
};
const GWValid = () => {
return GW() <= WASMData.limits.maxTOW;
};
const GSXActive = () => {
return (
(WASMData.GSX.boardingState >= GSX_SERVICE_CALLED || WASMData.GSX.deboardingState >= GSX_SERVICE_CALLED) &&
WASMData.GSX.deboardingState !== GSX_SERVICE_FINISHED
);
};
const handleInput = (input: string, maxValue: number, setter: (value: number) => void) => {
if (!input) {
setter(0);
return;
}
const converted = parseInt(input);
if (converted) {
if (converted < 0) setter(0);
else if (converted > maxValue) setter(maxValue);
else setter(converted);
}
};
const handleSB = async () => {
setSBInFlight(true);
const SBResponse = await ImportFlightPlan(
username,
WASMData.limits.maxZFW,
WASMData.limits.maxTOW,
WASMData.limits.maxFuel,
WASMData.userData.isImperial
);
if (SBResponse.type === 'error') {
console.error('TODO: ERROR', SBResponse.message);
setSBInFlight(false);
return;
}
cargo.current = parseFloat(SBResponse.message.cargo) ?? 0;
updateData();
setSBPlan(SBResponse.message);
setFuel(parseFloat(SBResponse.message.fuel) ?? 0);
setSBInFlight(false);
};
useEffect(
() =>
setFuel((prev) => {
if (prev > WASMData.limits.maxFuel) return WASMData.limits.maxFuel;
return prev;
}),
[WASMData.userData.isER]
);
useEffect(() => {
setFuelEnabled(inRangeOf(Math.round(WASMData.livePayload.fuel), fuel));
}, [WASMData.livePayload.fuel]);
const updateData = (_CGTarget?: number) => {
Coherent.call(
COHERENT_COMM_BUS_WASM_CALL,
COMM_BUS_UPDATE_TARGET_EVENT,
JSON.stringify({
mode: 0,
cargo: cargo.current ?? 0,
CGTarget: _CGTarget ?? CGTarget,
})
);
};
return (
<>
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
<div className="relative flex w-full items-center justify-between rounded-md bg-zinc-600 p-2 px-4">
<label>Fuel ({WASMData.userData.isImperial ? 'lbs' : 'kg'})</label>
<input
type="text"
placeholder=""
className={`w-1/2 rounded-lg border border-white bg-zinc-700 px-3 py-2 text-right`}
value={fuel}
onChange={(e) => handleInput(e.target.value, WASMData.limits.maxFuel, setFuel)}
disabled={loadingState !== 'preview' || GSXActive()}
/>
<button
className="middle none center rounded-lg bg-green-600 px-6 py-3 font-sans text-xs font-bold uppercase text-white shadow-md shadow-green-500/20 transition-all hover:shadow-lg hover:shadow-green-500/40 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none"
data-ripple-light="true"
onClick={() => {
SimVar.SetSimVarValue(
'L:MD11_EFB_PAYLOAD_FUEL',
'lbs',
WASMData.userData.isImperial ? fuel : fuel * 2.20462262185
);
SimVar.SetSimVarValue('L:MD11_EFB_READ_READY', 'bool', true);
setFuelEnabled(WASMData.livePayload.fuel === fuel);
}}
disabled={loadingState !== 'preview' || !fuelEnabled || GSXActive()}
>
Load Fuel
</button>
</div>
</div>
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
<div className="relative flex w-full items-center justify-between rounded-t-md bg-zinc-600 p-2 px-4">
<label>Planned ZFW ({WASMData.userData.isImperial ? 'lbs' : 'kg'})</label>
<input
type="text"
placeholder=""
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={SBPlan?.plannedZFW ?? 0}
disabled
/>
</div>
<div className="relative flex w-full items-center justify-between bg-zinc-700 p-2 px-4">
<label>Planned GW ({WASMData.userData.isImperial ? 'lbs' : 'kg'})</label>
<input
type="text"
placeholder=""
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={SBPlan?.plannedGW ?? 0}
disabled
/>
</div>
<div className="relative flex w-full items-center justify-between rounded-b-md bg-zinc-600 p-2 px-4">
<label>
Target ZFWCG ({WASMData.limits.minCG} - {WASMData.limits.maxCG})
</label>
<CGSelect
minCG={WASMData.limits.minCG}
maxCG={WASMData.limits.maxCG}
value={CGTarget}
disabled={loadingState !== 'preview' || GSXActive()}
increase={() =>
setCGTarget((prev) => {
const _new = prev + 0.1;
updateData(_new);
return _new;
})
}
decrease={() =>
setCGTarget((prev) => {
const _new = prev - 0.1;
updateData(_new);
return _new;
})
}
/>
</div>
</div>
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
<div className="relative flex w-full items-center justify-between rounded-t-md bg-zinc-600 p-2 px-4">
<label>
{loadingState !== 'loaded' && !GSXActive() ? 'Expected' : 'Actual'} ZFW (
{WASMData.userData.isImperial ? 'lbs' : 'kg'})
</label>
<input
type="text"
placeholder=""
className={`w-1/2 rounded-lg border ${ZFWValid() ? 'border-white' : 'border-red-500 text-red-500'} bg-zinc-700 px-3 py-2 text-right`}
disabled
value={ZFW()}
/>
</div>
<div className="relative flex w-full items-center justify-between rounded-b-md bg-zinc-700 p-2 px-4">
<label>
{loadingState !== 'loaded' && !GSXActive() ? 'Expected' : 'Actual'} GW (
{WASMData.userData.isImperial ? 'lbs' : 'kg'})
</label>
<input
type="text"
placeholder=""
className={`w-1/2 rounded-lg border ${GWValid() ? 'border-white' : 'border-red-500 text-red-500'} bg-zinc-700 px-3 py-2 text-right`}
disabled
value={GW()}
/>
</div>
</div>
<ActionBar
loadingState={loadingState}
loadDisabled={!GWValid() || SBInFlight}
GSXSync={WASMData.options.GSXSync}
GSXActive={GSXActive()}
importSB={handleSB}
load={() => {
setLoadingState('loaded');
loadAircraft();
}}
unload={() => {
setLoadingState('preview');
unloadAircraft();
}}
/>
</>
);
};
export default SBEntryF;

View File

@ -1,111 +1,55 @@
import { FC, useEffect, useState } from 'react';
import { PaxConfig, PayloadPax } from '../../configs/pax';
import { Fuel, SharedConfig } from '../../configs/shared';
import { FC, useEffect, useRef, useState } from 'react';
import {
COHERENT_COMM_BUS_WASM_CALL,
COMM_BUS_UPDATE_TARGET_EVENT,
GSX_SERVICE_CALLED,
GSX_SERVICE_FINISHED,
} from '../../constants';
import { WASMDataPax } from '../../types/WASMData';
import { LoadingState } from '../../types/general';
import { ImportFlightPlan } from '../../utils/TFDISBImport';
import { inRangeOf, loadAircraft, unloadAircraft } from '../../utils/utils';
import CGSelect from '../CGSelect/CGSelect';
import ActionBar from '../actionbar/ActionBar';
interface StationEntryProps {
unit: 'kg' | 'lbs';
isER: boolean;
initialPayload: PayloadPax;
fuelLive: Fuel;
payloadLive: PayloadPax;
loadingState: 'preview' | 'accepted' | 'loaded';
interface SBEntryProps {
WASMData: WASMDataPax;
loadingState: LoadingState;
username: string;
setLoadingState: (newState: StationEntryProps['loadingState']) => void;
updateView: (payload: PayloadPax) => void;
loadAircraft: () => void;
setLoadingState: (newState: LoadingState) => void;
}
const SBEntryPax: FC<StationEntryProps> = ({
unit,
isER,
initialPayload,
fuelLive,
payloadLive,
loadingState,
username,
setLoadingState,
updateView,
loadAircraft,
}) => {
const [targetZFWCG, setTargetZFWCG] = useState(SharedConfig.CGLimits.default);
const [fuel, setFuel] = useState(
Math.round(
fuelLive.main1 +
fuelLive.main1Tip +
fuelLive.main2 +
fuelLive.main3 +
fuelLive.main3Tip +
fuelLive.upperAux +
fuelLive.lowerAux +
fuelLive.tail +
fuelLive.forwardAux1 +
fuelLive.forwardAux2
)
);
const [ZFW, setZFW] = useState(
Math.round(
PaxConfig.weights.base[unit].total +
(isER ? SharedConfig.erExtraWeight[unit] * 2 : 0) +
payloadLive.empty +
initialPayload.business1Left +
initialPayload.business1Center +
initialPayload.business1Right +
initialPayload.business2Left +
initialPayload.business2Center +
initialPayload.business2Right +
initialPayload.economy1Left +
initialPayload.economy1Center +
initialPayload.economy1Right +
initialPayload.economy2Left +
initialPayload.economy2Center +
initialPayload.economy2Right +
initialPayload.forwardCargo +
initialPayload.rearCargo
)
);
const SBEntryPax: FC<SBEntryProps> = ({ WASMData, loadingState, username, setLoadingState }) => {
const [CGTarget, setCGTarget] = useState(WASMData.targetPayload.CGTarget);
const [fuel, setFuel] = useState(Math.round(WASMData.livePayload.fuel));
const [fuelEnabled, setFuelEnabled] = useState(true);
//eslint-disable-next-line @typescript-eslint/no-explicit-any
const [SBPlan, setSBPlan] = useState<any>();
const [SBInFlight, setSBInFlight] = useState(false);
const _ZFW = () => {
if (loadingState !== 'loaded') return ZFW;
const numPax = useRef(0);
const cargo = useRef(0);
return Math.round(
payloadLive.empty +
payloadLive.pilot +
payloadLive.firstOfficer +
payloadLive.engineer +
payloadLive.cabinCrewFront +
payloadLive.business1Left +
payloadLive.business1Center +
payloadLive.business1Right +
payloadLive.business2Left +
payloadLive.business2Center +
payloadLive.business2Right +
payloadLive.economy1Left +
payloadLive.economy1Center +
payloadLive.economy1Right +
payloadLive.economy2Left +
payloadLive.economy2Center +
payloadLive.economy2Right +
payloadLive.cabinCrewRear +
payloadLive.forwardCargo +
payloadLive.rearCargo +
payloadLive.leftAuxPax +
payloadLive.rightAuxPax
);
const ZFW = () => {
if (loadingState !== 'loaded' && !GSXActive()) return Math.round(WASMData.targetPayload.total);
return Math.round(WASMData.livePayload.total);
};
const ZFWValid = () => {
return _ZFW() <= PaxConfig.maxZWF[unit];
return ZFW() <= WASMData.limits.maxZFW;
};
const GW = () => {
return fuel + _ZFW();
return fuel + ZFW();
};
const GWValid = () => {
return GW() <= (isER ? SharedConfig.maxTOW.er[unit] : SharedConfig.maxTOW.norm[unit]);
return GW() <= WASMData.limits.maxTOW;
};
const GSXActive = () => {
return (
(WASMData.GSX.boardingState >= GSX_SERVICE_CALLED || WASMData.GSX.deboardingState >= GSX_SERVICE_CALLED) &&
WASMData.GSX.deboardingState !== GSX_SERVICE_FINISHED
);
};
const handleInput = (input: string, maxValue: number, setter: (value: number) => void) => {
@ -125,49 +69,89 @@ const SBEntryPax: FC<StationEntryProps> = ({
const handleSB = async () => {
setSBInFlight(true);
const SBResponse = await ImportFlightPlan(username, PaxConfig, unit, isER);
const SBResponse = await ImportFlightPlan(
username,
WASMData.limits.maxZFW,
WASMData.limits.maxTOW,
WASMData.limits.maxFuel,
WASMData.userData.isImperial
);
if (SBResponse.type === 'error') {
console.error('TODO: ERROR', SBResponse.message);
setSBInFlight(false);
return;
}
const __ZFW = Math.round(
PaxConfig.weights.base[unit].total +
(isER ? SharedConfig.erExtraWeight[unit] * 2 : 0) +
payloadLive.empty +
SBResponse.message.pax * (PaxConfig.weights.pax[unit] + PaxConfig.weights.baggage[unit]) +
SBResponse.message.cargo
);
const _fuel = SBResponse.message.fuel;
cargo.current = parseFloat(SBResponse.message.cargo) ?? 0;
numPax.current = parseInt(SBResponse.message.pax) ?? 0;
updateView(
PaxConfig.distribute(__ZFW, targetZFWCG, payloadLive.empty, fuelLive, unit, isER, SBResponse.message.pax)
);
updateData();
setSBPlan(SBResponse.message);
setZFW(__ZFW);
setFuel(_fuel);
setFuel(parseFloat(SBResponse.message.fuel) ?? 0);
setSBInFlight(false);
};
useEffect(
() =>
setFuel((prev) =>
prev > (isER ? SharedConfig.maxFuel.er[unit] : SharedConfig.maxFuel.norm[unit])
? isER
? SharedConfig.maxFuel.er[unit]
: SharedConfig.maxFuel.norm[unit]
: prev
),
[isER]
setFuel((prev) => {
if (prev > WASMData.limits.maxFuel) return WASMData.limits.maxFuel;
return prev;
}),
[WASMData.userData.isER]
);
useEffect(() => {
setFuelEnabled(inRangeOf(Math.round(WASMData.livePayload.fuel), fuel));
}, [WASMData.livePayload.fuel]);
const updateData = (_CGTarget?: number) => {
Coherent.call(
COHERENT_COMM_BUS_WASM_CALL,
COMM_BUS_UPDATE_TARGET_EVENT,
JSON.stringify({
mode: 0,
cargo: cargo.current ?? 0,
numPax: numPax.current ?? 0,
CGTarget: _CGTarget ?? CGTarget,
})
);
};
return (
<>
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
<div className="relative flex w-full items-center justify-between rounded-md bg-zinc-600 p-2 px-4">
<label>Fuel ({WASMData.userData.isImperial ? 'lbs' : 'kg'})</label>
<input
type="text"
placeholder=""
className={`w-1/2 rounded-lg border border-white bg-zinc-700 px-3 py-2 text-right`}
value={fuel}
onChange={(e) => handleInput(e.target.value, WASMData.limits.maxFuel, setFuel)}
disabled={loadingState !== 'preview' || GSXActive()}
/>
<button
className="middle none center rounded-lg bg-green-600 px-6 py-3 font-sans text-xs font-bold uppercase text-white shadow-md shadow-green-500/20 transition-all hover:shadow-lg hover:shadow-green-500/40 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none"
data-ripple-light="true"
onClick={() => {
SimVar.SetSimVarValue(
'L:MD11_EFB_PAYLOAD_FUEL',
'lbs',
WASMData.userData.isImperial ? fuel : fuel * 2.20462262185
);
SimVar.SetSimVarValue('L:MD11_EFB_READ_READY', 'bool', true);
setFuelEnabled(WASMData.livePayload.fuel === fuel);
}}
disabled={loadingState !== 'preview' || !fuelEnabled || GSXActive()}
>
Load Fuel
</button>
</div>
</div>
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
<div className="relative flex w-full items-center justify-between rounded-t-md bg-zinc-600 p-2 px-4">
<label>Planned ZFW ({unit})</label>
<label>Planned ZFW ({WASMData.userData.isImperial ? 'lbs' : 'kg'})</label>
<input
type="text"
placeholder=""
@ -177,7 +161,7 @@ const SBEntryPax: FC<StationEntryProps> = ({
/>
</div>
<div className="relative flex w-full items-center justify-between bg-zinc-700 p-2 px-4">
<label>Planned ZFW ({unit})</label>
<label>Planned GW ({WASMData.userData.isImperial ? 'lbs' : 'kg'})</label>
<input
type="text"
placeholder=""
@ -188,22 +172,24 @@ const SBEntryPax: FC<StationEntryProps> = ({
</div>
<div className="relative flex w-full items-center justify-between rounded-b-md bg-zinc-600 p-2 px-4">
<label>
Target ZFWCG ({SharedConfig.CGLimits.min} - {SharedConfig.CGLimits.max})
Target ZFWCG ({WASMData.limits.minCG} - {WASMData.limits.maxCG})
</label>
<CGSelect
value={targetZFWCG}
disabled={loadingState !== 'preview'}
minCG={WASMData.limits.minCG}
maxCG={WASMData.limits.maxCG}
value={CGTarget}
disabled={loadingState !== 'preview' || GSXActive()}
increase={() =>
setTargetZFWCG((prev) => {
setCGTarget((prev) => {
const _new = prev + 0.1;
updateView(PaxConfig.distribute(ZFW, _new, payloadLive.empty, fuelLive, unit, isER));
updateData(_new);
return _new;
})
}
decrease={() =>
setTargetZFWCG((prev) => {
setCGTarget((prev) => {
const _new = prev - 0.1;
updateView(PaxConfig.distribute(ZFW, _new, payloadLive.empty, fuelLive, unit, isER));
updateData(_new);
return _new;
})
}
@ -211,53 +197,24 @@ const SBEntryPax: FC<StationEntryProps> = ({
</div>
</div>
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
<div className="relative flex w-full items-center justify-between rounded-md bg-zinc-600 p-2 px-4">
<label>Fuel ({unit})</label>
<input
type="text"
placeholder=""
className={`w-1/2 rounded-lg border border-white bg-zinc-700 px-3 py-2 text-right`}
value={fuel}
onChange={(e) =>
handleInput(
e.target.value,
isER ? SharedConfig.maxFuel.er[unit] : SharedConfig.maxFuel.norm[unit],
setFuel
)
}
disabled
/>
<button
className="middle none center rounded-lg bg-green-600 px-6 py-3 font-sans text-xs font-bold uppercase text-white shadow-md shadow-green-500/20 transition-all hover:shadow-lg hover:shadow-green-500/40 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none"
data-ripple-light="true"
onClick={() => {
SimVar.SetSimVarValue('L:MD11_EFB_PAYLOAD_FUEL', 'lbs', unit === 'kg' ? fuel * 2.20462262185 : fuel);
SimVar.SetSimVarValue('L:MD11_EFB_READ_READY', 'bool', true);
}}
disabled={loadingState !== 'preview' || SBInFlight}
>
Load Fuel
</button>
</div>
</div>
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
<div className="relative flex w-full items-center justify-between rounded-t-md bg-zinc-600 p-2 px-4">
<label>
{loadingState !== 'loaded' ? 'Expected' : 'Actual'} ZFW ({unit})
{loadingState !== 'loaded' && !GSXActive() ? 'Expected' : 'Actual'} ZFW (
{WASMData.userData.isImperial ? 'lbs' : 'kg'})
</label>
<input
type="text"
placeholder=""
className={`w-1/2 rounded-lg border ${ZFWValid() ? 'border-white' : 'border-red-500 text-red-500'} bg-zinc-700 px-3 py-2 text-right`}
disabled
value={_ZFW()}
value={ZFW()}
/>
</div>
<div className="relative flex w-full items-center justify-between rounded-b-md bg-zinc-700 p-2 px-4">
<label>
{loadingState !== 'loaded' ? 'Expected' : 'Actual'} GW ({unit})
{loadingState !== 'loaded' && !GSXActive() ? 'Expected' : 'Actual'} GW (
{WASMData.userData.isImperial ? 'lbs' : 'kg'})
</label>
<input
type="text"
@ -271,10 +228,9 @@ const SBEntryPax: FC<StationEntryProps> = ({
<ActionBar
loadingState={loadingState}
acceptDisabled={!GWValid() || SBInFlight}
//TODO: Make GSX optional (accepted state for NON GSX)
accept={() => setLoadingState('loaded')}
reject={() => setLoadingState('preview')}
loadDisabled={!GWValid() || SBInFlight}
GSXSync={WASMData.options.GSXSync}
GSXActive={GSXActive()}
importSB={handleSB}
load={() => {
setLoadingState('loaded');
@ -284,7 +240,7 @@ const SBEntryPax: FC<StationEntryProps> = ({
unload={() => {
setLoadingState('preview');
PaxConfig.unload(unit, isER);
unloadAircraft();
}}
/>
</>

View File

@ -1,36 +1,36 @@
import { FC } from 'react';
import { LoadingState } from '../../types/general';
interface ActionBarProps {
loadingState: 'preview' | 'accepted' | 'loaded';
acceptDisabled: boolean;
accept: () => void;
reject: () => void;
loadingState: LoadingState;
loadDisabled: boolean;
GSXSync: boolean;
GSXActive: boolean;
importSB?: () => void;
load: () => void;
unload: () => void;
}
const ActionBar: FC<ActionBarProps> = ({ loadingState, acceptDisabled, accept, reject, importSB, load, unload }) => {
const ActionBar: FC<ActionBarProps> = ({ loadingState, loadDisabled, GSXSync, GSXActive, importSB, load, unload }) => {
return (
<div className="relative flex w-full items-center justify-start gap-x-6">
{loadingState === 'preview' && (
{loadingState === 'preview' && !GSXSync && (
<button
className="middle none center rounded-lg bg-green-600 px-6 py-3 font-sans text-xs font-bold uppercase text-white shadow-md shadow-green-500/20 transition-all hover:shadow-lg hover:shadow-green-500/40 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none"
data-ripple-light="true"
onClick={accept}
disabled={acceptDisabled}
onClick={load}
disabled={loadDisabled}
>
Accept
Load
</button>
)}
{/*TODO: Make GSX optional (accepted state for NON GSX) */}
{loadingState === 'loaded' && (
{loadingState === 'loaded' && !GSXSync && (
<button
className="middle none center rounded-lg bg-red-600 px-6 py-3 font-sans text-xs font-bold uppercase text-white shadow-md shadow-red-500/20 transition-all hover:shadow-lg hover:shadow-red-500/40 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none"
data-ripple-light="true"
onClick={reject}
onClick={unload}
>
Reject
Unload
</button>
)}
@ -41,31 +41,11 @@ const ActionBar: FC<ActionBarProps> = ({ loadingState, acceptDisabled, accept, r
className="middle none center rounded-lg bg-green-600 px-6 py-3 font-sans text-xs font-bold uppercase text-white shadow-md shadow-green-500/20 transition-all hover:shadow-lg hover:shadow-green-500/40 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none"
data-ripple-light="true"
onClick={importSB}
disabled={GSXActive}
>
Import from SimBrief
</button>
)}
{/*TODO: Make GSX optional */}
{/*
{loadingState === 'accepted' && (
<button
className="middle none center rounded-lg bg-green-600 px-6 py-3 font-sans text-xs font-bold uppercase text-white shadow-md shadow-green-500/20 transition-all hover:shadow-lg hover:shadow-green-500/40 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none"
data-ripple-light="true"
onClick={load}
>
Load
</button>
)}
{loadingState === 'loaded' && (
<button
className="middle none center rounded-lg bg-red-600 px-6 py-3 font-sans text-xs font-bold uppercase text-white shadow-md shadow-red-500/20 transition-all hover:shadow-lg hover:shadow-red-500/40 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none"
data-ripple-light="true"
onClick={unload}
>
Unload
</button>
)}
*/}
</div>
);
};

View File

@ -1,92 +0,0 @@
import { FC, useState } from 'react';
import { PayloadFreight } from '../../configs/freighter';
import { initialPayload, SharedConfig } from '../../configs/shared';
import Profile from '../profile/Profile';
import Tabbar from '../tabbar/Tabbar';
interface FreightProps {
isER: boolean;
unit: 'kg' | 'lbs';
OEW: number;
CGs: [number, number];
}
const Freight: FC<FreightProps> = ({ isER, unit, OEW, CGs }) => {
const [selectedTab, setSelectedTab] = useState(0);
const [payload, setPayload] = useState<PayloadFreight>(initialPayload);
const [inPreview, setInPreview] = useState(true);
const upper1 = () => {
return Math.round(payload.upper1Left + payload.upper1Right);
};
const upper2 = () => {
return Math.round(payload.upper2Left + payload.upper2Right);
};
const upper3 = () => {
return Math.round(payload.upper3Left + payload.upper3Right);
};
const upper4 = () => {
return Math.round(payload.upper4Left + payload.upper4Right);
};
const lower1 = () => {
return Math.round(payload.lowerForward);
};
const lower2 = () => {
return Math.round(payload.lowerRear);
};
const _OEW = () => {
return Math.round(OEW + (isER ? SharedConfig.erExtraWeight[unit] * 2 : 1));
};
const crew = () => {
return Math.round(payload.pilot + payload.firstOfficer + payload.engineer);
};
const cgs = (): [string, string] => {
return [CGs[0].toFixed(1), CGs[1].toFixed(1)];
};
return (
<>
<Profile
type="F"
isER={isER}
upper1={`${upper1()}`}
upper2={`${upper2()}`}
upper3={`${upper3()}`}
upper4={`${upper4()}`}
lower1={`${lower1()}`}
lower2={`${lower2()}`}
OEW={`${_OEW()}`}
crew={`${crew()}`}
unit={unit.toUpperCase()}
inPreview={inPreview}
CGs={cgs()}
/>
<Tabbar tabs={['Simbrief', 'ZFW', 'Cargo']} selectedTab={selectedTab} setSelectedTab={setSelectedTab} />
<div className="relative flex w-full items-center justify-start gap-x-6">
<button
className="middle none center rounded-lg bg-green-600 px-6 py-3 font-sans text-xs font-bold uppercase text-white shadow-md shadow-green-500/20 transition-all hover:shadow-lg hover:shadow-green-500/40 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none"
data-ripple-light="true"
onClick={() => {
console.log('TODO: SET PAYLOAD IN SIM');
setInPreview(false);
}}
>
Load
</button>
<button
className="middle none center rounded-lg bg-red-600 px-6 py-3 font-sans text-xs font-bold uppercase text-white shadow-md shadow-red-500/20 transition-all hover:shadow-lg hover:shadow-red-500/40 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none"
data-ripple-light="true"
onClick={() => {
console.log('TODO: CLEAR PAYLOAD IN SIM');
setInPreview(true);
}}
>
Unload
</button>
</div>
</>
);
};
export default Freight;

View File

@ -0,0 +1,128 @@
import { FC, useState } from 'react';
import { GSX_SERVICE_CALLED, GSX_SERVICE_FINISHED } from '../../constants';
import { LoadingState } from '../../types/general';
import { WASMDataF } from '../../types/WASMData';
import Profile from '../profile/Profile';
import SBEntryF from '../SBEntry/SBEntryF';
import StationEntryF from '../stationEntry/StationEntryF';
import Tabbar from '../tabbar/Tabbar';
import ZFWEntryF from '../zfwEntry/ZFWEntryF';
interface FreighterProps {
WASMData: WASMDataF;
username?: string;
}
const Freighter: FC<FreighterProps> = ({ WASMData, username }) => {
const [selectedTab, setSelectedTab] = useState(0);
const [loadingState, setLoadingState] = useState<LoadingState>('preview');
const upper1 = (overrideState: LoadingState = loadingState) => {
if (overrideState !== 'loaded') return Math.round(WASMData.targetPayload.upper1);
return Math.round(WASMData.livePayload.upper1);
};
const upper2 = (overrideState: LoadingState = loadingState) => {
if (overrideState !== 'loaded') return Math.round(WASMData.targetPayload.upper2);
return Math.round(WASMData.livePayload.upper2);
};
const upper3 = (overrideState: LoadingState = loadingState) => {
if (overrideState !== 'loaded') return Math.round(WASMData.targetPayload.upper3);
return Math.round(WASMData.livePayload.upper3);
};
const upper4 = (overrideState: LoadingState = loadingState) => {
if (overrideState !== 'loaded') return Math.round(WASMData.targetPayload.upper4);
return Math.round(WASMData.livePayload.upper4);
};
const lower1 = () => {
if (loadingState !== 'loaded' && !GSXActive()) return Math.round(WASMData.targetPayload.lowerForward);
return Math.round(WASMData.livePayload.lowerForward);
};
const lower2 = () => {
if (loadingState !== 'loaded' && !GSXActive()) return Math.round(WASMData.targetPayload.lowerRear);
return Math.round(WASMData.livePayload.lowerRear);
};
const OEW = () => {
if (loadingState !== 'loaded' && !GSXActive()) return Math.round(WASMData.targetPayload.empty);
return Math.round(WASMData.livePayload.empty);
};
const crew = () => {
if (loadingState !== 'loaded' && !GSXActive()) return Math.round(WASMData.targetPayload.crew);
return Math.round(WASMData.livePayload.crew);
};
const GSXActive = () => {
return (
(WASMData.GSX.boardingState >= GSX_SERVICE_CALLED || WASMData.GSX.deboardingState >= GSX_SERVICE_CALLED) &&
WASMData.GSX.deboardingState !== GSX_SERVICE_FINISHED
);
};
const CGs = (): [string, boolean, string, boolean] => {
if (loadingState !== 'loaded' && !GSXActive()) {
return [
WASMData.targetPayload.ZFWCG.toFixed(1),
WASMData.targetPayload.ZFWCG < WASMData.limits.minCG || WASMData.targetPayload.ZFWCG > WASMData.limits.maxCG,
WASMData.targetPayload.TOCG.toFixed(1),
WASMData.targetPayload.TOCG < WASMData.limits.minCG || WASMData.targetPayload.TOCG > WASMData.limits.maxCG,
];
}
return [
WASMData.livePayload.ZFWCG.toFixed(1),
WASMData.livePayload.ZFWCG < WASMData.limits.minCG || WASMData.livePayload.ZFWCG > WASMData.limits.maxCG,
WASMData.livePayload.TOCG.toFixed(1),
WASMData.livePayload.TOCG < WASMData.limits.minCG || WASMData.livePayload.TOCG > WASMData.limits.maxCG,
];
};
return (
<>
<Profile
type="PAX"
isER={WASMData.userData.isER}
upper1={`${upper1(GSXActive() ? 'loaded' : loadingState)}`}
upper2={`${upper2(GSXActive() ? 'loaded' : loadingState)}`}
upper3={`${upper3(GSXActive() ? 'loaded' : loadingState)}`}
upper4={`${upper4(GSXActive() ? 'loaded' : loadingState)}`}
lower1={`${lower1()}`}
lower2={`${lower2()}`}
OEW={`${OEW()}`}
crew={`${crew()}`}
unit={WASMData.userData.isImperial ? 'LBS' : 'KG'}
inPreview={loadingState !== 'loaded' && !GSXActive()}
CGs={CGs()}
/>
<Tabbar
tabs={
username ? ['Simbrief', 'ZFW', 'Passengers & Cargo', 'Options'] : ['ZFW', 'Passengers & Cargo', 'Options']
}
selectedTab={selectedTab}
setSelectedTab={setSelectedTab}
/>
{username && selectedTab === 0 && (
<SBEntryF
WASMData={WASMData}
loadingState={loadingState}
username={username}
setLoadingState={setLoadingState}
/>
)}
{((username && selectedTab === 1) || (!username && selectedTab === 0)) && (
<ZFWEntryF WASMData={WASMData} loadingState={loadingState} setLoadingState={setLoadingState} />
)}
{((username && selectedTab === 2) || (!username && selectedTab === 1)) && (
<StationEntryF WASMData={WASMData} loadingState={loadingState} setLoadingState={setLoadingState} />
)}
</>
);
};
export default Freighter;

View File

@ -1,167 +1,108 @@
import { FC, useEffect, useState } from 'react';
import { PaxConfig, PayloadPax } from '../../configs/pax';
import { Fuel, initialPayload, SharedConfig } from '../../configs/shared';
import { FC, useState } from 'react';
import { GSX_SERVICE_CALLED, GSX_SERVICE_FINISHED } from '../../constants';
import { LoadingState } from '../../types/general';
import { WASMDataPax } from '../../types/WASMData';
import Profile from '../profile/Profile';
import SBEntryPax from '../SBEntry/SBEntryPax';
import StationEntryPax from '../stationEntry/StationEntryPax';
import Tabbar from '../tabbar/Tabbar';
import ZFWEntryPax from '../ZFWEntry/ZFWEntryPax';
import ZFWEntryPax from '../zfwEntry/ZFWEntryPax';
interface PaxProps {
isER: boolean;
unit: 'kg' | 'lbs';
CGs: [number, number];
payloadLive: PayloadPax;
fuelLive: Fuel;
WASMData: WASMDataPax;
username?: string;
GSXPaxNum: number;
GSXCargoPercent: number;
GSXState: 'boarding' | 'deboarding' | 'idle';
}
const Pax: FC<PaxProps> = ({
isER,
unit,
CGs,
fuelLive,
payloadLive,
username,
GSXPaxNum,
GSXCargoPercent,
GSXState,
}) => {
const Pax: FC<PaxProps> = ({ WASMData, username }) => {
const [selectedTab, setSelectedTab] = useState(0);
const [payload, setPayload] = useState<PayloadPax>(initialPayload);
const [loadingState, setLoadingState] = useState<'preview' | 'accepted' | 'loaded'>('preview');
const [loadingState, setLoadingState] = useState<LoadingState>('preview');
const upper1 = (overrideState: 'preview' | 'accepted' | 'loaded' = loadingState) => {
if (overrideState !== 'loaded')
return PaxConfig.weightToPax(payload.business1Left + payload.business1Center + payload.business1Right, unit);
const upper1 = (overrideState: LoadingState = loadingState) => {
if (overrideState !== 'loaded') return WASMData.targetPayload.business1;
return PaxConfig.weightToPax(
payloadLive.business1Left + payloadLive.business1Center + payloadLive.business1Right,
unit
);
return WASMData.livePayload.business1;
};
const upper2 = (overrideState: 'preview' | 'accepted' | 'loaded' = loadingState) => {
if (overrideState !== 'loaded')
return PaxConfig.weightToPax(payload.business2Left + payload.business2Center + payload.business2Right, unit);
const upper2 = (overrideState: LoadingState = loadingState) => {
if (overrideState !== 'loaded') return WASMData.targetPayload.business2;
return PaxConfig.weightToPax(
payloadLive.business2Left + payloadLive.business2Center + payloadLive.business2Right,
unit
);
return WASMData.livePayload.business2;
};
const upper3 = (overrideState: 'preview' | 'accepted' | 'loaded' = loadingState) => {
if (overrideState !== 'loaded')
return PaxConfig.weightToPax(payload.economy1Left + payload.economy1Center + payload.economy1Right, unit);
const upper3 = (overrideState: LoadingState = loadingState) => {
if (overrideState !== 'loaded') return WASMData.targetPayload.economy1;
return PaxConfig.weightToPax(
payloadLive.economy1Left + payloadLive.economy1Center + payloadLive.economy1Right,
unit
);
return WASMData.livePayload.economy1;
};
const upper4 = (overrideState: 'preview' | 'accepted' | 'loaded' = loadingState) => {
if (overrideState !== 'loaded')
return PaxConfig.weightToPax(payload.economy2Left + payload.economy2Center + payload.economy2Right, unit);
const upper4 = (overrideState: LoadingState = loadingState) => {
if (overrideState !== 'loaded') return WASMData.targetPayload.economy2;
return PaxConfig.weightToPax(
payloadLive.economy2Left + payloadLive.economy2Center + payloadLive.economy2Right,
unit
);
return WASMData.livePayload.economy2;
};
const lower1 = () => {
if (loadingState !== 'loaded') return Math.round(payload.forwardCargo);
if (loadingState !== 'loaded' && !GSXActive()) return Math.round(WASMData.targetPayload.forwardCargo);
return Math.round(payloadLive.forwardCargo);
return Math.round(WASMData.livePayload.forwardCargo);
};
const lower2 = () => {
if (loadingState !== 'loaded') return Math.round(payload.rearCargo);
if (loadingState !== 'loaded' && !GSXActive()) return Math.round(WASMData.targetPayload.rearCargo);
return Math.round(payloadLive.rearCargo);
return Math.round(WASMData.livePayload.rearCargo);
};
const _OEW = () => {
if (loadingState !== 'loaded')
return Math.round(payloadLive.empty + (isER ? SharedConfig.erExtraWeight[unit] * 2 : 1));
const OEW = () => {
if (loadingState !== 'loaded' && !GSXActive()) return Math.round(WASMData.targetPayload.empty);
return Math.round(payloadLive.empty + payloadLive.leftAuxPax + payloadLive.rightAuxPax);
return Math.round(WASMData.livePayload.empty);
};
const crew = () => {
if (loadingState !== 'loaded') return PaxConfig.weights.base[unit].total;
if (loadingState !== 'loaded' && !GSXActive()) return Math.round(WASMData.targetPayload.crew);
return Math.round(
payloadLive.cabinCrewFront +
payloadLive.cabinCrewRear +
payloadLive.pilot +
payloadLive.firstOfficer +
payloadLive.engineer
return Math.round(WASMData.livePayload.crew);
};
const GSXActive = () => {
return (
(WASMData.GSX.boardingState >= GSX_SERVICE_CALLED || WASMData.GSX.deboardingState >= GSX_SERVICE_CALLED) &&
WASMData.GSX.deboardingState !== GSX_SERVICE_FINISHED
);
};
const _CGs = (): [string, boolean, string, boolean] => {
if (loadingState !== 'loaded') {
const __CGs = PaxConfig.calculateCGs(
{
...payload,
empty: payloadLive.empty,
cabinCrewFront: PaxConfig.weights.base[unit].cabinCrewFront,
cabinCrewRear: PaxConfig.weights.base[unit].cabinCrewRear,
pilot: PaxConfig.weights.base[unit].pilot,
firstOfficer: PaxConfig.weights.base[unit].firstOfficer,
engineer: PaxConfig.weights.base[unit].engineer,
leftAuxPax: isER ? SharedConfig.erExtraWeight[unit] : 0,
rightAuxPax: isER ? SharedConfig.erExtraWeight[unit] : 0,
},
fuelLive
);
const CGs = (): [string, boolean, string, boolean] => {
if (loadingState !== 'loaded' && !GSXActive()) {
return [
__CGs[0].toFixed(1),
__CGs[0] < SharedConfig.CGLimits.min || __CGs[0] > SharedConfig.CGLimits.max,
__CGs[1].toFixed(1),
__CGs[1] < SharedConfig.CGLimits.min || __CGs[1] > SharedConfig.CGLimits.max,
WASMData.targetPayload.ZFWCG.toFixed(1),
WASMData.targetPayload.ZFWCG < WASMData.limits.minCG || WASMData.targetPayload.ZFWCG > WASMData.limits.maxCG,
WASMData.targetPayload.TOCG.toFixed(1),
WASMData.targetPayload.TOCG < WASMData.limits.minCG || WASMData.targetPayload.TOCG > WASMData.limits.maxCG,
];
}
return [
CGs[0].toFixed(1),
CGs[0] < SharedConfig.CGLimits.min || CGs[0] > SharedConfig.CGLimits.max,
CGs[1].toFixed(1),
CGs[1] < SharedConfig.CGLimits.min || CGs[1] > SharedConfig.CGLimits.max,
WASMData.livePayload.ZFWCG.toFixed(1),
WASMData.livePayload.ZFWCG < WASMData.limits.minCG || WASMData.livePayload.ZFWCG > WASMData.limits.maxCG,
WASMData.livePayload.TOCG.toFixed(1),
WASMData.livePayload.TOCG < WASMData.limits.minCG || WASMData.livePayload.TOCG > WASMData.limits.maxCG,
];
};
//TODO: Make GSX optional
useEffect(() => {
if (GSXState === 'idle') return;
PaxConfig.setWeightsProgressive(
payload,
GSXState === 'boarding' ? GSXPaxNum : payload.paxCount.total - GSXPaxNum,
GSXCargoPercent,
unit
);
}, [GSXPaxNum, GSXCargoPercent, GSXState]);
return (
<>
<Profile
type="PAX"
isER={isER}
upper1={`${upper1()}`}
upper1max={loadingState === 'loaded' ? `${upper1('preview')}` : `${PaxConfig.stationMax.business1}`}
upper2={`${upper2()}`}
upper2max={loadingState === 'loaded' ? `${upper2('preview')}` : `${PaxConfig.stationMax.business2}`}
upper3={`${upper3()}`}
upper3max={loadingState === 'loaded' ? `${upper3('preview')}` : `${PaxConfig.stationMax.economy1}`}
upper4={`${upper4()}`}
upper4max={loadingState === 'loaded' ? `${upper4('preview')}` : `${PaxConfig.stationMax.economy2}`}
isER={WASMData.userData.isER}
upper1={`${upper1(GSXActive() ? 'loaded' : loadingState)}`}
upper1max={loadingState === 'loaded' || GSXActive() ? `${upper1('preview')}` : `${WASMData.limits.business1}`}
upper2={`${upper2(GSXActive() ? 'loaded' : loadingState)}`}
upper2max={loadingState === 'loaded' || GSXActive() ? `${upper2('preview')}` : `${WASMData.limits.business2}`}
upper3={`${upper3(GSXActive() ? 'loaded' : loadingState)}`}
upper3max={loadingState === 'loaded' || GSXActive() ? `${upper3('preview')}` : `${WASMData.limits.economy1}`}
upper4={`${upper4(GSXActive() ? 'loaded' : loadingState)}`}
upper4max={loadingState === 'loaded' || GSXActive() ? `${upper4('preview')}` : `${WASMData.limits.economy2}`}
lower1={`${lower1()}`}
lower2={`${lower2()}`}
OEW={`${_OEW()}`}
OEW={`${OEW()}`}
crew={`${crew()}`}
unit={unit.toUpperCase()}
inPreview={loadingState !== 'loaded'}
CGs={_CGs()}
unit={WASMData.userData.isImperial ? 'LBS' : 'KG'}
inPreview={loadingState !== 'loaded' && !GSXActive()}
CGs={CGs()}
/>
<Tabbar
tabs={
@ -170,63 +111,19 @@ const Pax: FC<PaxProps> = ({
selectedTab={selectedTab}
setSelectedTab={setSelectedTab}
/>
{username && selectedTab === 0 && (
<SBEntryPax
unit={unit}
isER={isER}
initialPayload={payload}
fuelLive={fuelLive}
payloadLive={payloadLive}
WASMData={WASMData}
loadingState={loadingState}
username={username}
setLoadingState={setLoadingState}
updateView={(_payload) => {
setPayload(_payload);
}}
loadAircraft={() => {
PaxConfig.setBaseWeight(unit, isER);
PaxConfig.setWeights(payload, unit);
}}
/>
)}
{((username && selectedTab === 1) || (!username && selectedTab === 0)) && (
<ZFWEntryPax
unit={unit}
isER={isER}
initialPayload={payload}
fuelLive={fuelLive}
payloadLive={payloadLive}
loadingState={loadingState}
setLoadingState={setLoadingState}
updateView={(_payload) => {
setPayload(_payload);
}}
loadAircraft={() => {
PaxConfig.setBaseWeight(unit, isER);
PaxConfig.setWeights(payload, unit);
}}
/>
<ZFWEntryPax WASMData={WASMData} loadingState={loadingState} setLoadingState={setLoadingState} />
)}
{((username && selectedTab === 2) || (!username && selectedTab === 1)) && (
<StationEntryPax
unit={unit}
isER={isER}
initialPayload={payload}
fuelLive={fuelLive}
payloadLive={payloadLive}
loadingState={loadingState}
setLoadingState={setLoadingState}
updateView={(_payload) => {
setPayload(_payload);
}}
loadAircraft={() => {
PaxConfig.setBaseWeight(unit, isER);
PaxConfig.setWeights(payload, unit);
}}
/>
<StationEntryPax WASMData={WASMData} loadingState={loadingState} setLoadingState={setLoadingState} />
)}
</>
);

View File

@ -0,0 +1,244 @@
import { FC, useEffect, useState } from 'react';
import {
COHERENT_COMM_BUS_WASM_CALL,
COMM_BUS_UPDATE_TARGET_EVENT,
GSX_SERVICE_CALLED,
GSX_SERVICE_FINISHED,
} from '../../constants';
import { LoadingState } from '../../types/general';
import { WASMDataF } from '../../types/WASMData';
import { inRangeOf, loadAircraft, unloadAircraft } from '../../utils/utils';
import ActionBar from '../actionbar/ActionBar';
interface StationEntryProps {
WASMData: WASMDataF;
loadingState: LoadingState;
setLoadingState: (newState: LoadingState) => void;
}
const StationEntryF: FC<StationEntryProps> = ({ WASMData, loadingState, setLoadingState }) => {
const [upper1, setUpper1] = useState(WASMData.targetPayload.upper1);
const [upper2, setUpper2] = useState(WASMData.targetPayload.upper2);
const [upper3, setUpper3] = useState(WASMData.targetPayload.upper3);
const [upper4, setUpper4] = useState(WASMData.targetPayload.upper4);
const [lowerForward, setLowerForward] = useState(WASMData.targetPayload.lowerForward);
const [lowerRear, setLowerRear] = useState(WASMData.targetPayload.lowerRear);
const [fuel, setFuel] = useState(Math.round(WASMData.livePayload.fuel));
const [fuelEnabled, setFuelEnabled] = useState(true);
const ZFW = () => {
if (loadingState !== 'loaded' && !GSXActive()) return Math.round(WASMData.targetPayload.total);
return Math.round(WASMData.livePayload.total);
};
const ZFWValid = () => {
return ZFW() <= WASMData.limits.maxZFW;
};
const GW = () => {
return fuel + ZFW();
};
const GWValid = () => {
return GW() <= WASMData.limits.maxTOW;
};
const GSXActive = () => {
return (
(WASMData.GSX.boardingState >= GSX_SERVICE_CALLED || WASMData.GSX.deboardingState >= GSX_SERVICE_CALLED) &&
WASMData.GSX.deboardingState !== GSX_SERVICE_FINISHED
);
};
const handleInput = (input: string, maxValue: number, setter: (value: number) => void) => {
if (!input) {
setter(0);
return;
}
const converted = parseInt(input);
if (converted) {
if (converted < 0) setter(0);
else if (converted > maxValue) setter(maxValue);
else setter(converted);
}
};
useEffect(() => updateData(), [upper1, upper2, upper3, upper4, lowerForward, lowerRear]);
useEffect(
() =>
setFuel((prev) => {
if (prev > WASMData.limits.maxFuel) return WASMData.limits.maxFuel;
return prev;
}),
[WASMData.userData.isER]
);
useEffect(() => {
setFuelEnabled(inRangeOf(Math.round(WASMData.livePayload.fuel), fuel));
}, [WASMData.livePayload.fuel]);
const updateData = () => {
Coherent.call(
COHERENT_COMM_BUS_WASM_CALL,
COMM_BUS_UPDATE_TARGET_EVENT,
JSON.stringify({
mode: 2,
business1: upper1,
business2: upper2,
economy1: upper3,
economy2: upper4,
forwardCargo: lowerForward,
rearCargo: lowerRear,
})
);
};
return (
<>
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
<div className="relative flex w-full items-center justify-between rounded-md bg-zinc-600 p-2 px-4">
<label>Fuel ({WASMData.userData.isImperial ? 'lbs' : 'kg'})</label>
<input
type="text"
placeholder=""
className={`w-1/2 rounded-lg border border-white bg-zinc-700 px-3 py-2 text-right`}
value={fuel}
onChange={(e) => handleInput(e.target.value, WASMData.limits.maxFuel, setFuel)}
disabled={loadingState !== 'preview' || GSXActive()}
/>
<button
className="middle none center rounded-lg bg-green-600 px-6 py-3 font-sans text-xs font-bold uppercase text-white shadow-md shadow-green-500/20 transition-all hover:shadow-lg hover:shadow-green-500/40 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none"
data-ripple-light="true"
onClick={() => {
SimVar.SetSimVarValue(
'L:MD11_EFB_PAYLOAD_FUEL',
'lbs',
WASMData.userData.isImperial ? fuel : fuel * 2.20462262185
);
SimVar.SetSimVarValue('L:MD11_EFB_READ_READY', 'bool', true);
setFuelEnabled(WASMData.livePayload.fuel === fuel);
}}
disabled={loadingState !== 'preview' || !fuelEnabled || GSXActive()}
>
Load Fuel
</button>
</div>
</div>
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
<div className="relative flex w-full items-center justify-between rounded-t-md bg-zinc-600 p-2 px-4">
<label>Upper 1</label>
<input
type="text"
placeholder=""
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={upper1}
onChange={(e) => handleInput(e.target.value, WASMData.limits.upper1, setUpper1)}
disabled={loadingState !== 'preview' || GSXActive()}
/>
</div>
<div className="relative flex w-full items-center justify-between bg-zinc-700 p-2 px-4">
<label>Upper 2</label>
<input
type="text"
placeholder=""
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={upper2}
onChange={(e) => handleInput(e.target.value, WASMData.limits.upper2, setUpper2)}
disabled={loadingState !== 'preview' || GSXActive()}
/>
</div>
<div className="relative flex w-full items-center justify-between bg-zinc-600 p-2 px-4">
<label>Upper 3</label>
<input
type="text"
placeholder=""
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={upper3}
onChange={(e) => handleInput(e.target.value, WASMData.limits.upper3, setUpper3)}
disabled={loadingState !== 'preview' || GSXActive()}
/>
</div>
<div className="relative flex w-full items-center justify-between bg-zinc-700 p-2 px-4">
<label>Upper 4</label>
<input
type="text"
placeholder=""
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={upper4}
onChange={(e) => handleInput(e.target.value, WASMData.limits.upper4, setUpper4)}
disabled={loadingState !== 'preview' || GSXActive()}
/>
</div>
<div className="relative flex w-full items-center justify-between bg-zinc-600 p-2 px-4">
<label>Forward Cargo ({WASMData.userData.isImperial ? 'lbs' : 'kg'})</label>
<input
type="text"
placeholder=""
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={lowerForward}
onChange={(e) => handleInput(e.target.value, WASMData.limits.lowerForward, setLowerForward)}
disabled={loadingState !== 'preview' || GSXActive()}
/>
</div>
<div className="relative flex w-full items-center justify-between rounded-b-md bg-zinc-700 p-2 px-4">
<label>Aft Cargo ({WASMData.userData.isImperial ? 'lbs' : 'kg'})</label>
<input
type="text"
placeholder=""
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={lowerRear}
onChange={(e) => handleInput(e.target.value, WASMData.limits.lowerRear, setLowerRear)}
disabled={loadingState !== 'preview' || GSXActive()}
/>
</div>
</div>
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
<div className="relative flex w-full items-center justify-between rounded-t-md bg-zinc-600 p-2 px-4">
<label>
{loadingState !== 'loaded' && !GSXActive() ? 'Expected' : 'Actual'} ZFW (
{WASMData.userData.isImperial ? 'lbs' : 'kg'})
</label>
<input
type="text"
placeholder=""
className={`w-1/2 rounded-lg border ${ZFWValid() ? 'border-white' : 'border-red-500 text-red-500'} bg-zinc-700 px-3 py-2 text-right`}
disabled
value={ZFW()}
/>
</div>
<div className="relative flex w-full items-center justify-between rounded-b-md bg-zinc-700 p-2 px-4">
<label>
{loadingState !== 'loaded' && !GSXActive() ? 'Expected' : 'Actual'} GW (
{WASMData.userData.isImperial ? 'lbs' : 'kg'})
</label>
<input
type="text"
placeholder=""
className={`w-1/2 rounded-lg border ${GWValid() ? 'border-white' : 'border-red-500 text-red-500'} bg-zinc-700 px-3 py-2 text-right`}
disabled
value={GW()}
/>
</div>
</div>
<ActionBar
loadingState={loadingState}
loadDisabled={!ZFWValid() || !GWValid()}
GSXSync={WASMData.options.GSXSync}
GSXActive={GSXActive()}
load={() => {
setLoadingState('loaded');
loadAircraft();
}}
unload={() => {
setLoadingState('preview');
unloadAircraft();
}}
/>
</>
);
};
export default StationEntryF;

View File

@ -1,117 +1,51 @@
import { FC, useEffect, useState } from 'react';
import { PaxConfig, PayloadPax } from '../../configs/pax';
import { Fuel, SharedConfig } from '../../configs/shared';
import {
COHERENT_COMM_BUS_WASM_CALL,
COMM_BUS_UPDATE_TARGET_EVENT,
GSX_SERVICE_CALLED,
GSX_SERVICE_FINISHED,
} from '../../constants';
import { LoadingState } from '../../types/general';
import { WASMDataPax } from '../../types/WASMData';
import { inRangeOf, loadAircraft, unloadAircraft } from '../../utils/utils';
import ActionBar from '../actionbar/ActionBar';
interface StationEntryProps {
unit: 'kg' | 'lbs';
isER: boolean;
initialPayload: PayloadPax;
fuelLive: Fuel;
payloadLive: PayloadPax;
loadingState: 'preview' | 'accepted' | 'loaded';
setLoadingState: (newState: StationEntryProps['loadingState']) => void;
updateView: (payload: PayloadPax) => void;
loadAircraft: () => void;
WASMData: WASMDataPax;
loadingState: LoadingState;
setLoadingState: (newState: LoadingState) => void;
}
const StationEntryPax: FC<StationEntryProps> = ({
unit,
isER,
initialPayload,
fuelLive,
payloadLive,
loadingState,
setLoadingState,
updateView,
loadAircraft,
}) => {
const [business1, setBusiness1] = useState(
PaxConfig.weightToPax(
initialPayload.business1Left + initialPayload.business1Center + initialPayload.business1Right,
unit
)
);
const [business2, setBusiness2] = useState(
PaxConfig.weightToPax(
initialPayload.business2Left + initialPayload.business2Center + initialPayload.business2Right,
unit
)
);
const [economy1, setEconomy1] = useState(
PaxConfig.weightToPax(
initialPayload.economy1Left + initialPayload.economy1Center + initialPayload.economy1Right,
unit
)
);
const [economy2, setEconomy2] = useState(
PaxConfig.weightToPax(
initialPayload.economy2Left + initialPayload.economy2Center + initialPayload.economy2Right,
unit
)
);
const [forwardCargo, setForwardCargo] = useState(initialPayload.forwardCargo);
const [rearCargo, setRearCargo] = useState(initialPayload.rearCargo);
const [fuel, setFuel] = useState(
Math.round(
fuelLive.main1 +
fuelLive.main1Tip +
fuelLive.main2 +
fuelLive.main3 +
fuelLive.main3Tip +
fuelLive.upperAux +
fuelLive.lowerAux +
fuelLive.tail +
fuelLive.forwardAux1 +
fuelLive.forwardAux2
)
);
const StationEntryPax: FC<StationEntryProps> = ({ WASMData, loadingState, setLoadingState }) => {
const [business1, setBusiness1] = useState(WASMData.targetPayload.business1);
const [business2, setBusiness2] = useState(WASMData.targetPayload.business2);
const [economy1, setEconomy1] = useState(WASMData.targetPayload.economy1);
const [economy2, setEconomy2] = useState(WASMData.targetPayload.economy2);
const [forwardCargo, setForwardCargo] = useState(WASMData.targetPayload.forwardCargo);
const [rearCargo, setRearCargo] = useState(WASMData.targetPayload.rearCargo);
const [fuel, setFuel] = useState(Math.round(WASMData.livePayload.fuel));
const [fuelEnabled, setFuelEnabled] = useState(true);
const ZFW = () => {
if (loadingState !== 'loaded')
return Math.round(
(business1 + business2 + economy1 + economy2) * PaxConfig.weights.pax[unit] +
forwardCargo +
rearCargo +
PaxConfig.weights.base[unit].total +
(isER ? SharedConfig.erExtraWeight[unit] * 2 : 0) +
payloadLive.empty
);
if (loadingState !== 'loaded' && !GSXActive()) return Math.round(WASMData.targetPayload.total);
return Math.round(
payloadLive.empty +
payloadLive.pilot +
payloadLive.firstOfficer +
payloadLive.engineer +
payloadLive.cabinCrewFront +
payloadLive.business1Left +
payloadLive.business1Center +
payloadLive.business1Right +
payloadLive.business2Left +
payloadLive.business2Center +
payloadLive.business2Right +
payloadLive.economy1Left +
payloadLive.economy1Center +
payloadLive.economy1Right +
payloadLive.economy2Left +
payloadLive.economy2Center +
payloadLive.economy2Right +
payloadLive.cabinCrewRear +
payloadLive.forwardCargo +
payloadLive.rearCargo +
payloadLive.leftAuxPax +
payloadLive.rightAuxPax
);
return Math.round(WASMData.livePayload.total);
};
const ZFWValid = () => {
return ZFW() <= PaxConfig.maxZWF[unit];
return ZFW() <= WASMData.limits.maxZFW;
};
const GW = () => {
return fuel + ZFW();
};
const GWValid = () => {
return GW() <= (isER ? SharedConfig.maxTOW.er[unit] : SharedConfig.maxTOW.norm[unit]);
return GW() <= WASMData.limits.maxTOW;
};
const GSXActive = () => {
return (
(WASMData.GSX.boardingState >= GSX_SERVICE_CALLED || WASMData.GSX.deboardingState >= GSX_SERVICE_CALLED) &&
WASMData.GSX.deboardingState !== GSX_SERVICE_FINISHED
);
};
const handleInput = (input: string, maxValue: number, setter: (value: number) => void) => {
@ -128,37 +62,67 @@ const StationEntryPax: FC<StationEntryProps> = ({
}
};
useEffect(() => _updateView(), [business1, business2, economy1, economy2, forwardCargo, rearCargo]);
useEffect(() => updateData(), [business1, business2, economy1, economy2, forwardCargo, rearCargo]);
useEffect(
() =>
setFuel((prev) =>
prev > (isER ? SharedConfig.maxFuel.er[unit] : SharedConfig.maxFuel.norm[unit])
? isER
? SharedConfig.maxFuel.er[unit]
: SharedConfig.maxFuel.norm[unit]
: prev
),
[isER]
setFuel((prev) => {
if (prev > WASMData.limits.maxFuel) return WASMData.limits.maxFuel;
return prev;
}),
[WASMData.userData.isER]
);
useEffect(() => {
setFuelEnabled(inRangeOf(Math.round(WASMData.livePayload.fuel), fuel));
}, [WASMData.livePayload.fuel]);
const _updateView = () => {
const payload = PaxConfig.generateDistribution(
payloadLive.empty,
const updateData = () => {
Coherent.call(
COHERENT_COMM_BUS_WASM_CALL,
COMM_BUS_UPDATE_TARGET_EVENT,
JSON.stringify({
mode: 2,
business1,
business2,
economy1,
economy2,
forwardCargo,
rearCargo,
unit,
isER
})
);
updateView(payload);
};
return (
<>
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
<div className="relative flex w-full items-center justify-between rounded-md bg-zinc-600 p-2 px-4">
<label>Fuel ({WASMData.userData.isImperial ? 'lbs' : 'kg'})</label>
<input
type="text"
placeholder=""
className={`w-1/2 rounded-lg border border-white bg-zinc-700 px-3 py-2 text-right`}
value={fuel}
onChange={(e) => handleInput(e.target.value, WASMData.limits.maxFuel, setFuel)}
disabled={loadingState !== 'preview' || GSXActive()}
/>
<button
className="middle none center rounded-lg bg-green-600 px-6 py-3 font-sans text-xs font-bold uppercase text-white shadow-md shadow-green-500/20 transition-all hover:shadow-lg hover:shadow-green-500/40 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none"
data-ripple-light="true"
onClick={() => {
SimVar.SetSimVarValue(
'L:MD11_EFB_PAYLOAD_FUEL',
'lbs',
WASMData.userData.isImperial ? fuel : fuel * 2.20462262185
);
SimVar.SetSimVarValue('L:MD11_EFB_READ_READY', 'bool', true);
setFuelEnabled(WASMData.livePayload.fuel === fuel);
}}
disabled={loadingState !== 'preview' || !fuelEnabled || GSXActive()}
>
Load Fuel
</button>
</div>
</div>
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
<div className="relative flex w-full items-center justify-between rounded-t-md bg-zinc-600 p-2 px-4">
<label>Business</label>
@ -167,8 +131,8 @@ const StationEntryPax: FC<StationEntryProps> = ({
placeholder=""
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={business1}
onChange={(e) => handleInput(e.target.value, PaxConfig.stationMax.business1, setBusiness1)}
disabled={loadingState !== 'preview'}
onChange={(e) => handleInput(e.target.value, WASMData.limits.business1, setBusiness1)}
disabled={loadingState !== 'preview' || GSXActive()}
/>
</div>
<div className="relative flex w-full items-center justify-between bg-zinc-700 p-2 px-4">
@ -178,8 +142,8 @@ const StationEntryPax: FC<StationEntryProps> = ({
placeholder=""
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={business2}
onChange={(e) => handleInput(e.target.value, PaxConfig.stationMax.business2, setBusiness2)}
disabled={loadingState !== 'preview'}
onChange={(e) => handleInput(e.target.value, WASMData.limits.business2, setBusiness2)}
disabled={loadingState !== 'preview' || GSXActive()}
/>
</div>
<div className="relative flex w-full items-center justify-between bg-zinc-600 p-2 px-4">
@ -189,8 +153,8 @@ const StationEntryPax: FC<StationEntryProps> = ({
placeholder=""
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={economy1}
onChange={(e) => handleInput(e.target.value, PaxConfig.stationMax.economy1, setEconomy1)}
disabled={loadingState !== 'preview'}
onChange={(e) => handleInput(e.target.value, WASMData.limits.economy1, setEconomy1)}
disabled={loadingState !== 'preview' || GSXActive()}
/>
</div>
<div className="relative flex w-full items-center justify-between bg-zinc-700 p-2 px-4">
@ -200,69 +164,39 @@ const StationEntryPax: FC<StationEntryProps> = ({
placeholder=""
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={economy2}
onChange={(e) => handleInput(e.target.value, PaxConfig.stationMax.economy2, setEconomy2)}
disabled={loadingState !== 'preview'}
onChange={(e) => handleInput(e.target.value, WASMData.limits.economy2, setEconomy2)}
disabled={loadingState !== 'preview' || GSXActive()}
/>
</div>
<div className="relative flex w-full items-center justify-between bg-zinc-600 p-2 px-4">
<label>Forward Cargo ({unit})</label>
<label>Forward Cargo ({WASMData.userData.isImperial ? 'lbs' : 'kg'})</label>
<input
type="text"
placeholder=""
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={forwardCargo}
onChange={(e) => handleInput(e.target.value, SharedConfig.stationMax.forward[unit], setForwardCargo)}
disabled={loadingState !== 'preview'}
onChange={(e) => handleInput(e.target.value, WASMData.limits.forwardCargo, setForwardCargo)}
disabled={loadingState !== 'preview' || GSXActive()}
/>
</div>
<div className="relative flex w-full items-center justify-between rounded-b-md bg-zinc-700 p-2 px-4">
<label>Aft Cargo ({unit})</label>
<label>Aft Cargo ({WASMData.userData.isImperial ? 'lbs' : 'kg'})</label>
<input
type="text"
placeholder=""
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={rearCargo}
onChange={(e) => handleInput(e.target.value, SharedConfig.stationMax.rear[unit], setRearCargo)}
disabled={loadingState !== 'preview'}
onChange={(e) => handleInput(e.target.value, WASMData.limits.rearCargo, setRearCargo)}
disabled={loadingState !== 'preview' || GSXActive()}
/>
</div>
</div>
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
<div className="relative flex w-full items-center justify-between rounded-md bg-zinc-600 p-2 px-4">
<label>Fuel ({unit})</label>
<input
type="text"
placeholder=""
className={`w-1/2 rounded-lg border border-white bg-zinc-700 px-3 py-2 text-right`}
value={fuel}
onChange={(e) =>
handleInput(
e.target.value,
isER ? SharedConfig.maxFuel.er[unit] : SharedConfig.maxFuel.norm[unit],
setFuel
)
}
disabled={loadingState !== 'preview'}
/>
<button
className="middle none center rounded-lg bg-green-600 px-6 py-3 font-sans text-xs font-bold uppercase text-white shadow-md shadow-green-500/20 transition-all hover:shadow-lg hover:shadow-green-500/40 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none"
data-ripple-light="true"
onClick={() => {
SimVar.SetSimVarValue('L:MD11_EFB_PAYLOAD_FUEL', 'lbs', unit === 'kg' ? fuel * 2.20462262185 : fuel);
SimVar.SetSimVarValue('L:MD11_EFB_READ_READY', 'bool', true);
}}
disabled={loadingState !== 'preview'}
>
Load Fuel
</button>
</div>
</div>
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
<div className="relative flex w-full items-center justify-between rounded-t-md bg-zinc-600 p-2 px-4">
<label>
{loadingState !== 'loaded' ? 'Expected' : 'Actual'} ZFW ({unit})
{loadingState !== 'loaded' && !GSXActive() ? 'Expected' : 'Actual'} ZFW (
{WASMData.userData.isImperial ? 'lbs' : 'kg'})
</label>
<input
type="text"
@ -274,7 +208,8 @@ const StationEntryPax: FC<StationEntryProps> = ({
</div>
<div className="relative flex w-full items-center justify-between rounded-b-md bg-zinc-700 p-2 px-4">
<label>
{loadingState !== 'loaded' ? 'Expected' : 'Actual'} GW ({unit})
{loadingState !== 'loaded' && !GSXActive() ? 'Expected' : 'Actual'} GW (
{WASMData.userData.isImperial ? 'lbs' : 'kg'})
</label>
<input
type="text"
@ -288,9 +223,9 @@ const StationEntryPax: FC<StationEntryProps> = ({
<ActionBar
loadingState={loadingState}
acceptDisabled={!ZFWValid() || !GWValid()}
accept={() => setLoadingState('accepted')}
reject={() => setLoadingState('preview')}
loadDisabled={!ZFWValid() || !GWValid()}
GSXSync={WASMData.options.GSXSync}
GSXActive={GSXActive()}
load={() => {
setLoadingState('loaded');
@ -299,7 +234,7 @@ const StationEntryPax: FC<StationEntryProps> = ({
unload={() => {
setLoadingState('preview');
PaxConfig.unload(unit, isER);
unloadAircraft();
}}
/>
</>

View File

@ -0,0 +1,234 @@
import { FC, useEffect, useState } from 'react';
import {
COHERENT_COMM_BUS_WASM_CALL,
COMM_BUS_UPDATE_TARGET_EVENT,
GSX_SERVICE_CALLED,
GSX_SERVICE_FINISHED,
} from '../../constants';
import { WASMDataF } from '../../types/WASMData';
import { LoadingState } from '../../types/general';
import { inRangeOf, loadAircraft, unloadAircraft } from '../../utils/utils';
import CGSelect from '../CGSelect/CGSelect';
import ActionBar from '../actionbar/ActionBar';
interface ZFWEntryProps {
WASMData: WASMDataF;
loadingState: LoadingState;
setLoadingState: (newState: LoadingState) => void;
}
const ZFWEntryF: FC<ZFWEntryProps> = ({ WASMData, loadingState, setLoadingState }) => {
const [CGTarget, setCGTarget] = useState(WASMData.targetPayload.CGTarget);
const [fuel, setFuel] = useState(Math.round(WASMData.livePayload.fuel));
const [ZFWTarget, setZFWTarget] = useState(Math.round(WASMData.targetPayload.total));
const [fuelEnabled, setFuelEnabled] = useState(true);
const ZFW = () => {
if (loadingState !== 'loaded' && !GSXActive()) return ZFWTarget;
return Math.round(WASMData.livePayload.total);
};
const ZFWValid = () => {
return ZFW() <= WASMData.limits.maxZFW;
};
const GW = () => {
return fuel + ZFW();
};
const GWValid = () => {
return GW() <= WASMData.limits.maxTOW;
};
const GSXActive = () => {
return (
(WASMData.GSX.boardingState >= GSX_SERVICE_CALLED || WASMData.GSX.deboardingState >= GSX_SERVICE_CALLED) &&
WASMData.GSX.deboardingState !== GSX_SERVICE_FINISHED
);
};
const handleInput = (input: string, maxValue: number, setter: (value: number) => void) => {
if (!input) {
setter(0);
return;
}
const converted = parseInt(input);
if (converted) {
if (converted < 0) setter(0);
else if (converted > maxValue) setter(maxValue);
else setter(converted);
}
};
const handleInputZFW = (input: string) => {
if (!input) return;
const converted = parseInt(input);
if (converted) {
if (converted < 0) setZFWTarget(Math.round(WASMData.targetPayload.empty + WASMData.targetPayload.crew));
else if (converted > WASMData.limits.maxZFW) setZFWTarget(WASMData.limits.maxZFW);
else setZFWTarget(converted);
}
};
const handleBlur = (input: string) => {
const minZFW = Math.round(WASMData.targetPayload.empty + WASMData.targetPayload.crew);
if (!input) {
setZFWTarget(minZFW);
return;
}
const converted = parseInt(input);
if (converted) {
if (converted < minZFW) setZFWTarget(minZFW);
else if (converted > WASMData.limits.maxZFW) setZFWTarget(WASMData.limits.maxZFW);
else setZFWTarget(converted);
}
updateData(converted);
};
useEffect(
() =>
setFuel((prev) => {
if (prev > WASMData.limits.maxFuel) return WASMData.limits.maxFuel;
return prev;
}),
[WASMData.userData.isER]
);
useEffect(() => {
setFuelEnabled(inRangeOf(Math.round(WASMData.livePayload.fuel), fuel));
}, [WASMData.livePayload.fuel]);
const updateData = (_ZFWTarget?: number, _CGTarget?: number) => {
Coherent.call(
COHERENT_COMM_BUS_WASM_CALL,
COMM_BUS_UPDATE_TARGET_EVENT,
JSON.stringify({
mode: 1,
ZFWTarget: _ZFWTarget ?? ZFWTarget,
CGTarget: _CGTarget ?? CGTarget,
})
);
};
return (
<>
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
<div className="relative flex w-full items-center justify-between rounded-md bg-zinc-600 p-2 px-4">
<label>Fuel ({WASMData.userData.isImperial ? 'lbs' : 'kg'})</label>
<input
type="text"
placeholder=""
className={`w-1/2 rounded-lg border border-white bg-zinc-700 px-3 py-2 text-right`}
value={fuel}
onChange={(e) => handleInput(e.target.value, WASMData.limits.maxFuel, setFuel)}
disabled={loadingState !== 'preview' || GSXActive()}
/>
<button
className="middle none center rounded-lg bg-green-600 px-6 py-3 font-sans text-xs font-bold uppercase text-white shadow-md shadow-green-500/20 transition-all hover:shadow-lg hover:shadow-green-500/40 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none"
data-ripple-light="true"
onClick={() => {
SimVar.SetSimVarValue(
'L:MD11_EFB_PAYLOAD_FUEL',
'lbs',
WASMData.userData.isImperial ? fuel : fuel * 2.20462262185
);
SimVar.SetSimVarValue('L:MD11_EFB_READ_READY', 'bool', true);
setFuelEnabled(WASMData.livePayload.fuel === fuel);
}}
disabled={loadingState !== 'preview' || !fuelEnabled || GSXActive()}
>
Load Fuel
</button>
</div>
</div>
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
<div className="relative flex w-full items-center justify-between rounded-t-md bg-zinc-600 p-2 px-4">
<label>Target ZFW ({WASMData.userData.isImperial ? 'lbs' : 'kg'})</label>
<input
type="text"
placeholder=""
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={ZFWTarget}
onChange={(e) => handleInputZFW(e.target.value)}
onBlur={(e) => handleBlur(e.target.value)}
disabled={loadingState !== 'preview' || GSXActive()}
/>
</div>
<div className="relative flex w-full items-center justify-between rounded-b-md bg-zinc-700 p-2 px-4">
<label>
Target ZFWCG ({WASMData.limits.minCG} - {WASMData.limits.maxCG})
</label>
<CGSelect
minCG={WASMData.limits.minCG}
maxCG={WASMData.limits.maxCG}
value={CGTarget}
disabled={loadingState !== 'preview' || GSXActive()}
increase={() =>
setCGTarget((prev) => {
const _new = prev + 0.1;
updateData(undefined, _new);
return _new;
})
}
decrease={() =>
setCGTarget((prev) => {
const _new = prev - 0.1;
updateData(undefined, _new);
return _new;
})
}
/>
</div>
</div>
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
<div className="relative flex w-full items-center justify-between rounded-t-md bg-zinc-600 p-2 px-4">
<label>
{loadingState !== 'loaded' && !GSXActive() ? 'Expected' : 'Actual'} ZFW (
{WASMData.userData.isImperial ? 'lbs' : 'kg'})
</label>
<input
type="text"
placeholder=""
className={`w-1/2 rounded-lg border ${ZFWValid() ? 'border-white' : 'border-red-500 text-red-500'} bg-zinc-700 px-3 py-2 text-right`}
disabled
value={ZFW()}
/>
</div>
<div className="relative flex w-full items-center justify-between rounded-b-md bg-zinc-700 p-2 px-4">
<label>
{loadingState !== 'loaded' && !GSXActive() ? 'Expected' : 'Actual'} GW (
{WASMData.userData.isImperial ? 'lbs' : 'kg'})
</label>
<input
type="text"
placeholder=""
className={`w-1/2 rounded-lg border ${GWValid() ? 'border-white' : 'border-red-500 text-red-500'} bg-zinc-700 px-3 py-2 text-right`}
disabled
value={GW()}
/>
</div>
</div>
<ActionBar
loadingState={loadingState}
loadDisabled={!GWValid()}
GSXSync={WASMData.options.GSXSync}
GSXActive={GSXActive()}
load={() => {
setLoadingState('loaded');
loadAircraft();
}}
unload={() => {
setLoadingState('preview');
unloadAircraft();
}}
/>
</>
);
};
export default ZFWEntryF;

View File

@ -1,106 +1,48 @@
import { FC, useEffect, useState } from 'react';
import { PaxConfig, PayloadPax } from '../../configs/pax';
import { Fuel, SharedConfig } from '../../configs/shared';
import {
COHERENT_COMM_BUS_WASM_CALL,
COMM_BUS_UPDATE_TARGET_EVENT,
GSX_SERVICE_CALLED,
GSX_SERVICE_FINISHED,
} from '../../constants';
import { WASMDataPax } from '../../types/WASMData';
import { LoadingState } from '../../types/general';
import { inRangeOf, loadAircraft, unloadAircraft } from '../../utils/utils';
import CGSelect from '../CGSelect/CGSelect';
import ActionBar from '../actionbar/ActionBar';
interface StationEntryProps {
unit: 'kg' | 'lbs';
isER: boolean;
initialPayload: PayloadPax;
fuelLive: Fuel;
payloadLive: PayloadPax;
loadingState: 'preview' | 'accepted' | 'loaded';
setLoadingState: (newState: StationEntryProps['loadingState']) => void;
updateView: (payload: PayloadPax) => void;
loadAircraft: () => void;
interface ZFWEntryProps {
WASMData: WASMDataPax;
loadingState: LoadingState;
setLoadingState: (newState: LoadingState) => void;
}
const ZFWEntryPax: FC<StationEntryProps> = ({
unit,
isER,
initialPayload,
fuelLive,
payloadLive,
loadingState,
setLoadingState,
updateView,
loadAircraft,
}) => {
const [targetZFWCG, setTargetZFWCG] = useState(SharedConfig.CGLimits.default);
const [fuel, setFuel] = useState(
Math.round(
fuelLive.main1 +
fuelLive.main1Tip +
fuelLive.main2 +
fuelLive.main3 +
fuelLive.main3Tip +
fuelLive.upperAux +
fuelLive.lowerAux +
fuelLive.tail +
fuelLive.forwardAux1 +
fuelLive.forwardAux2
)
);
const [ZFW, setZFW] = useState(
Math.round(
PaxConfig.weights.base[unit].total +
(isER ? SharedConfig.erExtraWeight[unit] * 2 : 0) +
payloadLive.empty +
initialPayload.business1Left +
initialPayload.business1Center +
initialPayload.business1Right +
initialPayload.business2Left +
initialPayload.business2Center +
initialPayload.business2Right +
initialPayload.economy1Left +
initialPayload.economy1Center +
initialPayload.economy1Right +
initialPayload.economy2Left +
initialPayload.economy2Center +
initialPayload.economy2Right +
initialPayload.forwardCargo +
initialPayload.rearCargo
)
);
const ZFWEntryPax: FC<ZFWEntryProps> = ({ WASMData, loadingState, setLoadingState }) => {
const [CGTarget, setCGTarget] = useState(WASMData.targetPayload.CGTarget);
const [fuel, setFuel] = useState(Math.round(WASMData.livePayload.fuel));
const [ZFWTarget, setZFWTarget] = useState(Math.round(WASMData.targetPayload.total));
const [fuelEnabled, setFuelEnabled] = useState(true);
const _ZFW = () => {
if (loadingState !== 'loaded') return ZFW;
const ZFW = () => {
if (loadingState !== 'loaded' && !GSXActive()) return ZFWTarget;
return Math.round(
payloadLive.empty +
payloadLive.pilot +
payloadLive.firstOfficer +
payloadLive.engineer +
payloadLive.cabinCrewFront +
payloadLive.business1Left +
payloadLive.business1Center +
payloadLive.business1Right +
payloadLive.business2Left +
payloadLive.business2Center +
payloadLive.business2Right +
payloadLive.economy1Left +
payloadLive.economy1Center +
payloadLive.economy1Right +
payloadLive.economy2Left +
payloadLive.economy2Center +
payloadLive.economy2Right +
payloadLive.cabinCrewRear +
payloadLive.forwardCargo +
payloadLive.rearCargo +
payloadLive.leftAuxPax +
payloadLive.rightAuxPax
);
return Math.round(WASMData.livePayload.total);
};
const ZFWValid = () => {
return _ZFW() <= PaxConfig.maxZWF[unit];
return ZFW() <= WASMData.limits.maxZFW;
};
const GW = () => {
return fuel + _ZFW();
return fuel + ZFW();
};
const GWValid = () => {
return GW() <= (isER ? SharedConfig.maxTOW.er[unit] : SharedConfig.maxTOW.norm[unit]);
return GW() <= WASMData.limits.maxTOW;
};
const GSXActive = () => {
return (
(WASMData.GSX.boardingState >= GSX_SERVICE_CALLED || WASMData.GSX.deboardingState >= GSX_SERVICE_CALLED) &&
WASMData.GSX.deboardingState !== GSX_SERVICE_FINISHED
);
};
const handleInput = (input: string, maxValue: number, setter: (value: number) => void) => {
@ -121,113 +63,79 @@ const ZFWEntryPax: FC<StationEntryProps> = ({
const converted = parseInt(input);
if (converted) {
if (converted < 0)
setZFW(
Math.round(
PaxConfig.weights.base[unit].total + (isER ? SharedConfig.erExtraWeight[unit] * 2 : 0) + payloadLive.empty
)
);
else if (converted > PaxConfig.maxZWF[unit]) setZFW(PaxConfig.maxZWF[unit]);
else setZFW(converted);
if (converted < 0) setZFWTarget(Math.round(WASMData.targetPayload.empty + WASMData.targetPayload.crew));
else if (converted > WASMData.limits.maxZFW) setZFWTarget(WASMData.limits.maxZFW);
else setZFWTarget(converted);
}
};
const handleBlur = (input: string) => {
const minZFW = Math.round(
PaxConfig.weights.base[unit].total + (isER ? SharedConfig.erExtraWeight[unit] * 2 : 0) + payloadLive.empty
);
const minZFW = Math.round(WASMData.targetPayload.empty + WASMData.targetPayload.crew);
if (!input) {
setZFW(minZFW);
setZFWTarget(minZFW);
return;
}
const converted = parseInt(input);
if (converted) {
if (converted < minZFW) setZFW(minZFW);
else if (converted > PaxConfig.maxZWF[unit]) setZFW(PaxConfig.maxZWF[unit]);
else setZFW(converted);
if (converted < minZFW) setZFWTarget(minZFW);
else if (converted > WASMData.limits.maxZFW) setZFWTarget(WASMData.limits.maxZFW);
else setZFWTarget(converted);
}
updateView(PaxConfig.distribute(converted, targetZFWCG, payloadLive.empty, fuelLive, unit, isER));
updateData(converted);
};
useEffect(
() =>
setFuel((prev) =>
prev > (isER ? SharedConfig.maxFuel.er[unit] : SharedConfig.maxFuel.norm[unit])
? isER
? SharedConfig.maxFuel.er[unit]
: SharedConfig.maxFuel.norm[unit]
: prev
),
[isER]
setFuel((prev) => {
if (prev > WASMData.limits.maxFuel) return WASMData.limits.maxFuel;
return prev;
}),
[WASMData.userData.isER]
);
useEffect(() => {
setFuelEnabled(inRangeOf(Math.round(WASMData.livePayload.fuel), fuel));
}, [WASMData.livePayload.fuel]);
const updateData = (_ZFWTarget?: number, _CGTarget?: number) => {
Coherent.call(
COHERENT_COMM_BUS_WASM_CALL,
COMM_BUS_UPDATE_TARGET_EVENT,
JSON.stringify({
mode: 1,
ZFWTarget: _ZFWTarget ?? ZFWTarget,
CGTarget: _CGTarget ?? CGTarget,
})
);
};
return (
<>
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
<div className="relative flex w-full items-center justify-between rounded-t-md bg-zinc-600 p-2 px-4">
<label>Target ZFW ({unit})</label>
<input
type="text"
placeholder=""
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={ZFW}
onChange={(e) => handleInputZFW(e.target.value)}
onBlur={(e) => handleBlur(e.target.value)}
disabled={loadingState !== 'preview'}
/>
</div>
<div className="relative flex w-full items-center justify-between rounded-b-md bg-zinc-700 p-2 px-4">
<label>
Target ZFWCG ({SharedConfig.CGLimits.min} - {SharedConfig.CGLimits.max})
</label>
<CGSelect
value={targetZFWCG}
disabled={loadingState !== 'preview'}
increase={() =>
setTargetZFWCG((prev) => {
const _new = prev + 0.1;
updateView(PaxConfig.distribute(ZFW, _new, payloadLive.empty, fuelLive, unit, isER));
return _new;
})
}
decrease={() =>
setTargetZFWCG((prev) => {
const _new = prev - 0.1;
updateView(PaxConfig.distribute(ZFW, _new, payloadLive.empty, fuelLive, unit, isER));
return _new;
})
}
/>
</div>
</div>
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
<div className="relative flex w-full items-center justify-between rounded-md bg-zinc-600 p-2 px-4">
<label>Fuel ({unit})</label>
<label>Fuel ({WASMData.userData.isImperial ? 'lbs' : 'kg'})</label>
<input
type="text"
placeholder=""
className={`w-1/2 rounded-lg border border-white bg-zinc-700 px-3 py-2 text-right`}
value={fuel}
onChange={(e) =>
handleInput(
e.target.value,
isER ? SharedConfig.maxFuel.er[unit] : SharedConfig.maxFuel.norm[unit],
setFuel
)
}
disabled={loadingState !== 'preview'}
onChange={(e) => handleInput(e.target.value, WASMData.limits.maxFuel, setFuel)}
disabled={loadingState !== 'preview' || GSXActive()}
/>
<button
className="middle none center rounded-lg bg-green-600 px-6 py-3 font-sans text-xs font-bold uppercase text-white shadow-md shadow-green-500/20 transition-all hover:shadow-lg hover:shadow-green-500/40 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none"
data-ripple-light="true"
onClick={() => {
SimVar.SetSimVarValue('L:MD11_EFB_PAYLOAD_FUEL', 'lbs', unit === 'kg' ? fuel * 2.20462262185 : fuel);
SimVar.SetSimVarValue(
'L:MD11_EFB_PAYLOAD_FUEL',
'lbs',
WASMData.userData.isImperial ? fuel : fuel * 2.20462262185
);
SimVar.SetSimVarValue('L:MD11_EFB_READ_READY', 'bool', true);
setFuelEnabled(WASMData.livePayload.fuel === fuel);
}}
disabled={loadingState !== 'preview'}
disabled={loadingState !== 'preview' || !fuelEnabled || GSXActive()}
>
Load Fuel
</button>
@ -236,20 +144,62 @@ const ZFWEntryPax: FC<StationEntryProps> = ({
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
<div className="relative flex w-full items-center justify-between rounded-t-md bg-zinc-600 p-2 px-4">
<label>Target ZFW ({WASMData.userData.isImperial ? 'lbs' : 'kg'})</label>
<input
type="text"
placeholder=""
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={ZFWTarget}
onChange={(e) => handleInputZFW(e.target.value)}
onBlur={(e) => handleBlur(e.target.value)}
disabled={loadingState !== 'preview' || GSXActive()}
/>
</div>
<div className="relative flex w-full items-center justify-between rounded-b-md bg-zinc-700 p-2 px-4">
<label>
{loadingState !== 'loaded' ? 'Expected' : 'Actual'} ZFW ({unit})
Target ZFWCG ({WASMData.limits.minCG} - {WASMData.limits.maxCG})
</label>
<CGSelect
minCG={WASMData.limits.minCG}
maxCG={WASMData.limits.maxCG}
value={CGTarget}
disabled={loadingState !== 'preview' || GSXActive()}
increase={() =>
setCGTarget((prev) => {
const _new = prev + 0.1;
updateData(undefined, _new);
return _new;
})
}
decrease={() =>
setCGTarget((prev) => {
const _new = prev - 0.1;
updateData(undefined, _new);
return _new;
})
}
/>
</div>
</div>
<div className="block flex w-full flex-col opacity-100 transition-opacity duration-150 ease-linear mb-4">
<div className="relative flex w-full items-center justify-between rounded-t-md bg-zinc-600 p-2 px-4">
<label>
{loadingState !== 'loaded' && !GSXActive() ? 'Expected' : 'Actual'} ZFW (
{WASMData.userData.isImperial ? 'lbs' : 'kg'})
</label>
<input
type="text"
placeholder=""
className={`w-1/2 rounded-lg border ${ZFWValid() ? 'border-white' : 'border-red-500 text-red-500'} bg-zinc-700 px-3 py-2 text-right`}
disabled
value={_ZFW()}
value={ZFW()}
/>
</div>
<div className="relative flex w-full items-center justify-between rounded-b-md bg-zinc-700 p-2 px-4">
<label>
{loadingState !== 'loaded' ? 'Expected' : 'Actual'} GW ({unit})
{loadingState !== 'loaded' && !GSXActive() ? 'Expected' : 'Actual'} GW (
{WASMData.userData.isImperial ? 'lbs' : 'kg'})
</label>
<input
type="text"
@ -263,9 +213,9 @@ const ZFWEntryPax: FC<StationEntryProps> = ({
<ActionBar
loadingState={loadingState}
acceptDisabled={!GWValid()}
accept={() => setLoadingState('accepted')}
reject={() => setLoadingState('preview')}
loadDisabled={!GWValid()}
GSXSync={WASMData.options.GSXSync}
GSXActive={GSXActive()}
load={() => {
setLoadingState('loaded');
@ -274,7 +224,7 @@ const ZFWEntryPax: FC<StationEntryProps> = ({
unload={() => {
setLoadingState('preview');
PaxConfig.unload(unit, isER);
unloadAircraft();
}}
/>
</>

View File

@ -1,153 +0,0 @@
import { ArmsFuel, Fuel, toPercentMAC } from './shared';
// TODO: Extract from CFG at runtime.
const ArmsFreight = {
empty: -159.6,
pilot: 984,
firstOfficer: 984,
engineer: 960,
upper1Left: 660,
upper1Right: 660,
upper2Left: 240,
upper2Right: 240,
upper3Left: -240,
upper3Right: -240,
upper4Left: -600,
upper4Right: -600,
lowerForward: 360,
lowerRear: -360,
leftAuxF: 60,
rightAuxF: 60,
};
export interface PayloadFreight {
empty: number;
pilot: number;
firstOfficer: number;
engineer: number;
upper1Left: number;
upper1Right: number;
upper2Left: number;
upper2Right: number;
upper3Left: number;
upper3Right: number;
upper4Left: number;
upper4Right: number;
lowerForward: number;
lowerRear: number;
leftAuxF: number;
rightAuxF: number;
}
//PMC pallet
export const maxUpperStationWeight = {
lbs: (26 / 8) * 15000,
kg: (26 / 8) * 6804,
};
export const baseWeightFreight = {
pilot: {
lbs: 190,
kg: 86,
},
firstOfficer: {
lbs: 190,
kg: 86,
},
};
export const maxZFWFreight = {
lbs: 451300,
kg: 204706,
};
export const calculateCGsFreight = (payload: PayloadFreight, fuel: Fuel): [number, number] => {
let totalMoment =
payload.empty * ArmsFreight.empty +
payload.pilot * ArmsFreight.pilot +
payload.firstOfficer * ArmsFreight.firstOfficer +
payload.engineer * ArmsFreight.engineer +
payload.upper1Left * ArmsFreight.upper1Left +
payload.upper1Right * ArmsFreight.upper1Right +
payload.upper2Left * ArmsFreight.upper2Left +
payload.upper2Right * ArmsFreight.upper2Right +
payload.upper3Left * ArmsFreight.upper3Left +
payload.upper3Right * ArmsFreight.upper3Right +
payload.upper4Left * ArmsFreight.upper4Left +
payload.upper4Right * ArmsFreight.upper4Right +
payload.lowerForward * ArmsFreight.lowerForward +
payload.lowerRear * ArmsFreight.lowerRear +
payload.leftAuxF * ArmsFreight.leftAuxF +
payload.rightAuxF * ArmsFreight.rightAuxF;
let totalWeight =
payload.empty +
payload.pilot +
payload.firstOfficer +
payload.engineer +
payload.upper1Left +
payload.upper1Right +
payload.upper2Left +
payload.upper2Right +
payload.upper3Left +
payload.upper3Right +
payload.upper4Left +
payload.upper4Right +
payload.lowerForward +
payload.lowerRear +
payload.leftAuxF +
payload.rightAuxF;
const ZFWCG = toPercentMAC(totalMoment / totalWeight);
totalMoment +=
fuel.main1 * ArmsFuel.main1 +
fuel.main3 * ArmsFuel.main3 +
fuel.main2 * ArmsFuel.main2 +
fuel.upperAux * ArmsFuel.upperAux +
fuel.lowerAux * ArmsFuel.lowerAux +
fuel.main1Tip * ArmsFuel.main1Tip +
fuel.main3Tip * ArmsFuel.main3Tip +
fuel.tail * ArmsFuel.tail +
fuel.forwardAux1 * ArmsFuel.forwardAux1 +
fuel.forwardAux2 * ArmsFuel.forwardAux2;
totalWeight +=
fuel.main1 +
fuel.main3 +
fuel.main2 +
fuel.upperAux +
fuel.lowerAux +
fuel.main1Tip +
fuel.main3Tip +
fuel.tail +
fuel.forwardAux1 +
fuel.forwardAux2;
const TOCG = toPercentMAC(totalMoment / totalWeight);
return [ZFWCG, TOCG];
};
export const getWeightsFreight = (unit: 'kg' | 'lbs') => {
const payload: PayloadFreight = {
empty: SimVar.GetSimVarValue('EMPTY WEIGHT', unit),
pilot: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:1', unit),
firstOfficer: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:2', unit),
engineer: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:3', unit),
upper1Left: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:4', unit),
upper1Right: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:5', unit),
upper2Left: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:6', unit),
upper2Right: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:7', unit),
upper3Left: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:8', unit),
upper3Right: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:9', unit),
upper4Left: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:10', unit),
upper4Right: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:11', unit),
lowerForward: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:12', unit),
lowerRear: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:13', unit),
leftAuxF: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:14', unit),
rightAuxF: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:15', unit),
};
return payload;
};

View File

@ -1,598 +0,0 @@
import { ArmsFuel, Fuel, SharedConfig, toPercentMAC } from './shared';
export interface PayloadPax {
empty: number;
pilot: number;
firstOfficer: number;
engineer: number;
cabinCrewFront: number;
business1Left: number;
business1Center: number;
business1Right: number;
business2Left: number;
business2Center: number;
business2Right: number;
economy1Left: number;
economy1Center: number;
economy1Right: number;
economy2Left: number;
economy2Center: number;
economy2Right: number;
cabinCrewRear: number;
forwardCargo: number;
rearCargo: number;
leftAuxPax: number;
rightAuxPax: number;
paxCount: {
business1: number;
business2: number;
economy1: number;
economy2: number;
total: number;
};
}
export const PaxConfig = {
// TODO: Extract from CFG at runtime.
arms: {
empty: -159.6,
pilot: 984,
firstOfficer: 984,
engineer: 960,
cabinCrewFront: 792,
business1Left: 540,
business1Center: 540,
business1Right: 540,
business2Left: 300,
business2Center: 300,
business2Right: 300,
economy1Left: -240,
economy1Center: -240,
economy1Right: -240,
economy2Left: -600,
economy2Center: -600,
economy2Right: -600,
cabinCrewRear: -660,
forwardCargo: 360,
rearCargo: -360,
leftAuxPax: 60,
rightAuxPax: 60,
},
// TODO: Make user adjustable
weights: {
pax: {
lbs: 190,
kg: 86,
},
baggage: {
lbs: 50,
kg: 23,
},
base: {
lbs: {
pilot: 190,
firstOfficer: 190,
engineer: 190,
cabinCrewFront: 380,
cabinCrewRear: 950,
total: 190 + 190 + 190 + 380 + 950,
},
kg: {
pilot: 86,
firstOfficer: 86,
engineer: 86,
cabinCrewFront: 172,
cabinCrewRear: 430,
total: 86 + 86 + 86 + 172 + 430,
},
},
},
stationMax: {
business1: 30,
business2: 45,
economy1: 86,
economy2: 137,
total: 30 + 45 + 86 + 137,
},
maxZWF: {
lbs: 400000,
kg: 181437,
},
weightToPax: (weight: number, unit: 'kg' | 'lbs') => {
return Math.round(weight / PaxConfig.weights.pax[unit]);
},
calculateCGs: (payload: PayloadPax, fuel: Fuel): [number, number] => {
let totalMoment =
payload.empty * PaxConfig.arms.empty +
payload.pilot * PaxConfig.arms.pilot +
payload.firstOfficer * PaxConfig.arms.firstOfficer +
payload.engineer * PaxConfig.arms.engineer +
payload.cabinCrewFront * PaxConfig.arms.cabinCrewFront +
payload.business1Left * PaxConfig.arms.business1Left +
payload.business1Center * PaxConfig.arms.business1Center +
payload.business1Right * PaxConfig.arms.business1Right +
payload.business2Left * PaxConfig.arms.business2Left +
payload.business2Center * PaxConfig.arms.business2Center +
payload.business2Right * PaxConfig.arms.business2Right +
payload.economy1Left * PaxConfig.arms.economy1Left +
payload.economy1Center * PaxConfig.arms.economy1Center +
payload.economy1Right * PaxConfig.arms.economy1Right +
payload.economy2Left * PaxConfig.arms.economy2Left +
payload.economy2Center * PaxConfig.arms.economy2Center +
payload.economy2Right * PaxConfig.arms.economy2Right +
payload.cabinCrewRear * PaxConfig.arms.cabinCrewRear +
payload.forwardCargo * PaxConfig.arms.forwardCargo +
payload.rearCargo * PaxConfig.arms.rearCargo +
payload.leftAuxPax * PaxConfig.arms.leftAuxPax +
payload.rightAuxPax * PaxConfig.arms.rightAuxPax;
let totalWeight =
payload.empty +
payload.pilot +
payload.firstOfficer +
payload.engineer +
payload.cabinCrewFront +
payload.business1Left +
payload.business1Center +
payload.business1Right +
payload.business2Left +
payload.business2Center +
payload.business2Right +
payload.economy1Left +
payload.economy1Center +
payload.economy1Right +
payload.economy2Left +
payload.economy2Center +
payload.economy2Right +
payload.cabinCrewRear +
payload.forwardCargo +
payload.rearCargo +
payload.leftAuxPax +
payload.rightAuxPax;
const ZFWCG = toPercentMAC(totalMoment / totalWeight);
totalMoment +=
fuel.main1 * ArmsFuel.main1 +
fuel.main3 * ArmsFuel.main3 +
fuel.main2 * ArmsFuel.main2 +
fuel.upperAux * ArmsFuel.upperAux +
fuel.lowerAux * ArmsFuel.lowerAux +
fuel.main1Tip * ArmsFuel.main1Tip +
fuel.main3Tip * ArmsFuel.main3Tip +
fuel.tail * ArmsFuel.tail +
fuel.forwardAux1 * ArmsFuel.forwardAux1 +
fuel.forwardAux2 * ArmsFuel.forwardAux2;
totalWeight +=
fuel.main1 +
fuel.main3 +
fuel.main2 +
fuel.upperAux +
fuel.lowerAux +
fuel.main1Tip +
fuel.main3Tip +
fuel.tail +
fuel.forwardAux1 +
fuel.forwardAux2;
const toCG = toPercentMAC(totalMoment / totalWeight);
return [ZFWCG, toCG];
},
generateDistribution: (
OEW: number,
business1: number,
business2: number,
economy1: number,
economy2: number,
forwardCargo: number,
rearCargo: number,
unit: 'kg' | 'lbs',
isER: boolean
): PayloadPax => {
const distribution: PayloadPax = {
empty: OEW,
...PaxConfig.weights.base[unit],
business1Left: (business1 / 3) * PaxConfig.weights.pax[unit],
business1Center: (business1 / 3) * PaxConfig.weights.pax[unit],
business1Right: (business1 / 3) * PaxConfig.weights.pax[unit],
business2Left: (business2 / 3) * PaxConfig.weights.pax[unit],
business2Center: (business2 / 3) * PaxConfig.weights.pax[unit],
business2Right: (business2 / 3) * PaxConfig.weights.pax[unit],
economy1Left: (economy1 / 3) * PaxConfig.weights.pax[unit],
economy1Center: (economy1 / 3) * PaxConfig.weights.pax[unit],
economy1Right: (economy1 / 3) * PaxConfig.weights.pax[unit],
economy2Left: (economy2 / 3) * PaxConfig.weights.pax[unit],
economy2Center: (economy2 / 3) * PaxConfig.weights.pax[unit],
economy2Right: (economy2 / 3) * PaxConfig.weights.pax[unit],
forwardCargo: forwardCargo,
rearCargo: rearCargo,
leftAuxPax: isER ? SharedConfig.erExtraWeight[unit] : 0,
rightAuxPax: isER ? SharedConfig.erExtraWeight[unit] : 0,
paxCount: {
business1,
business2,
economy1,
economy2,
total: business1 + business2 + economy1 + economy2,
},
};
return distribution;
},
distribute: (
ZFWTarget: number,
CGTarget: number,
OEW: number,
fuelLive: Fuel,
unit: 'kg' | 'lbs',
isER: boolean,
numPax?: number
) => {
const payload =
ZFWTarget -
OEW -
PaxConfig.weights.base[unit].pilot -
PaxConfig.weights.base[unit].firstOfficer -
PaxConfig.weights.base[unit].engineer -
PaxConfig.weights.base[unit].cabinCrewFront -
PaxConfig.weights.base[unit].cabinCrewRear -
(isER ? SharedConfig.erExtraWeight[unit] * 2 : 0);
let _numPax =
numPax ??
Math.max(
0,
Math.min(
PaxConfig.stationMax.total,
Math.floor(payload / (PaxConfig.weights.pax[unit] + PaxConfig.weights.baggage[unit]))
)
);
let cargo = Math.round(payload - _numPax * PaxConfig.weights.pax[unit] - _numPax * PaxConfig.weights.baggage[unit]);
let business1 = 0;
let business2 = 0;
let economy1 = 0;
let economy2 = 0;
let forwardCargo = 0;
let rearCargo = 0;
let __numPax = 0;
let count = PaxConfig.stationMax.economy2;
// initial distribution
while (_numPax > 0 && count > 0) {
if (_numPax >= 4) {
if (business1 < PaxConfig.stationMax.business1) {
business1++;
__numPax++;
}
if (business2 < PaxConfig.stationMax.business2) {
business2++;
__numPax++;
}
if (economy1 < PaxConfig.stationMax.economy1) {
economy1++;
__numPax++;
}
if (economy2 < PaxConfig.stationMax.economy2) {
economy2++;
__numPax++;
}
} else if (_numPax === 3) {
if (business2 < PaxConfig.stationMax.business2) {
business2++;
__numPax++;
}
if (economy1 < PaxConfig.stationMax.economy1) {
economy1++;
__numPax++;
}
if (economy2 < PaxConfig.stationMax.economy2) {
economy2++;
__numPax++;
}
} else if (_numPax === 2) {
if (economy1 < PaxConfig.stationMax.economy1) {
economy1++;
__numPax++;
}
if (economy2 < PaxConfig.stationMax.economy2) {
economy2++;
__numPax++;
}
} else if (_numPax === 1) {
if (economy2 < PaxConfig.stationMax.economy2) {
economy2++;
__numPax++;
}
}
_numPax -= __numPax;
if (__numPax % 2 === 0) {
forwardCargo += (__numPax / 2) * PaxConfig.weights.baggage[unit];
rearCargo += (__numPax / 2) * PaxConfig.weights.baggage[unit];
} else {
__numPax--;
forwardCargo += (__numPax / 2 + 1) * PaxConfig.weights.baggage[unit];
rearCargo += (__numPax / 2) * PaxConfig.weights.baggage[unit];
}
__numPax = 0;
count--;
}
count = SharedConfig.stationMax.forward[unit];
while (cargo > 0 && count > 0) {
if (forwardCargo < SharedConfig.stationMax.forward[unit]) {
forwardCargo++;
cargo--;
}
if (rearCargo < SharedConfig.stationMax.rear[unit]) {
rearCargo++;
cargo--;
}
count--;
}
// Refinement pax
count = PaxConfig.stationMax.total;
while (count > 0) {
const distribution = PaxConfig.generateDistribution(
OEW,
business1,
business2,
economy1,
economy2,
forwardCargo,
rearCargo,
unit,
isER
);
const _CGs = PaxConfig.calculateCGs(distribution, fuelLive);
// in front of target
if (_CGs[0] < CGTarget - SharedConfig.CGLimits.tolerance) {
if (business1 > 0) {
business1--;
} else if (business2 > 0) {
business2--;
} else if (economy1 > 0) {
economy1--;
} else {
break;
}
if (economy2 < PaxConfig.stationMax.economy2) {
economy2++;
} else if (economy1 < PaxConfig.stationMax.economy1) {
economy1++;
} else if (business2 < PaxConfig.stationMax.business2) {
business2++;
} else {
business1++;
}
}
// behind target
else if (_CGs[0] > CGTarget + SharedConfig.CGLimits.tolerance) {
if (economy2 > 0) {
economy2--;
} else if (economy1 > 0) {
economy1--;
} else if (business2 > 0) {
business2--;
} else {
break;
}
if (business1 < PaxConfig.stationMax.business1) {
business1++;
} else if (business2 < PaxConfig.stationMax.business2) {
business2++;
} else if (economy1 < PaxConfig.stationMax.economy1) {
economy1++;
} else {
economy2++;
}
} else {
break;
}
count--;
}
// Refinement cargo
count = SharedConfig.stationMax.forward[unit] + SharedConfig.stationMax.rear[unit];
while (count > 0) {
const distribution = PaxConfig.generateDistribution(
OEW,
business1,
business2,
economy1,
economy2,
forwardCargo,
rearCargo,
unit,
isER
);
const _CGs = PaxConfig.calculateCGs(distribution, fuelLive);
// in front of target
if (_CGs[0] < CGTarget - SharedConfig.CGLimits.tolerance) {
if (forwardCargo > 0 && rearCargo < SharedConfig.stationMax.rear[unit]) {
if (
forwardCargo > PaxConfig.weights.baggage[unit] &&
rearCargo < SharedConfig.stationMax.forward[unit] - PaxConfig.weights.baggage[unit]
) {
forwardCargo -= PaxConfig.weights.baggage[unit];
rearCargo += PaxConfig.weights.baggage[unit];
} else {
forwardCargo--;
rearCargo++;
}
} else {
break;
}
}
// behind target
else if (_CGs[0] > CGTarget + SharedConfig.CGLimits.tolerance) {
if (rearCargo > 0 && forwardCargo < SharedConfig.stationMax.forward[unit]) {
if (
rearCargo > PaxConfig.weights.baggage[unit] &&
forwardCargo < SharedConfig.stationMax.rear[unit] - PaxConfig.weights.baggage[unit]
) {
rearCargo -= PaxConfig.weights.baggage[unit];
forwardCargo += PaxConfig.weights.baggage[unit];
} else {
rearCargo--;
forwardCargo++;
}
} else {
break;
}
} else {
break;
}
count--;
}
const distribution = PaxConfig.generateDistribution(
OEW,
business1,
business2,
economy1,
economy2,
forwardCargo,
rearCargo,
unit,
isER
);
return distribution;
},
// SIM access
getWeights: (unit: 'kg' | 'lbs') => {
const payload: PayloadPax = {
empty: SimVar.GetSimVarValue('EMPTY WEIGHT', unit),
pilot: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:1', unit),
firstOfficer: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:2', unit),
engineer: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:3', unit),
cabinCrewFront: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:4', unit),
business1Left: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:5', unit),
business1Center: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:6', unit),
business1Right: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:7', unit),
business2Left: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:8', unit),
business2Center: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:9', unit),
business2Right: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:10', unit),
economy1Left: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:11', unit),
economy1Center: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:12', unit),
economy1Right: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:13', unit),
economy2Left: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:14', unit),
economy2Center: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:15', unit),
economy2Right: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:16', unit),
cabinCrewRear: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:17', unit),
forwardCargo: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:18', unit),
rearCargo: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:19', unit),
leftAuxPax: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:20', unit),
rightAuxPax: SimVar.GetSimVarValue('PAYLOAD STATION WEIGHT:21', unit),
paxCount: {
business1: 0,
business2: 0,
economy1: 0,
economy2: 0,
total: 0,
},
};
return payload;
},
setBaseWeight: (unit: 'kg' | 'lbs', isER: boolean) => {
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:1', unit, PaxConfig.weights.base[unit].pilot); // Pilot
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:2', unit, PaxConfig.weights.base[unit].firstOfficer); // First officer
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:3', unit, PaxConfig.weights.base[unit].engineer); // Engineer
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:4', unit, PaxConfig.weights.base[unit].cabinCrewFront); // Cabin Crew front
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:17', unit, PaxConfig.weights.base[unit].cabinCrewRear); // Cabin Crew rear
if (isER) {
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:20', unit, SharedConfig.erExtraWeight[unit]); // Forward Aux 1
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:21', unit, SharedConfig.erExtraWeight[unit]); // Forward Aux 2
}
},
setWeights: (payload: PayloadPax, unit: 'kg' | 'lbs') => {
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:4', unit, payload.cabinCrewFront); // Cabin Crew front
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:5', unit, payload.business1Left); // Business 1L
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:6', unit, payload.business1Center); // Business 1C
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:7', unit, payload.business1Right); // Business 1R
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:8', unit, payload.business2Left); // Business 2L
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:9', unit, payload.business2Center); // Business 2C
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:10', unit, payload.business2Right); // Business 2R
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:11', unit, payload.economy1Left); // Economy 1L
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:12', unit, payload.economy1Center); // Economy 1C
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:13', unit, payload.economy1Right); // Economy 1R
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:14', unit, payload.economy2Left); // Economy 2L
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:15', unit, payload.economy2Center); // Economy 2C
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:16', unit, payload.economy2Right); // Economy 2R
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:17', unit, payload.cabinCrewRear); //Cabin Crew rear
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:18', unit, payload.forwardCargo); // Forward Cargo
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:19', unit, payload.rearCargo); // Rear Cargo
},
setWeightsProgressive: (payload: PayloadPax, paxNum: number, cargoPercent: number, unit: 'kg' | 'lbs') => {
const business1Scalar = Math.min(1, paxNum / payload.paxCount.business1);
paxNum -= payload.paxCount.business1 * business1Scalar;
const business2Scalar = Math.min(1, paxNum / payload.paxCount.business2);
paxNum -= payload.paxCount.business2 * business2Scalar;
const economy1Scalar = Math.min(1, paxNum / payload.paxCount.economy1);
paxNum -= payload.paxCount.economy1 * economy1Scalar;
const economy2Scalar = Math.min(1, paxNum / payload.paxCount.economy2);
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:4', unit, payload.cabinCrewFront); // Cabin Crew front
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:5', unit, payload.business1Left * business1Scalar); // Business 1L
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:6', unit, payload.business1Center * business1Scalar); // Business 1C
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:7', unit, payload.business1Right * business1Scalar); // Business 1R
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:8', unit, payload.business2Left * business2Scalar); // Business 2L
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:9', unit, payload.business2Center * business2Scalar); // Business 2C
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:10', unit, payload.business2Right * business2Scalar); // Business 2R
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:11', unit, payload.economy1Left * economy1Scalar); // Economy 1L
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:12', unit, payload.economy1Center * economy1Scalar); // Economy 1C
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:13', unit, payload.economy1Right * economy1Scalar); // Economy 1R
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:14', unit, payload.economy2Left * economy2Scalar); // Economy 2L
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:15', unit, payload.economy2Center * economy2Scalar); // Economy 2C
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:16', unit, payload.economy2Right * economy2Scalar); // Economy 2R
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:17', unit, payload.cabinCrewRear); //Cabin Crew rear
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:18', unit, payload.forwardCargo * (cargoPercent / 100)); // Forward Cargo
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:19', unit, payload.rearCargo * (cargoPercent / 100)); // Rear Cargo
},
unload: (unit: 'kg' | 'lbs', isER: boolean) => {
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:1', unit, 0); // Pilot
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:2', unit, 0); // First officer
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:3', unit, 0); // Engineer
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:4', unit, 0); // Cabin Crew front
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:17', unit, 0); // Cabin Crew rear
if (!isER) {
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:20', unit, 0); // Forward Aux 1
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:21', unit, 0); // Forward Aux 2
}
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:4', unit, 0); // Cabin Crew front
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:5', unit, 0); // Business 1L
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:6', unit, 0); // Business 1C
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:7', unit, 0); // Business 1R
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:8', unit, 0); // Business 2L
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:9', unit, 0); // Business 2C
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:10', unit, 0); // Business 2R
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:11', unit, 0); // Economy 1L
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:12', unit, 0); // Economy 1C
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:13', unit, 0); // Economy 1R
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:14', unit, 0); // Economy 2L
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:15', unit, 0); // Economy 2C
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:16', unit, 0); // Economy 2R
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:17', unit, 0); //Cabin Crew rear
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:18', unit, 0); // Forward Cargo
SimVar.SetSimVarValue('PAYLOAD STATION WEIGHT:19', unit, 0); // Rear Cargo
},
};

View File

@ -1,166 +0,0 @@
export interface Fuel {
main1: number;
main3: number;
main2: number;
upperAux: number;
lowerAux: number;
main1Tip: number;
main3Tip: number;
tail: number;
forwardAux1: number;
forwardAux2: number;
}
// TODO: Extract from CFG at runtime.
export const ArmsFuel = {
main1: -240,
main3: -240,
main2: 120,
upperAux: 0,
lowerAux: 0,
main1Tip: -468,
main3Tip: -468,
tail: -840,
forwardAux1: 60,
forwardAux2: 60,
};
// TODO: Extract following four from CFG at runtime
const rootChord = 34.68;
const wingSpan = 170.5;
const wingArea = 3648;
const quarterMAC = -165; //aero_center
const tipChord = (2 * wingArea) / wingSpan - rootChord;
const taperRatio = tipChord / rootChord;
const MAC = (2 / 3) * rootChord * ((1 + taperRatio + taperRatio ** 2) / (1 + taperRatio)) * 12;
const LEMAC = quarterMAC + (1 / 4) * MAC;
export const toPercentMAC = (positionInInches: number) => {
return ((positionInInches - LEMAC) / MAC) * -100;
};
export const SharedConfig = {
stationMax: {
//PMC pallet due to 104in door
forward: {
lbs: 6 * 15000,
kg: 6 * 6804,
},
//LD3s due to 70in door
rear: {
lbs: 14 * 3500,
kg: 14 * 1588,
},
},
maxTOW: {
er: {
lbs: 630500,
kg: 285990,
},
norm: {
lbs: 625500,
kg: 283722,
},
},
maxFuel: {
er: {
lbs: 282619,
kg: 128193,
},
norm: {
lbs: 256207,
kg: 116213,
},
},
erExtraWeight: {
lbs: 200,
kg: 91,
},
CGLimits: {
min: 12,
default: 20.5,
max: 34,
tolerance: 0.05,
},
};
export const initialPayload = {
empty: 0,
pilot: 0,
firstOfficer: 0,
engineer: 0,
cabinCrewFront: 0,
business1Left: 0,
business1Center: 0,
business1Right: 0,
business2Left: 0,
business2Center: 0,
business2Right: 0,
economy1Left: 0,
economy1Center: 0,
economy1Right: 0,
economy2Left: 0,
economy2Center: 0,
economy2Right: 0,
cabinCrewRear: 0,
forwardCargo: 0,
rearCargo: 0,
leftAuxPax: 0,
rightAuxPax: 0,
upper1Left: 0,
upper1Right: 0,
upper2Left: 0,
upper2Right: 0,
upper3Left: 0,
upper3Right: 0,
upper4Left: 0,
upper4Right: 0,
lowerForward: 0,
lowerRear: 0,
leftAuxF: 0,
rightAuxF: 0,
paxCount: {
business1: 0,
business2: 0,
economy1: 0,
economy2: 0,
total: 0,
},
};
export const initialFuel = {
main1: 0,
main3: 0,
main2: 0,
upperAux: 0,
lowerAux: 0,
main1Tip: 0,
main3Tip: 0,
tail: 0,
forwardAux1: 0,
forwardAux2: 0,
};
// SIM access
export const getFuel = (unit: 'kg' | 'lbs') => {
const conversion = SimVar.GetSimVarValue('FUEL WEIGHT PER GALLON', unit);
const fuel = {
main1: SimVar.GetSimVarValue('FUEL TANK LEFT MAIN QUANTITY', 'gal') * conversion,
main3: SimVar.GetSimVarValue('FUEL TANK RIGHT MAIN QUANTITY', 'gal') * conversion,
main2: SimVar.GetSimVarValue('FUEL TANK CENTER QUANTITY', 'gal') * conversion,
upperAux: SimVar.GetSimVarValue('FUEL TANK CENTER2 QUANTITY', 'gal') * conversion,
lowerAux: SimVar.GetSimVarValue('FUEL TANK CENTER3 QUANTITY', 'gal') * conversion,
main1Tip: SimVar.GetSimVarValue('FUEL TANK LEFT TIP QUANTITY', 'gal') * conversion,
main3Tip: SimVar.GetSimVarValue('FUEL TANK RIGHT TIP QUANTITY', 'gal') * conversion,
tail: SimVar.GetSimVarValue('FUEL TANK EXTERNAL1 QUANTITY', 'gal') * conversion,
forwardAux1: SimVar.GetSimVarValue('FUEL TANK LEFT AUX QUANTITY', 'gal') * conversion,
forwardAux2: SimVar.GetSimVarValue('FUEL TANK RIGHT AUX QUANTITY', 'gal') * conversion,
};
return fuel;
};

View File

@ -1,6 +1,13 @@
export const COMMANDS = 'KHOFMANN_PDF_READER_COMMANDS';
export const DATA = 'KHOFMANN_PDF_READER_DATA';
export const LIST = 'LIST';
export const LOAD = 'LOAD';
export const SAVE = 'SAVE';
export const MAX_LIST = 10;
export const COHERENT_COMM_BUS_WASM_CALL = 'COMM_BUS_WASM_CALLBACK';
export const TFDI_SIMBRIEF_USERNAME_CALL = 'requestSimBriefUsername';
export const TFDI_SIMBRIEF_USERNAME_EVENT = 'receiveSimBriefUsername';
export const COMM_BUS_LIVE_DATA_EVENT = 'khofmann_tfdi_md-11_load_manager_live_data';
export const COMM_BUS_UPDATE_TARGET_EVENT = 'khofmann_tfdi_md-11_load_manager_update_target';
export const CG_ADJUST = 0.05;
export const GSX_SERVICE_CALLED = 4;
export const GSX_SERVICE_ACTIVE = 5;
export const GSX_SERVICE_FINISHED = 6;

View File

@ -32,9 +32,7 @@
class="ingameUiFrame panelInvisible"
content-fit="true"
>
<virtual-scroll direction="y">
<div id="react" style="display: flex"></div>
</virtual-scroll>
</ingame-ui>
</tfdidesign-md11-load-manager-panel>
<script src="index.js" type="text/javascript"></script>

View File

@ -16,6 +16,7 @@ class TFDiDesignMD11LoadManagerPanel extends TemplateElement {
const container = document.getElementById('react');
if (container) {
console.log('Starting React');
const root = createRoot(container);
root.render(createElement(App, { commBus: this.commBus }));
}

View File

@ -0,0 +1,98 @@
export interface WASMDataPax {
livePayload: LivePayloadPax;
targetPayload: TargetPayloadPax;
GSX: GSX;
userData: UserData;
limits: LimitsPax;
options: Options;
}
export interface WASMDataF {
livePayload: LivePayloadF;
targetPayload: TargetPayloadF;
GSX: GSX;
userData: UserData;
limits: LimitsF;
options: Options;
}
interface TargetPayload {
CGTarget: number;
ZFWCG: number;
TOCG: number;
total: number;
}
interface TargetPayloadPax extends TargetPayload {
empty: number;
crew: number;
business1: number;
business2: number;
economy1: number;
economy2: number;
forwardCargo: number;
rearCargo: number;
}
interface LivePayloadPax extends TargetPayloadPax {
fuel: number;
}
interface TargetPayloadF extends TargetPayload {
empty: number;
crew: number;
upper1: number;
upper2: number;
upper3: number;
upper4: number;
lowerForward: number;
lowerRear: number;
}
interface LivePayloadF extends TargetPayloadF {
fuel: number;
}
interface GSX {
boardingState: number;
deboardingState: number;
}
interface Limits {
minCG: number;
maxCG: number;
maxFuel: number;
maxTOW: number;
maxZFW: number;
minZFW: number;
}
interface LimitsPax extends Limits {
business1: number;
business2: number;
economy1: number;
economy2: number;
forwardCargo: number;
rearCargo: number;
}
interface LimitsF extends Limits {
upper1: number;
upper2: number;
upper3: number;
upper4: number;
lowerForward: number;
lowerRear: number;
}
interface UserData {
isCargo: boolean;
isER: boolean;
isImperial: boolean;
}
interface Options {
GSXSync: boolean;
paxWeight: number;
bagWeight: number;
}

View File

@ -0,0 +1 @@
export type LoadingState = 'preview' | 'loaded';

View File

@ -1,10 +0,0 @@
import '@mui/material';
declare module '@mui/material/styles' {
interface Theme {
screenHeight: number;
}
interface ThemeOptions {
screenHeight: number;
}
}

View File

@ -1,11 +0,0 @@
import { CSSProperties, DOMAttributes, ReactNode } from 'react';
type CustomElement<T> = Partial<T & DOMAttributes<T> & { children: ReactNode }>;
declare global {
namespace JSX {
interface IntrinsicElements {
['virtual-scroll']: CustomElement<{ class?: string; direction: 'x' | 'y'; style?: CSSProperties }>;
}
}
}

View File

@ -1,6 +1,3 @@
import { PaxConfig } from '../configs/pax';
import { SharedConfig } from '../configs/shared';
const getSimBriefFlightPlan = async (simBriefUsername: string) => {
const flightPlanURL = `https://www.simbrief.com/api/xml.fetcher.php?username=${simBriefUsername}&json=1`;
let response: Response;
@ -8,6 +5,7 @@ const getSimBriefFlightPlan = async (simBriefUsername: string) => {
try {
response = await fetch(flightPlanURL);
success = true;
//eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (e: any) {
response = e.response;
}
@ -19,9 +17,10 @@ const getSimBriefFlightPlan = async (simBriefUsername: string) => {
export const ImportFlightPlan = async (
username: string,
config: typeof PaxConfig,
unit: 'kg' | 'lbs',
isER: boolean
maxZFW: number,
maxTOW: number,
maxFuel: number,
isImperial: boolean
) => {
const flightPlan = await getSimBriefFlightPlan(username);
if (!flightPlan.success) {
@ -41,23 +40,17 @@ export const ImportFlightPlan = async (
}
let convFactor = 1;
if (data.params.units === 'kgs' && unit === 'lbs') convFactor = 2.20462262185;
if (data.params.units === 'lbs' && unit === 'kg') convFactor = 1 / 2.20462262185;
if (data.params.units === 'kgs' && isImperial) convFactor = 2.20462262185;
if (data.params.units === 'lbs' && !isImperial) convFactor = 1 / 2.20462262185;
return {
type: 'data',
message: {
plannedZFW: Math.min(config.maxZWF[unit], Math.round(data.weights.est_zfw * convFactor)),
plannedGW: Math.min(
isER ? SharedConfig.maxTOW.er[unit] : SharedConfig.maxTOW.norm[unit],
Math.round(data.weights.est_ramp * convFactor)
),
plannedZFW: Math.min(maxZFW, Math.round(data.weights.est_zfw * convFactor)),
plannedGW: Math.min(maxTOW, Math.round(data.weights.est_ramp * convFactor)),
pax: data.weights.pax_count_actual,
cargo: Math.round(data.weights.freight_added * convFactor),
fuel: Math.min(
isER ? SharedConfig.maxFuel.er[unit] : SharedConfig.maxFuel.norm[unit],
Math.round(data.fuel.plan_ramp * convFactor)
),
fuel: Math.min(maxFuel, Math.round(data.fuel.plan_ramp * convFactor)),
},
};
};

View File

@ -0,0 +1,25 @@
import { COHERENT_COMM_BUS_WASM_CALL, COMM_BUS_UPDATE_TARGET_EVENT } from '../constants';
export const loadAircraft = () => {
Coherent.call(
COHERENT_COMM_BUS_WASM_CALL,
COMM_BUS_UPDATE_TARGET_EVENT,
JSON.stringify({
mode: 3,
})
);
};
export const unloadAircraft = () => {
Coherent.call(
COHERENT_COMM_BUS_WASM_CALL,
COMM_BUS_UPDATE_TARGET_EVENT,
JSON.stringify({
mode: 4,
})
);
};
export const inRangeOf = (value: number, target: number, tolerance: number = 10) => {
return Math.abs(value - target) < tolerance;
};

View File

@ -0,0 +1,306 @@
#include "freighter.h"
// ZFW Entry
void distribute(fPayloadData_t* const targetPayload, const FuelData_t* const fuel, const double ZFWTarget, const bool isImperial, const bool isER) {
// Find payload, num pax and extra cargo
double payload = ZFWTarget - targetPayload->empty - targetPayload->pilot - targetPayload->firstOfficer - targetPayload->engineer -
targetPayload->leftAux - targetPayload->rightAux;
unsigned int cargo = round(payload);
distribute(targetPayload, fuel, cargo, isImperial, isER);
}
// SimBrief Entry
void distribute(fPayloadData_t* const targetPayload, const FuelData_t* const fuel, unsigned int cargo, const bool isImperial, const bool isER) {
// Clear
targetPayload->stations.upper1 = targetPayload->stations.upper2 = targetPayload->stations.upper3 = targetPayload->stations.upper4 =
targetPayload->stations.total = 0;
targetPayload->lowerForward = targetPayload->lowerRear = 0;
unsigned short _cargo = 0;
unsigned int count = MAX_UPPER_CARGO(isImperial) * 4 + MAX_FRONT_CARGO(isImperial) + MAX_REAR_CARGO(isImperial, isER);
// Initial distributiob
while (cargo > 0 && count > 0) {
if (cargo >= 6) {
if (targetPayload->stations.upper1 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper1++;
_cargo++;
}
if (targetPayload->stations.upper2 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper2++;
_cargo++;
}
if (targetPayload->stations.upper3 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper3++;
_cargo++;
}
if (targetPayload->stations.upper4 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper4++;
_cargo++;
}
if (targetPayload->lowerForward < MAX_FRONT_CARGO(isImperial)) {
targetPayload->lowerForward++;
_cargo++;
}
if (targetPayload->lowerRear < MAX_REAR_CARGO(isImperial, isER)) {
targetPayload->lowerRear++;
_cargo++;
}
} else if (cargo == 5) {
if (targetPayload->stations.upper1 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper1++;
_cargo++;
}
if (targetPayload->stations.upper2 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper2++;
_cargo++;
}
if (targetPayload->stations.upper3 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper3++;
_cargo++;
}
if (targetPayload->stations.upper4 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper4++;
_cargo++;
}
if (targetPayload->lowerForward < MAX_FRONT_CARGO(isImperial)) {
targetPayload->lowerForward++;
_cargo++;
}
}
else if (cargo == 4) {
if (targetPayload->stations.upper1 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper1++;
_cargo++;
}
if (targetPayload->stations.upper2 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper2++;
_cargo++;
}
if (targetPayload->stations.upper3 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper3++;
_cargo++;
}
if (targetPayload->stations.upper4 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper4++;
_cargo++;
}
}
else if (cargo == 3) {
if (targetPayload->stations.upper1 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper1++;
_cargo++;
}
if (targetPayload->stations.upper2 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper2++;
_cargo++;
}
if (targetPayload->stations.upper3 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper3++;
_cargo++;
}
}
else if (cargo == 2) {
if (targetPayload->stations.upper1 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper1++;
_cargo++;
}
if (targetPayload->stations.upper2 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper2++;
_cargo++;
}
}
else if (cargo == 1) {
if (targetPayload->stations.upper1 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper1++;
_cargo++;
}
}
cargo -= _cargo;
targetPayload->stations.total += _cargo;
_cargo = 0;
count--;
}
// Refinement
count = MAX_UPPER_CARGO(isImperial) * 4 + MAX_FRONT_CARGO(isImperial) + MAX_REAR_CARGO(isImperial, isER);
while (count > 0) {
generatePayload(targetPayload, isImperial);
calculateCGs(targetPayload, fuel, &targetPayload->ZFWCG, &targetPayload->TOCG, isImperial);
// in front of target
if (targetPayload->ZFWCG < targetPayload->CGTarget - CG_TOLERANCE) {
if (targetPayload->stations.upper1 > 0) {
targetPayload->stations.upper1--;
}
else if (targetPayload->stations.upper2 > 0) {
targetPayload->stations.upper2--;
}
else if (targetPayload->stations.upper3 > 0) {
targetPayload->stations.upper3--;
}
else {
break;
}
if (targetPayload->stations.upper4 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper4++;
}
else if (targetPayload->stations.upper3 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper3++;
}
else if (targetPayload->stations.upper2 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper2++;
}
else {
targetPayload->stations.upper1++;
}
}
// behind target
else if (targetPayload->ZFWCG > targetPayload->CGTarget + CG_TOLERANCE) {
if (targetPayload->stations.upper4 > 0) {
targetPayload->stations.upper4--;
}
else if (targetPayload->stations.upper3 > 0) {
targetPayload->stations.upper3--;
}
else if (targetPayload->stations.upper2 > 0) {
targetPayload->stations.upper2--;
}
else {
break;
}
if (targetPayload->stations.upper1 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper1++;
}
else if (targetPayload->stations.upper2 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper2++;
}
else if (targetPayload->stations.upper3 < MAX_UPPER_CARGO(isImperial)) {
targetPayload->stations.upper3++;
}
else {
targetPayload->stations.upper4++;
}
}
else {
break;
}
count--;
}
// Refinement cargo
count = MAX_FRONT_CARGO(isImperial) + MAX_REAR_CARGO(isImperial, isER);
while (count > 0) {
generatePayload(targetPayload, isImperial);
calculateCGs(targetPayload, fuel, &targetPayload->ZFWCG, &targetPayload->TOCG, isImperial);
// in front of target
if (targetPayload->ZFWCG < targetPayload->CGTarget - CG_TOLERANCE) {
if (targetPayload->lowerForward > 0 && targetPayload->lowerRear < MAX_REAR_CARGO(isImperial, isER)) {
targetPayload->lowerForward--;
targetPayload->lowerRear++;
}
else {
break;
}
}
// behind target
else if (targetPayload->ZFWCG > targetPayload->CGTarget + CG_TOLERANCE) {
if (targetPayload->lowerRear > 0 && targetPayload->lowerForward < MAX_FRONT_CARGO(isImperial)) {
targetPayload->lowerRear--;
targetPayload->lowerForward++;
}
else {
break;
}
}
else {
break;
}
count--;
}
}
// Updates pax stations with their respective weights
// Used internally and used for Station Entry (pax only, cargo is set directly)
void generatePayload(fPayloadData_t* const targetPayload, const bool isImperial) {
targetPayload->upper1Left = targetPayload->upper1Right = (targetPayload->stations.upper1 / 2.0);
targetPayload->upper2Left = targetPayload->upper2Right = (targetPayload->stations.upper2 / 2.0);
targetPayload->upper3Left = targetPayload->upper3Right = (targetPayload->stations.upper3 / 2.0);
targetPayload->upper4Left = targetPayload->upper4Right = (targetPayload->stations.upper4 / 2.0);
targetPayload->total = targetPayload->empty + targetPayload->pilot + targetPayload->firstOfficer + targetPayload->engineer + targetPayload->upper1Left +
targetPayload->upper1Right + targetPayload->upper2Left + targetPayload->upper2Right + targetPayload->upper3Left +
targetPayload->upper3Right + targetPayload->upper4Left + targetPayload->upper4Right + targetPayload->lowerForward +
targetPayload->lowerRear + targetPayload->leftAux + targetPayload->rightAux;
}
// Normalise to Pounds
// MANDATORY BEFORE SETTING WEIGHTS
// USE ON COPY OF GLOBAL STATE ONLY
void normalisePayload(fPayloadData_t* const targetPayload, const bool isImperial) {
targetPayload->empty = TO_POUNDS(isImperial, targetPayload->empty);
targetPayload->pilot = TO_POUNDS(isImperial, targetPayload->pilot);
targetPayload->firstOfficer = TO_POUNDS(isImperial, targetPayload->firstOfficer);
targetPayload->engineer = TO_POUNDS(isImperial, targetPayload->engineer);
targetPayload->upper1Left = TO_POUNDS(isImperial, targetPayload->upper1Left);
targetPayload->upper1Right = TO_POUNDS(isImperial, targetPayload->upper1Right);
targetPayload->upper2Left = TO_POUNDS(isImperial, targetPayload->upper2Left);
targetPayload->upper2Right = TO_POUNDS(isImperial, targetPayload->upper2Right);
targetPayload->upper3Left = TO_POUNDS(isImperial, targetPayload->upper3Left);
targetPayload->upper3Right = TO_POUNDS(isImperial, targetPayload->upper3Right);
targetPayload->upper4Left = TO_POUNDS(isImperial, targetPayload->upper4Left);
targetPayload->upper4Right = TO_POUNDS(isImperial, targetPayload->upper4Right);
targetPayload->lowerForward = TO_POUNDS(isImperial, targetPayload->lowerForward);
targetPayload->lowerRear = TO_POUNDS(isImperial, targetPayload->lowerRear);
targetPayload->leftAux = TO_POUNDS(isImperial, targetPayload->leftAux);
targetPayload->rightAux = TO_POUNDS(isImperial, targetPayload->rightAux);
}
void calculateCGs(const fPayloadData_t* const targetPayload, const FuelData_t* const fuel, double* const ZFWCG, double* const TOCG, const bool isImperial) {
fPayloadData_t localPayload = {};
memcpy(&localPayload, targetPayload, sizeof(localPayload));
normalisePayload(&localPayload, isImperial);
double totalMoment = localPayload.empty * ARM_EMPTY + localPayload.pilot * ARM_PILOT + localPayload.firstOfficer * ARM_FIRST_OFFICER +
localPayload.engineer * ARM_ENGINEER + localPayload.upper1Left * ARM_F_UPPER1_LEFT + localPayload.upper1Right * ARM_F_UPPER1_RIGHT +
localPayload.upper2Left * ARM_F_UPPER2_LEFT + localPayload.upper2Right * ARM_F_UPPER2_RIGHT + localPayload.upper3Left * ARM_F_UPPER3_LEFT +
localPayload.upper3Right * ARM_F_UPPER3_RIGHT + localPayload.upper4Left * ARM_F_UPPER4_LEFT + localPayload.upper4Right * ARM_F_UPPER4_RIGHT +
localPayload.lowerForward * ARM_FORWARD_CARGO + localPayload.lowerRear * ARM_REAR_CARGO + localPayload.leftAux * ARM_LEFT_AUX +
localPayload.rightAux * ARM_RIGHT_AUX;
double totalWeight = localPayload.empty + localPayload.pilot + localPayload.firstOfficer + localPayload.engineer + localPayload.upper1Left +
localPayload.upper1Right + localPayload.upper2Left + localPayload.upper2Right + localPayload.upper3Left + localPayload.upper3Right +
localPayload.upper4Left + localPayload.upper4Right + localPayload.lowerForward + localPayload.lowerRear + localPayload.leftAux +
localPayload.rightAux;
*ZFWCG = TO_PERCENT_MAC(totalMoment / totalWeight);
totalMoment += fuel->main1 * ARM_MAIN1 + fuel->main3 * ARM_MAIN3 + fuel->main2 * ARM_MAIN2 + fuel->upperAux * ARM_UPPER_AUX +
fuel->lowerAux * ARM_LOWER_AUX + fuel->main1Tip * ARM_MAIN1_TIP + fuel->main3Tip * ARM_MAIN3_TIP +
fuel->tail * ARM_TAIL + fuel->forwardAux1 * ARM_FORWARD_AUX1 + fuel->forwardAux2 * ARM_FORWARD_AUX2;
totalWeight += fuel->total;
*TOCG = TO_PERCENT_MAC(totalMoment / totalWeight);
}
void load(const fPayloadData_t* const targetPayload, const HANDLE simConnect, const bool isImperial) {
fPayloadData_t localPayload = {};
memcpy(&localPayload, targetPayload, sizeof(localPayload));
normalisePayload(&localPayload, isImperial);
SimConnect_SetDataOnSimObject(simConnect, DATA_DEFINITION_PAYLOAD_F, SIMCONNECT_OBJECT_ID_USER, 0, 0, sizeof(fPayloadDataSet_t), &localPayload);
}
void unloadF(const HANDLE simConnect, const bool isER) {
fPayloadData_t localPayload = {};
localPayload.leftAux = localPayload.rightAux = isER ? AUX_WEIGHT(true) : 0;
localPayload.pilot = localPayload.firstOfficer = localPayload.engineer = PILOT_WEIGHT(true);
SimConnect_SetDataOnSimObject(simConnect, DATA_DEFINITION_PAYLOAD_F, SIMCONNECT_OBJECT_ID_USER, 0, 0, sizeof(fPayloadDataSet_t), &localPayload);
}

View File

@ -0,0 +1,36 @@
#pragma once
#ifndef __INTELLISENSE__
# define MODULE_EXPORT __attribute__( ( visibility( "default" ) ) )
# define MODULE_WASM_MODNAME(mod) __attribute__((import_module(mod)))
#else
# define MODULE_EXPORT
# define MODULE_WASM_MODNAME(mod)
# define __attribute__(x)
# define __restrict__
#endif
#include <MSFS/MSFS_WindowsTypes.h>
#include <math.h>
#include <algorithm>
#include <SimConnect.h>
#include "types.h"
// ZFW Entry
void distribute(fPayloadData_t* const targetPayload, const FuelData_t* const fuel, const double ZFWTarget, const bool isImperial, const bool isER);
// SimBrief Entry
void distribute(fPayloadData_t* const targetPayload, const FuelData_t* const fuel, unsigned int cargo, const bool isImperial, const bool isER);
// Updates pax stations with their respective weights
// Used internally and used for Station Entry (pax only, cargo is ste directly)
// STATION WEIGHTS ARE NOT NORMALISED TO POUNDS
void generatePayload(fPayloadData_t* const targetPayload, const bool isImperial);
// Normalise to Pounds
// For Station Entry: CALL AFTER `generatePayload`
void normalisePayload(fPayloadData_t* const targetPayload, const bool isImperial);
void calculateCGs(const fPayloadData_t* const targetPayload, const FuelData_t* const fuel, double* const ZFWCG, double* const TOCG, const bool isImperial);
void load(const fPayloadData_t* const targetPayload, const HANDLE simConnect, const bool isImperial);
void unloadF(const HANDLE simConnect, const bool isER);

View File

@ -0,0 +1,25 @@
// load-manager-cli.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include "../wasm-module/pax.h"
int main()
{
bool isImperial = false;
bool isER = true;
paxPayloadData_t targetPaxPayloadData = paxPayloadData_t();
targetPaxPayloadData.empty = FROM_POUNDS(isImperial, 283975);
targetPaxPayloadData.pilot = PAX_WEIGHT(isImperial);
targetPaxPayloadData.firstOfficer = PAX_WEIGHT(isImperial);
targetPaxPayloadData.engineer = PAX_WEIGHT(isImperial);
targetPaxPayloadData.cabinCrewFront = FRONT_CREW_WEIGHT(isImperial);
targetPaxPayloadData.cabinCrewRear = REAR_CREW_WEIGHT(isImperial);
targetPaxPayloadData.leftAux = isER ? AUX_WEIGHT(isImperial) : 0;
targetPaxPayloadData.rightAux = isER ? AUX_WEIGHT(isImperial) : 0;
FuelData_t liveFuelData = FuelData_t();
distribute(&targetPaxPayloadData, &liveFuelData, 162000.0, 20.5, isImperial);
}

View File

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{992caf4b-b3f6-4a86-a1c1-663686082c5e}</ProjectGuid>
<RootNamespace>loadmanagercli</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<IntDir>$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IntDir>$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="pax.cpp" />
<ClCompile Include="load-manager-cli.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="pax.h" />
<ClInclude Include="types.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>
rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="load-manager-cli.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="pax.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="pax.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="types.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>

View File

@ -0,0 +1,980 @@
#include "load-manager.h"
#include "pax.h"
// Data
UserData_t* UserData;
GSXData_t* GSXData;
paxPayloadData_t* livePaxPayloadData;
paxPayloadData_t* targetPaxPayloadData;
fPayloadData_t* liveFPayloadData;
fPayloadData_t* targetFPayloadData;
FuelData_t* liveFuelData;
UserOptions_t* UserOptions;
// Operational
bool commBusCallbackRegistered;
HANDLE simConnect;
FILE* logFile;
MODULE_VAR tick18 = { TICK18 };
// Init
extern "C" MSFS_CALLBACK void module_init(void) {
log(stdout, MODULE_NAME"Starting init.\n");
logFile = fopen("\\work\\log.txt", "w");
if (logFile == NULL)
{
log(stderr, MODULE_NAME"Error creating logfile.\n");
}
UserData = new UserData_t();
GSXData = new GSXData_t();
livePaxPayloadData = new paxPayloadData_t();
targetPaxPayloadData = new paxPayloadData_t();
liveFPayloadData = new fPayloadData_t();
targetFPayloadData = new fPayloadData_t();
liveFuelData = new FuelData_t();
UserOptions = new UserOptions_t();
targetFPayloadData->CGTarget = targetPaxPayloadData->CGTarget = 21;
#pragma region SimConnect
// SimConnect open
HRESULT hr;
hr = SimConnect_Open(&simConnect, "KHOFMANN TFDi MD-11 Load Manager", nullptr, 0, 0, 0);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not open SimConnect connection, terminating.\n");
return;
}
// SimConnect Empty Weight data definition
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_EMPTY_WEIGHT, "EMPTY WEIGHT", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add EMPTY WEIGHT to data definition, terminating.\n");
return;
}
// SimConnect Pax/F Weight data definition
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_PAX, "PAYLOAD STATION WEIGHT:1", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:1 to PAX data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_F, "PAYLOAD STATION WEIGHT:1", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:1 to F data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_PAX, "PAYLOAD STATION WEIGHT:2", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:2 to PAX data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_F, "PAYLOAD STATION WEIGHT:2", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:2 to F data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_PAX, "PAYLOAD STATION WEIGHT:3", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:3 to PAX data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_F, "PAYLOAD STATION WEIGHT:3", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:3 to F data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_PAX, "PAYLOAD STATION WEIGHT:4", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:4 to PAX data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_F, "PAYLOAD STATION WEIGHT:4", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:4 to F data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_PAX, "PAYLOAD STATION WEIGHT:5", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:5 to PAX data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_F, "PAYLOAD STATION WEIGHT:5", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:5 to F data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_PAX, "PAYLOAD STATION WEIGHT:6", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:6 to PAX data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_F, "PAYLOAD STATION WEIGHT:6", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:6 to F data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_PAX, "PAYLOAD STATION WEIGHT:7", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:7 to PAX data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_F, "PAYLOAD STATION WEIGHT:7", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:7 to F data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_PAX, "PAYLOAD STATION WEIGHT:8", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:8 to PAX data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_F, "PAYLOAD STATION WEIGHT:8", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:8 to F data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_PAX, "PAYLOAD STATION WEIGHT:9", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:9 to PAX data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_F, "PAYLOAD STATION WEIGHT:9", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:9 to F data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_PAX, "PAYLOAD STATION WEIGHT:10", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:10 to PAX data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_F, "PAYLOAD STATION WEIGHT:10", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:10 to F data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_PAX, "PAYLOAD STATION WEIGHT:11", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:11 to PAX data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_F, "PAYLOAD STATION WEIGHT:11", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:11 to F data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_PAX, "PAYLOAD STATION WEIGHT:12", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:12 to PAX data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_F, "PAYLOAD STATION WEIGHT:12", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:12 to F data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_PAX, "PAYLOAD STATION WEIGHT:13", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:13 to PAX data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_F, "PAYLOAD STATION WEIGHT:13", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:13 to F data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_PAX, "PAYLOAD STATION WEIGHT:14", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:14 to PAX data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_F, "PAYLOAD STATION WEIGHT:14", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:14 to F data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_PAX, "PAYLOAD STATION WEIGHT:15", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:15 to PAX data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_F, "PAYLOAD STATION WEIGHT:15", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:15 to F data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_PAX, "PAYLOAD STATION WEIGHT:16", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:16 to PAX data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_PAX, "PAYLOAD STATION WEIGHT:17", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:17 to PAX data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_PAX, "PAYLOAD STATION WEIGHT:18", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:18 to PAX data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_PAX, "PAYLOAD STATION WEIGHT:19", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:19 to PAX data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_PAX, "PAYLOAD STATION WEIGHT:20", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:20 to PAX data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_PAYLOAD_PAX, "PAYLOAD STATION WEIGHT:21", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add PAYLOAD STATION WEIGHT:21 to PAX data definition, terminating.\n");
return;
}
// SimConnect Fuel data definition
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_FUEL, "FUEL WEIGHT PER GALLON", "pounds", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add FUEL WEIGHT PER GALLON to data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_FUEL, "FUEL TANK LEFT MAIN QUANTITY", "gallons", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add FUEL TANK LEFT MAIN QUANTITY to data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_FUEL, "FUEL TANK RIGHT MAIN QUANTITY", "gallons", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add FUEL TANK RIGHT MAIN QUANTITY to data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_FUEL, "FUEL TANK CENTER QUANTITY", "gallons", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add FUEL TANK CENTER QUANTITY to data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_FUEL, "FUEL TANK CENTER2 QUANTITY", "gallons", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add FUEL TANK CENTER2 QUANTITY to data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_FUEL, "FUEL TANK CENTER3 QUANTITY", "gallons", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add FUEL TANK CENTER3 QUANTITY to data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_FUEL, "FUEL TANK LEFT TIP QUANTITY", "gallons", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add FUEL TANK LEFT TIP QUANTITY to data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_FUEL, "FUEL TANK RIGHT TIP QUANTITY", "gallons", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add FUEL TANK RIGHT TIP QUANTITY to data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_FUEL, "FUEL TANK EXTERNAL1 QUANTITY", "gallons", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add FUEL TANK EXTERNAL1 QUANTITY to data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_FUEL, "FUEL TANK LEFT AUX QUANTITY", "gallons", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add FUEL TANK LEFT AUX QUANTITY to data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_FUEL, "FUEL TANK RIGHT AUX QUANTITY", "gallons", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add FUEL TANK RIGHT AUX QUANTITY to data definition, terminating.\n");
return;
}
// GSX LVars
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_GSX, "L:FSDT_GSX_BOARDING_STATE", "number", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add L:FSDT_GSX_BOARDING_STATE to data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_GSX, "L:FSDT_GSX_DEBOARDING_STATE", "number", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add L:FSDT_GSX_DEBOARDING_STATE to data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_GSX, "L:FSDT_GSX_NUMPASSENGERS_BOARDING_TOTAL", "number", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add L:FSDT_GSX_NUMPASSENGERS_BOARDING_TOTAL to data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_GSX, "L:FSDT_GSX_NUMPASSENGERS_DEBOARDING_TOTAL", "number", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add L:FSDT_GSX_NUMPASSENGERS_DEBOARDING_TOTAL to data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_GSX, "L:FSDT_GSX_BOARDING_CARGO_PERCENT", "number", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add L:FSDT_GSX_BOARDING_CARGO_PERCENT to data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_GSX, "L:FSDT_GSX_DEBOARDING_CARGO_PERCENT", "number", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add L:FSDT_GSX_DEBOARDING_CARGO_PERCENT to data definition, terminating.\n");
return;
}
// User LVars
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_USER_DATA, "L:MD11_EFB_IS_CARGO", "bool", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add L:MD11_EFB_IS_CARGO to data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_USER_DATA, "L:MD11_OPT_ER", "bool", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add L:MD11_OPT_ER to data definition, terminating.\n");
return;
}
hr = SimConnect_AddToDataDefinition(simConnect, DATA_DEFINITION_USER_DATA, "L:MD11_EFB_OPTIONS_GENERAL", "number", SIMCONNECT_DATATYPE_FLOAT64);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not add L:MD11_EFB_OPTIONS_GENERAL to data definition, terminating.\n");
return;
}
log(stdout, MODULE_NAME"Data definitions created\n");
// SimConnect Requests
hr = SimConnect_RequestDataOnSimObject(simConnect, DATA_REQUEST_EMPTY_WEIGHT, DATA_DEFINITION_EMPTY_WEIGHT, SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD_VISUAL_FRAME);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not request empty weight, terminating.\n");
return;
}
hr = SimConnect_RequestDataOnSimObject(simConnect, DATA_REQUEST_PAYLOAD_PAX, DATA_DEFINITION_PAYLOAD_PAX, SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD_VISUAL_FRAME);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not request payload pax, terminating.\n");
return;
}
hr = SimConnect_RequestDataOnSimObject(simConnect, DATA_REQUEST_PAYLOAD_F, DATA_DEFINITION_PAYLOAD_F, SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD_VISUAL_FRAME);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not request payload f, terminating.\n");
return;
}
hr = SimConnect_RequestDataOnSimObject(simConnect, DATA_REQUEST_FUEL, DATA_DEFINITION_FUEL, SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD_VISUAL_FRAME);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not request fuel, terminating.\n");
return;
}
hr = SimConnect_RequestDataOnSimObject(simConnect, DATA_REQUEST_GSX, DATA_DEFINITION_GSX, SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD_VISUAL_FRAME);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not request GSX, terminating.\n");
return;
}
hr = SimConnect_RequestDataOnSimObject(simConnect, DATA_REQUEST_USER_DATA, DATA_DEFINITION_USER_DATA, SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD_SECOND);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not request user data, terminating.\n");
return;
}
log(stdout, MODULE_NAME"Requests created.\n");
hr = SimConnect_CallDispatch(simConnect, MyDispatchProc, nullptr);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Could not set dispatch proc, terminating.\n");
return;
}
log(stdout, MODULE_NAME"Callback created.\n");
#pragma endregion
// CommBus
if (!fsCommBusRegister(COMM_BUS_UPDATE_TARGET_EVENT, commBusUpdateTargetCallback)) {
log(stderr, MODULE_NAME"Could not register CommBus, terminating.\n");
return;
}
else {
log(stdout, MODULE_NAME"CommBus registered.\n");
}
// Options
FILE* optionsFile = fopen("\\work\\options.json", "rb");
if (optionsFile != NULL) {
char readBuffer[256];
rapidjson::FileReadStream is(optionsFile, readBuffer, sizeof(readBuffer));
rapidjson::Document optionsDoc;
optionsDoc.ParseStream(is);
if (optionsDoc.HasMember("GSXSync")) UserOptions->GSXSync = optionsDoc["GSXSync"].GetBool();
if (optionsDoc.HasMember("paxWeightKG")) UserOptions->paxWeightKG = optionsDoc["paxWeightKG"].GetDouble();
if (optionsDoc.HasMember("bagWeightKG")) UserOptions->bagWeightKG = optionsDoc["bagWeightKG"].GetDouble();
if (optionsDoc.HasMember("paxWeightLBS")) UserOptions->paxWeightLBS = optionsDoc["paxWeightLBS"].GetDouble();
if (optionsDoc.HasMember("bagWeightLBS")) UserOptions->bagWeightLBS = optionsDoc["bagWeightLBS"].GetDouble();
fclose(optionsFile);
log(stdout, MODULE_NAME"Options loaded.\n");
}
else {
log(stdout, MODULE_NAME"Options file not present, skip.\n");
}
log(stdout, MODULE_NAME"Initialized.\n");
}
// Deinit
extern "C" MSFS_CALLBACK void module_deinit(void) {
HRESULT hr;
hr = SimConnect_Close(simConnect);
if (hr != S_OK) {
log(stderr, MODULE_NAME"Failed to close SimConnect.\n");
}
log(stdout, MODULE_NAME"SimConnect closed.\n");
delete UserData;
delete GSXData;
delete livePaxPayloadData;
delete targetPaxPayloadData;
delete liveFPayloadData;
delete targetFPayloadData;
delete liveFuelData;
log(stdout, MODULE_NAME"Global memory released.\n");
fsCommBusUnregister(COMM_BUS_UPDATE_TARGET_EVENT, commBusUpdateTargetCallback);
log(stdout, MODULE_NAME"CommBus unregistered.\n");
// Options
rapidjson::Document optionsDoc;
rapidjson::Document::AllocatorType& allocator = optionsDoc.GetAllocator();
optionsDoc.SetObject();
optionsDoc.AddMember("GSXSync", UserOptions->GSXSync, allocator);
optionsDoc.AddMember("paxWeightKG", UserOptions->paxWeightKG, allocator);
optionsDoc.AddMember("bagWeightKG", UserOptions->bagWeightKG, allocator);
optionsDoc.AddMember("paxWeightLBS", UserOptions->paxWeightLBS, allocator);
optionsDoc.AddMember("bagWeightLBS", UserOptions->bagWeightLBS, allocator);
FILE* optionsFile = fopen("\\work\\options.json", "wb");
if (optionsFile != NULL) {
char writeBuffer[256];
rapidjson::FileWriteStream os(optionsFile, writeBuffer, sizeof(writeBuffer));
rapidjson::Writer<rapidjson::FileWriteStream> writer(os);
optionsDoc.Accept(writer);
fclose(optionsFile);
log(stdout, MODULE_NAME"Options written.\n");
}
else {
log(stdout, MODULE_NAME"Filed to open options file for write, skip.\n");
}
log(stdout, MODULE_NAME"Deinitialized.\n");
}
// Main loop
extern "C" MSFS_CALLBACK bool Load_Manager_gauge_callback(FsContext ctx, int service_id, void* pData) {
switch (service_id) {
case PANEL_SERVICE_PRE_UPDATE: {
lookup_var(&tick18);
if (fmod(tick18.var_value.n, 3) == 0) sendData();
}
default:
break;
}
return true;
}
// CommBus
void commBusUpdateTargetCallback(const char* args, unsigned int size, void* ctx) {
printf("Target payload update request: %d", receiveData(args));
}
#pragma region JSON data handling
// JSON receive
int receiveData(const char* buf) {
if (liveFPayloadData == nullptr || livePaxPayloadData == nullptr || targetFPayloadData == nullptr || targetPaxPayloadData == nullptr ||
liveFuelData == nullptr || UserData == nullptr) return 0;
rapidjson::Document document;
document.Parse(buf);
if (document.HasParseError()) return document.GetParseError();
if (document.HasMember("mode")) {
int mode = document["mode"].GetUint();
switch(mode) {
// SB Entry
case 0: {
if (!document.HasMember("cargo") || !document.HasMember("CGTarget")) return -1;
unsigned int cargo = document["cargo"].GetInt();
double CGTarget = document["CGTarget"].GetDouble();
if (UserData->isCargo) {
targetFPayloadData->CGTarget = CGTarget;
distribute(targetFPayloadData, liveFuelData, cargo, UserData->isImperial, UserData->isER);
}
else {
if (!document.HasMember("numPax")) return -1;
unsigned short numPax = document["numPax"].GetInt();
targetPaxPayloadData->CGTarget = CGTarget;
distribute(targetPaxPayloadData, liveFuelData, numPax, cargo, UserData->isImperial, UserData->isER);
}
break;
}
// ZFW Entry
case 1: {
if (!document.HasMember("ZFWTarget") || !document.HasMember("CGTarget")) return -1;
double ZFWTarget = document["ZFWTarget"].GetDouble();
double CGTarget = document["CGTarget"].GetDouble();
if (UserData->isCargo) {
targetFPayloadData->CGTarget = CGTarget;
distribute(targetFPayloadData, liveFuelData, ZFWTarget, UserData->isImperial, UserData->isER);
}
else {
targetPaxPayloadData->CGTarget = CGTarget;
distribute(targetPaxPayloadData, liveFuelData, ZFWTarget, UserData->isImperial, UserData->isER);
}
break;
}
// Station Entry
case 2: {
if (UserData->isCargo) {
if (!document.HasMember("upper1") || !document.HasMember("upper2") ||
!document.HasMember("upper3") || !document.HasMember("upper4") ||
!document.HasMember("lowerForward") || !document.HasMember("lowerRear")) return -1;
targetFPayloadData->stations.upper1 = document["upper1"].GetInt();
targetFPayloadData->stations.upper2 = document["upper2"].GetInt();
targetFPayloadData->stations.upper3 = document["upper3"].GetInt();
targetFPayloadData->stations.upper4 = document["upper4"].GetInt();
targetFPayloadData->lowerForward = document["lowerForward"].GetDouble();
targetFPayloadData->lowerRear = document["lowerRear"].GetDouble();
generatePayload(targetFPayloadData, UserData->isImperial);
}
else {
if (!document.HasMember("business1") || !document.HasMember("business2") ||
!document.HasMember("economy1") || !document.HasMember("economy2") ||
!document.HasMember("forwardCargo") || !document.HasMember("rearCargo")) return -1;
targetPaxPayloadData->paxCount.business1 = document["business1"].GetInt();
targetPaxPayloadData->paxCount.business2 = document["business2"].GetInt();
targetPaxPayloadData->paxCount.economy1 = document["economy1"].GetInt();
targetPaxPayloadData->paxCount.economy2 = document["economy2"].GetInt();
targetPaxPayloadData->forwardCargo = document["forwardCargo"].GetDouble();
targetPaxPayloadData->rearCargo = document["rearCargo"].GetDouble();
generatePayload(targetPaxPayloadData, UserData->isImperial);
}
break;
}
// Trigger load
case 3: {
if (UserData->isCargo) {
load(targetFPayloadData, simConnect, UserData->isImperial);
}
else {
load(targetPaxPayloadData, simConnect, UserData->isImperial);
}
break;
}
// Trigger unload
case 4: {
if (UserData->isCargo) {
unloadF(simConnect, UserData->isER);
}
else {
unload(simConnect, UserData->isER);
}
break;
}
default:
break;
}
sendData();
}
else return -1;
return 0;
}
// JSON send
void sendData () {
if (liveFPayloadData == nullptr || livePaxPayloadData == nullptr || targetFPayloadData == nullptr || targetPaxPayloadData == nullptr ||
liveFuelData == nullptr || UserData == nullptr || GSXData == nullptr) return;
rapidjson::Document document;
rapidjson::Document::AllocatorType& allocator = document.GetAllocator();
document.SetObject();
rapidjson::Value livePayload;
livePayload.SetObject();
rapidjson::Value targetPayload;
targetPayload.SetObject();
rapidjson::Value GSX;
GSX.SetObject();
rapidjson::Value userData;
userData.SetObject();
rapidjson::Value limits;
limits.SetObject();
rapidjson::Value options;
options.SetObject();
rapidjson::StringBuffer strbuf;
rapidjson::Writer<rapidjson::StringBuffer> writer(strbuf);
#pragma region Live Payload
// OEW (empty + aux tank wgts)
livePayload.AddMember("empty",
FROM_POUNDS(UserData->isImperial, UserData->isCargo ? liveFPayloadData->empty : livePaxPayloadData->empty) +
FROM_POUNDS(UserData->isImperial, UserData->isCargo ? liveFPayloadData->leftAux : livePaxPayloadData->leftAux) +
FROM_POUNDS(UserData->isImperial, UserData->isCargo ? liveFPayloadData->rightAux : livePaxPayloadData->rightAux),
allocator);
// Cargo only
if (UserData->isCargo) {
livePayload.AddMember("crew",
FROM_POUNDS(UserData->isImperial, liveFPayloadData->pilot) +
FROM_POUNDS(UserData->isImperial, liveFPayloadData->firstOfficer) +
FROM_POUNDS(UserData->isImperial, liveFPayloadData->engineer),
allocator);
livePayload.AddMember("upper1", FROM_POUNDS(UserData->isImperial, liveFPayloadData->upper1Left + liveFPayloadData->upper1Right), allocator);
livePayload.AddMember("upper2", FROM_POUNDS(UserData->isImperial, liveFPayloadData->upper2Left + liveFPayloadData->upper2Right), allocator);
livePayload.AddMember("upper3", FROM_POUNDS(UserData->isImperial, liveFPayloadData->upper3Left + liveFPayloadData->upper3Right), allocator);
livePayload.AddMember("upper4", FROM_POUNDS(UserData->isImperial, liveFPayloadData->upper4Left + liveFPayloadData->upper4Right), allocator);
livePayload.AddMember("lowerForward", FROM_POUNDS(UserData->isImperial, liveFPayloadData->lowerForward), allocator);
livePayload.AddMember("lowerRear", FROM_POUNDS(UserData->isImperial, liveFPayloadData->lowerRear), allocator);
livePayload.AddMember("total", FROM_POUNDS(UserData->isImperial, liveFPayloadData->total), allocator);
// CGs
calculateCGs(liveFPayloadData, liveFuelData, &liveFPayloadData->ZFWCG, &liveFPayloadData->TOCG, true);
livePayload.AddMember("ZFWCG", liveFPayloadData->ZFWCG, allocator);
livePayload.AddMember("TOCG", liveFPayloadData->TOCG, allocator);
}
// Pax only (converted to passengers)
else {
livePayload.AddMember("crew",
FROM_POUNDS(UserData->isImperial, livePaxPayloadData->pilot) + FROM_POUNDS(UserData->isImperial, livePaxPayloadData->firstOfficer) +
FROM_POUNDS(UserData->isImperial, livePaxPayloadData->engineer) + FROM_POUNDS(UserData->isImperial, livePaxPayloadData->cabinCrewFront) +
FROM_POUNDS(UserData->isImperial, livePaxPayloadData->cabinCrewRear),
allocator);
livePayload.AddMember("business1",
(short)(FROM_POUNDS(UserData->isImperial, livePaxPayloadData->business1Left + livePaxPayloadData->business1Center +
livePaxPayloadData->business1Right) / PAX_WEIGHT(UserData->isImperial)),
allocator);
livePayload.AddMember("business2",
(short)(FROM_POUNDS(UserData->isImperial, livePaxPayloadData->business2Left + livePaxPayloadData->business2Center +
livePaxPayloadData->business2Right) / PAX_WEIGHT(UserData->isImperial)),
allocator);
livePayload.AddMember("economy1",
(short)(FROM_POUNDS(UserData->isImperial, livePaxPayloadData->economy1Left + livePaxPayloadData->economy1Center +
livePaxPayloadData->economy1Right) / PAX_WEIGHT(UserData->isImperial)),
allocator);
livePayload.AddMember("economy2",
(short)(FROM_POUNDS(UserData->isImperial, livePaxPayloadData->economy2Left + livePaxPayloadData->economy2Center +
livePaxPayloadData->economy2Right) / PAX_WEIGHT(UserData->isImperial)),
allocator);
livePayload.AddMember("forwardCargo", FROM_POUNDS(UserData->isImperial, livePaxPayloadData->forwardCargo), allocator);
livePayload.AddMember("rearCargo", FROM_POUNDS(UserData->isImperial, livePaxPayloadData->rearCargo), allocator);
livePayload.AddMember("total", FROM_POUNDS(UserData->isImperial, livePaxPayloadData->total), allocator);
// CGs
calculateCGs(livePaxPayloadData, liveFuelData, &livePaxPayloadData->ZFWCG, &livePaxPayloadData->TOCG, true);
livePayload.AddMember("ZFWCG",livePaxPayloadData->ZFWCG, allocator);
livePayload.AddMember("TOCG", livePaxPayloadData->TOCG, allocator);
}
// Fuel
livePayload.AddMember("fuel", FROM_POUNDS(UserData->isImperial, liveFuelData->total), allocator);
#pragma endregion
#pragma region Target Payload
// OEW (empty + aux tank wgts)
targetPayload.AddMember("empty",
(UserData->isCargo ? targetFPayloadData->empty : targetPaxPayloadData->empty)+
(UserData->isCargo ? targetFPayloadData->leftAux : targetPaxPayloadData->leftAux) +
(UserData->isCargo ? targetFPayloadData->rightAux : targetPaxPayloadData->rightAux),
allocator);
// Cargo only
if (UserData->isCargo) {
targetPayload.AddMember("crew", targetFPayloadData->pilot + targetFPayloadData->firstOfficer + targetFPayloadData->engineer, allocator);
targetPayload.AddMember("upper1", targetFPayloadData->upper1Left + targetFPayloadData->upper1Right, allocator);
targetPayload.AddMember("upper2", targetFPayloadData->upper2Left + targetFPayloadData->upper2Right, allocator);
targetPayload.AddMember("upper3", targetFPayloadData->upper3Left + targetFPayloadData->upper3Right, allocator);
targetPayload.AddMember("upper4", targetFPayloadData->upper4Left + targetFPayloadData->upper4Right, allocator);
targetPayload.AddMember("lowerForward", targetFPayloadData->lowerForward, allocator);
targetPayload.AddMember("lowerRear", targetFPayloadData->lowerRear, allocator);
targetPayload.AddMember("total", targetFPayloadData->total, allocator);
targetPayload.AddMember("CGTarget", targetFPayloadData->CGTarget, allocator);
// CGs
calculateCGs(targetFPayloadData, liveFuelData, &targetFPayloadData->ZFWCG, &targetFPayloadData->TOCG, UserData->isImperial);
targetPayload.AddMember("ZFWCG", targetFPayloadData->ZFWCG, allocator);
targetPayload.AddMember("TOCG", targetFPayloadData->TOCG, allocator);
}
// Pax only (converted to passengers)
else {
targetPayload.AddMember("crew",
targetPaxPayloadData->pilot + targetPaxPayloadData->firstOfficer + targetPaxPayloadData->engineer +
targetPaxPayloadData->cabinCrewFront + targetPaxPayloadData->cabinCrewRear,
allocator);
targetPayload.AddMember("business1", targetPaxPayloadData->paxCount.business1, allocator);
targetPayload.AddMember("business2", targetPaxPayloadData->paxCount.business2, allocator);
targetPayload.AddMember("economy1", targetPaxPayloadData->paxCount.economy1, allocator);
targetPayload.AddMember("economy2", targetPaxPayloadData->paxCount.economy2, allocator);
targetPayload.AddMember("forwardCargo", targetPaxPayloadData->forwardCargo, allocator);
targetPayload.AddMember("rearCargo", targetPaxPayloadData->rearCargo, allocator);
targetPayload.AddMember("total", targetPaxPayloadData->total, allocator);
targetPayload.AddMember("CGTarget", targetPaxPayloadData->CGTarget, allocator);
// CGs
calculateCGs(targetPaxPayloadData, liveFuelData, &targetPaxPayloadData->ZFWCG, &targetPaxPayloadData->TOCG, UserData->isImperial);
targetPayload.AddMember("ZFWCG", targetPaxPayloadData->ZFWCG, allocator);
targetPayload.AddMember("TOCG", targetPaxPayloadData->TOCG, allocator);
}
#pragma endregion
// GSX
GSX.AddMember("boardingState", GSXData->boardingState, allocator);
GSX.AddMember("deboardingState", GSXData->deboardingState, allocator);
// User Data
userData.AddMember<bool>("isCargo", UserData->isCargo, allocator);
userData.AddMember<bool>("isER", UserData->isER, allocator);
userData.AddMember<bool>("isImperial", UserData->isImperial, allocator);
// Limits
limits.AddMember("minCG", MIN_CG, allocator);
limits.AddMember("maxCG", MAX_CG, allocator);
limits.AddMember("maxFuel", UserData->isER ? MAX_FUEL_ER(UserData->isImperial) : MAX_FUEL(UserData->isImperial), allocator);
limits.AddMember("maxTOW", UserData->isER ? MAX_TOW_ER(UserData->isImperial) : MAX_TOW(UserData->isImperial), allocator);
// Cargo Only
if (UserData->isCargo) {
limits.AddMember("upper1", MAX_UPPER_CARGO(UserData->isImperial), allocator);
limits.AddMember("upper2", MAX_UPPER_CARGO(UserData->isImperial), allocator);
limits.AddMember("upper3", MAX_UPPER_CARGO(UserData->isImperial), allocator);
limits.AddMember("upper4", MAX_UPPER_CARGO(UserData->isImperial), allocator);
limits.AddMember("lowerForward", MAX_FRONT_CARGO(UserData->isImperial), allocator);
limits.AddMember("lowerRear", MAX_REAR_CARGO(UserData->isImperial, UserData->isER), allocator);
limits.AddMember("maxZFW", MAX_F_ZFW(UserData->isImperial), allocator);
limits.AddMember("minZFW", targetFPayloadData->empty + targetFPayloadData->leftAux + targetFPayloadData->rightAux, allocator);
}
// Pax only
else {
limits.AddMember("business1", MAX_BUSINESS_1, allocator);
limits.AddMember("business2", MAX_BUSINESS_2, allocator);
limits.AddMember("economy1", MAX_ECONOMY_1, allocator);
limits.AddMember("economy2", MAX_ECONOMY_2, allocator);
limits.AddMember("forwardCargo", MAX_FRONT_CARGO(UserData->isImperial), allocator);
limits.AddMember("rearCargo", MAX_REAR_CARGO(UserData->isImperial, UserData->isER), allocator);
limits.AddMember("maxZFW", MAX_PAX_ZFW(UserData->isImperial), allocator);
limits.AddMember("minZFW", targetPaxPayloadData->empty + targetPaxPayloadData->leftAux + targetPaxPayloadData->rightAux, allocator);
}
// Options
options.AddMember("GSXSync", UserOptions->GSXSync, allocator);
options.AddMember("paxWeight", UserData->isImperial ? UserOptions->paxWeightLBS : UserOptions->paxWeightKG, allocator);
options.AddMember("bagWeight", UserData->isImperial ? UserOptions->bagWeightLBS : UserOptions->bagWeightKG, allocator);
// Construct document
document.AddMember("livePayload", livePayload.Move(), allocator);
document.AddMember("targetPayload", targetPayload.Move(), allocator);
document.AddMember("GSX", GSX.Move(), allocator);
document.AddMember("userData", userData.Move(), allocator);
document.AddMember("limits", limits.Move(), allocator);
document.AddMember("options", options.Move(), allocator);
// Write to CommBus
document.Accept(writer);
fsCommBusCall(COMM_BUS_LIVE_DATA_EVENT, strbuf.GetString(), strbuf.GetSize(), FsCommBusBroadcast_JS);
}
#pragma endregion
// Logfile
void log(FILE* file, const char* format, void* optionalElement)
{
if (logFile != NULL)
{
fprintf(logFile, format, optionalElement);
fflush(logFile);
}
fprintf(file, format, optionalElement);
}
// SimConnect
void CALLBACK MyDispatchProc(SIMCONNECT_RECV* pData, DWORD cbData, void* pContext) {
switch (pData->dwID) {
case SIMCONNECT_RECV_ID_SIMOBJECT_DATA: {
SIMCONNECT_RECV_SIMOBJECT_DATA* pObjData = (SIMCONNECT_RECV_SIMOBJECT_DATA*)pData;
switch (pObjData->dwRequestID) {
case DATA_REQUEST_EMPTY_WEIGHT: {
liveFPayloadData->empty = livePaxPayloadData->empty = *((double*)&pObjData->dwData);
break;
}
case DATA_REQUEST_PAYLOAD_F: {
fPayloadData_t* data = (fPayloadData_t*)&pObjData->dwData;
data->empty = liveFPayloadData->empty;
memcpy(liveFPayloadData, data, sizeof(fPayloadData_t));
liveFPayloadData->total = liveFPayloadData->empty + liveFPayloadData->pilot + liveFPayloadData->firstOfficer +
liveFPayloadData->engineer + liveFPayloadData->upper1Left + liveFPayloadData->upper1Right +
liveFPayloadData->upper2Left + liveFPayloadData->upper2Right + liveFPayloadData->upper3Left +
liveFPayloadData->upper3Right + liveFPayloadData->upper4Left + liveFPayloadData->upper4Right +
liveFPayloadData->lowerForward + liveFPayloadData->lowerRear + liveFPayloadData->leftAux +
liveFPayloadData->rightAux;
break;
}
case DATA_REQUEST_PAYLOAD_PAX: {
paxPayloadData_t* data = (paxPayloadData_t*)&pObjData->dwData;
data->empty = livePaxPayloadData->empty;
memcpy(livePaxPayloadData, data, sizeof(paxPayloadData_t));
livePaxPayloadData->total = livePaxPayloadData->empty + livePaxPayloadData->pilot + livePaxPayloadData->firstOfficer +
livePaxPayloadData->engineer + livePaxPayloadData->cabinCrewFront + livePaxPayloadData->business1Left +
livePaxPayloadData->business1Center + livePaxPayloadData->business1Right + livePaxPayloadData->business2Left +
livePaxPayloadData->business2Center + livePaxPayloadData->business2Right + livePaxPayloadData->economy1Left +
livePaxPayloadData->economy1Center + livePaxPayloadData->economy1Right + livePaxPayloadData->economy2Left +
livePaxPayloadData->economy2Center + livePaxPayloadData->economy2Right + livePaxPayloadData->cabinCrewRear +
livePaxPayloadData->forwardCargo + livePaxPayloadData->rearCargo + livePaxPayloadData->leftAux +
livePaxPayloadData->rightAux;
break;
}
case DATA_REQUEST_FUEL: {
FuelData_t* data = (FuelData_t*)&pObjData->dwData;
liveFuelData->main1 = data->main1 * data->poundsPerGallon;
liveFuelData->main3 = data->main3 * data->poundsPerGallon;
liveFuelData->main2 = data->main2 * data->poundsPerGallon;
liveFuelData->upperAux = data->upperAux * data->poundsPerGallon;
liveFuelData->lowerAux = data->lowerAux * data->poundsPerGallon;
liveFuelData->main1Tip = data->main1Tip * data->poundsPerGallon;
liveFuelData->main3Tip = data->main3Tip * data->poundsPerGallon;
liveFuelData->tail = data->tail * data->poundsPerGallon;
liveFuelData->forwardAux1 = data->forwardAux1 * data->poundsPerGallon;
liveFuelData->forwardAux2 = data->forwardAux2 * data->poundsPerGallon;
liveFuelData->total = liveFuelData->main1 + liveFuelData->main3 + liveFuelData->main2 + liveFuelData->upperAux +
liveFuelData->lowerAux + liveFuelData->main1Tip + liveFuelData->main3Tip + liveFuelData->tail +
liveFuelData->forwardAux1 + liveFuelData->forwardAux2;
break;
}
case DATA_REQUEST_GSX: {
GSXData_t* data = (GSXData_t*)&pObjData->dwData;
memcpy(GSXData, data, sizeof(GSXData_t));
if (UserOptions->GSXSync) {
if (GSXData->boardingState == GSX_SERVICE_ACTIVE) {
double cargoBoarded = GSXData->cargoBoarded;
if (UserData->isCargo) {
fPayloadData_t localPayload = {};
memcpy(&localPayload, targetFPayloadData, sizeof(localPayload));
localPayload.stations.upper1 = targetFPayloadData->stations.upper1 * (cargoBoarded / 100);
localPayload.stations.upper2 = targetFPayloadData->stations.upper2 * (cargoBoarded / 100);
localPayload.stations.upper3 = targetFPayloadData->stations.upper3 * (cargoBoarded / 100);
localPayload.stations.upper4 = targetFPayloadData->stations.upper4 * (cargoBoarded / 100);
localPayload.lowerForward = targetFPayloadData->lowerForward * (cargoBoarded / 100);
localPayload.lowerRear = targetFPayloadData->lowerRear * (cargoBoarded / 100);
generatePayload(&localPayload, UserData->isImperial);
load(&localPayload, simConnect, UserData->isImperial);
}
else {
double passengersBoarded = GSXData->passengersBoarded;
paxPayloadData_t localPayload = {};
memcpy(&localPayload, targetPaxPayloadData, sizeof(localPayload));
localPayload.paxCount.business1 = min(targetPaxPayloadData->paxCount.business1, passengersBoarded);
passengersBoarded -= localPayload.paxCount.business1;
localPayload.paxCount.business2 = min(targetPaxPayloadData->paxCount.business2, passengersBoarded);
passengersBoarded -= localPayload.paxCount.business2;
localPayload.paxCount.economy1 = min(targetPaxPayloadData->paxCount.economy1, passengersBoarded);
passengersBoarded -= localPayload.paxCount.economy1;
localPayload.paxCount.economy2 = min(targetPaxPayloadData->paxCount.economy2, passengersBoarded);
passengersBoarded -= localPayload.paxCount.economy2;
localPayload.forwardCargo = targetPaxPayloadData->forwardCargo * (cargoBoarded / 100);
localPayload.rearCargo = targetPaxPayloadData->rearCargo * (cargoBoarded / 100);
generatePayload(&localPayload, UserData->isImperial);
load(&localPayload, simConnect, UserData->isImperial);
}
}
if (GSXData->deboardingState == GSX_SERVICE_ACTIVE) {
double cargoDeboarded = GSXData->cargoDeboarded;
if (UserData->isCargo) {
fPayloadData_t localPayload = {};
memcpy(&localPayload, targetFPayloadData, sizeof(localPayload));
localPayload.stations.upper1 -= targetFPayloadData->stations.upper1 * (cargoDeboarded / 100);
localPayload.stations.upper2 -= targetFPayloadData->stations.upper2 * (cargoDeboarded / 100);
localPayload.stations.upper3 -= targetFPayloadData->stations.upper3 * (cargoDeboarded / 100);
localPayload.stations.upper4 -= targetFPayloadData->stations.upper4 * (cargoDeboarded / 100);
localPayload.lowerForward -= targetFPayloadData->lowerForward * (cargoDeboarded / 100);
localPayload.lowerRear -= targetFPayloadData->lowerRear * (cargoDeboarded / 100);
generatePayload(&localPayload, UserData->isImperial);
load(&localPayload, simConnect, UserData->isImperial);
}
else {
double passengersDeboarded = GSXData->passengersDeboarded;
paxPayloadData_t localPayload = {};
memcpy(&localPayload, targetPaxPayloadData, sizeof(localPayload));
localPayload.paxCount.business1 -= min(targetPaxPayloadData->paxCount.business1, passengersDeboarded);
passengersDeboarded -= targetPaxPayloadData->paxCount.business1 - localPayload.paxCount.business1;
localPayload.paxCount.business2 -= min(targetPaxPayloadData->paxCount.business2, passengersDeboarded);
passengersDeboarded -= targetPaxPayloadData->paxCount.business2 - localPayload.paxCount.business2;
localPayload.paxCount.economy1 -= min(targetPaxPayloadData->paxCount.economy1, passengersDeboarded);
passengersDeboarded -= targetPaxPayloadData->paxCount.economy1 - localPayload.paxCount.economy1;
localPayload.paxCount.economy2 -= min(targetPaxPayloadData->paxCount.economy2, passengersDeboarded);
passengersDeboarded -= targetPaxPayloadData->paxCount.economy2 - localPayload.paxCount.economy2;
localPayload.forwardCargo -= targetPaxPayloadData->forwardCargo * (cargoDeboarded / 100);
localPayload.rearCargo -= targetPaxPayloadData->rearCargo * (cargoDeboarded / 100);
generatePayload(&localPayload, UserData->isImperial);
load(&localPayload, simConnect, UserData->isImperial);
}
}
}
break;
}
case DATA_REQUEST_USER_DATA: {
UserData_t* data = (UserData_t*)&pObjData->dwData;
data->isImperial = ((long)data->isImperial) & 1;
memcpy(UserData, data, sizeof(UserData_t));
// Update static weights
// Shared part 1
targetFPayloadData->empty = targetPaxPayloadData->empty = FROM_POUNDS(UserData->isImperial, liveFPayloadData->empty);
targetFPayloadData->pilot = targetPaxPayloadData->pilot = targetFPayloadData->firstOfficer = targetPaxPayloadData->firstOfficer =
targetFPayloadData->engineer = targetPaxPayloadData->engineer = PILOT_WEIGHT(UserData->isImperial);
// Shared part 2
targetFPayloadData->leftAux = targetPaxPayloadData->leftAux = targetFPayloadData->rightAux = targetPaxPayloadData->rightAux =
UserData->isER ? AUX_WEIGHT(UserData->isImperial) : 0;
// Pax only fixed weights
if (!UserData->isCargo) {
targetPaxPayloadData->cabinCrewFront = FRONT_CREW_WEIGHT(UserData->isImperial);
targetPaxPayloadData->cabinCrewRear = REAR_CREW_WEIGHT(UserData->isImperial);
}
break;
}
default: {
break;
}
}
break;
}
case SIMCONNECT_RECV_ID_EXCEPTION:
{
SIMCONNECT_RECV_EXCEPTION* pEx = (SIMCONNECT_RECV_EXCEPTION*)pData;
log(stderr, MODULE_NAME"SimConnect Exception: %i\n", &pEx->dwException);
break;
}
default: {
break;
}
}
}

View File

@ -0,0 +1,38 @@
#pragma once
#ifndef __INTELLISENSE__
# define MODULE_EXPORT __attribute__( ( visibility( "default" ) ) )
# define MODULE_WASM_MODNAME(mod) __attribute__((import_module(mod)))
#else
# define MODULE_EXPORT
# define MODULE_WASM_MODNAME(mod)
# define __attribute__(x)
# define __restrict__
#endif
#include <MSFS/MSFS.h>
#include <MSFS/MSFS_CommBus.h>
#include <MSFS/Legacy/gauges.h>
#include <rapidjson/document.h>
#include <rapidjson/filereadstream.h>
#include "rapidjson/filewritestream.h"
#include <rapidjson/writer.h>
#include <SimConnect.h>
#include "types.h"
#include "pax.h"
#include "freighter.h"
#define MODULE_NAME "[KHOFMANN TFDi MD-11 Load Manager] "
#define COMM_BUS_LIVE_DATA_EVENT "khofmann_tfdi_md-11_load_manager_live_data"
#define COMM_BUS_UPDATE_TARGET_EVENT "khofmann_tfdi_md-11_load_manager_update_target"
void commBusUpdateTargetCallback(const char* args, unsigned int size, void* ctx);
int receiveData(const char* buf);
void sendData();
void CALLBACK MyDispatchProc(SIMCONNECT_RECV* pData, DWORD cbData, void* pContext);
void log(FILE* file, const char* format, void* optionalElement = NULL);

View File

@ -0,0 +1,37 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.13.36105.23
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "load-manager", "load-manager.vcxproj", "{A5468B35-BBBD-4C55-97ED-81BFE343B0E4}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "load-manager-cli", "load-manager-cli.vcxproj", "{992CAF4B-B3F6-4A86-A1C1-663686082C5E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|MSFS = Debug|MSFS
Debug|x64 = Debug|x64
Release|MSFS = Release|MSFS
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A5468B35-BBBD-4C55-97ED-81BFE343B0E4}.Debug|MSFS.ActiveCfg = Debug|MSFS
{A5468B35-BBBD-4C55-97ED-81BFE343B0E4}.Debug|MSFS.Build.0 = Debug|MSFS
{A5468B35-BBBD-4C55-97ED-81BFE343B0E4}.Debug|x64.ActiveCfg = Debug|x64
{A5468B35-BBBD-4C55-97ED-81BFE343B0E4}.Release|MSFS.ActiveCfg = Release|MSFS
{A5468B35-BBBD-4C55-97ED-81BFE343B0E4}.Release|MSFS.Build.0 = Release|MSFS
{A5468B35-BBBD-4C55-97ED-81BFE343B0E4}.Release|x64.ActiveCfg = Release|MSFS
{992CAF4B-B3F6-4A86-A1C1-663686082C5E}.Debug|MSFS.ActiveCfg = Debug|x64
{992CAF4B-B3F6-4A86-A1C1-663686082C5E}.Debug|x64.ActiveCfg = Debug|x64
{992CAF4B-B3F6-4A86-A1C1-663686082C5E}.Debug|x64.Build.0 = Debug|x64
{992CAF4B-B3F6-4A86-A1C1-663686082C5E}.Release|MSFS.ActiveCfg = Release|x64
{992CAF4B-B3F6-4A86-A1C1-663686082C5E}.Release|x64.ActiveCfg = Release|x64
{992CAF4B-B3F6-4A86-A1C1-663686082C5E}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {835CA9EE-0C67-4B32-B910-3F3A40943047}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>

View File

@ -0,0 +1,299 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|MSFS">
<Configuration>Debug</Configuration>
<Platform>MSFS</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|MSFS">
<Configuration>Release</Configuration>
<Platform>MSFS</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<ProjectGuid>{A5468B35-BBBD-4C55-97ED-81BFE343B0E4}</ProjectGuid>
<RootNamespace>Module</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<ProjectName>load-manager</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|MSFS'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>MSFS</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>MSFS</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|MSFS'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>MSFS</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>MSFS</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|MSFS'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|MSFS'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|MSFS'">
<TargetExt>.wasm</TargetExt>
<GenerateManifest />
<LinkIncremental />
<IncludePath>$(MSFS_IncludePath)</IncludePath>
<TargetName>$(ProjectName)</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<TargetExt>.wasm</TargetExt>
<GenerateManifest />
<LinkIncremental />
<IncludePath>$(MSFS_IncludePath)</IncludePath>
<TargetName>$(ProjectName)</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|MSFS'">
<TargetExt>.wasm</TargetExt>
<IncludePath>$(MSFS_IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<TargetExt>.wasm</TargetExt>
<IncludePath>$(MSFS_IncludePath)</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|MSFS'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>
</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<BufferSecurityCheck>false</BufferSecurityCheck>
<AdditionalIncludeDirectories>
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>__wasi__;_STRING_H_CPLUSPLUS_98_CONFORMANCE_;_WCHAR_H_CPLUSPLUS_98_CONFORMANCE_;_LIBCPP_HAS_NO_THREADS;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ShowIncludes>false</ShowIncludes>
<ExceptionHandling>false</ExceptionHandling>
<RuntimeTypeInfo>
</RuntimeTypeInfo>
<SupportJustMyCode>
</SupportJustMyCode>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<BasicRuntimeChecks>
</BasicRuntimeChecks>
<LanguageStandard>stdcpp14</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>
</SubSystem>
<AdditionalDependencies>
</AdditionalDependencies>
<IgnoreAllDefaultLibraries>
</IgnoreAllDefaultLibraries>
<NoEntryPoint>true</NoEntryPoint>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<RandomizedBaseAddress>
</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>
</ProgramDatabaseFile>
<ImportLibrary>
</ImportLibrary>
<ProfileGuidedDatabase>
</ProfileGuidedDatabase>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>
</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<BufferSecurityCheck>false</BufferSecurityCheck>
<AdditionalIncludeDirectories>
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>__wasi__;_STRING_H_CPLUSPLUS_98_CONFORMANCE_;_WCHAR_H_CPLUSPLUS_98_CONFORMANCE_;_LIBCPP_HAS_NO_THREADS;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ShowIncludes>false</ShowIncludes>
<ExceptionHandling>false</ExceptionHandling>
<RuntimeTypeInfo>
</RuntimeTypeInfo>
<SupportJustMyCode>
</SupportJustMyCode>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<BasicRuntimeChecks>
</BasicRuntimeChecks>
<LanguageStandard>stdcpp14</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>
</SubSystem>
<AdditionalDependencies>
</AdditionalDependencies>
<IgnoreAllDefaultLibraries>
</IgnoreAllDefaultLibraries>
<NoEntryPoint>true</NoEntryPoint>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<RandomizedBaseAddress>
</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>
</ProgramDatabaseFile>
<ImportLibrary>
</ImportLibrary>
<ProfileGuidedDatabase>
</ProfileGuidedDatabase>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|MSFS'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>__wasi__;__wasm32__;_STRING_H_CPLUSPLUS_98_CONFORMANCE_;_WCHAR_H_CPLUSPLUS_98_CONFORMANCE_;_LIBCPP_NO_EXCEPTIONS;_LIBCPP_HAS_NO_THREADS;_LIBCPP_STD_VER=14;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BufferSecurityCheck>false</BufferSecurityCheck>
<ExceptionHandling>false</ExceptionHandling>
<DebugInformationFormat>false</DebugInformationFormat>
<SupportJustMyCode>
</SupportJustMyCode>
<LanguageStandard>stdcpp14</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>
</SubSystem>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>
</IgnoreAllDefaultLibraries>
<NoEntryPoint>true</NoEntryPoint>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<RandomizedBaseAddress>
</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ProgramDatabaseFile>
</ProgramDatabaseFile>
<ImportLibrary>
</ImportLibrary>
<ProfileGuidedDatabase>
</ProfileGuidedDatabase>
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>__wasi__;__wasm32__;_STRING_H_CPLUSPLUS_98_CONFORMANCE_;_WCHAR_H_CPLUSPLUS_98_CONFORMANCE_;_LIBCPP_NO_EXCEPTIONS;_LIBCPP_HAS_NO_THREADS;_LIBCPP_STD_VER=14;_WINDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BufferSecurityCheck>false</BufferSecurityCheck>
<ExceptionHandling>false</ExceptionHandling>
<DebugInformationFormat>false</DebugInformationFormat>
<SupportJustMyCode>
</SupportJustMyCode>
<LanguageStandard>stdcpp14</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>
</SubSystem>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>
</IgnoreAllDefaultLibraries>
<NoEntryPoint>true</NoEntryPoint>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<RandomizedBaseAddress>
</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ProgramDatabaseFile>
</ProgramDatabaseFile>
<ImportLibrary>
</ImportLibrary>
<ProfileGuidedDatabase>
</ProfileGuidedDatabase>
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="freighter.cpp" />
<ClCompile Include="load-manager.cpp" />
<ClCompile Include="pax.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="freighter.h" />
<ClInclude Include="load-manager.h" />
<ClInclude Include="pax.h" />
<ClInclude Include="types.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="load-manager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="pax.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="freighter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="pax.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="load-manager.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="types.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="freighter.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
</Project>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>

View File

@ -0,0 +1,985 @@
 0>Property reassignment: $(MSBuildExtensionsPath)="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild" (previous value: "C:\Program Files (x86)\MSBuild") at
Property reassignment: $(MSBuildExtensionsPath32)="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild" (previous value: "C:\Program Files (x86)\MSBuild") at
Search paths being used for $(MSBuildExtensionsPath) are C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild;$(MSBuildProgramFiles32)\MSBuild
Trying to import C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\$(MSBuildToolsVersion)\Microsoft.Common.props using extensions path C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild
Property reassignment: $(MSBuildProjectExtensionsPath)="C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\obj\" (previous value: "obj\") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Microsoft.Common.props (60,5)
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Microsoft.Common.props(84,119): message : Property 'MSBuildUserExtensionsPath' with value 'C:\Users\llego\AppData\Local\Microsoft\MSBuild' expanded from the environment.
Search paths being used for $(MSBuildExtensionsPath) are C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild;$(MSBuildProgramFiles32)\MSBuild
Trying to import C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\$(MSBuildToolsVersion)\Imports\Microsoft.Common.props\ImportBefore\* using extensions path C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Imports\Microsoft.Common.props\ImportBefore\Microsoft.NuGet.ImportBefore.props(14,5): message : Property 'VisualStudioVersion' with value '17.0' expanded from the environment.
The "Configuration" property is a global property, and cannot be modified.
Search paths being used for $(MSBuildExtensionsPath) are C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild;$(MSBuildProgramFiles32)\MSBuild
Search paths being used for $(MSBuildExtensionsPath) are C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild;$(MSBuildProgramFiles32)\MSBuild
The "Configuration" property is a global property, and cannot be modified.
The "LangID" property is a global property, and cannot be modified.
The "SolutionDir" property is a global property, and cannot be modified.
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Default.props(218,5): message : Property 'LOCALAPPDATA' with value 'C:\Users\llego\AppData\Local' expanded from the environment.
Property reassignment: $(UseDebugLibraries)="true" (previous value: "false") at C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj (37,5)
Property reassignment: $(CharacterSet)="MultiByte" (previous value: "NotSet") at C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj (39,5)
Assembly loaded during Evaluation: Microsoft.Build.Utilities.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (location: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Microsoft.Build.Utilities.Core.dll, MVID: 31a80c7f-4ffa-4599-b4dd-076487b86c14, AppDomain: [Default])
Property reassignment: $(_RelativeVCTargetsPath_15)="Common7\IDE\VC\VCTargets\" (previous value: "Msbuild\Microsoft\VC\v150\") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Redirect.15.props (31,5)
Property reassignment: $(_RelativeToolsetFiles_15)="Common7\IDE\VC\VCTargets\Platforms\x64\PlatformToolsets\MSFS\Toolset.props;Common7\IDE\VC\VCTargets\Platforms\x64\PlatformToolsets\MSFS\Toolset.targets;Common7\IDE\VC\VCTargets\Platforms\x64\Platform.props;Common7\IDE\VC\VCTargets\Platforms\x64\Platform.targets" (previous value: "Msbuild\Microsoft\VC\v150\Platforms\x64\PlatformToolsets\MSFS\Toolset.props;Msbuild\Microsoft\VC\v150\Platforms\x64\PlatformToolsets\MSFS\Toolset.targets;Msbuild\Microsoft\VC\v150\Platforms\x64\Platform.props;Msbuild\Microsoft\VC\v150\Platforms\x64\Platform.targets") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Redirect.15.props (33,5)
Property reassignment: $(_RelativePlatformDefaultProps)="Platforms\x64\\Microsoft.Cpp.x64.default.props" (previous value: "Platforms\x64\Platform.Default.props") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Redirect.11.props (47,5)
Property reassignment: $(_RelativePlatformProps)="Platforms\x64\Microsoft.Cpp.x64.props" (previous value: "Platforms\x64\Platform.props") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Redirect.11.props (48,5)
Property reassignment: $(_RelativePlatformTargets)="Platforms\x64\Microsoft.Cpp.x64.targets" (previous value: "Platforms\x64\Platform.targets") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Redirect.11.props (49,5)
Property reassignment: $(_RelativeToolsetProps)="Platforms\x64\PlatformToolsets\MSFS\Microsoft.Cpp.x64.MSFS.props" (previous value: "Platforms\x64\PlatformToolsets\MSFS\Toolset.props") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Redirect.11.props (50,5)
Property reassignment: $(_RelativeToolsetTargets)="Platforms\x64\PlatformToolsets\MSFS\Microsoft.Cpp.x64.MSFS.targets" (previous value: "Platforms\x64\PlatformToolsets\MSFS\Toolset.targets") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Redirect.11.props (51,5)
Property reassignment: $(_RelativeToolsetFiles)="Platforms\x64\PlatformToolsets\MSFS\Microsoft.Cpp.x64.MSFS.props;Platforms\x64\PlatformToolsets\MSFS\Microsoft.Cpp.x64.MSFS.targets;Platforms\x64\Microsoft.Cpp.x64.props;Platforms\x64\Microsoft.Cpp.x64.targets" (previous value: "Platforms\x64\PlatformToolsets\MSFS\Toolset.props;Platforms\x64\PlatformToolsets\MSFS\Toolset.targets;Platforms\x64\Platform.props;Platforms\x64\Platform.targets") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Redirect.11.props (53,5)
Property reassignment: $(WindowsSdkDir_10)="C:\Program Files (x86)\Windows Kits\10\" (previous value: "") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.WindowsSDK.props (18,5)
Property reassignment: $(NETFXKitsDir)="C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8.1\" (previous value: "") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.WindowsSDK.props (41,5)
Property reassignment: $(NETFXSDKDir)="C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\" (previous value: "") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.WindowsSDK.props (44,5)
Property reassignment: $(WindowsSDK_ExecutablePath_x86)="C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x86;;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8.1 Tools" (previous value: "C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x86;") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.WindowsSDK.props (209,5)
Property reassignment: $(WindowsSDK_ExecutablePath_x64)="C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64;;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8.1 Tools\x64" (previous value: "C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64;") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.WindowsSDK.props (210,5)
Property reassignment: $(TargetExt)=".exe" (previous value: "") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Common.props (28,5)
Property reassignment: $(VC_ExecutablePath_Loc)="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x86\1033;;;" (previous value: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x86\1033;;") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Common.props (88,5)
Property reassignment: $(VC_ExecutablePath_Loc)="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x86\1033;;;;" (previous value: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x86\1033;;;") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Common.props (89,5)
Property reassignment: $(VC_ExecutablePath_Loc)="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x86\1033;;;;;" (previous value: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x86\1033;;;;") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Common.props (90,5)
Property reassignment: $(VC_ExecutablePath_Loc)="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x86\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x86\1033;;;;;;" (previous value: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x86\1033;;;;;") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Common.props (91,5)
Property reassignment: $(VC_ExecutablePath_Loc)="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x86\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x86\1033;;;;;;;" (previous value: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x86\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x86\1033;;;;;;") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Common.props (92,5)
Property reassignment: $(VC_ExecutablePath_Loc)="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x86\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x86\1033;;;;;;;;" (previous value: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x86\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x86\1033;;;;;;;") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Common.props (93,5)
Property reassignment: $(VC_ExecutablePath_Loc)="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostArm64\x86\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x86\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x86\1033;;;;;;;;;" (previous value: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x86\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x86\1033;;;;;;;;") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Common.props (94,5)
Property reassignment: $(VC_ExecutablePath_Loc)="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostArm64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostArm64\x86\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x86\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x86\1033;;;;;;;;;;" (previous value: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostArm64\x86\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x86\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x86\1033;;;;;;;;;") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Common.props (95,5)
Property reassignment: $(VC_ExecutablePath_Loc)="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostArm64\arm\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostArm64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostArm64\x86\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x86\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x86\1033;;;;;;;;;;;" (previous value: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostArm64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostArm64\x86\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x86\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x86\1033;;;;;;;;;;") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Common.props (96,5)
Property reassignment: $(VC_ExecutablePath_Loc)="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostArm64\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostArm64\arm\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostArm64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostArm64\x86\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x86\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x86\1033;;;;;;;;;;;;" (previous value: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostArm64\arm\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostArm64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostArm64\x86\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x86\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\arm\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\1033;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x86\1033;;;;;;;;;;;") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Common.props (97,5)
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Common.props(147,5): message : Property 'COMPUTERNAME' with value 'FSXDOSE' expanded from the environment.
Property reassignment: $(RemoteDebuggerDeployDebugCppRuntime)="true" (previous value: "false") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Common.props (153,5)
Property reassignment: $(MultiProcMaxCount)="0" (previous value: "") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Common.props (214,5)
Property reassignment: $(MsvcAnalysisToolsPath)="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64" (previous value: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Analysis.props (29,5)
Property reassignment: $(MsvcAnalysisPluginPath)="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64" (previous value: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Analysis.props (33,5)
Property reassignment: $(EspXtensions)="EnumIndex.dll;CppCoreCheck.dll;" (previous value: "CppCoreCheck.dll;") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CodeAnalysis.Extensions.props (21,5)
Property reassignment: $(EspXtensions)="HResultCheck.dll;EnumIndex.dll;CppCoreCheck.dll;" (previous value: "EnumIndex.dll;CppCoreCheck.dll;") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CodeAnalysis.Extensions.props (24,5)
Property reassignment: $(EspXtensions)="VariantClear.dll;HResultCheck.dll;EnumIndex.dll;CppCoreCheck.dll;" (previous value: "HResultCheck.dll;EnumIndex.dll;CppCoreCheck.dll;") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CodeAnalysis.Extensions.props (27,5)
Property reassignment: $(ConcurrencyCheckPath)="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\ConcurrencyCheck.dll" (previous value: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x86\ConcurrencyCheck.dll") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CodeAnalysis.Extensions.props (33,5)
Property reassignment: $(EspXtensions)="ConcurrencyCheck.dll;VariantClear.dll;HResultCheck.dll;EnumIndex.dll;CppCoreCheck.dll;" (previous value: "VariantClear.dll;HResultCheck.dll;EnumIndex.dll;CppCoreCheck.dll;") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CodeAnalysis.Extensions.props (34,5)
Property reassignment: $(_PropertySheetDisplayName)="Multi-byte Character Support" (previous value: "Core Windows Libraries") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.MultiByteCharSupport.props (15,5)
Property reassignment: $(_PropertySheetDisplayName)="Application" (previous value: "Multi-byte Character Support") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Application.props (15,5)
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.MSVC.Toolset.Common.props(55,5): message : Property 'Path' with value 'c:\program files\imagemagick-7.0.10-q8;c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\windows\system32\windowspowershell\v1.0\;c:\windows\system32\openssh\;c:\program files\nvidia corporation\nvidia nvdlisr;c:\windows\system32\config\systemprofile\appdata\local\microsoft\windowsapps;c:\program files\git\cmd;c:\program files\microsoft sql server\130\toolsn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Toolsn\;C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Microsoft SQL Server\150\Toolsn\;C:\Program Files\dotnet;C:\Program Files\dotnet\;C:\Program Files (x86)\Meld\;C:\Program Files\Git\cmd;C:\Users\llego\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\PuTTY\;C:\Users\llego\scoop\shims;C:\Users\llego\AppData\Local\pnpm;C:\Users\llego\AppData\Local\Microsoft\WindowsApps;C:\Users\llego\.dotnet\tools;C:\Users\llego\AppData\Local\Programs\Microsoft VS CodeC:\Program Files\IPFS Desktop\resources\app.asar.unpacked\src\ipfs-on-path\scripts-win;C:\Users\llego\.dotnet\tools;C:\Users\llego\AppData\Local\Microsoft\WindowsApps;C:\texlive\2023\windows;C:\Users\llego\AppData\Roaming\npm;C:\Users\llego\AppData\Local\Pandoc\;C:\texlive\2025\bin\windows' expanded from the environment.
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.MSVC.Toolset.Common.props(56,5): message : Property 'SystemRoot' with value 'C:\WINDOWS' expanded from the environment.
Property reassignment: $(TargetExt)=".wasm" (previous value: ".exe") at C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj (81,5)
Property reassignment: $(GenerateManifest)="" (previous value: "true") at C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj (82,5)
Property reassignment: $(LinkIncremental)="" (previous value: "true") at C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj (83,5)
Property reassignment: $(IncludePath)="" (previous value: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\include;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include;;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;;;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\winrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8.1\Include\um;") at C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj (84,5)
The "SolutionExt" property is a global property, and cannot be modified.
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Current.targets(45,27): message : Property 'PROCESSOR_ARCHITECTURE' with value 'AMD64' expanded from the environment.
Property reassignment: $(ExtensionsToDeleteOnClean)="*.cdf;*.cache;*.obj;*.obj.enc;*.ilk;*.ipdb;*.iobj;*.resources;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;*.tlog;*.manifest;*.res;*.pch;*.exp;*.idb;*.rep;*.xdc;*.pdb;*_manifest.rc;*.bsc;*.sbr;*.xml;*.metagen;*.bi;C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\x64\Debug\load-manager.wasm.manifest;C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\x64\Debug\load-manager.tlb;C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\x64\Debug\load-manager.pdb;C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\x64\Debug\load-manager.wasm;C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\x64\Debug\load-manager.bsc;C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\x64\Debug\load-manager.ilk;C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\x64\Debug\load-manager.wasm.intermediate.manifest;load-manager\x64\Debug\load-manager.vcxproj.FileListAbsolute.txt" (previous value: "*.cdf;*.cache;*.obj;*.obj.enc;*.ilk;*.ipdb;*.iobj;*.resources;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;*.tlog;*.manifest;*.res;*.pch;*.exp;*.idb;*.rep;*.xdc;*.pdb;*_manifest.rc;*.bsc;*.sbr;*.xml;*.metagen;*.bi") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets (40,5)
Property reassignment: $(DebugType)="none" (previous value: "") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.BuildSteps.Targets (32,5)
Search paths being used for $(MSBuildExtensionsPath) are C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild;$(MSBuildProgramFiles32)\MSBuild
Search paths being used for $(MSBuildExtensionsPath) are C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild;$(MSBuildProgramFiles32)\MSBuild
Trying to import C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportBefore\* using extensions path C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild
The "Configuration" property is a global property, and cannot be modified.
Property reassignment: $(_DocumentationFileProduced)="false" (previous value: "true") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets (185,5)
The "DevEnvDir" property is a global property, and cannot be modified.
The "SolutionName" property is a global property, and cannot be modified.
The "SolutionFileName" property is a global property, and cannot be modified.
The "SolutionPath" property is a global property, and cannot be modified.
The "SolutionDir" property is a global property, and cannot be modified.
The "SolutionExt" property is a global property, and cannot be modified.
Property reassignment: $(AutoUnifyAssemblyReferences)="false" (previous value: "true") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets (369,5)
Property reassignment: $(MSBuildCopyMarkerName)="load-man.74C1EDB1" (previous value: "load-manager.vcxproj") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets (392,5)
Property reassignment: $(MSBuildCopyMarkerName)="load-man.74C1EDB1.Up2Date" (previous value: "load-man.74C1EDB1") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets (393,5)
Property reassignment: $(ProcessorArchitecture)="amd64" (previous value: "x64") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets (528,5)
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(562,42): message : Property 'MSBuildExtensionsPath64' with value 'C:\Program Files\MSBuild' expanded from the environment.
Property reassignment: $(DelaySign)="" (previous value: "false") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets (580,5)
Property reassignment: $(AssemblySearchPaths)="{CandidateAssemblyFiles};C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\lib\x64;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\lib\x64;" (previous value: "{CandidateAssemblyFiles}") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets (649,5)
Property reassignment: $(AssemblySearchPaths)="{CandidateAssemblyFiles};C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\lib\x64;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\lib\x64;;{HintPathFromItem}" (previous value: "{CandidateAssemblyFiles};C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\lib\x64;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\lib\x64;") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets (650,5)
Property reassignment: $(AssemblySearchPaths)="{CandidateAssemblyFiles};C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\lib\x64;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\lib\x64;;{HintPathFromItem};{TargetFrameworkDirectory}" (previous value: "{CandidateAssemblyFiles};C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\lib\x64;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\lib\x64;;{HintPathFromItem}") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets (651,5)
Property reassignment: $(AssemblySearchPaths)="{CandidateAssemblyFiles};C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\lib\x64;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\lib\x64;;{HintPathFromItem};{TargetFrameworkDirectory};{AssemblyFoldersFromConfig:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\AssemblyFolders.config,};" (previous value: "{CandidateAssemblyFiles};C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\lib\x64;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\lib\x64;;{HintPathFromItem};{TargetFrameworkDirectory}") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets (652,5)
Property reassignment: $(AssemblySearchPaths)="{CandidateAssemblyFiles};C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\lib\x64;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\lib\x64;;{HintPathFromItem};{TargetFrameworkDirectory};{AssemblyFoldersFromConfig:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\AssemblyFolders.config,};;{Registry:Software\Microsoft\,,AssemblyFoldersEx}" (previous value: "{CandidateAssemblyFiles};C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\lib\x64;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\lib\x64;;{HintPathFromItem};{TargetFrameworkDirectory};{AssemblyFoldersFromConfig:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\AssemblyFolders.config,};") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets (653,5)
Property reassignment: $(AssemblySearchPaths)="{CandidateAssemblyFiles};C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\lib\x64;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\lib\x64;;{HintPathFromItem};{TargetFrameworkDirectory};{AssemblyFoldersFromConfig:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\AssemblyFolders.config,};;{Registry:Software\Microsoft\,,AssemblyFoldersEx};{AssemblyFolders}" (previous value: "{CandidateAssemblyFiles};C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\lib\x64;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\lib\x64;;{HintPathFromItem};{TargetFrameworkDirectory};{AssemblyFoldersFromConfig:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\AssemblyFolders.config,};;{Registry:Software\Microsoft\,,AssemblyFoldersEx}") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets (654,5)
Property reassignment: $(AssemblySearchPaths)="{CandidateAssemblyFiles};C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\lib\x64;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\lib\x64;;{HintPathFromItem};{TargetFrameworkDirectory};{AssemblyFoldersFromConfig:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\AssemblyFolders.config,};;{Registry:Software\Microsoft\,,AssemblyFoldersEx};{AssemblyFolders};{GAC}" (previous value: "{CandidateAssemblyFiles};C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\lib\x64;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\lib\x64;;{HintPathFromItem};{TargetFrameworkDirectory};{AssemblyFoldersFromConfig:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\AssemblyFolders.config,};;{Registry:Software\Microsoft\,,AssemblyFoldersEx};{AssemblyFolders}") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets (655,5)
Property reassignment: $(AssemblySearchPaths)="{CandidateAssemblyFiles};C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\lib\x64;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\lib\x64;;{HintPathFromItem};{TargetFrameworkDirectory};{AssemblyFoldersFromConfig:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\AssemblyFolders.config,};;{Registry:Software\Microsoft\,,AssemblyFoldersEx};{AssemblyFolders};{GAC};{RawFileName}" (previous value: "{CandidateAssemblyFiles};C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\lib\x64;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\lib\x64;;{HintPathFromItem};{TargetFrameworkDirectory};{AssemblyFoldersFromConfig:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\AssemblyFolders.config,};;{Registry:Software\Microsoft\,,AssemblyFoldersEx};{AssemblyFolders};{GAC}") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets (656,5)
Property reassignment: $(AssemblySearchPaths)="{CandidateAssemblyFiles};C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\lib\x64;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\lib\x64;;{HintPathFromItem};{TargetFrameworkDirectory};{AssemblyFoldersFromConfig:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\AssemblyFolders.config,};;{Registry:Software\Microsoft\,,AssemblyFoldersEx};{AssemblyFolders};{GAC};{RawFileName};C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\x64\Debug\" (previous value: "{CandidateAssemblyFiles};C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\lib\x64;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\lib\x64;;{HintPathFromItem};{TargetFrameworkDirectory};{AssemblyFoldersFromConfig:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\AssemblyFolders.config,};;{Registry:Software\Microsoft\,,AssemblyFoldersEx};{AssemblyFolders};{GAC};{RawFileName}") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets (657,5)
Property reassignment: $(_SGenGenerateSerializationAssembliesConfig)="Auto" (previous value: "") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets (3917,5)
Property reassignment: $(_SGenGenerateSerializationAssembliesConfig)="Off" (previous value: "Auto") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets (3918,5)
Property reassignment: $(_TargetsThatPrepareProjectReferences)="
AssignProjectConfiguration;
_SplitProjectReferencesByFileExistence
" (previous value: "_SplitProjectReferencesByFileExistence") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets (5129,5)
Property reassignment: $(_CodeAnalysisTreatWarningsAsErrors)="false" (previous value: "") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VisualStudio\v17.0\CodeAnalysis\Microsoft.CodeAnalysis.targets (125,5)
Property reassignment: $(CAExcludePath)="C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\winrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8.1\Include\um;" (previous value: "C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\winrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8.1\Include\um;") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VisualStudio\v17.0\CodeAnalysis\Microsoft.CodeAnalysis.targets (235,5)
Property reassignment: $(CAExcludePath)="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\winrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8.1\Include\um;" (previous value: "C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\winrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8.1\Include\um;") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VisualStudio\v17.0\CodeAnalysis\Microsoft.CodeAnalysis.targets (236,5)
Property reassignment: $(CAExcludePath)="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\include;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\winrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8.1\Include\um;" (previous value: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\winrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8.1\Include\um;") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VisualStudio\v17.0\CodeAnalysis\Microsoft.CodeAnalysis.targets (237,5)
Property reassignment: $(PrepareForBuildDependsOn)=";GetFrameworkPaths;GetReferenceAssemblyPaths;AssignLinkMetadata;SetCABuildNativeEnvironmentVariables" (previous value: ";GetFrameworkPaths;GetReferenceAssemblyPaths;AssignLinkMetadata") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VisualStudio\v17.0\CodeAnalysis\Microsoft.CodeAnalysis.targets (240,5)
Property reassignment: $(PrepareResourcesDependsOn)="
XamlMarkupCompilePass1;
XamlMarkupCompilePass2;
;
PrepareResourceNames;
ResGen;
CompileLicxFiles
" (previous value: "
;
PrepareResourceNames;
ResGen;
CompileLicxFiles
") at C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Xaml.targets (35,5)
Property reassignment: $(ResolveReferencesDependsOn)="
BeforeResolveReferences;
AssignProjectConfiguration;
ResolveProjectReferences;
FindInvalidProjectReferences;
ResolveNativeReferences;
ResolveAssemblyReferences;
GenerateBindingRedirects;
GenerateBindingRedirectsUpdateAppConfig;
ResolveComReferences;
AfterResolveReferences
;
ResolveTestReferences
" (previous value: "
BeforeResolveReferences;
AssignProjectConfiguration;
ResolveProjectReferences;
FindInvalidProjectReferences;
ResolveNativeReferences;
ResolveAssemblyReferences;
GenerateBindingRedirects;
GenerateBindingRedirectsUpdateAppConfig;
ResolveComReferences;
AfterResolveReferences
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VisualStudio\v17.0\TeamTest\Microsoft.TeamTest.targets (4,5)
Search paths being used for $(MSBuildExtensionsPath) are C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild;$(MSBuildProgramFiles32)\MSBuild
Trying to import C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\$(MSBuildToolsVersion)\Microsoft.Common.targets\ImportAfter\* using extensions path C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild
Property reassignment: $(ProjectLockFile)="obj\project.assets.json" (previous value: "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\obj\project.assets.json") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\NuGet\17.0\Microsoft.NuGet.targets (74,5)
Property reassignment: $(ResolveAssemblyReferencesDependsOn)="
ResolveProjectReferences;
FindInvalidProjectReferences;
GetFrameworkPaths;
GetReferenceAssemblyPaths;
PrepareForBuild;
ResolveSDKReferences;
ExpandSDKReferences;
;ResolveNuGetPackageAssets" (previous value: "
ResolveProjectReferences;
FindInvalidProjectReferences;
GetFrameworkPaths;
GetReferenceAssemblyPaths;
PrepareForBuild;
ResolveSDKReferences;
ExpandSDKReferences;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\NuGet\17.0\Microsoft.NuGet.targets (185,5)
Property reassignment: $(PrepareResourcesDependsOn)="ResolveNuGetPackageAssets;
XamlMarkupCompilePass1;
XamlMarkupCompilePass2;
;
PrepareResourceNames;
ResGen;
CompileLicxFiles
" (previous value: "
XamlMarkupCompilePass1;
XamlMarkupCompilePass2;
;
PrepareResourceNames;
ResGen;
CompileLicxFiles
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\NuGet\17.0\Microsoft.NuGet.targets (186,5)
Property reassignment: $(ResolveAssemblyReferencesDependsOn)="
ResolveProjectReferences;
FindInvalidProjectReferences;
GetFrameworkPaths;
GetReferenceAssemblyPaths;
PrepareForBuild;
ResolveSDKReferences;
ExpandSDKReferences;
;ResolveNuGetPackageAssets;
FakesGenerateBeforeBuild;
" (previous value: "
ResolveProjectReferences;
FindInvalidProjectReferences;
GetFrameworkPaths;
GetReferenceAssemblyPaths;
PrepareForBuild;
ResolveSDKReferences;
ExpandSDKReferences;
;ResolveNuGetPackageAssets") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VisualStudio\v17.0\Fakes\Microsoft.QualityTools.Testing.Fakes.targets (68,5)
Search paths being used for $(MSBuildExtensionsPath) are C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild;$(MSBuildProgramFiles32)\MSBuild
Search paths being used for $(MSBuildExtensionsPath) are C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild;$(MSBuildProgramFiles32)\MSBuild
Trying to import C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VisualStudio\WebTools.Aspire\Microsoft.WebTools.Aspire.targets using extensions path C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild
Property reassignment: $(JsonSchemaCombinedFilePath)="C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager\x64\Debug\CombinedComponentSchema.json" (previous value: "load-manager\x64\Debug\\CombinedComponentSchema.json") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VisualStudio\WebTools.Aspire\Microsoft.WebTools.Aspire.targets (25,5)
Property reassignment: $(AppSettingsJsonSchemaCombinedFilePath)="C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager\x64\Debug\AppSettingsSchema.json" (previous value: "load-manager\x64\Debug\\AppSettingsSchema.json") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VisualStudio\WebTools.Aspire\Microsoft.WebTools.Aspire.targets (27,5)
Property reassignment: $(DebugType)="" (previous value: "none") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.BuildSteps.Targets (39,5)
Property reassignment: $(BuildDependsOn)="
_PrepareForBuild;
ResolveReferences;
PrepareForBuild;
InitializeBuildStatus;
BuildGenerateSources;
BuildCompile;
BuildLink;
;
AfterBuild;
IncrementalClean;
TlogCleanup;
FinalizeBuildStatus;
" (previous value: "
BeforeBuild;
CoreBuild;
AfterBuild
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.BuildSteps.Targets (122,5)
Property reassignment: $(RebuildDependsOn)="
_PrepareForRebuild;
BeforeRebuild;
Clean;
Build;
AfterRebuild;
;
" (previous value: "
BeforeRebuild;
Clean;
Build;
AfterRebuild;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.BuildSteps.Targets (131,5)
Property reassignment: $(CleanDependsOn)="
_PrepareForClean;
BeforeClean;
UnmanagedUnregistration;
CoreClean;
CleanReferencedProjects;
CleanPublishFolder;
AfterClean
;
" (previous value: "
BeforeClean;
UnmanagedUnregistration;
CoreClean;
CleanReferencedProjects;
CleanPublishFolder;
AfterClean
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.BuildSteps.Targets (136,5)
Property reassignment: $(BeforeBuildGenerateSourcesTargets)="
;
BeforeBuildGenerateSources;
;
" (previous value: "
;
BeforeBuildGenerateSources;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (60,5)
Property reassignment: $(AfterBuildGenerateSourcesTargets)="
;
AfterBuildGenerateSources;
;
AfterBuildGenerateSourcesEvent;
" (previous value: "
;
AfterBuildGenerateSources;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (71,5)
Property reassignment: $(BuildGenerateSourcesAction)="_BuildGenerateSourcesAction" (previous value: "Build") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (140,5)
Property reassignment: $(BuildCompileAction)="_BuildCompileAction" (previous value: "Build") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (141,5)
Property reassignment: $(BuildLinkAction)="_BuildLinkAction" (previous value: "Build") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (142,5)
Property reassignment: $(DetermineProjectTypeTargets)="_PrepareForReferenceResolution;
;
AddExternalIncludDirectoriesToPaths
" (previous value: "
;
AddExternalIncludDirectoriesToPaths
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (249,5)
Property reassignment: $(ResolveReferencesDependsOn)="_PrepareForReferenceResolution;ComputeCrtSDKReference;
BeforeResolveReferences;
AssignProjectConfiguration;
ResolveProjectReferences;
FindInvalidProjectReferences;
ResolveNativeReferences;
ResolveAssemblyReferences;
GenerateBindingRedirects;
GenerateBindingRedirectsUpdateAppConfig;
ResolveComReferences;
AfterResolveReferences
;
ResolveTestReferences
" (previous value: "
BeforeResolveReferences;
AssignProjectConfiguration;
ResolveProjectReferences;
FindInvalidProjectReferences;
ResolveNativeReferences;
ResolveAssemblyReferences;
GenerateBindingRedirects;
GenerateBindingRedirectsUpdateAppConfig;
ResolveComReferences;
AfterResolveReferences
;
ResolveTestReferences
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (311,5)
Property reassignment: $(ResolveAssemblyReferencesDependsOn)="_PrepareForReferenceResolution;
ResolveProjectReferences;
FindInvalidProjectReferences;
GetFrameworkPaths;
GetReferenceAssemblyPaths;
PrepareForBuild;
ResolveSDKReferences;
ExpandSDKReferences;
;ResolveNuGetPackageAssets;
FakesGenerateBeforeBuild;
" (previous value: "
ResolveProjectReferences;
FindInvalidProjectReferences;
GetFrameworkPaths;
GetReferenceAssemblyPaths;
PrepareForBuild;
ResolveSDKReferences;
ExpandSDKReferences;
;ResolveNuGetPackageAssets;
FakesGenerateBeforeBuild;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (312,5)
Property reassignment: $(ResolveSDKReferencesDependsOn)="_PrepareForReferenceResolution;ComputeCrtSDKReference;
GetInstalledSDKLocations
" (previous value: "
GetInstalledSDKLocations
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (313,5)
Property reassignment: $(ComputeCompileInputsTargets)="
;
GenerateTargetFrameworkMonikerAttribute;
;
ComputeMIDLGeneratedCompileInputs;
" (previous value: "
;
GenerateTargetFrameworkMonikerAttribute;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (642,5)
Property reassignment: $(ComputeLinkInputsTargets)="
;
ComputeRCGeneratedLinkInputs;
;
ComputeManifestGeneratedLinkerInputs;
" (previous value: "
;
ComputeRCGeneratedLinkInputs;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (955,5)
Property reassignment: $(ComputeCompileInputsTargets)="
;
GenerateTargetFrameworkMonikerAttribute;
;
ComputeMIDLGeneratedCompileInputs;
;
ComputeCLInputPDBName;
ComputeReferenceCLInput;
WarnCompileDuplicatedFilename
" (previous value: "
;
GenerateTargetFrameworkMonikerAttribute;
;
ComputeMIDLGeneratedCompileInputs;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (1152,5)
Property reassignment: $(ComputeLinkInputsTargets)="
;
ComputeRCGeneratedLinkInputs;
;
ComputeManifestGeneratedLinkerInputs;
;
ComputeCustomBuildOutput;
" (previous value: "
;
ComputeRCGeneratedLinkInputs;
;
ComputeManifestGeneratedLinkerInputs;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (1204,5)
Property reassignment: $(ComputeLibInputsTargets)="
;
ComputeRCGeneratedLibInputs;
;
ComputeCustomBuildOutput;
" (previous value: "
;
ComputeRCGeneratedLibInputs;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (1211,5)
Property reassignment: $(ComputeImpLibInputsTargets)="
;
ComputeRCGeneratedLibInputs;
;
ComputeRCGeneratedImpLibInputs;
;
ComputeCustomBuildOutput;
" (previous value: "
;
ComputeRCGeneratedLibInputs;
;
ComputeRCGeneratedImpLibInputs;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (1218,5)
Property reassignment: $(ComputeLinkInputsTargets)="
;
ComputeRCGeneratedLinkInputs;
;
ComputeManifestGeneratedLinkerInputs;
;
ComputeCustomBuildOutput;
;
ComputeCLGeneratedLinkInputs;
" (previous value: "
;
ComputeRCGeneratedLinkInputs;
;
ComputeManifestGeneratedLinkerInputs;
;
ComputeCustomBuildOutput;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (1279,5)
Property reassignment: $(ComputeLibInputsTargets)="
;
ComputeRCGeneratedLibInputs;
;
ComputeCustomBuildOutput;
;
ComputeCLGeneratedLibInputs;
" (previous value: "
;
ComputeRCGeneratedLibInputs;
;
ComputeCustomBuildOutput;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (1294,5)
Property reassignment: $(ComputeImpLibInputsTargets)="
;
ComputeRCGeneratedLibInputs;
;
ComputeRCGeneratedImpLibInputs;
;
ComputeCustomBuildOutput;
;
ComputeCLGeneratedImpLibInputs;
" (previous value: "
;
ComputeRCGeneratedLibInputs;
;
ComputeRCGeneratedImpLibInputs;
;
ComputeCustomBuildOutput;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (1309,5)
Property reassignment: $(ComputeLinkInputsTargets)="
;
ComputeRCGeneratedLinkInputs;
;
ComputeManifestGeneratedLinkerInputs;
;
ComputeCustomBuildOutput;
;
ComputeCLGeneratedLinkInputs;
;
ComputeLinkInputsFromProject;
" (previous value: "
;
ComputeRCGeneratedLinkInputs;
;
ComputeManifestGeneratedLinkerInputs;
;
ComputeCustomBuildOutput;
;
ComputeCLGeneratedLinkInputs;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (1340,5)
Property reassignment: $(ComputeLibInputsTargets)="
;
ComputeRCGeneratedLibInputs;
;
ComputeCustomBuildOutput;
;
ComputeCLGeneratedLibInputs;
;
ComputeLibInputsFromProject;
" (previous value: "
;
ComputeRCGeneratedLibInputs;
;
ComputeCustomBuildOutput;
;
ComputeCLGeneratedLibInputs;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (1358,5)
Property reassignment: $(ComputeImpLibInputsTargets)="
;
ComputeRCGeneratedLibInputs;
;
ComputeRCGeneratedImpLibInputs;
;
ComputeCustomBuildOutput;
;
ComputeCLGeneratedImpLibInputs;
;
ComputeImpLibInputsFromProject;
" (previous value: "
;
ComputeRCGeneratedLibInputs;
;
ComputeRCGeneratedImpLibInputs;
;
ComputeCustomBuildOutput;
;
ComputeCLGeneratedImpLibInputs;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (1376,5)
Property reassignment: $(ComputeLinkInputsTargets)="
;
ComputeRCGeneratedLinkInputs;
;
ComputeManifestGeneratedLinkerInputs;
;
ComputeCustomBuildOutput;
;
ComputeCLGeneratedLinkInputs;
;
ComputeLinkInputsFromProject;
;
ComputeReferenceLinkInputs;
" (previous value: "
;
ComputeRCGeneratedLinkInputs;
;
ComputeManifestGeneratedLinkerInputs;
;
ComputeCustomBuildOutput;
;
ComputeCLGeneratedLinkInputs;
;
ComputeLinkInputsFromProject;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (1500,5)
Property reassignment: $(ComputeLibInputsTargets)="
;
ComputeRCGeneratedLibInputs;
;
ComputeCustomBuildOutput;
;
ComputeCLGeneratedLibInputs;
;
ComputeLibInputsFromProject;
;
ComputeReferenceLibInputs;
" (previous value: "
;
ComputeRCGeneratedLibInputs;
;
ComputeCustomBuildOutput;
;
ComputeCLGeneratedLibInputs;
;
ComputeLibInputsFromProject;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (1538,5)
Property reassignment: $(ComputeLibInputsTargets)="
ComputeLibAdditionalOptions;
;
ComputeRCGeneratedLibInputs;
;
ComputeCustomBuildOutput;
;
ComputeCLGeneratedLibInputs;
;
ComputeLibInputsFromProject;
;
ComputeReferenceLibInputs;
" (previous value: "
;
ComputeRCGeneratedLibInputs;
;
ComputeCustomBuildOutput;
;
ComputeCLGeneratedLibInputs;
;
ComputeLibInputsFromProject;
;
ComputeReferenceLibInputs;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (1595,5)
Property reassignment: $(GetProjectInfoForReferenceDependsOn)="
;
AddPublicIncludeDirectoriesToProjectsInfoForReference;
;
AddPublicBMIsToProjectsInfoForReference;
AddDeployRecipeFileToProjectsInfoForReference;
AddLibrariesToProjectsInfoForReference;
" (previous value: "
;
AddPublicIncludeDirectoriesToProjectsInfoForReference;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (1783,5)
Property reassignment: $(DocumentationProjectOutputGroupDependsOn)="ResolvedXDCMake;ComputeCLCompileGeneratedXDCFiles" (previous value: "") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (2183,5)
Property reassignment: $(ContentFilesProjectOutputGroupDependsOn)="PrepareForBuild;AssignTargetPaths;PrepareForBuild;AssignTargetPaths;MakeDirsForFxc" (previous value: "PrepareForBuild;AssignTargetPaths") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets (2249,5)
Property reassignment: $(ComputeCompileInputsTargets)="
;
GenerateTargetFrameworkMonikerAttribute;
;
ComputeMIDLGeneratedCompileInputs;
;
ComputeCLInputPDBName;
ComputeReferenceCLInput;
WarnCompileDuplicatedFilename
;
;
ComputeStdModulesCompileInputs;
FixupCLCompileOptions;
SetModuleDependencies;
" (previous value: "
;
GenerateTargetFrameworkMonikerAttribute;
;
ComputeMIDLGeneratedCompileInputs;
;
ComputeCLInputPDBName;
ComputeReferenceCLInput;
WarnCompileDuplicatedFilename
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets (315,5)
Property reassignment: $(BuildingProject)="true" (previous value: "false") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets (2103,5)
Property reassignment: $(ContentFilesProjectOutputGroupDependsOn)="PrepareForBuild;AssignTargetPaths;PrepareForBuild;AssignTargetPaths;MakeDirsForFxc;_CreateCopyFileItems;" (previous value: "PrepareForBuild;AssignTargetPaths;PrepareForBuild;AssignTargetPaths;MakeDirsForFxc") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets (2649,5)
Property reassignment: $(PrepareForBuildDependsOn)="_CheckWindowsSDKInstalled;;GetFrameworkPaths;GetReferenceAssemblyPaths;AssignLinkMetadata;SetCABuildNativeEnvironmentVariables" (previous value: ";GetFrameworkPaths;GetReferenceAssemblyPaths;AssignLinkMetadata;SetCABuildNativeEnvironmentVariables") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.WindowsSDK.targets (16,5)
Property reassignment: $(CleanDependsOn)="
_PrepareForClean;
BeforeClean;
UnmanagedUnregistration;
CoreClean;
CleanReferencedProjects;
CleanPublishFolder;
AfterClean
;
;
CppClean
" (previous value: "
_PrepareForClean;
BeforeClean;
UnmanagedUnregistration;
CoreClean;
CleanReferencedProjects;
CleanPublishFolder;
AfterClean
;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppClean.targets (22,5)
Property reassignment: $(CppCleanDependsOn)="
BeforeCppClean;
;
CoreCppClean;
AfterCppClean;
;PGInstrumentedClean" (previous value: "
BeforeCppClean;
;
CoreCppClean;
AfterCppClean;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppClean.targets (92,5)
Property reassignment: $(BuildDependsOn)="SetTelemetryEnvironmentVariables;
_PrepareForBuild;
ResolveReferences;
PrepareForBuild;
InitializeBuildStatus;
BuildGenerateSources;
BuildCompile;
BuildLink;
;
AfterBuild;
IncrementalClean;
TlogCleanup;
FinalizeBuildStatus;
" (previous value: "
_PrepareForBuild;
ResolveReferences;
PrepareForBuild;
InitializeBuildStatus;
BuildGenerateSources;
BuildCompile;
BuildLink;
;
AfterBuild;
IncrementalClean;
TlogCleanup;
FinalizeBuildStatus;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.DesignTime.targets (540,5)
Property reassignment: $(RebuildDependsOn)="SetTelemetryEnvironmentVariables;
_PrepareForRebuild;
BeforeRebuild;
Clean;
Build;
AfterRebuild;
;
" (previous value: "
_PrepareForRebuild;
BeforeRebuild;
Clean;
Build;
AfterRebuild;
;
") at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.DesignTime.targets (541,5)
Assembly loaded during Evaluation: System.Collections.Immutable, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (location: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\System.Collections.Immutable.dll, MVID: 8448ed54-b238-40d8-a464-bff29b2d85b9, AppDomain: [Default])
Overriding target "GenerateTargetFrameworkMonikerAttribute" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "GenerateTargetFrameworkMonikerAttribute" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.BuildSteps.Targets".
Overriding target "Build" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "Build" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.BuildSteps.Targets".
Overriding target "Rebuild" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "Rebuild" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.BuildSteps.Targets".
Overriding target "AfterBuild" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "AfterBuild" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.BuildSteps.Targets".
Overriding target "PrepareForBuild" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "PrepareForBuild" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets".
Overriding target "GetTargetPath" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "GetTargetPath" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets".
Overriding target "ComputeIntermediateSatelliteAssemblies" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "ComputeIntermediateSatelliteAssemblies" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets".
Overriding target "ClCompile" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets" with target "ClCompile" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets".
Overriding target "ResourceCompile" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets" with target "ResourceCompile" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets".
Overriding target "Lib" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets" with target "Lib" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets".
Overriding target "Link" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets" with target "Link" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets".
Overriding target "AllProjectOutputGroups" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "AllProjectOutputGroups" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets".
Overriding target "BuiltProjectOutputGroup" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "BuiltProjectOutputGroup" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets".
Overriding target "DebugSymbolsProjectOutputGroup" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "DebugSymbolsProjectOutputGroup" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets".
Overriding target "DocumentationProjectOutputGroup" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "DocumentationProjectOutputGroup" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets".
Overriding target "SourceFilesProjectOutputGroup" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "SourceFilesProjectOutputGroup" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets".
Overriding target "ContentFilesProjectOutputGroup" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "ContentFilesProjectOutputGroup" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets".
Overriding target "AllProjectOutputGroupsDependencies" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "AllProjectOutputGroupsDependencies" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets".
Overriding target "BuiltProjectOutputGroupDependencies" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "BuiltProjectOutputGroupDependencies" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets".
Overriding target "DebugSymbolsProjectOutputGroupDependencies" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "DebugSymbolsProjectOutputGroupDependencies" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets".
Overriding target "DocumentationProjectOutputGroupDependencies" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "DocumentationProjectOutputGroupDependencies" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets".
Overriding target "PreBuildEvent" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "PreBuildEvent" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets".
Overriding target "PostBuildEvent" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "PostBuildEvent" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets".
Overriding target "ClCompile" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets" with target "ClCompile" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets".
Overriding target "Link" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets" with target "Link" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets".
Overriding target "Lib" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets" with target "Lib" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets".
Overriding target "ImpLib" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets" with target "ImpLib" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets".
Overriding target "Midl" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets" with target "Midl" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets".
Overriding target "ResourceCompile" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets" with target "ResourceCompile" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets".
Overriding target "BeforeResGen" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "BeforeResGen" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets".
Overriding target "ResGen" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "ResGen" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets".
Overriding target "GenerateSatelliteAssemblies" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "GenerateSatelliteAssemblies" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets".
Overriding target "Manifest" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets" with target "Manifest" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets".
Overriding target "XdcMake" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets" with target "XdcMake" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets".
Overriding target "BscMake" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets" with target "BscMake" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets".
Overriding target "ComputeMetaGenInputs" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.MetaGen.targets" with target "ComputeMetaGenInputs" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets".
Overriding target "GetNativeManifest" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "GetNativeManifest" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets".
Overriding target "GetTargetPathWithTargetPlatformMoniker" in project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" with target "GetTargetPathWithTargetPlatformMoniker" from project "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.DesignTime.targets".
The target "CompileDesignTime" listed in a BeforeTargets attribute at "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VisualStudio\WebTools.Aspire\Microsoft.WebTools.Aspire.targets (44,11)" does not exist in the project, and will be ignored.
The target "CompileDesignTime" listed in a BeforeTargets attribute at "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VisualStudio\WebTools.Aspire\Microsoft.WebTools.Aspire.targets (57,11)" does not exist in the project, and will be ignored.
Build started 09.06.2025 22:25:05.
Logging verbosity is set to: Detailed. 1>Project "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" on node 2 (Build target(s)).
1>Target "EnableIntermediateOutputPathMismatchWarning" skipped, due to false condition; ('$(RestoreProjectStyle)' == 'PackageReference') was evaluated as ('' == 'PackageReference').
1>Target "_CheckForInvalidConfigurationAndPlatform" in file "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" (target "SetTelemetryEnvironmentVariables" depends on it):
Task "MSBuildInternalMessage" skipped, due to false condition; ('$(_InvalidConfigurationMessageSeverity)' != '') was evaluated as ('' != '').
Using "Message" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "Message"
Configuration=Debug
Done executing task "Message".
Task "Message"
Platform=x64
Done executing task "Message".
Task "MSBuildInternalMessage" skipped, due to false condition; ('$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')) was evaluated as ('C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\x64\Debug\' != '' and !HasTrailingSlash('C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\x64\Debug\')).
Task "MSBuildInternalMessage" skipped, due to false condition; ('$(IntermediateOutputPath)' != '' and !HasTrailingSlash('$(IntermediateOutputPath)')) was evaluated as ('load-manager\x64\Debug\' != '' and !HasTrailingSlash('load-manager\x64\Debug\')).
Task "MSBuildInternalMessage" skipped, due to false condition; ('$(BaseIntermediateOutputPath)' != '' and !HasTrailingSlash('$(BaseIntermediateOutputPath)')) was evaluated as ('obj\' != '' and !HasTrailingSlash('obj\')).
Task "MSBuildInternalMessage" skipped, due to false condition; ( '$(Prefer32Bit)' == 'true' and '$(PreferNativeArm64)' == 'true' ) was evaluated as ( '' == 'true' and '' == 'true' ).
Task "MSBuildInternalMessage" skipped, due to false condition; ( '$(NoWin32Manifest)' == 'true' and '$(PreferNativeArm64)' == 'true' ) was evaluated as ( '' == 'true' and '' == 'true' ).
Task "MSBuildInternalMessage" skipped, due to false condition; ( '$(PreferNativeArm64)' == 'true' and '$(Platform)' != 'AnyCPU' ) was evaluated as ( '' == 'true' and 'x64' != 'AnyCPU' ).
Task "MSBuildInternalMessage" skipped, due to false condition; ( '$(_InitialMSBuildProjectExtensionsPath)' != '' And '$(MSBuildProjectExtensionsPath)' != '$(_InitialMSBuildProjectExtensionsPath)' ) was evaluated as ( 'C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\obj\' != '' And 'C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\obj\' != 'C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\obj\' ).
Task "MSBuildInternalMessage" skipped, due to false condition; ( '$(EnableBaseIntermediateOutputPathMismatchWarning)' == 'true' And '$(_InitialBaseIntermediateOutputPath)' != '$(BaseIntermediateOutputPath)' And '$(BaseIntermediateOutputPath)' != '$(MSBuildProjectExtensionsPath)' ) was evaluated as ( '' == 'true' And 'obj\' != 'obj\' And 'obj\' != 'C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\obj\' ).
1>Done building target "_CheckForInvalidConfigurationAndPlatform" in project "load-manager.vcxproj".
Target "_CheckForInvalidConfigurationAndPlatform" skipped. Previously built successfully.
1>Target "SetTelemetryEnvironmentVariables" in file "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.DesignTime.targets" from project "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" (target "Build" depends on it):
Using "SetEnv" task from assembly "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Build.CppTasks.Common.dll".
Task "SetEnv"
VSTEL_SolutionSessionID={35F0874A-44E8-4DA5-B51D-41108D3393B8}
Done executing task "SetEnv".
Task "SetEnv"
VSTEL_CurrentSolutionBuildID=3376952331
Done executing task "SetEnv".
Task "SetEnv"
VSTEL_ProjectID={A5468B35-BBBD-4C55-97ED-81BFE343B0E4}
Done executing task "SetEnv".
Task "SetEnv"
VSTEL_SolutionPath=C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.sln
Done executing task "SetEnv".
Task "SetEnv"
VSTEL_MSBuildProjectFullPath=C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj
Done executing task "SetEnv".
1>Done building target "SetTelemetryEnvironmentVariables" in project "load-manager.vcxproj".
1>Target "_PrepareForBuild" in file "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.BuildSteps.Targets" from project "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" (target "Build" depends on it):
Task "CreateItem" skipped, due to false condition; ('%(CustomBuild.IncludeFileToTool)'!='') was evaluated as (''!='').
1>Done building target "_PrepareForBuild" in project "load-manager.vcxproj".
1>Target "_PrepareForReferenceResolution" in file "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets" from project "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" (target "ResolveReferences" depends on it):
Task "VCMessage" skipped, due to false condition; ('$(WarnAboutIndividualManagedFiles)' == 'true') was evaluated as ('' == 'true').
Task "Message" skipped, due to false condition; ('$(_REFERENCE_DEBUG)'=='true') was evaluated as (''=='true').
1>Done building target "_PrepareForReferenceResolution" in project "load-manager.vcxproj".
Target "ComputeCrtSDKReference" skipped, due to false condition; ('@(ClCompile)'!='' and '$(WindowsAppContainer)'=='true' and '$(UseCrtSDKReference)' != 'false') was evaluated as ('load-manager.cpp;pax.cpp'!='' and 'false'=='true' and '' != 'false').
1>Target "BeforeResolveReferences" in file "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" (target "ResolveReferences" depends on it):
1>Done building target "BeforeResolveReferences" in project "load-manager.vcxproj".
1>Target "IgnoreJavaScriptOutputAssembly" in file "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" (target "AssignProjectConfiguration" depends on it):
1>Done building target "IgnoreJavaScriptOutputAssembly" in project "load-manager.vcxproj".
1>Target "AssignProjectConfiguration" in file "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" (target "ResolveReferences" depends on it):
Using "AssignProjectConfiguration" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "AssignProjectConfiguration"
Done executing task "AssignProjectConfiguration".
1>Done building target "AssignProjectConfiguration" in project "load-manager.vcxproj".
Target "AssignProjectConfiguration" skipped. Previously built successfully.
1>Target "_SplitProjectReferencesByFileExistence" in file "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" (target "PrepareProjectReferences" depends on it):
Task "ResolveNonMSBuildProjectOutput" skipped, due to false condition; ('$(BuildingInsideVisualStudio)'=='true' and '@(ProjectReferenceWithConfiguration)'!='') was evaluated as ('true'=='true' and ''!='').
1>Done building target "_SplitProjectReferencesByFileExistence" in project "load-manager.vcxproj".
1>Target "_AddOutputPathToGlobalPropertiesToRemove" in file "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" (target "_GetProjectReferenceTargetFrameworkProperties" depends on it):
1>Done building target "_AddOutputPathToGlobalPropertiesToRemove" in project "load-manager.vcxproj".
1>Target "_GetProjectReferenceTargetFrameworkProperties" in file "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" (target "PrepareProjectReferences" depends on it):
Using "MSBuild" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "MSBuild"
Done executing task "MSBuild".
Task "MSBuild" skipped, due to false condition; ('%(_MSBuildProjectReferenceExistent.SkipGetTargetFrameworkProperties)' != 'true' and '$(EnableDynamicPlatformResolution)' == 'true') was evaluated as ('' != 'true' and '' == 'true').
Task "GetReferenceNearestTargetFrameworkTask" skipped, due to false condition; ('@(_ProjectReferenceTargetFrameworkPossibilities)' != '' and '$(ReferringTargetFrameworkForProjectReferences)' != ''
And '$(GetReferenceNearestTargetFrameworkTaskSupportsTargetPlatformParameter)' == 'true' and '%(_ProjectReferenceTargetFrameworkPossibilities.IsVcxOrNativeProj)' != 'true') was evaluated as ('' != '' and '' != ''
And 'true' == 'true' and '' != 'true').
Task "GetReferenceNearestTargetFrameworkTask" skipped, due to false condition; ('@(_ProjectReferenceTargetFrameworkPossibilities)' != '' and '$(ReferringTargetFrameworkForProjectReferences)' != ''
And '$(GetReferenceNearestTargetFrameworkTaskSupportsTargetPlatformParameter)' != 'true' and '%(_ProjectReferenceTargetFrameworkPossibilities.IsVcxOrNativeProj)' != 'true') was evaluated as ('' != '' and '' != ''
And 'true' != 'true' and '' != 'true').
Using "SetRidAgnosticValueForProjects" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "SetRidAgnosticValueForProjects"
Done executing task "SetRidAgnosticValueForProjects".
1>Done building target "_GetProjectReferenceTargetFrameworkProperties" in project "load-manager.vcxproj".
Target "_GetProjectReferencePlatformProperties" skipped, due to false condition; ('$(EnableDynamicPlatformResolution)' == 'true'
and '@(_MSBuildProjectReferenceExistent)' != '') was evaluated as ('' == 'true'
and '' != '').
1>Target "PrepareProjectReferences" in file "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" (target "ResolveProjectReferences" depends on it):
1>Done building target "PrepareProjectReferences" in project "load-manager.vcxproj".
Target "_RemoveNameMetadataFromProjectReferenceItems" skipped, due to false condition; ('@(ProjectReference)'!='') was evaluated as (''!='').
1>Target "ResolveProjectReferences" in file "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" (target "ResolveReferences" depends on it):
Task "MSBuild" skipped, due to false condition; ('%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true') and '$(VisualStudioVersion)' != '10.0' and '@(_MSBuildProjectReferenceExistent)' != '') was evaluated as ('' == 'true' and '' != '' and ('true' == 'true' or 'true' != 'true') and '17.0' != '10.0' and '' != '').
Task "MSBuild" skipped, due to false condition; ('%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '$(BuildingInsideVisualStudio)' != 'true' and '$(BuildProjectReferences)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != '') was evaluated as ('' == 'true' and '' != '' and 'true' != 'true' and 'true' == 'true' and '' != '').
Task "MSBuild" skipped, due to false condition; ('%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '$(BuildingProject)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != '') was evaluated as ('' == 'true' and '' != '' and 'true' == 'true' and '' != '').
Task "MSBuildInternalMessage" skipped, due to false condition; ('$(_NonExistentProjectReferenceSeverity)' != '') was evaluated as ('' != '').
1>Done building target "ResolveProjectReferences" in project "load-manager.vcxproj".
Target "FindInvalidProjectReferences" skipped, due to false condition; ('$(FindInvalidProjectReferences)' == 'true') was evaluated as ('' == 'true').
Target "ResolveNativeReferences" skipped, due to false condition; ('@(NativeReference)'!='') was evaluated as (''!='').
Target "_PrepareForReferenceResolution" skipped. Previously built successfully.
Target "ResolveProjectReferences" skipped. Previously built successfully.
Target "FindInvalidProjectReferences" skipped, due to false condition; ('$(FindInvalidProjectReferences)' == 'true') was evaluated as ('' == 'true').
1>Target "GetFrameworkPaths" in file "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" (target "ResolveAssemblyReferences" depends on it):
1>Done building target "GetFrameworkPaths" in project "load-manager.vcxproj".
Target "_PrepareForReferenceResolution" skipped. Previously built successfully.
Target "GetFrameworkPaths" skipped. Previously built successfully.
1>Target "GetReferenceAssemblyPaths" in file "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" (target "ResolveAssemblyReferences" depends on it):
Task "GetReferenceAssemblyPaths" skipped, due to false condition; ('$(TargetFrameworkMoniker)' != '' and ('$(_TargetFrameworkDirectories)' == '' or '$(_FullFrameworkReferenceAssemblyPaths)' == '')) was evaluated as ('' != '' and ('' == '' or '' == '')).
1>Done building target "GetReferenceAssemblyPaths" in project "load-manager.vcxproj".
1>Target "AddExternalIncludDirectoriesToPaths" in file "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Current.targets" from project "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" (target "SetBuildDefaultEnvironmentVariables" depends on it):
1>Done building target "AddExternalIncludDirectoriesToPaths" in project "load-manager.vcxproj".
1>Target "SetBuildDefaultEnvironmentVariables" in file "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Current.targets" from project "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" (target "PrepareForBuild" depends on it):
Task "SetEnv"
PATH=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\bin\HostX86\x86;C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x86;;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8.1 Tools;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\tools;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\ide;C:\Program Files (x86)\HTML Help Workshop;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\;;c:\program files\imagemagick-7.0.10-q8;c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\windows\system32\windowspowershell\v1.0\;c:\windows\system32\openssh\;c:\program files\nvidia corporation\nvidia nvdlisr;c:\windows\system32\config\systemprofile\appdata\local\microsoft\windowsapps;c:\program files\git\cmd;c:\program files\microsoft sql server\130\toolsn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Toolsn\;C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Microsoft SQL Server\150\Toolsn\;C:\Program Files\dotnet;C:\Program Files\dotnet\;C:\Program Files (x86)\Meld\;C:\Program Files\Git\cmd;C:\Users\llego\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\PuTTY\;C:\Users\llego\scoop\shims;C:\Users\llego\AppData\Local\pnpm;C:\Users\llego\AppData\Local\Microsoft\WindowsApps;C:\Users\llego\.dotnet\tools;C:\Users\llego\AppData\Local\Programs\Microsoft VS CodeC:\Program Files\IPFS Desktop\resources\app.asar.unpacked\src\ipfs-on-path\scripts-win;C:\Users\llego\.dotnet\tools;C:\Users\llego\AppData\Local\Microsoft\WindowsApps;C:\texlive\2023\windows;C:\Users\llego\AppData\Roaming\npm;C:\Users\llego\AppData\Local\Pandoc\;C:\texlive\2025\bin\windows;
Done executing task "SetEnv".
Task "SetEnv"
LIB=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\lib\x64;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\lib\x64;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\lib\x64;;C:\Program Files (x86)\Windows Kits\10\lib\10.0.26100.0\ucrt\x64;;;C:\Program Files (x86)\Windows Kits\10\lib\10.0.26100.0\um\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8.1\lib\um\x64;
Done executing task "SetEnv".
Task "SetEnv"
LIBPATH=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\lib\x64;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\lib\x64;
Done executing task "SetEnv".
Task "SetEnv"
INCLUDE=;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\include;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\winrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8.1\Include\um
Done executing task "SetEnv".
Task "SetEnv"
EXTERNAL_INCLUDE=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\include;;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include;;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;;;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\winrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8.1\Include\um;
Done executing task "SetEnv".
1>Done building target "SetBuildDefaultEnvironmentVariables" in project "load-manager.vcxproj".
Target "SetUserMacroEnvironmentVariables" skipped, due to false condition; ('@(BuildMacro)' != '' and '$(DesignTimeBuild)' != 'true') was evaluated as ('' != '' and '' != 'true').
Target "_PrepareForReferenceResolution" skipped. Previously built successfully.
1>Target "GetResolvedWinMD" in file "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets" from project "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" (target "PrepareForBuild" depends on it):
1>Done building target "GetResolvedWinMD" in project "load-manager.vcxproj".
1>Target "_CheckWindowsSDKInstalled" in file "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.WindowsSDK.targets" from project "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" (target "PrepareForBuild" depends on it):
Task "VCMessage" skipped, due to false condition; ('$(WindowsSDKInstalled)' != 'true') was evaluated as ('true' != 'true').
Task "VCMessage" skipped, due to false condition; ('$(WindowsAppContainer)' != 'true' and '$(WindowsSDK_Desktop_Support)' != true) was evaluated as ('false' != 'true' and 'true' != true).
1>Done building target "_CheckWindowsSDKInstalled" in project "load-manager.vcxproj".
Target "GetFrameworkPaths" skipped. Previously built successfully.
Target "GetReferenceAssemblyPaths" skipped. Previously built successfully.
Target "AssignLinkMetadata" skipped, due to false condition; ( '$(SynthesizeLinkMetadata)' == 'true' ) was evaluated as ( '' == 'true' ).
1>Target "SetCABuildNativeEnvironmentVariables" in file "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VisualStudio\v17.0\CodeAnalysis\Microsoft.CodeAnalysis.targets" from project "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" (target "PrepareForBuild" depends on it):
Task "SetEnv"
CAExcludePath=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\atlmfc\include;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt;;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\winrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8.1\Include\um;
Done executing task "SetEnv".
Task "SetEnv" skipped, due to false condition; ('$(RunMsvcAnalysis)'=='true' and '$(VCCodeAnalysisUX)'=='true') was evaluated as ('false'=='true' and 'true'=='true').
1>Done building target "SetCABuildNativeEnvironmentVariables" in project "load-manager.vcxproj".
1>Target "PrepareForBuild" in file "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets" from project "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" (target "ResolveAssemblyReferences" depends on it):
Task "VCMessage" skipped, due to false condition; ('$(PlatformToolset)' == '') was evaluated as ('MSFS' == '').
Task "VCMessage" skipped, due to false condition; ('$(DesignTimeBuild)' != 'true' and '$(ConfigurationPlatformExists)' != 'true') was evaluated as ('' != 'true' and 'true' != 'true').
Using "VCMessage" task from assembly "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.Build.CppTasks.Common.dll".
Task "VCMessage"
1>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(459,5): error MSB8020: The build tools for MSFS (Platform Toolset = 'MSFS') cannot be found. To build using the MSFS build tools, please install MSFS build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
Done executing task "VCMessage" -- FAILED.
1>Done building target "PrepareForBuild" in project "load-manager.vcxproj" -- FAILED.
1>Done Building Project "C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" (Build target(s)) -- FAILED.
Build FAILED.
"C:\Users\llego\Documents\TFDi MD-11 QA\xkhofmann-tfdidesign-md11-load-manager\PackageSources\wasm-module\load-manager.vcxproj" (Build target) (1) ->
(PrepareForBuild target) ->
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(459,5): error MSB8020: The build tools for MSFS (Platform Toolset = 'MSFS') cannot be found. To build using the MSFS build tools, please install MSFS build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.05

View File

@ -0,0 +1,312 @@
#include "pax.h"
// ZFW Entry, fill pax first (pax+bag), rest is cargo
void distribute(paxPayloadData_t* const targetPayload, const FuelData_t* const fuel, const double ZFWTarget, const bool isImperial, const bool isER) {
// Find payload, num pax and extra cargo
double payload = ZFWTarget - targetPayload->empty - targetPayload->pilot - targetPayload->firstOfficer - targetPayload->engineer -
targetPayload->cabinCrewFront - targetPayload->cabinCrewRear - targetPayload->leftAux - targetPayload->rightAux;
unsigned short numPax = max(0.0, min((double)MAX_PAX, floor(payload / (PAX_WEIGHT(isImperial) + BAG_WEIGHT(isImperial)))));
unsigned int cargo = round(payload - numPax * PAX_WEIGHT(isImperial) - numPax * BAG_WEIGHT(isImperial));
distribute(targetPayload, fuel, numPax, cargo, isImperial, isER);
}
// SimBrief Entry, SB pax count and extra cargo
void distribute(paxPayloadData_t* const targetPayload, const FuelData_t* const fuel, unsigned short numPax, unsigned int cargo, const bool isImperial, const bool isER) {
// Clear
targetPayload->paxCount.business1 = targetPayload->paxCount.business2 = targetPayload->paxCount.economy1 = targetPayload->paxCount.economy2 =
targetPayload->paxCount.total = 0;
targetPayload->forwardCargo = targetPayload->rearCargo = 0;
unsigned short _numPax = 0;
unsigned int count = MAX_PAX;
// Initial distribution pax + bags
while (numPax > 0 && count > 0) {
if (numPax >= 4) {
if (targetPayload->paxCount.business1 < MAX_BUSINESS_1) {
targetPayload->paxCount.business1++;
_numPax++;
}
if (targetPayload->paxCount.business2 < MAX_BUSINESS_2) {
targetPayload->paxCount.business2++;
_numPax++;
}
if (targetPayload->paxCount.economy1 < MAX_ECONOMY_1) {
targetPayload->paxCount.economy1++;
_numPax++;
}
if (targetPayload->paxCount.economy2 < MAX_ECONOMY_2) {
targetPayload->paxCount.economy2++;
_numPax++;
}
}
else if (numPax == 3) {
if (targetPayload->paxCount.business2 < MAX_BUSINESS_2) {
targetPayload->paxCount.business2++;
_numPax++;
}
if (targetPayload->paxCount.economy1 < MAX_ECONOMY_1) {
targetPayload->paxCount.economy1++;
_numPax++;
}
if (targetPayload->paxCount.economy2 < MAX_ECONOMY_2) {
targetPayload->paxCount.economy2++;
_numPax++;
}
}
else if (numPax == 2) {
if (targetPayload->paxCount.economy1 < MAX_ECONOMY_1) {
targetPayload->paxCount.economy1++;
_numPax++;
}
if (targetPayload->paxCount.economy2 < MAX_ECONOMY_2) {
targetPayload->paxCount.economy2++;
_numPax++;
}
}
else if (numPax == 1) {
if (targetPayload->paxCount.economy2 < MAX_ECONOMY_2) {
targetPayload->paxCount.economy2++;
_numPax++;
}
}
numPax -= _numPax;
targetPayload->paxCount.total += _numPax;
if (_numPax % 2 == 0) {
targetPayload->forwardCargo += (_numPax / 2) * BAG_WEIGHT(isImperial);
targetPayload->rearCargo += (_numPax / 2) * BAG_WEIGHT(isImperial);
}
else {
_numPax--;
targetPayload->forwardCargo += (_numPax / 2 + 1) * BAG_WEIGHT(isImperial);
targetPayload->rearCargo += (_numPax / 2) * BAG_WEIGHT(isImperial);
}
_numPax = 0;
count--;
}
count = MAX_FRONT_CARGO(isImperial);
// Initial distibution of remaining cargo
while (cargo > 0 && count > 0) {
if (targetPayload->forwardCargo < MAX_FRONT_CARGO(isImperial)) {
targetPayload->forwardCargo++;
cargo--;
}
if (targetPayload->rearCargo < MAX_REAR_CARGO(isImperial, isER) && cargo > 0) {
targetPayload->rearCargo++;
cargo--;
}
count--;
}
// Refinement pax
count = MAX_PAX;
while (count > 0) {
generatePayload(targetPayload, isImperial);
calculateCGs(targetPayload, fuel, &targetPayload->ZFWCG, &targetPayload->TOCG, isImperial);
// in front of target
if (targetPayload->ZFWCG < targetPayload->CGTarget - CG_TOLERANCE) {
if (targetPayload->paxCount.business1 > 0) {
targetPayload->paxCount.business1--;
}
else if (targetPayload->paxCount.business2 > 0) {
targetPayload->paxCount.business2--;
}
else if (targetPayload->paxCount.economy1 > 0) {
targetPayload->paxCount.economy1--;
}
else {
break;
}
if (targetPayload->paxCount.economy2 < MAX_ECONOMY_2) {
targetPayload->paxCount.economy2++;
}
else if (targetPayload->paxCount.economy1 < MAX_ECONOMY_1) {
targetPayload->paxCount.economy1++;
}
else if (targetPayload->paxCount.business2 < MAX_BUSINESS_2) {
targetPayload->paxCount.business2++;
}
else {
targetPayload->paxCount.business1++;
}
}
// behind target
else if (targetPayload->ZFWCG > targetPayload->CGTarget + CG_TOLERANCE) {
if (targetPayload->paxCount.economy2 > 0) {
targetPayload->paxCount.economy2--;
}
else if (targetPayload->paxCount.economy1 > 0) {
targetPayload->paxCount.economy1--;
}
else if (targetPayload->paxCount.business2 > 0) {
targetPayload->paxCount.business2--;
}
else {
break;
}
if (targetPayload->paxCount.business1 < MAX_BUSINESS_1) {
targetPayload->paxCount.business1++;
}
else if (targetPayload->paxCount.business2 < MAX_BUSINESS_2) {
targetPayload->paxCount.business2++;
}
else if (targetPayload->paxCount.economy1 < MAX_ECONOMY_1) {
targetPayload->paxCount.economy1++;
}
else {
targetPayload->paxCount.economy2++;
}
}
else {
break;
}
count--;
}
// Refinement cargo
count = MAX_FRONT_CARGO(isImperial) + MAX_REAR_CARGO(isImperial, isER);
while (count > 0) {
generatePayload(targetPayload, isImperial);
calculateCGs(targetPayload, fuel, &targetPayload->ZFWCG, &targetPayload->TOCG, isImperial);
// in front of target
if (targetPayload->ZFWCG < targetPayload->CGTarget - CG_TOLERANCE) {
if (targetPayload->forwardCargo > 0 && targetPayload->rearCargo < MAX_REAR_CARGO(isImperial, isER)) {
if (targetPayload->forwardCargo > BAG_WEIGHT(isImperial) &&
targetPayload->rearCargo < MAX_FRONT_CARGO(isImperial) - BAG_WEIGHT(isImperial)) {
targetPayload->forwardCargo -= BAG_WEIGHT(isImperial);
targetPayload->rearCargo += BAG_WEIGHT(isImperial);
}
else {
targetPayload->forwardCargo--;
targetPayload->rearCargo++;
}
}
else {
break;
}
}
// behind target
else if (targetPayload->ZFWCG > targetPayload->CGTarget + CG_TOLERANCE) {
if (targetPayload->rearCargo > 0 && targetPayload->forwardCargo < MAX_FRONT_CARGO(isImperial)) {
if (targetPayload->rearCargo > BAG_WEIGHT(isImperial) &&
targetPayload->forwardCargo < MAX_REAR_CARGO(isImperial, isER) - BAG_WEIGHT(isImperial)) {
targetPayload->rearCargo -= BAG_WEIGHT(isImperial);
targetPayload->forwardCargo += BAG_WEIGHT(isImperial);
}
else {
targetPayload->rearCargo--;
targetPayload->forwardCargo++;
}
}
else {
break;
}
}
else {
break;
}
count--;
}
}
// Updates pax stations with their respective weights
// Used internally and used for Station Entry (pax only, cargo is set directly)
void generatePayload(paxPayloadData_t* const targetPayload, const bool isImperial) {
targetPayload->business1Left = targetPayload->business1Center = targetPayload->business1Right = (targetPayload->paxCount.business1 / 3.0) * PAX_WEIGHT(isImperial);
targetPayload->business2Left = targetPayload->business2Center = targetPayload->business2Right = (targetPayload->paxCount.business2 / 3.0) * PAX_WEIGHT(isImperial);
targetPayload->economy1Left = targetPayload->economy1Center = targetPayload->economy1Right = (targetPayload->paxCount.economy1 / 3.0) * PAX_WEIGHT(isImperial);
targetPayload->economy2Left = targetPayload->economy2Center = targetPayload->economy2Right = (targetPayload->paxCount.economy2 / 3.0) * PAX_WEIGHT(isImperial);
targetPayload->total = targetPayload->empty + targetPayload->pilot + targetPayload->firstOfficer + targetPayload->engineer + targetPayload->cabinCrewFront +
targetPayload->business1Left + targetPayload->business1Center + targetPayload->business1Right + targetPayload->business2Left +
targetPayload->business2Center + targetPayload->business2Right + targetPayload->economy1Left + targetPayload->economy1Center +
targetPayload->economy1Right + targetPayload->economy2Left + targetPayload->economy2Center + targetPayload->economy2Right +
targetPayload->cabinCrewRear + targetPayload->forwardCargo + targetPayload->rearCargo + targetPayload->leftAux + targetPayload->rightAux;
}
// Normalise to Pounds
// MANDATORY BEFORE SETTING WEIGHTS
// USE ON COPY OF GLOBAL STATE ONLY
void normalisePayload(paxPayloadData_t* const targetPayload, const bool isImperial) {
targetPayload->empty = TO_POUNDS(isImperial, targetPayload->empty);
targetPayload->pilot = TO_POUNDS(isImperial, targetPayload->pilot);
targetPayload->firstOfficer = TO_POUNDS(isImperial, targetPayload->firstOfficer);
targetPayload->engineer = TO_POUNDS(isImperial, targetPayload->engineer);
targetPayload->cabinCrewFront = TO_POUNDS(isImperial, targetPayload->cabinCrewFront);
targetPayload->business1Left = TO_POUNDS(isImperial, targetPayload->business1Left);
targetPayload->business1Center = TO_POUNDS(isImperial, targetPayload->business1Center);
targetPayload->business1Right = TO_POUNDS(isImperial, targetPayload->business1Right);
targetPayload->business2Left = TO_POUNDS(isImperial, targetPayload->business2Left);
targetPayload->business2Center = TO_POUNDS(isImperial, targetPayload->business2Center);
targetPayload->business2Right = TO_POUNDS(isImperial, targetPayload->business2Right);
targetPayload->economy1Left = TO_POUNDS(isImperial, targetPayload->economy1Left);
targetPayload->economy1Center = TO_POUNDS(isImperial, targetPayload->economy1Center);
targetPayload->economy1Right = TO_POUNDS(isImperial, targetPayload->economy1Right);
targetPayload->economy2Left = TO_POUNDS(isImperial, targetPayload->economy2Left);
targetPayload->economy2Center = TO_POUNDS(isImperial, targetPayload->economy2Center);
targetPayload->economy2Right = TO_POUNDS(isImperial, targetPayload->economy2Right);
targetPayload->cabinCrewRear = TO_POUNDS(isImperial, targetPayload->cabinCrewRear);
targetPayload->forwardCargo = TO_POUNDS(isImperial, targetPayload->forwardCargo);
targetPayload->rearCargo = TO_POUNDS(isImperial, targetPayload->rearCargo);
targetPayload->leftAux = TO_POUNDS(isImperial, targetPayload->leftAux);
targetPayload->rightAux = TO_POUNDS(isImperial, targetPayload->rightAux);
}
void calculateCGs(const paxPayloadData_t* const targetPayload, const FuelData_t* const fuel, double* const ZFWCG, double* const TOCG, const bool isImperial) {
paxPayloadData_t localPayload = {};
memcpy(&localPayload, targetPayload, sizeof(localPayload));
normalisePayload(&localPayload, isImperial);
double totalMoment = localPayload.empty * ARM_EMPTY + localPayload.pilot * ARM_PILOT + localPayload.firstOfficer * ARM_FIRST_OFFICER +
localPayload.engineer * ARM_ENGINEER + localPayload.cabinCrewFront * ARM_PAX_CABIN_CREW_FRONT +
localPayload.business1Left * ARM_PAX_BUSINESS1_LEFT + localPayload.business1Center * ARM_PAX_BUSINESS1_CENTER +
localPayload.business1Right * ARM_PAX_BUSINESS1_RIGHT + localPayload.business2Left * ARM_PAX_BUSINESS2_LEFT +
localPayload.business2Center * ARM_PAX_BUSINESS2_CENTER + localPayload.business2Right * ARM_PAX_BUSINESS2_RIGHT +
localPayload.economy1Left * ARM_PAX_ECONOMY1_LEFT + localPayload.economy1Center * ARM_PAX_ECONOMY1_CENTER +
localPayload.economy1Right * ARM_PAX_ECONOMY1_RIGHT + localPayload.economy2Left * ARM_PAX_ECONOMY2_LEFT +
localPayload.economy2Center * ARM_PAX_ECONOMY2_CENTER + localPayload.economy2Right * ARM_PAX_ECONOMY2_RIGHT +
localPayload.cabinCrewRear * ARM_PAX_CABIN_CREW_REAR + localPayload.forwardCargo * ARM_FORWARD_CARGO +
localPayload.rearCargo * ARM_REAR_CARGO + localPayload.leftAux * ARM_LEFT_AUX + localPayload.rightAux * ARM_RIGHT_AUX;
double totalWeight = localPayload.empty + localPayload.pilot + localPayload.firstOfficer + localPayload.engineer + localPayload.cabinCrewFront +
localPayload.business1Left + localPayload.business1Center + localPayload.business1Right + localPayload.business2Left +
localPayload.business2Center + localPayload.business2Right + localPayload.economy1Left + localPayload.economy1Center +
localPayload.economy1Right + localPayload.economy2Left + localPayload.economy2Center + localPayload.economy2Right +
localPayload.cabinCrewRear + localPayload.forwardCargo + localPayload.rearCargo + localPayload.leftAux + localPayload.rightAux;
*ZFWCG = TO_PERCENT_MAC(totalMoment / totalWeight);
totalMoment += fuel->main1 * ARM_MAIN1 + fuel->main3 * ARM_MAIN3 + fuel->main2 * ARM_MAIN2 + fuel->upperAux * ARM_UPPER_AUX +
fuel->lowerAux * ARM_LOWER_AUX + fuel->main1Tip * ARM_MAIN1_TIP + fuel->main3Tip * ARM_MAIN3_TIP +
fuel->tail * ARM_TAIL + fuel->forwardAux1 * ARM_FORWARD_AUX1 + fuel->forwardAux2 * ARM_FORWARD_AUX2;
totalWeight += fuel->total;
*TOCG = TO_PERCENT_MAC(totalMoment / totalWeight);
}
void load(const paxPayloadData_t* const targetPayload, const HANDLE simConnect, const bool isImperial) {
paxPayloadData_t localPayload = {};
memcpy(&localPayload, targetPayload, sizeof(localPayload));
normalisePayload(&localPayload, isImperial);
SimConnect_SetDataOnSimObject(simConnect, DATA_DEFINITION_PAYLOAD_PAX, SIMCONNECT_OBJECT_ID_USER, 0, 0, sizeof(paxPayloadDataSet_t), &localPayload);
}
void unload(const HANDLE simConnect, const bool isER) {
paxPayloadDataSet_t localPayload = {};
localPayload.cabinCrewFront = FRONT_CREW_WEIGHT(true);
localPayload.cabinCrewRear = REAR_CREW_WEIGHT(true);
localPayload.leftAux = localPayload.rightAux = isER ? AUX_WEIGHT(true) : 0;
localPayload.pilot = localPayload.firstOfficer = localPayload.engineer = PILOT_WEIGHT(true);
SimConnect_SetDataOnSimObject(simConnect, DATA_DEFINITION_PAYLOAD_PAX, SIMCONNECT_OBJECT_ID_USER, 0, 0, sizeof(paxPayloadDataSet_t), &localPayload);
}

View File

@ -0,0 +1,36 @@
#pragma once
#ifndef __INTELLISENSE__
# define MODULE_EXPORT __attribute__( ( visibility( "default" ) ) )
# define MODULE_WASM_MODNAME(mod) __attribute__((import_module(mod)))
#else
# define MODULE_EXPORT
# define MODULE_WASM_MODNAME(mod)
# define __attribute__(x)
# define __restrict__
#endif
#include <MSFS/MSFS_WindowsTypes.h>
#include <math.h>
#include <algorithm>
#include <SimConnect.h>
#include "types.h"
//ZFW Entry, fill pax first (pax+bag), rest is cargo
void distribute(paxPayloadData_t* const targetPayload, const FuelData_t* const fuel, const double ZFWTarget, const bool isImperial, const bool isER);
//SimBrief Entry, SB pax count and total cargo
void distribute(paxPayloadData_t* const targetPayload, const FuelData_t* const fuel, unsigned short numPax, unsigned int cargo, const bool isImperial, const bool isER);
// Updates pax stations with their respective weights
// Used internally and used for Station Entry (pax only, cargo is ste directly)
// STATION WEIGHTS ARE NOT NORMALISED TO POUNDS
void generatePayload(paxPayloadData_t* const targetPayload, const bool isImperial);
// Normalise to Pounds
// For Station Entry: CALL AFTER `generatePayload`
void normalisePayload(paxPayloadData_t* const targetPayload, const bool isImperial);
void calculateCGs(const paxPayloadData_t* const targetPayload, const FuelData_t* const fuel, double* const ZFWCG, double* const TOCG, const bool isImperial);
void load(const paxPayloadData_t* const targetPayload, const HANDLE simConnect, const bool isImperial);
void unload(const HANDLE simConnect, const bool isER);

View File

@ -0,0 +1,290 @@
#pragma once
// Constants
//TODO: Make User adjustable
// Based on ICAO/LH findings
#define PAX_WEIGHT(IS_IMPERIAL) ((IS_IMPERIAL) ? (190.0) : (86.0))
#define BAG_WEIGHT(IS_IMPERIAL) ((IS_IMPERIAL) ? (50.0) : (23.0))
// 190lbs default
#define PILOT_WEIGHT(IS_IMPERIAL) ((IS_IMPERIAL) ? (190.0) : (86.0))
// 2x 190lbs default
#define FRONT_CREW_WEIGHT(IS_IMPERIAL) ((IS_IMPERIAL) ? (380.0) : (172.0))
// 5x 190lbs default
#define REAR_CREW_WEIGHT(IS_IMPERIAL) ((IS_IMPERIAL) ? (950.0) : (430.0))
// 200lbs per tank (one LD3)
#define AUX_WEIGHT(IS_IMPERIAL) ((IS_IMPERIAL) ? (200.0) : (91.0))
//PMC pallet due to 104in door
#define MAX_FRONT_CARGO(IS_IMPERIAL) ((IS_IMPERIAL) ? (6.0 * 15000.0) : (6.0 * 6804.0))
#define MAX_UPPER_CARGO(IS_IMPERIAL) ((IS_IMPERIAL) ? (6.5 * 15000.0) : (6.5 * 6804.0))
//LD3s due to 70in door
#define MAX_REAR_CARGO(IS_IMPERIAL, IS_ER) ((IS_IMPERIAL) ? ((IS_ER ? 12.0 : 14.0) * 3500.0) : ((IS_ER ? 12.0 : 14.0) * 1588.0))
// All actual Business seats
#define MAX_BUSINESS_1 30
// First 5 rows of economy
#define MAX_BUSINESS_2 45
// Next 14 rows
#define MAX_ECONOMY_1 86
// Remaining rows
#define MAX_ECONOMY_2 137
// Total
#define MAX_PAX 298
// Max ZFW
#define MAX_PAX_ZFW(IS_IMPERIAL) ((IS_IMPERIAL) ? (400000) : (181437))
#define MAX_F_ZFW(IS_IMPERIAL) ((IS_IMPERIAL) ? (451300) : (204706))
// Max TOW
#define MAX_TOW(IS_IMPERIAL) ((IS_IMPERIAL) ? (625500) : (283722))
#define MAX_TOW_ER(IS_IMPERIAL) ((IS_IMPERIAL) ? (630500) : (285990))
// Max Fuel
#define MAX_FUEL(IS_IMPERIAL) ((IS_IMPERIAL) ? (256207) : (116213))
#define MAX_FUEL_ER(IS_IMPERIAL) ((IS_IMPERIAL) ? (282619) : (128193))
// Arms
// Shared part 1
#define ARM_EMPTY -159.6
// Pax Only
#define ARM_PILOT 984.0
#define ARM_FIRST_OFFICER 984.0
#define ARM_ENGINEER 960.0
#define ARM_PAX_CABIN_CREW_FRONT 792.0
#define ARM_PAX_BUSINESS1_LEFT 540.0
#define ARM_PAX_BUSINESS1_CENTER 540.0
#define ARM_PAX_BUSINESS1_RIGHT 540.0
#define ARM_PAX_BUSINESS2_LEFT 300.0
#define ARM_PAX_BUSINESS2_CENTER 300.0
#define ARM_PAX_BUSINESS2_RIGHT 300.0
#define ARM_PAX_ECONOMY1_LEFT -240.0
#define ARM_PAX_ECONOMY1_CENTER -240.0
#define ARM_PAX_ECONOMY1_RIGHT -240.0
#define ARM_PAX_ECONOMY2_LEFT -600.0
#define ARM_PAX_ECONOMY2_CENTER -600.0
#define ARM_PAX_ECONOMY2_RIGHT -600.0
#define ARM_PAX_CABIN_CREW_REAR -660.0
// Cargo only
#define ARM_F_UPPER1_LEFT 660
#define ARM_F_UPPER1_RIGHT 660
#define ARM_F_UPPER2_LEFT 240
#define ARM_F_UPPER2_RIGHT 240
#define ARM_F_UPPER3_LEFT -240
#define ARM_F_UPPER3_RIGHT -240
#define ARM_F_UPPER4_LEFT -600
#define ARM_F_UPPER4_RIGHT -600
// Shared part 2
#define ARM_FORWARD_CARGO 360.0
#define ARM_REAR_CARGO -360.0
#define ARM_LEFT_AUX 60.0
#define ARM_RIGHT_AUX 60.0
// Fuel
#define ARM_MAIN1 -240.0
#define ARM_MAIN3 -240.0
#define ARM_MAIN2 120.0
#define ARM_UPPER_AUX 0.0
#define ARM_LOWER_AUX 0.0
#define ARM_MAIN1_TIP -468.0
#define ARM_MAIN3_TIP -468.0
#define ARM_TAIL -840.0
#define ARM_FORWARD_AUX1 60.0
#define ARM_FORWARD_AUX2 60.0
// MAC Stuff
// TODO: Extract following four from CFG at runtime
#define ROOT_CHORD 34.68
#define WING_SPAN 170.5
#define WING_AREA 3648.0
#define QUARTER_MAC -165.0 //aero_center
#define TIP_CHORD ((2.0 * WING_AREA) / WING_SPAN - ROOT_CHORD)
#define TAPER_RATIO (TIP_CHORD / ROOT_CHORD)
#define MAC ((2.0 / 3.0) * ROOT_CHORD * ((1.0 + TAPER_RATIO + (TAPER_RATIO * TAPER_RATIO)) / (1.0 + TAPER_RATIO)) * 12.0)
#define LEMAC (QUARTER_MAC + (1.0 / 4.0) * MAC)
#define TO_PERCENT_MAC(POS) ((((POS) - LEMAC) / MAC) * -100.0)
// CG Limits
#define MIN_CG 12.0
#define MAX_CG 34.0
#define CG_TOLERANCE 0.05
// Conversions
#define TO_POUNDS(IS_IMPERIAL, VALUE) ((IS_IMPERIAL) ? (VALUE) : (VALUE) * 2.20462262185)
#define FROM_POUNDS(IS_IMPERIAL, VALUE) ((IS_IMPERIAL) ? (VALUE) : (VALUE) * (1.0 / 2.20462262185))
// GSX States
#define GSX_SERVICE_ACTIVE 5
// SimConnect ENUMs
enum DATA_DEFINITIONS {
DATA_DEFINITION_EMPTY_WEIGHT,
DATA_DEFINITION_PAYLOAD_PAX,
DATA_DEFINITION_PAYLOAD_F,
DATA_DEFINITION_FUEL,
DATA_DEFINITION_GSX,
DATA_DEFINITION_USER_DATA,
};
enum DATA_REQUESTS {
DATA_REQUEST_EMPTY_WEIGHT,
DATA_REQUEST_PAYLOAD_PAX,
DATA_REQUEST_PAYLOAD_F,
DATA_REQUEST_FUEL,
DATA_REQUEST_GSX,
DATA_REQUEST_USER_DATA,
};
// Data
typedef struct {
double isCargo;
double isER;
double isImperial;
} UserData_t;
typedef struct {
double boardingState; // See manual, 5 => active
double deboardingState; // See manual, 5 => active
double passengersBoarded; // Num pax
double passengersDeboarded; // Num pax
double cargoBoarded; // In percent
double cargoDeboarded; // In percent
} GSXData_t;
typedef struct {
// SimConnect mapped
double pilot;
double firstOfficer;
double engineer;
double cabinCrewFront;
double business1Left;
double business1Center;
double business1Right;
double business2Left;
double business2Center;
double business2Right;
double economy1Left;
double economy1Center;
double economy1Right;
double economy2Left;
double economy2Center;
double economy2Right;
double cabinCrewRear;
double forwardCargo;
double rearCargo;
double leftAux;
double rightAux;
// Additional properties
double empty;
double total;
double CGTarget;
double ZFWCG;
double TOCG;
struct paxCount {
unsigned char business1;
unsigned char business2;
unsigned char economy1;
unsigned char economy2;
unsigned short total;
} paxCount;
} paxPayloadData_t;
typedef struct {
double pilot;
double firstOfficer;
double engineer;
double cabinCrewFront;
double business1Left;
double business1Center;
double business1Right;
double business2Left;
double business2Center;
double business2Right;
double economy1Left;
double economy1Center;
double economy1Right;
double economy2Left;
double economy2Center;
double economy2Right;
double cabinCrewRear;
double forwardCargo;
double rearCargo;
double leftAux;
double rightAux;
} paxPayloadDataSet_t;
typedef struct {
// SimConnect mapped
double pilot;
double firstOfficer;
double engineer;
double upper1Left;
double upper1Right;
double upper2Left;
double upper2Right;
double upper3Left;
double upper3Right;
double upper4Left;
double upper4Right;
double lowerForward;
double lowerRear;
double leftAux;
double rightAux;
// Additional properties
double empty;
double total;
double CGTarget;
double ZFWCG;
double TOCG;
struct stations {
unsigned int upper1;
unsigned int upper2;
unsigned int upper3;
unsigned int upper4;
unsigned int total;
} stations;
} fPayloadData_t;
typedef struct {
// SimConnect mapped
double pilot;
double firstOfficer;
double engineer;
double upper1Left;
double upper1Right;
double upper2Left;
double upper2Right;
double upper3Left;
double upper3Right;
double upper4Left;
double upper4Right;
double lowerForward;
double lowerRear;
double leftAux;
double rightAux;
} fPayloadDataSet_t;
typedef struct {
// SimConnect mapped
double poundsPerGallon; // DO NOT USE
double main1;
double main3;
double main2;
double upperAux;
double lowerAux;
double main1Tip;
double main3Tip;
double tail;
double forwardAux1;
double forwardAux2;
// Additional properties
double total;
} FuelData_t;
typedef struct {
bool GSXSync;
double paxWeightKG;
double bagWeightKG;
double paxWeightLBS;
double bagWeightLBS;
} UserOptions_t;

View File

@ -1,6 +1,25 @@
# How to build
After building WASM, run `copy-debug` or `copy-release` to copy WASM module.
# Sources
- https://www.boeing.com/content/dam/boeing/boeingdotcom/company/about_bca/startup/pdf/freighters/MD11BCF.pdf
- LAMM
- https://www.satco-inc.com/product-pallet/?part_number=31086-595
- https://www.satco-inc.com/product-container/?part_number=34124-901
TODO:
- EFB integration (BRANCH)
- Check if including bundle is getting loaded
- Add to bundle global scoped react "import"
- Automate this?
- Add to EFB.js and EFB.html
- Automate this?
- JS
- Persist SB data across page changes
- Options (GSX sync, pax/bag weights)
- Types for SB plan (only what I need)
- WASM
- Custom pax/bag weights

4
copy-debug.ps1 Normal file
View File

@ -0,0 +1,4 @@
Copy-Item .\PackageSources\wasm-module\MSFS\Debug\load-manager.wasm .\PackageSources\SimObjects\Airplanes\TFDi_Design_MD-11_GE\panel
Copy-Item .\PackageSources\wasm-module\MSFS\Debug\load-manager.wasm .\PackageSources\SimObjects\Airplanes\TFDi_Design_MD-11_PW\panel
Copy-Item .\PackageSources\wasm-module\MSFS\Debug\load-manager.wasm .\PackageSources\SimObjects\Airplanes\TFDi_Design_MD-11F_GE\panel
Copy-Item .\PackageSources\wasm-module\MSFS\Debug\load-manager.wasm .\PackageSources\SimObjects\Airplanes\TFDi_Design_MD-11F_PW\panel

4
copy-release.ps1 Normal file
View File

@ -0,0 +1,4 @@
Copy-Item .\PackageSources\wasm-module\MSFS\Release\load-manager.wasm .\PackageSources\SimObjects\Airplanes\TFDi_Design_MD-11_GE\panel
Copy-Item .\PackageSources\wasm-module\MSFS\Release\load-manager.wasm .\PackageSources\SimObjects\Airplanes\TFDi_Design_MD-11_PW\panel
Copy-Item .\PackageSources\wasm-module\MSFS\Release\load-manager.wasm .\PackageSources\SimObjects\Airplanes\TFDi_Design_MD-11F_GE\panel
Copy-Item .\PackageSources\wasm-module\MSFS\Release\load-manager.wasm .\PackageSources\SimObjects\Airplanes\TFDi_Design_MD-11F_PW\panel

View File

@ -4,5 +4,7 @@
"path": "."
}
],
"settings": {}
"settings": {
"cSpell.words": ["deboarding", "khofmann", "tfdi", "TFDI", "TOCG", "ZFWCG"]
}
}