Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(hyd): Adjusted steering flow on A380 and speed to pressure/flow behavior #8805

Merged
merged 4 commits into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -1593,6 +1593,7 @@ impl A320Hydraulic {
AngularVelocity::new::<radian_per_second>(0.35),
Length::new::<meter>(0.075),
Ratio::new::<ratio>(0.18),
Pressure::new::<psi>(2000.),
),

core_hydraulic_updater: MaxStepLoop::new(Self::HYDRAULIC_SIM_TIME_STEP),
Expand Down
25 changes: 24 additions & 1 deletion fbw-a380x/src/wasm/systems/a380_systems/src/hydraulic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1640,8 +1640,9 @@ impl A380Hydraulic {
context,
Angle::new::<degree>(75.),
AngularVelocity::new::<radian_per_second>(0.35),
Length::new::<meter>(0.075),
Length::new::<meter>(0.11), // Diameter of 0.11 gives correct A380 flow of around 35 lpm at full speed
Ratio::new::<ratio>(0.18),
Pressure::new::<psi>(4000.),
),

core_hydraulic_updater: MaxStepLoop::new(Self::HYDRAULIC_SIM_TIME_STEP),
Expand Down Expand Up @@ -10091,6 +10092,8 @@ mod tests {
.set_yellow_e_pump_a(false)
.start_eng1(Ratio::new::<percent>(80.))
.start_eng2(Ratio::new::<percent>(80.))
.start_eng3(Ratio::new::<percent>(80.))
.start_eng4(Ratio::new::<percent>(80.))
.set_anti_skid(false)
.run_one_tick();

Expand All @@ -10102,6 +10105,26 @@ mod tests {
assert!(test_bed.nose_steering_position().get::<degree>() <= 0.1);
}

#[test]
fn nose_steering_steers() {
let mut test_bed = test_bed_on_ground_with()
.engines_off()
.on_the_ground()
.set_cold_dark_inputs()
.set_yellow_e_pump_a(false)
.start_eng1(Ratio::new::<percent>(80.))
.start_eng2(Ratio::new::<percent>(80.))
.start_eng3(Ratio::new::<percent>(80.))
.start_eng4(Ratio::new::<percent>(80.))
.run_one_tick();

test_bed = test_bed
.set_tiller_demand(Ratio::new::<ratio>(1.))
.run_waiting_for(Duration::from_secs_f64(5.));

assert!(test_bed.nose_steering_position().get::<degree>() >= 40.);
}

#[test]
fn yellow_epump_has_cavitation_at_low_air_press() {
let mut test_bed = test_bed_on_ground_with()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ pub struct SteeringActuator {
total_volume_to_reservoir: Volume,

actuator_area: Area,

reference_pressure_for_max_speed: Pressure,
}
impl SteeringActuator {
const MIN_PRESSURE_ALLOWING_STEERING_PSI: f64 = 300.;

const REFERENCE_PRESS_FOR_NOMINAL_SPEED_PSI: f64 = 2000.;

const CURRENT_SPEED_FILTER_TIMECONST: Duration = Duration::from_millis(150);

// Adjusts how the steering slows down with position error
Expand All @@ -129,6 +129,7 @@ impl SteeringActuator {
nominal_speed: AngularVelocity,
actuator_diameter: Length,
angular_to_linear_ratio: Ratio,
reference_pressure_for_max_speed: Pressure,
) -> Self {
Self {
position_id: context.get_identifier("NOSE_WHEEL_POSITION_RATIO".to_owned()),
Expand All @@ -149,6 +150,8 @@ impl SteeringActuator {
actuator_area: std::f64::consts::PI
* (actuator_diameter / 2.)
* (actuator_diameter / 2.),

reference_pressure_for_max_speed,
}
}

Expand Down Expand Up @@ -222,7 +225,7 @@ impl SteeringActuator {
) -> AngularVelocity {
(if current_pressure.get::<psi>() > Self::MIN_PRESSURE_ALLOWING_STEERING_PSI {
self.nominal_speed * current_pressure.get::<psi>().sqrt()
/ Self::REFERENCE_PRESS_FOR_NOMINAL_SPEED_PSI.sqrt()
/ self.reference_pressure_for_max_speed.get::<psi>().sqrt()
} else {
AngularVelocity::default()
})
Expand Down Expand Up @@ -678,6 +681,7 @@ mod tests {
AngularVelocity::new::<radian_per_second>(0.35),
Length::new::<meter>(0.05),
Ratio::new::<ratio>(0.15),
Pressure::new::<psi>(2000.),
)
}

Expand Down