Skip to content

Commit

Permalink
fix(cpc): adjusted constants to match a330
Browse files Browse the repository at this point in the history
  • Loading branch information
Revyn112 committed Nov 9, 2024
1 parent 62d6e28 commit 0fad7f8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -949,12 +949,12 @@ impl SimulationElement for PressurizationSystemInterfaceUnit {
struct A320PressurizationConstants;

impl PressurizationConstants for A320PressurizationConstants {
// Volume data from A320 AIRCRAFT CHARACTERISTICS - AIRPORT AND MAINTENANCE PLANNING
const CABIN_ZONE_VOLUME_CUBIC_METER: f64 = 139.; // m3
const COCKPIT_VOLUME_CUBIC_METER: f64 = 9.; // m3
// Volume data from A330 AIRCRAFT CHARACTERISTICS - AIRPORT AND MAINTENANCE PLANNING
const CABIN_ZONE_VOLUME_CUBIC_METER: f64 = 372.; // m3
const COCKPIT_VOLUME_CUBIC_METER: f64 = 12.; // m3
const FWD_CARGO_ZONE_VOLUME_CUBIC_METER: f64 = 0.; // m3 Not used in A320
const BULK_CARGO_ZONE_VOLUME_CUBIC_METER: f64 = 0.; // m3 Not used in A320
const PRESSURIZED_FUSELAGE_VOLUME_CUBIC_METER: f64 = 330.; // m3
const PRESSURIZED_FUSELAGE_VOLUME_CUBIC_METER: f64 = 1056.; // m3
const CABIN_LEAKAGE_AREA: f64 = 0.0003; // m2
const OUTFLOW_VALVE_SIZE: f64 = 0.05; // m2
const SAFETY_VALVE_SIZE: f64 = 0.02; // m2
Expand Down
8 changes: 6 additions & 2 deletions hdw-a339x/src/wasm/systems/a320_systems/src/payload/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ pub enum A320Cargo {
AftBaggage,
AftBulkLoose,
}

#[cfg(test)]
impl From<A320Cargo> for usize {
fn from(value: A320Cargo) -> Self {
value as usize
}
}
#[cfg(test)]
impl From<usize> for A320Cargo {
fn from(value: usize) -> Self {
Expand Down Expand Up @@ -171,7 +176,6 @@ impl A320Payload {
let per_pax_weight = Rc::new(Cell::new(Mass::new::<kilogram>(
Self::DEFAULT_PER_PAX_WEIGHT_KG,
)));

let developer_state = Rc::new(Cell::new(0));
let boarding_sounds = BoardingSounds::new(context);
let pax = Self::A320_PAX.map(|p| {
Expand Down
3 changes: 2 additions & 1 deletion hdw-a339x/src/wasm/systems/a320_systems_wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ use spoilers::spoilers;
use std::error::Error;
use systems::air_conditioning::{
acs_controller::AcscId, cabin_pressure_controller::CpcId, Channel, ZoneType,
};use systems::failures::FailureType;
};
use systems::failures::FailureType;
use systems::shared::{
AirbusElectricPumpId, AirbusEngineDrivenPumpId, ElectricalBusType, GearActuatorId,
HydraulicColor, LgciuId, ProximityDetectorId,
Expand Down

0 comments on commit 0fad7f8

Please sign in to comment.