Skip to content

Commit 2b79662

Browse files
lukecolognedonstimMaximilian-Reuter
authored
feat(fctl): lateral law improvements (#10607)
* fix(a380/hyd): aileron and spoiler to MSFS computation * feat(a380x/fctl): roll/yaw law improvements, update lat. flight model --------- Co-authored-by: donstim <70166617+donstim@users.noreply.github.com> Co-authored-by: Chaoz <5833783+Maximilian-Reuter@users.noreply.github.com>
1 parent f71402e commit 2b79662

File tree

15 files changed

+1350
-1485
lines changed

15 files changed

+1350
-1485
lines changed

fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/flight_model.cfg

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -534,11 +534,11 @@ Trigger.46 = Name:OuterTankRightEmpty#Condition:Manual#EffectTrue:StopPump.Right
534534
;Trigger.46 = NameOuterTankRightEmpty#Target:RightOuter#Threshold:0.1#Condition:TankQuantityBelow
535535
;
536536
; Notes:
537-
; Inner and middle tank transfers to the feed tanks are done through the forward gallery via the forward inner and mid tank pumps,
538-
; feed tank 1 and 4 forward transfer valve 2 and feed tank 2 and 3 forward transfer valves 2_1 using forward gallery junction
537+
; Inner and middle tank transfers to the feed tanks are done through the forward gallery via the forward inner and mid tank pumps,
538+
; feed tank 1 and 4 forward transfer valve 2 and feed tank 2 and 3 forward transfer valves 2_1 using forward gallery junction
539539
; option 2 and FeedTanks2_3 Junction 2 option 1 unless the combined left and right mid tanks have less than 8000 kg of fuel. Feed tanks 1 and 4
540540
; transfers start and end at a lower feed tank fuel level than for 2 and 3 until the combined left and right mid tanks have less than 8000 kg of fuel.
541-
; Fuel levels for the symmetric pairs of feed tanks 1/4 and 2/3 are kept in balance by: the tank with less fuel will trigger a transfer first. When
541+
; Fuel levels for the symmetric pairs of feed tanks 1/4 and 2/3 are kept in balance by: the tank with less fuel will trigger a transfer first. When
542542
; the fuel levels for the two tanks are equal (the level for the higher tank will be decreasing because a transfer has not been triggered yet, while
543543
; the level for the lower tank will be increasing due to the transfer), the transfer to the other tank (formerly higher) will begin. The transfers to
544544
; feed tanks 1 and 4 end when either feed tank reaches the target end threshold, and the transfers to feed tanks 2 and 3 end when either of those
@@ -567,7 +567,7 @@ Trigger.46 = Name:OuterTankRightEmpty#Condition:Manual#EffectTrue:StopPump.Right
567567
;
568568
; Outer tank transfers are done through the forward gallery via the via the feed tank 1 and 4 forward transfer valve 1 and feed tanks 2 and 3
569569
; forward transfer valves 1_1 using forward gallery junction option 1 and FeedTanks2_3 Junction 1 option 1. The transfers start for symmetric pairs
570-
; of the feed tanks (1/4 and 2/3) when one of the pair reaches the transfer start threshold. A transfer ends for each feed tank when it reaches the
570+
; of the feed tanks (1/4 and 2/3) when one of the pair reaches the transfer start threshold. A transfer ends for each feed tank when it reaches the
571571
; target end threshold. (The FCOM states that the transfers should end when both of the tanks in a symmetric pair reaches the threshold.)
572572
;
573573
; Feed tanks 2 and 3 forward transfer valves 1_2 and their corresponding lines are no longer used.
@@ -610,7 +610,7 @@ rudder_area = 416.6 ; Elevator area (SQUARE FEET)
610610
elevator_up_limit = 30 ; Elevator max deflection up angle (DEGREES)
611611
elevator_down_limit = 20 ; Elevator max deflection down angle (absolute value) (DEGREES)
612612
aileron_up_limit = 30; Aileron max deflection angle (DEGREES)
613-
aileron_down_limit = 20; Aileron max deflection down angle (absolute value) (DEGREES)
613+
aileron_down_limit = 30; Aileron max deflection down angle (absolute value) (DEGREES)
614614
rudder_limit = 30; Rudder max deflection angle (absolute value) (DEGREES)
615615
rudder_trim_limit = 25.5 ; Rudder trim max deflection angle (absolute value) (DEGREES)
616616
elevator_trim_up_limit = 10 ; Elevator trim max angle (absolute value) (DEGREES)
@@ -751,14 +751,14 @@ induced_drag_scalar = 0.853
751751
flap_induced_drag_scalar = 0.35
752752
elevator_effectiveness = 1.3
753753
elevator_maxangle_scalar = 1
754-
aileron_effectiveness = 1
754+
aileron_effectiveness = 1.8
755755
rudder_effectiveness = 0.2
756756
rudder_maxangle_scalar = 1
757757
pitch_stability = 4
758-
roll_stability = 1
758+
roll_stability = 0.4
759759
yaw_stability = 1
760760
pitch_gyro_stability = 6
761-
roll_gyro_stability = 4.5
761+
roll_gyro_stability = 2.5
762762
yaw_gyro_stability = 1
763763
elevator_trim_effectiveness = 1.05
764764
aileron_trim_effectiveness = 1

fbw-a380x/src/wasm/fbw_a380/src/model/A380LateralDirectLaw.cpp

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ A380LateralDirectLaw::Parameters_A380LateralDirectLaw_T A380LateralDirectLaw::A3
1616

1717
50.0,
1818

19-
0.0,
20-
2119
-30.0,
2220

2321
-30.0
@@ -47,22 +45,16 @@ void A380LateralDirectLaw::reset(void)
4745
}
4846

