diff --git a/B78XH-wasm/B78XH-wasm.vcxproj b/B78XH-wasm/B78XH-wasm.vcxproj
index b05ce8f..5b8b611 100644
--- a/B78XH-wasm/B78XH-wasm.vcxproj
+++ b/B78XH-wasm/B78XH-wasm.vcxproj
@@ -40,6 +40,7 @@
+
@@ -51,7 +52,7 @@
true
.wasm
$(MSFS_IncludePath)
- ..\..\..\..\WebstormProjects\B78XH-su9-stable\SimObjects\Airplanes\Asobo_B787_10\panel
+ ..\..\..\AppData\Roaming\Microsoft Flight Simulator\Packages\Community\B78XH-main\SimObjects\Airplanes\Asobo_B787_10\panel
false
@@ -149,14 +150,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -261,6 +274,8 @@
+
+
@@ -271,6 +286,14 @@
+
+
+
+
+
+
+
+
@@ -284,6 +307,8 @@
+
+
@@ -294,7 +319,9 @@
+
+
@@ -365,4 +392,4 @@
-
\ No newline at end of file
+
diff --git a/B78XH-wasm/B78XH-wasm.vcxproj.filters b/B78XH-wasm/B78XH-wasm.vcxproj.filters
index 47c084d..2f3c022 100644
--- a/B78XH-wasm/B78XH-wasm.vcxproj.filters
+++ b/B78XH-wasm/B78XH-wasm.vcxproj.filters
@@ -285,6 +285,42 @@
Source Files\Equipment\AircraftEquipment\Bases
+
+ Source Files\Systems\Fuel
+
+
+ Source Files\Equipment\AircraftEquipment\Fuel
+
+
+ Source Files\Systems\Fuel
+
+
+ Source Files\Equipment\AircraftEquipment\Fuel\Sensors
+
+
+ Source Files\Equipment\AircraftEquipment\Fuel\Sensors
+
+
+ Source Files\Equipment\AircraftEquipment\Fuel\Sensors
+
+
+ Source Files\Equipment\AircraftEquipment\Fuel\Sensors
+
+
+ Source Files\Equipment\AircraftEquipment\Fuel\SensorGroups
+
+
+ Source Files\Equipment\AircraftEquipment\Fuel\SensorGroups
+
+
+ Source Files\Equipment\AircraftEquipment\Fuel\SensorGroups
+
+
+ Source Files\Equipment\AircraftEquipment\Fuel\SensorGroups
+
+
+ Source Files\Equipment\AircraftEquipment\Fuel
+
@@ -697,6 +733,46 @@
Source Files\Equipment\AircraftEquipment\Bases
+
+
+ Source Files\Tools\staticdata
+
+
+ Source Files\Systems\Fuel
+
+
+ Source Files\Equipment\AircraftEquipment\Fuel
+
+
+ Source Files\Systems\Fuel
+
+
+ Source Files\Equipment\AircraftEquipment\Fuel\Sensors
+
+
+ Source Files\Equipment\AircraftEquipment\Fuel\Sensors
+
+
+ Source Files\Equipment\AircraftEquipment\Fuel\Sensors
+
+
+ Source Files\Equipment\AircraftEquipment\Fuel\Sensors
+
+
+ Source Files\Equipment\AircraftEquipment\Fuel\SensorGroups
+
+
+ Source Files\Equipment\AircraftEquipment\Fuel\SensorGroups
+
+
+ Source Files\Equipment\AircraftEquipment\Fuel\SensorGroups
+
+
+ Source Files\Equipment\AircraftEquipment\Fuel\SensorGroups
+
+
+ Source Files\Equipment\AircraftEquipment\Fuel
+
@@ -879,6 +955,15 @@
{a4046750-4ccb-4bf9-9402-6f841a78c254}
+
+ {d940d724-092b-47d5-b599-891e8fbe0ea9}
+
+
+ {1bb92db7-bef7-4646-803d-1d344a31ae3b}
+
+
+ {da86a793-f4e6-449d-bf50-898554ede86f}
+
@@ -889,4 +974,4 @@
-
\ No newline at end of file
+
diff --git a/B78XH-wasm/CCS.h b/B78XH-wasm/CCS.h
index f4673d4..6539c5b 100644
--- a/B78XH-wasm/CCS.h
+++ b/B78XH-wasm/CCS.h
@@ -17,6 +17,7 @@
#pragma once
#include "ERS.h"
+#include "FQIS.h"
#include "LVars.h"
/*
@@ -31,6 +32,7 @@ class CCS {
auto reset() -> void;
private:
ERS ers;
+ FQIS fqis;
LVars lvars;
auto updateLVars() -> void;
auto updateERS(double deltaTime) -> void;
diff --git a/B78XH-wasm/CenterFuelSensorGroupA.cpp b/B78XH-wasm/CenterFuelSensorGroupA.cpp
new file mode 100644
index 0000000..0070a6f
--- /dev/null
+++ b/B78XH-wasm/CenterFuelSensorGroupA.cpp
@@ -0,0 +1 @@
+#include "CenterFuelSensorGroupA.h"
diff --git a/B78XH-wasm/CenterFuelSensorGroupA.h b/B78XH-wasm/CenterFuelSensorGroupA.h
new file mode 100644
index 0000000..d76940f
--- /dev/null
+++ b/B78XH-wasm/CenterFuelSensorGroupA.h
@@ -0,0 +1,14 @@
+#pragma once
+#include "FuelCompensatorSensor.h"
+#include "FuelHeightSensor.h"
+#include "FuelHeightTemperatureSensor.h"
+
+class CenterFuelSensorGroupA
+{
+ private:
+ FuelHeightSensor fhs1;
+ FuelHeightSensor fhs2;
+ FuelHeightTemperatureSensor fhts;
+ FuelCompensatorSensor fcs;
+};
+
diff --git a/B78XH-wasm/CenterFuelSensorGroupB.cpp b/B78XH-wasm/CenterFuelSensorGroupB.cpp
new file mode 100644
index 0000000..04c68ec
--- /dev/null
+++ b/B78XH-wasm/CenterFuelSensorGroupB.cpp
@@ -0,0 +1 @@
+#include "CenterFuelSensorGroupB.h"
diff --git a/B78XH-wasm/CenterFuelSensorGroupB.h b/B78XH-wasm/CenterFuelSensorGroupB.h
new file mode 100644
index 0000000..f2567cf
--- /dev/null
+++ b/B78XH-wasm/CenterFuelSensorGroupB.h
@@ -0,0 +1,12 @@
+#pragma once
+#include "FuelCompensatorSensor.h"
+#include "FuelHeightSensor.h"
+
+class CenterFuelSensorGroupB
+{
+ private:
+ FuelHeightSensor fhs1;
+ FuelHeightSensor fhs2;
+ FuelCompensatorSensor fcs;
+};
+
diff --git a/B78XH-wasm/FQDCCenter.cpp b/B78XH-wasm/FQDCCenter.cpp
new file mode 100644
index 0000000..bac952d
--- /dev/null
+++ b/B78XH-wasm/FQDCCenter.cpp
@@ -0,0 +1,5 @@
+#include "FQDCCenter.h"
+
+double FQDCCenter::getSensorData() {
+ return 0;
+}
diff --git a/B78XH-wasm/FQDCCenter.h b/B78XH-wasm/FQDCCenter.h
new file mode 100644
index 0000000..30c691c
--- /dev/null
+++ b/B78XH-wasm/FQDCCenter.h
@@ -0,0 +1,13 @@
+#pragma once
+#include "CenterFuelSensorGroupA.h"
+#include "CenterFuelSensorGroupB.h"
+class FQDCCenter
+{
+ public:
+ // TODO: see FQDC side comments
+ auto getSensorData() -> double;
+ private:
+ CenterFuelSensorGroupA sensorGroupA;
+ CenterFuelSensorGroupB sensorGroupB;
+};
+
diff --git a/B78XH-wasm/FQDCSide.cpp b/B78XH-wasm/FQDCSide.cpp
new file mode 100644
index 0000000..af92be6
--- /dev/null
+++ b/B78XH-wasm/FQDCSide.cpp
@@ -0,0 +1,5 @@
+#include "FQDCSide.h"
+
+double FQDCSide::getSensorData() {
+ return 0;
+}
diff --git a/B78XH-wasm/FQDCSide.h b/B78XH-wasm/FQDCSide.h
new file mode 100644
index 0000000..89bc720
--- /dev/null
+++ b/B78XH-wasm/FQDCSide.h
@@ -0,0 +1,19 @@
+// fuel quantity data concentrators. there are 3 of them, one for each tank
+//
+
+#pragma once
+#include "MainFuelSensorGroupA.h"
+#include "MainFuelSensorGroupB.h"
+class FQDCSide
+{
+ public:
+ // TODO: define functions for retrieval of data. The "main" sensor groups (left and right) also have a sensor for
+ // the center tank, so it's not directly 1-to-1
+ // for now this is double but eventually will be something more complex, probably a struct
+ // can just get the corresponding (l/c/r) fuel tank to start with ig?
+ auto getSensorData() -> double;
+ private:
+ MainFuelSensorGroupA sensorGroupA;
+ MainFuelSensorGroupB sensorGroupB;
+};
+
diff --git a/B78XH-wasm/FQIS.cpp b/B78XH-wasm/FQIS.cpp
new file mode 100644
index 0000000..9144fab
--- /dev/null
+++ b/B78XH-wasm/FQIS.cpp
@@ -0,0 +1,18 @@
+#include "FQIS.h"
+
+auto FQIS::getCenterTankFuelWeight() -> double {
+ // TODO: return actual fuel weight
+ // simple impl based on default simvars: get fuel level in each tank * fuel density. or even simpler just get fuel weight simvars
+ // advanced custom impl: calculate fuel level from height sensors, fuel density from density sensors, and use that to calculate
+ return 0;
+}
+
+auto FQIS::getLeftTankFuelWeight() -> double {
+ // TODO: return actual fuel weight
+ return 0;
+}
+
+auto FQIS::getRightTankFuelWeight() -> double {
+ // TODO: return actual fuel weight
+ return 0;
+}
diff --git a/B78XH-wasm/FQIS.h b/B78XH-wasm/FQIS.h
new file mode 100644
index 0000000..350a8f1
--- /dev/null
+++ b/B78XH-wasm/FQIS.h
@@ -0,0 +1,18 @@
+// fuel quantity indicating system
+
+#pragma once
+#include "FQDCSide.h"
+#include "FQDCCenter.h"
+
+class FQIS
+{
+ public:
+ auto getCenterTankFuelWeight() -> double;
+ auto getLeftTankFuelWeight() -> double;
+ auto getRightTankFuelWeight() -> double;
+ private:
+ FQDCSide fqdcLeft;
+ FQDCCenter fqdcCenter;
+ FQDCSide fqdcRight;
+};
+
diff --git a/B78XH-wasm/FQMS.cpp b/B78XH-wasm/FQMS.cpp
new file mode 100644
index 0000000..3735f01
--- /dev/null
+++ b/B78XH-wasm/FQMS.cpp
@@ -0,0 +1 @@
+#include "FQMS.h"
diff --git a/B78XH-wasm/FQMS.h b/B78XH-wasm/FQMS.h
new file mode 100644
index 0000000..c78348e
--- /dev/null
+++ b/B78XH-wasm/FQMS.h
@@ -0,0 +1,8 @@
+// fuel quantity management system
+// calculates fuel weight per tank and total, and monitors for faults
+
+#pragma once
+class FQMS
+{
+};
+
diff --git a/B78XH-wasm/FuelCompensatorSensor.cpp b/B78XH-wasm/FuelCompensatorSensor.cpp
new file mode 100644
index 0000000..e770564
--- /dev/null
+++ b/B78XH-wasm/FuelCompensatorSensor.cpp
@@ -0,0 +1,6 @@
+#include "FuelCompensatorSensor.h"
+
+double FuelCompensatorSensor::getFuelDensity() {
+ // TODO: return fuel density simvar
+ return 0;
+}
diff --git a/B78XH-wasm/FuelCompensatorSensor.h b/B78XH-wasm/FuelCompensatorSensor.h
new file mode 100644
index 0000000..db2fd82
--- /dev/null
+++ b/B78XH-wasm/FuelCompensatorSensor.h
@@ -0,0 +1,8 @@
+#pragma once
+#include "Operable.h"
+class FuelCompensatorSensor : public Operable
+{
+ public:
+ auto getFuelDensity() -> double;
+};
+
diff --git a/B78XH-wasm/FuelDensitySensor.cpp b/B78XH-wasm/FuelDensitySensor.cpp
new file mode 100644
index 0000000..c5c5619
--- /dev/null
+++ b/B78XH-wasm/FuelDensitySensor.cpp
@@ -0,0 +1,6 @@
+#include "FuelDensitySensor.h"
+
+double FuelDensitySensor::getFuelDensity() {
+ // TODO: return simvar for fuel density
+ return 0;
+}
diff --git a/B78XH-wasm/FuelDensitySensor.h b/B78XH-wasm/FuelDensitySensor.h
new file mode 100644
index 0000000..e543598
--- /dev/null
+++ b/B78XH-wasm/FuelDensitySensor.h
@@ -0,0 +1,8 @@
+#pragma once
+#include "Operable.h"
+class FuelDensitySensor : public Operable
+{
+ public:
+ auto getFuelDensity() -> double;
+};
+
diff --git a/B78XH-wasm/FuelHeightSensor.cpp b/B78XH-wasm/FuelHeightSensor.cpp
new file mode 100644
index 0000000..a3bac2a
--- /dev/null
+++ b/B78XH-wasm/FuelHeightSensor.cpp
@@ -0,0 +1,5 @@
+#include "FuelHeightSensor.h"
+
+double FuelHeightSensor::getFuelHeight() {
+ return 0;
+}
diff --git a/B78XH-wasm/FuelHeightSensor.h b/B78XH-wasm/FuelHeightSensor.h
new file mode 100644
index 0000000..6365d9e
--- /dev/null
+++ b/B78XH-wasm/FuelHeightSensor.h
@@ -0,0 +1,10 @@
+// fuel height sensor - supplies capacitance signal corresponding to fuel height at a specific location in the tank
+
+#pragma once
+#include "Operable.h"
+class FuelHeightSensor final : public Operable
+{
+ public:
+ auto getFuelHeight() -> double;
+};
+
diff --git a/B78XH-wasm/FuelHeightTemperatureSensor.cpp b/B78XH-wasm/FuelHeightTemperatureSensor.cpp
new file mode 100644
index 0000000..680ae0d
--- /dev/null
+++ b/B78XH-wasm/FuelHeightTemperatureSensor.cpp
@@ -0,0 +1,9 @@
+#include "FuelHeightTemperatureSensor.h"
+
+double FuelHeightTemperatureSensor::getFuelHeight() {
+ return 0;
+}
+
+double FuelHeightTemperatureSensor::getFuelTemperature() {
+ return 0;
+}
diff --git a/B78XH-wasm/FuelHeightTemperatureSensor.h b/B78XH-wasm/FuelHeightTemperatureSensor.h
new file mode 100644
index 0000000..3ec349a
--- /dev/null
+++ b/B78XH-wasm/FuelHeightTemperatureSensor.h
@@ -0,0 +1,9 @@
+#pragma once
+#include "Operable.h"
+class FuelHeightTemperatureSensor : public Operable
+{
+ public:
+ auto getFuelHeight() -> double;
+ auto getFuelTemperature() -> double;
+};
+
diff --git a/B78XH-wasm/MainFuelSensorGroupA.cpp b/B78XH-wasm/MainFuelSensorGroupA.cpp
new file mode 100644
index 0000000..9ea7d5b
--- /dev/null
+++ b/B78XH-wasm/MainFuelSensorGroupA.cpp
@@ -0,0 +1 @@
+#include "MainFuelSensorGroupA.h"
diff --git a/B78XH-wasm/MainFuelSensorGroupA.h b/B78XH-wasm/MainFuelSensorGroupA.h
new file mode 100644
index 0000000..f6bb05b
--- /dev/null
+++ b/B78XH-wasm/MainFuelSensorGroupA.h
@@ -0,0 +1,19 @@
+#pragma once
+#include "FuelCompensatorSensor.h"
+#include "FuelHeightSensor.h"
+#include "FuelHeightTemperatureSensor.h"
+
+class MainFuelSensorGroupA
+{
+ private:
+ FuelHeightSensor fhs1;
+ FuelHeightSensor fhs2;
+ FuelHeightSensor fhs3;
+ FuelHeightSensor fhs4;
+ FuelHeightSensor fhs5;
+ FuelHeightSensor fhs6;
+ FuelHeightTemperatureSensor fhts;
+ FuelHeightSensor centerFhs;
+ FuelCompensatorSensor fcs;
+};
+
diff --git a/B78XH-wasm/MainFuelSensorGroupB.cpp b/B78XH-wasm/MainFuelSensorGroupB.cpp
new file mode 100644
index 0000000..628aacd
--- /dev/null
+++ b/B78XH-wasm/MainFuelSensorGroupB.cpp
@@ -0,0 +1 @@
+#include "MainFuelSensorGroupB.h"
diff --git a/B78XH-wasm/MainFuelSensorGroupB.h b/B78XH-wasm/MainFuelSensorGroupB.h
new file mode 100644
index 0000000..e0b7497
--- /dev/null
+++ b/B78XH-wasm/MainFuelSensorGroupB.h
@@ -0,0 +1,19 @@
+#pragma once
+#include "FuelDensitySensor.h"
+#include "FuelHeightSensor.h"
+#include "FuelHeightTemperatureSensor.h"
+
+class MainFuelSensorGroupB
+{
+ private:
+ FuelHeightSensor fhs1;
+ FuelHeightSensor fhs2;
+ FuelHeightSensor fhs3;
+ FuelHeightSensor fhs4;
+ FuelHeightSensor fhs5;
+ FuelHeightSensor fhs6;
+ FuelHeightSensor fhs7;
+ FuelHeightSensor centerFhs;
+ FuelDensitySensor fds;
+};
+
diff --git a/B78XH-wasm/PrincipalCharacteristics.h b/B78XH-wasm/PrincipalCharacteristics.h
new file mode 100644
index 0000000..a7629fa
--- /dev/null
+++ b/B78XH-wasm/PrincipalCharacteristics.h
@@ -0,0 +1,19 @@
+// Defines values from the "Principal Characteristics" table from page 9 of B787 syst document
+
+#pragma once
+
+const struct PrincipalCharacteristics {
+ // max weights
+ inline static double maxTaxiWeightPounds = 537000;
+ inline static double maxTakeoffWeightPounds = 535000;
+ inline static double maxLandingWeightPounds = 445000;
+ inline static double maxZeroFuelWeightPounds = 425200;
+
+ // max thrust, same value for genx or trent
+ inline static double maxThrustPounds = 76000;
+
+ // passenger capacity
+ inline static int threeClassPassengerCapacity = 295;
+ inline static int twoClassPassengerCapacity = 356;
+ inline static int economyPassengerCapacity = 440;
+};