Skip to content

Commit

Permalink
feat: improvements for FBW, AP and ATHR (flybywiresim#6546)
Browse files Browse the repository at this point in the history
- changed ALT condition time to 0.8 s
- changed ALT condition to delta height of 40 ft
- added ALT* inhibit delay of 3 s after changing the FCU altitude
- reworked the conditions to arm ALT
- increased pitch rate of C* law, recommended sensivity is now +/- 30%
- separated nz limit for vertical guidance per law
- improved HDG and TRK law Phi limit for small Psi changes
- improved thrust limits
- FLX thrust is now limiting CLB on entry, transition to default CLB
  thrust is now with a delay of 10 s and a transition time of 30 s
- reduced speed of LOC ALIGN during Autoland
- reduced gain of ROLL OUT law
- improved thrust transition for (OP) CLB/DES
- when MCT is higher than TOGA on higher altitudes, use MCT as limit
- improved normal law flight path stability when speed is
  increased or decreased
- improved SPD/MACH law in edge cases and transitions
  (i.e. manual thrust)
- improved accuracy to achieve N1 target (N1 control base loop)
- improved SRS engagement condition
- do not disengage SRS/RWY when thrust levers are set to IDLE for RTO
- use different Nz target when V/S push to level off (0.1 g instead of 0.05 g)
- added speed brake compensation for normal law

Co-authored-by: IbrahimK42 <[email protected]>
  • Loading branch information
aguther and IbrahimK42 authored Jan 18, 2022
1 parent a0b816b commit e919a7b
Show file tree
Hide file tree
Showing 18 changed files with 2,331 additions and 1,601 deletions.
9 changes: 9 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,15 @@
1. [ATSU] Don't include airport as a waypoint in route uplink - @tracernz (Mike)
1. [HYD] Increased reservoirs air pressure to avoid low air fault on pumps - @Crocket63
1. [EFB] Fix FAA TAF option - @tracernz (Mike)
1. [AP] Improved SPD/MACH law to be more robust in edge cases - @IbrahimK42 (IbrahimK42)
1. [FBW] Improved normal law (flight path stability when speed changed, pitch rates) - @aguther (Andreas Guther)
1. [AP] Improved ALT engage conditions (now +/- 40 ft and 0.8 s) - @aguther (Andreas Guther)
1. [AP] Inhibit ALT* for 3 s after changing FCU altitude - @aguther (Andreas Guther)
1. [AP] Separated and improved Nz used by different autopilot laws - @aguther (Andreas Guther)
1. [AP] Improved HDG/TRK law on small changes - @aguther (Andreas Guther)
1. [AP] Do not disengage SRS on RTO, engage it only in FLX detent when FLX is configured - @aguther (Andreas Guther)
1. [ATHR] Improved thrust limits, FLX limits now CLB when entered into FMGC - @aguther (Andreas Guther)
1. [AP] Improved LOC ALGIN and ROLL OUT during Autoland - @aguther (Andreas Guther)

## 0.7.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ class A32NX_FlightPhase_Approach {
init(_fmc) {
this.nextFmgcFlightPhase = FmgcFlightPhases.DONE;
_fmc.updateManagedSpeed();
SimVar.SetSimVarValue("L:AIRLINER_TO_FLEX_TEMP", "Number", 0);
}

check(_deltaTime, _fmc) {
Expand All @@ -330,6 +331,7 @@ class A32NX_FlightPhase_GoAround {

init(_fmc) {
_fmc.updateManagedSpeed();
SimVar.SetSimVarValue("L:AIRLINER_TO_FLEX_TEMP", "Number", 0);
}

check(_deltaTime, _fmc) {
Expand All @@ -341,6 +343,7 @@ class A32NX_FlightPhase_Done {
constructor() {
this.takeoffConfirmation = new NXLogic_ConfirmNode(.2);
this.nextFmgcFlightPhase = FmgcFlightPhases.TAKEOFF;
SimVar.SetSimVarValue("L:AIRLINER_TO_FLEX_TEMP", "Number", 0);
}

init(_fmc) {
Expand Down
8 changes: 5 additions & 3 deletions src/fbw/src/FlyByWireInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@ bool FlyByWireInterface::updateFlyByWire(double sampleTime) {
} else {
outputEtaTrim.eta_trim_deg = elevatorTrimHandler->getPosition();
}
if (!flyByWireOutput.sim.data_computed.tracking_mode_on && (flyByWireEnabled || !flyByWireOutput.output.eta_trim_deg_should_write)) {
if (!flyByWireOutput.sim.data_computed.tracking_mode_on) {
if (!simConnectInterface.sendData(outputEtaTrim)) {
cout << "WASM: Write data failed!" << endl;
return false;
Expand All @@ -1415,7 +1415,7 @@ bool FlyByWireInterface::updateFlyByWire(double sampleTime) {
} else {
outputZetaTrim.zeta_trim_pos = rudderTrimHandler->getPosition();
}
if (!flyByWireOutput.sim.data_computed.tracking_mode_on && (flyByWireEnabled || !flyByWireOutput.output.zeta_trim_pos_should_write)) {
if (!flyByWireOutput.sim.data_computed.tracking_mode_on) {
if (!simConnectInterface.sendData(outputZetaTrim)) {
cout << "WASM: Write data failed!" << endl;
return false;
Expand Down Expand Up @@ -1472,6 +1472,7 @@ bool FlyByWireInterface::updateThrustLimits(double sampleTime) {

// fill input data
thrustLimitsInput.in.dt = sampleTime;
thrustLimitsInput.in.simulation_time_s = simData.simulationTime;
thrustLimitsInput.in.H_ft = simData.H_ft;
thrustLimitsInput.in.V_mach = simData.V_mach;
thrustLimitsInput.in.OAT_degC = simData.ambient_temperature_celsius;
Expand All @@ -1484,13 +1485,14 @@ bool FlyByWireInterface::updateThrustLimits(double sampleTime) {
thrustLimitsInput.in.is_air_conditioning_2_active = idAirConditioningPack_2->get();
thrustLimitsInput.in.thrust_limit_IDLE_percent = engineEngineIdleN1->get();
thrustLimitsInput.in.flex_temperature_degC = idFmgcFlexTemperature->get();
if (!autothrustThrustLimitUseExternalFlex) {
if (autothrustThrustLimitUseExternal && !autothrustThrustLimitUseExternalFlex) {
thrustLimitsInput.in.use_external_CLB_limit = true;
thrustLimitsInput.in.thrust_limit_CLB_percent = idAutothrustThrustLimitCLB->get();
} else {
thrustLimitsInput.in.use_external_CLB_limit = false;
thrustLimitsInput.in.thrust_limit_CLB_percent = 0;
}
thrustLimitsInput.in.thrust_limit_type = autoThrustOutput.thrust_limit_type;

// set input data
thrustLimits.setExternalInputs(&thrustLimitsInput);
Expand Down
Loading

0 comments on commit e919a7b

Please sign in to comment.