Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
6184c4b
Initial hydraulic elements
wpine215 Dec 25, 2020
1cb0027
Update structure
wpine215 Dec 25, 2020
7196335
Accumulators and reservoirs are now handled entirely by their parent …
wpine215 Dec 25, 2020
7f066e0
Better implementation
wpine215 Dec 25, 2020
f06aa53
New methods
wpine215 Dec 25, 2020
2366143
Added references, fixed UOM type usage
wpine215 Dec 25, 2020
83f4a29
Added electric pump calculations
wpine215 Dec 26, 2020
e0edd33
Updated hydraulic fluid references & fixed volume rate calculations
wpine215 Dec 26, 2020
e677099
Starting work on loop code
wpine215 Dec 26, 2020
e425121
Update TODO
wpine215 Dec 26, 2020
6666578
Finished loop update calculations
wpine215 Dec 26, 2020
1ac1e06
Fix errors
wpine215 Dec 26, 2020
9a11519
Some error fixes and formatting
wpine215 Dec 27, 2020
a8e455d
No more errors
wpine215 Dec 27, 2020
cd4a30d
More verbose constant names
wpine215 Dec 27, 2020
da6bd30
More verbose variable names
wpine215 Dec 27, 2020
c710c06
Minor changes + fixed engine n2 placeholder
wpine215 Dec 27, 2020
7d2cf8b
Minor formatting changes
wpine215 Dec 27, 2020
2077a2d
A couple tests to start off
wpine215 Dec 27, 2020
f9dcb80
Update mod.rs
wpine215 Dec 27, 2020
9b072d7
New functions for pump displacement and flow
wpine215 Dec 27, 2020
50ca5af
some more fixes + rat pump
wpine215 Dec 27, 2020
75466c6
refactor: various pumps containing a Pump type
davidwalschots Dec 27, 2020
c3d0e60
Merge pull request #1 from davidwalschots/hydraulics-pump
wpine215 Dec 27, 2020
78edcc2
Fixed engine N2 RPM calculations and overhauled EDP tests
wpine215 Dec 28, 2020
aaefeda
A lot of restructuring
wpine215 Dec 28, 2020
14e0603
Some changes to get proper pressurization behavior
wpine215 Dec 28, 2020
fd35b47
Update mod.rs
wpine215 Dec 28, 2020
b5f1f80
Implemented load, temporary print statements
wpine215 Dec 28, 2020
11b3301
Better EDP RPM modeling
wpine215 Dec 28, 2020
cbf4a0a
Electric pump fixes
wpine215 Dec 28, 2020
50bbe45
formatting and removed unnecessary debug statements
wpine215 Dec 28, 2020
dac4fb1
Merge branch 'master' into hydraulics
wpine215 Dec 29, 2020
e82e8bc
misc changes
wpine215 Dec 29, 2020
8254934
Hydraulic loop rework pt. 1 (WIP)
wpine215 Dec 29, 2020
f40845c
Update mod.rs
wpine215 Dec 30, 2020
31a3a2e
Accumulator rewrite
wpine215 Dec 31, 2020
58d6f7d
PTU update part 1
wpine215 Jan 1, 2021
0b48cc0
Completed PTU and pressure relief valve
wpine215 Jan 1, 2021
42618ad
Clean-up. Accumulator currently broken.
wpine215 Jan 1, 2021
372df0b
Fixed accumulator
wpine215 Jan 1, 2021
6eac23b
Completely working actuator - but it overshoots a bit
wpine215 Jan 1, 2021
03be19d
Targeted midpoint pressure with accumulator for less overshoot/unders…
wpine215 Jan 1, 2021
296aaad
Even better accumulator performance
wpine215 Jan 1, 2021
e3d7108
Merge branch 'master' into hydraulics
wpine215 Jan 5, 2021
c16991c
Merge branch 'master' into hydraulics
wpine215 Jan 7, 2021
831848a
chore: removed BleedSrcType and uncommented Actuator
wpine215 Jan 10, 2021
95432b8
chore: added base code for hydraulic overhead and imports
wpine215 Jan 10, 2021
7a1e6be
Merge branch 'master' into hydraulics
wpine215 Jan 10, 2021
fbbe3ed
chore: switched to f64 and minor bug fixes
wpine215 Jan 10, 2021
0298ab7
Merge branch 'master' into hydraulics
wpine215 Jan 13, 2021
c250e4f
Update mod.rs
wpine215 Jan 13, 2021
ee217ca
chore: finished integration with new project structure
wpine215 Jan 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 67 additions & 4 deletions systems/src/a320/hydraulic.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,83 @@
use crate::simulator::UpdateContext;
use std::time::Duration;
use uom::si::{
area::square_meter, f64::*, force::newton, length::foot, length::meter,
mass_density::kilogram_per_cubic_meter, pressure::atmosphere, pressure::pascal, pressure::psi,
ratio::percent, thermodynamic_temperature::degree_celsius, time::second, velocity::knot,
volume::cubic_inch, volume::gallon, volume::liter, volume_rate::cubic_meter_per_second,
volume_rate::gallon_per_second,
};
use crate::{
hydraulic::{LoopColor, HydLoop, Pump, EngineDrivenPump, ElectricPump, RatPump, Actuator},
overhead::{AutoOffPushButton, NormalAltnPushButton, OnOffPushButton},
shared::{DelayedTrueLogicGate, Engine},
simulator::UpdateContext,
};

pub struct A320Hydraulic {
blue_loop: HydLoop,
green_loop: HydLoop,
yellow_loop: HydLoop,
engine_driven_pump_1: EngineDrivenPump,
engine_driven_pump_2: EngineDrivenPump,
blue_electric_pump: ElectricPump,
yellow_electric_pump: ElectricPump,
// Until hydraulic is implemented, we'll fake it with this boolean.
blue_pressurised: bool,
// blue_pressurised: bool,
}

impl A320Hydraulic {
pub fn new() -> A320Hydraulic {
A320Hydraulic {
blue_pressurised: true,
// blue_pressurised: true,
blue_loop: HydLoop::new(
LoopColor::Blue,
false,
Length::new::<meter>(10.),
Volume::new::<gallon>(1.5),
Volume::new::<gallon>(1.6),
Volume::new::<gallon>(1.5)
),
green_loop: HydLoop::new(
LoopColor::Green,
true,
Length::new::<meter>(15.),
Volume::new::<gallon>(3.6),
Volume::new::<gallon>(3.7),
Volume::new::<gallon>(3.6)
),
yellow_loop: HydLoop::new(
LoopColor::Blue,
true,
Length::new::<meter>(14.),
Volume::new::<gallon>(3.1),
Volume::new::<gallon>(3.2),
Volume::new::<gallon>(3.1)
),
engine_driven_pump_1: EngineDrivenPump::new(),
engine_driven_pump_2: EngineDrivenPump::new(),
blue_electric_pump: ElectricPump::new(),
yellow_electric_pump: ElectricPump::new(),
}
}

pub fn is_blue_pressurised(&self) -> bool {
self.blue_pressurised
// self.blue_pressurised
true
}

pub fn update(&mut self, _: &UpdateContext) {}
}

pub struct A320HydraulicOverheadPanel {
}

impl A320HydraulicOverheadPanel {
pub fn new() -> A320HydraulicOverheadPanel {
A320HydraulicOverheadPanel {

}
}

pub fn update(&mut self, context: &UpdateContext) {
}
}
Loading