4947
void A380LateralDirectLaw::step(const real_T *rtu_In_time_dt, const real_T *rtu_In_delta_xi_pos, const real_T
50-
*rtu_In_delta_zeta_pos, real_T *rty_Out_xi_inboard_deg, real_T *rty_Out_xi_midboard_deg, real_T
51-
*rty_Out_xi_outboard_deg, real_T *rty_Out_xi_spoiler_deg, real_T *rty_Out_zeta_upper_deg, real_T
52-
*rty_Out_zeta_lower_deg)
48+
*rtu_In_delta_zeta_pos, real_T *rty_Out_xi_deg, real_T *rty_Out_zeta_deg)
5349
{
54-
*rty_Out_xi_spoiler_deg = A380LateralDirectLaw_rtP.Constant_Value;
5550
A380LateralDirectLaw_RateLimiter(A380LateralDirectLaw_rtP.Gain1_Gain * *rtu_In_delta_xi_pos,
5651
A380LateralDirectLaw_rtP.RateLimiterVariableTs_up, A380LateralDirectLaw_rtP.RateLimiterVariableTs_lo, rtu_In_time_dt,
57-
A380LateralDirectLaw_rtP.RateLimiterVariableTs_InitialCondition, rty_Out_xi_outboard_deg,
52+
A380LateralDirectLaw_rtP.RateLimiterVariableTs_InitialCondition, rty_Out_xi_deg,
5853
&A380LateralDirectLaw_DWork.sf_RateLimiter);
59-
*rty_Out_xi_inboard_deg = *rty_Out_xi_outboard_deg;
60-
*rty_Out_xi_midboard_deg = *rty_Out_xi_outboard_deg;
6154
A380LateralDirectLaw_RateLimiter(A380LateralDirectLaw_rtP.Gain2_Gain * *rtu_In_delta_zeta_pos,
6255
A380LateralDirectLaw_rtP.RateLimiterVariableTs1_up, A380LateralDirectLaw_rtP.RateLimiterVariableTs1_lo,
63-
rtu_In_time_dt, A380LateralDirectLaw_rtP.RateLimiterVariableTs1_InitialCondition, rty_Out_zeta_lower_deg,
56+
rtu_In_time_dt, A380LateralDirectLaw_rtP.RateLimiterVariableTs1_InitialCondition, rty_Out_zeta_deg,
6457
&A380LateralDirectLaw_DWork.sf_RateLimiter_n);
65-
*rty_Out_zeta_upper_deg = *rty_Out_zeta_lower_deg;
6658
}
6759

6860
A380LateralDirectLaw::A380LateralDirectLaw():

fbw-a380x/src/wasm/fbw_a380/src/model/A380LateralDirectLaw.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ class A380LateralDirectLaw final
2424
real_T RateLimiterVariableTs1_lo;
2525
real_T RateLimiterVariableTs_up;
2626
real_T RateLimiterVariableTs1_up;
27-
real_T Constant_Value;
2827
real_T Gain1_Gain;
2928
real_T Gain2_Gain;
3029
};
@@ -34,8 +33,7 @@ class A380LateralDirectLaw final
3433
A380LateralDirectLaw(A380LateralDirectLaw &&) = delete;
3534
A380LateralDirectLaw& operator= (A380LateralDirectLaw &&) = delete;
3635
void step(const real_T *rtu_In_time_dt, const real_T *rtu_In_delta_xi_pos, const real_T *rtu_In_delta_zeta_pos, real_T
37-
*rty_Out_xi_inboard_deg, real_T *rty_Out_xi_midboard_deg, real_T *rty_Out_xi_outboard_deg, real_T
38-
*rty_Out_xi_spoiler_deg, real_T *rty_Out_zeta_upper_deg, real_T *rty_Out_zeta_lower_deg);
36+
*rty_Out_xi_deg, real_T *rty_Out_zeta_deg);
3937
void reset();
4038
A380LateralDirectLaw();
4139
~A380LateralDirectLaw();

0 commit comments

Comments
 (0)