Skip to content

Commit

Permalink
fix EGT and maybe decrease spool up time
Browse files Browse the repository at this point in the history
(cherry picked from commit 97c341e)
  • Loading branch information
flogross89 committed Jul 25, 2024
1 parent de5a318 commit acd49de
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ oil_temp_tuning_constant = 1
oil_press_max = 60480
oil_press_tc = 0.8
oil_press_tuning_constant = 1
itt_peak_temperature = 2141
itt_peak_temperature = 2148
itt_tc = 2
itt_tuning_constant = 1
egt_peak_temperature = 1841
egt_peak_temperature = 1752
egt_tc = 2
egt_tuning_constant = 1
fuel_press_max = 8640
fuel_press_max = 7205
fuel_press_tc = 2
fuel_press_tuning_constant = 1
variable_inlet = 0
Expand Down Expand Up @@ -99,8 +99,8 @@ high_fuel_flow = 50000
min_n2_for_fuel_flow = 22
mach_influence_on_n1 = 10
fuel_flow_max = 50000
fuel_flow_controller_p = 1
fuel_flow_controller_i = 0.01
fuel_flow_controller_p = 2.5
fuel_flow_controller_i = 0.0075
fuel_flow_controller_d = 0
fuel_flow_controller_iboundary = 1
fuel_flow_controller_dboundary = 100
Expand Down
14 changes: 14 additions & 0 deletions fbw-a380x/src/systems/instruments/src/Common/gauges.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,20 @@
stroke-linecap: round;
}

.GreenGaugeIndicator {
stroke: $display-green;
stroke-width: 3;
fill: none;
stroke-linecap: round;
}

.AmberGaugeIndicator {
stroke: $display-amber;
stroke-width: 3;
fill: none;
stroke-linecap: round;
}

.RedGaugeIndicator {
stroke: $display-red;
stroke-width: 3;
Expand Down
40 changes: 11 additions & 29 deletions fbw-a380x/src/systems/instruments/src/EWD/elements/EGT.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,27 @@ import { GaugeComponent, GaugeMarkerComponent, GaugeMaxEGTComponent } from '@ins
import { useSimVar } from '@instruments/common/simVars';
import { EGTProps } from '@instruments/common/types';

const getModeEGTMax = () => {
const [throttleMode] = useSimVar('L:A32NX_AUTOTHRUST_THRUST_LIMIT_TYPE', 'number', 500);
const [togaWarning] = useSimVar('L:A32NX_AUTOTHRUST_THRUST_LEVER_WARNING_TOGA', 'boolean', 500);

switch (throttleMode) {
case 4:
return togaWarning ? 1060 : 1025;

case 1:
case 2:
case 3:
case 5:
return 1025;

default:
return 750;
}
};

const warningEGTColor = (EGTemperature: number) => {
if (EGTemperature > 1060) {
const warningEGTColor = (EGTemperature: number, throttleMode: number) => {
if (EGTemperature > 900) {
return 'Red';
}
if (EGTemperature > getModeEGTMax()) {
if (EGTemperature > 850 && throttleMode < 4) {
return 'Amber';
}
return 'Green';
};

const EGT: React.FC<EGTProps> = ({ x, y, engine, active }) => {
const [EGTemperature] = useSimVar(`L:A32NX_ENGINE_EGT:${engine}`, 'number');
const [throttleMode] = useSimVar('L:A32NX_AUTOTHRUST_THRUST_LIMIT_TYPE', 'number', 500);
const radius = 68;
const startAngle = 270;
const endAngle = 90;
const min = 0;
const max = 1200;
const max = 1000;

const modeEGTMax = getModeEGTMax();
const EGTColour = warningEGTColor(EGTemperature);
const amberVisible = throttleMode < 4;
const EGTColour = warningEGTColor(EGTemperature, throttleMode);

return (
<>
Expand Down Expand Up @@ -71,8 +53,8 @@ const EGT: React.FC<EGTProps> = ({ x, y, engine, active }) => {
/>
<GaugeMarkerComponent value={600} x={x} y={y} min={min} max={max} radius={radius} startAngle={startAngle} endAngle={endAngle} className='GaugeText Gauge' />
<GaugeMarkerComponent value={max} x={x} y={y} min={min} max={max} radius={radius} startAngle={startAngle} endAngle={endAngle} className='GaugeText Gauge RedLine' />
<GaugeMaxEGTComponent
value={modeEGTMax}
{amberVisible && <GaugeMaxEGTComponent
value={850}
x={x}
y={y}
min={min}
Expand All @@ -81,7 +63,7 @@ const EGT: React.FC<EGTProps> = ({ x, y, engine, active }) => {
startAngle={startAngle}
endAngle={endAngle}
className='GaugeThrustLimitIndicatorFill Gauge'
/>
/>}
<rect x={x - 36} y={y - 11} width={72} height={26} className='DarkGreyBox' />
<GaugeMarkerComponent
value={EGTemperature}
Expand All @@ -92,7 +74,7 @@ const EGT: React.FC<EGTProps> = ({ x, y, engine, active }) => {
radius={radius}
startAngle={startAngle}
endAngle={endAngle}
className={`GaugeIndicator Gauge ${EGTColour}`}
className={`${EGTColour}GaugeIndicator Gauge`}
multiplierInner={0.75}
indicator
halfIndicator
Expand Down

0 comments on commit acd49de

Please sign in to comment.