From da73db9ec6849fb102e6bc277fa706e107ab822c Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Wed, 26 Jan 2022 11:33:15 +0000 Subject: [PATCH 1/9] Add official copyright notice to ensure clarity --- README.copyright.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 README.copyright.md diff --git a/README.copyright.md b/README.copyright.md new file mode 100644 index 00000000..9c4467e3 --- /dev/null +++ b/README.copyright.md @@ -0,0 +1,14 @@ +Copyright (C) 2022 Josh Davidson, Jonathan Redpath, merspieler, Matthew Maring, Thorsten Herrmann, Semir Gebran + +This program is free software; you can redistribute it and/or +modify it under the terms of version 2 of the GNU General Public License +as published by the Free Software Foundation. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. \ No newline at end of file From 4e69288995d2580fb1fc6b3db8a9dde4bdee7578 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Fri, 28 Jan 2022 16:49:43 +0000 Subject: [PATCH 2/9] IRS align: improve conditions to use accurate lateral velocity parameters --- Nasal/Systems/ADIRS/ADR.nas | 8 ++------ Systems/a320-adr.xml | 28 ++++++++++++++++++++++++++++ Systems/libraries.xml | 8 ++++++++ 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/Nasal/Systems/ADIRS/ADR.nas b/Nasal/Systems/ADIRS/ADR.nas index 6987df3d..a0c36f52 100644 --- a/Nasal/Systems/ADIRS/ADR.nas +++ b/Nasal/Systems/ADIRS/ADR.nas @@ -144,13 +144,9 @@ var ADIRU = { } }, _excessMotion: 0, + alignFault: props.globals.getNode("/systems/navigation/align-fault"), alignLoop: func() { - me._roll = pts.Orientation.roll.getValue(); - me._pitch = pts.Orientation.pitch.getValue(); - me._gs = pts.Velocities.groundspeed.getValue(); - - # todo use IR values - if (me._gs > 5 or abs(me._pitch) > 5 or abs(me._roll) > 10) { + if (me.alignFault.getBoolValue()) { me.stopAlignNoAlign(); me._excessMotion = 1; me.update(); # update operative diff --git a/Systems/a320-adr.xml b/Systems/a320-adr.xml index bf207379..02baba04 100644 --- a/Systems/a320-adr.xml +++ b/Systems/a320-adr.xml @@ -4,6 +4,34 @@ + + + + velocities/r-aero-deg_sec + 1 + + + + velocities/v-north-fps + 1 + + + + velocities/v-east-fps + 1 + + + + + + velocities/r-aero-deg_sec_filter ge 2 + velocities/v-north-fps_filter ge 0.5 + velocities/v-east-fps_filter ge 0.5 + + + + + diff --git a/Systems/libraries.xml b/Systems/libraries.xml index 35cbed5a..4c7cc82b 100644 --- a/Systems/libraries.xml +++ b/Systems/libraries.xml @@ -23,6 +23,14 @@ 0.0 + + Heading Rate Degrees Per Second + gain + 57.2957795131 + /fdm/jsbsim/velocities/r-aero-rad_sec + /fdm/jsbsim/velocities/r-aero-deg_sec + + Gear AGL Altitude FT gain From 9ad6731ffde329599092d9893ad71422a51b63d7 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Fri, 28 Jan 2022 16:56:32 +0000 Subject: [PATCH 3/9] IESI: use same code as ADIRS --- Models/Instruments/IESI/IESI.nas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Models/Instruments/IESI/IESI.nas b/Models/Instruments/IESI/IESI.nas index 45364330..3b19aa50 100644 --- a/Models/Instruments/IESI/IESI.nas +++ b/Models/Instruments/IESI/IESI.nas @@ -141,6 +141,7 @@ var canvas_IESI = { getKeys: func() { return ["IESI","IESI_Init","attRst","attRstRect","att90s","ATTflag","ATTflag_rect","ATTflag_text","ALTwarn","SPDwarn","ASI_scale","ASI_mach","ASI_mach_decimal","AI_center","AI_index","AI_horizon","AI_sky_bank","AI_bank","AI_bank_center","AI_slipskid","ALT_scale","ALT_one","ALT_two","ALT_three","ALT_four","ALT_five","ALT_digits","ALT_tens","ALT_meters","QNH_setting","QNH_std","negText","negText2","AI_bank_scale","metricM","metricBox"]; }, + alignFault: props.globals.getNode("/systems/navigation/align-fault"), update: func(notification) { me._powerResult = me.updatePower(notification); if (me._powerResult == 0) { return; } @@ -152,7 +153,7 @@ var canvas_IESI = { } if (me._IESITime + 90 >= notification.elapsedTime) { - if (notification.groundspeed > 2) { + if (!me._fastInit and me.alignFault.getBoolValue()) { me._excessMotionInInit = 1; } From 6a59bfb69ac7a84fbe3c2e9a6879c298066da5b4 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Fri, 28 Jan 2022 17:09:50 +0000 Subject: [PATCH 4/9] Fix bug where during fast init, the airspeed and altitude indicators would not work --- Models/Instruments/IESI/IESI.nas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Models/Instruments/IESI/IESI.nas b/Models/Instruments/IESI/IESI.nas index 3b19aa50..8e2600d7 100644 --- a/Models/Instruments/IESI/IESI.nas +++ b/Models/Instruments/IESI/IESI.nas @@ -178,8 +178,8 @@ var canvas_IESI = { me["IESI"].hide(); me["IESI_Init"].show(); me["ATTflag"].hide(); + return; } - return; } else { if (pinPrograms.metricAltitude) { me["ALT_meters"].show(); From 9370274b1c0909230d30811edd4bc8dd082a2ea2 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Fri, 28 Jan 2022 18:34:11 +0000 Subject: [PATCH 5/9] Fix decimal point, PFD digits --- Models/Instruments/ND/canvas/style.nas | 2 +- Models/Instruments/PFD/PFD.nas | 8 +- Models/Instruments/PFD/res/pfd.svg | 308 +++++++++++-------------- 3 files changed, 136 insertions(+), 182 deletions(-) diff --git a/Models/Instruments/ND/canvas/style.nas b/Models/Instruments/ND/canvas/style.nas index 14c46d34..cac353d4 100644 --- a/Models/Instruments/ND/canvas/style.nas +++ b/Models/Instruments/ND/canvas/style.nas @@ -832,7 +832,7 @@ canvas.NDStyles["Airbus"] = { var deg = math.round(getprop("/FMGC/flightplan[2]/current-leg-course-mag")) or 0; } if (deg != nil) { - nd.symbols.wpActiveCrs.setText(sprintf("%03.0f", deg) ~ "°"); + nd.symbols.wpActiveCrs.setText(sprintf("%03.0f°", deg)); nd.symbols.wpActiveCrs.show(); } else { nd.symbols.wpActiveCrs.hide(); diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas index 8cfcf2ab..22496380 100644 --- a/Models/Instruments/PFD/PFD.nas +++ b/Models/Instruments/PFD/PFD.nas @@ -776,7 +776,7 @@ var canvas_pfd = { getKeys: func() { return ["FMA_man","FMA_manmode","FMA_flxmode","FMA_flxtemp","FMA_thrust","FMA_lvrclb","FMA_pitch","FMA_pitcharm","FMA_pitcharm2","FMA_roll","FMA_rollarm","FMA_combined","FMA_ctr_msg","FMA_catmode","FMA_cattype","FMA_nodh","FMA_dh","FMA_dhn","FMA_ap", "FMA_fd","FMA_athr","FMA_man_box","FMA_flx_box","FMA_thrust_box","FMA_pitch_box","FMA_pitcharm_box","FMA_roll_box","FMA_rollarm_box","FMA_combined_box","FMA_catmode_box","FMA_cattype_box","FMA_cat_box","FMA_dh_box","FMA_ap_box","FMA_fd_box", - "FMA_athr_box","FMA_Middle1","FMA_Middle2","ALPHA_MAX","ALPHA_PROT","ALPHA_SW","ALPHA_bars","VLS_min","ASI_max","ASI_scale","ASI_target","ASI_mach","ASI_mach_decimal","ASI_trend_up","ASI_trend_down","ASI_digit_UP","ASI_digit_DN","ASI_decimal_UP", + "FMA_athr_box","FMA_Middle1","FMA_Middle2","ALPHA_MAX","ALPHA_PROT","ALPHA_SW","ALPHA_bars","VLS_min","ASI_max","ASI_scale","ASI_target","ASI_mach","ASI_trend_up","ASI_trend_down","ASI_digit_UP","ASI_digit_DN","ASI_decimal_UP", "ASI_decimal_DN","ASI_index","ASI_error","ASI_group","ASI_frame","AI_center","AI_bank","AI_bank_lim","AI_bank_lim_X","AI_pitch_lim","AI_pitch_lim_X","AI_slipskid","AI_horizon","AI_horizon_ground","AI_horizon_sky","AI_stick","AI_stick_pos","AI_heading", "AI_agl_g","AI_agl","AI_error","AI_group","FD_roll","FD_pitch","ALT_box_flash","ALT_box","ALT_box_amber","ALT_scale","ALT_target","ALT_target_digit","ALT_one","ALT_two","ALT_three","ALT_four","ALT_five","ALT_digits","ALT_tens","ALT_digit_UP", "ALT_digit_DN","ALT_digit_UP_metric","ALT_error","ALT_neg","ALT_group","ALT_group2","ALT_frame","VS_pointer","VS_box","VS_digit","VS_error","VS_group","QNH","QNH_setting","QNH_std","QNH_box","LOC_pointer","LOC_scale","GS_scale","GS_pointer","CRS_pointer", @@ -1279,16 +1279,14 @@ var canvas_pfd = { me["machError"].hide(); if (me.ind_mach >= 0.999) { - me["ASI_mach"].setText("999"); + me["ASI_mach"].setText(".999"); } else { - me["ASI_mach"].setText(sprintf("%3.0f", me.ind_mach * 1000)); + me["ASI_mach"].setText(sprintf(".%3.0f", me.ind_mach * 1000)); } if (me.ind_mach >= 0.5) { - me["ASI_mach_decimal"].show(); me["ASI_mach"].show(); } else { - me["ASI_mach_decimal"].hide(); me["ASI_mach"].hide(); } } else { diff --git a/Models/Instruments/PFD/res/pfd.svg b/Models/Instruments/PFD/res/pfd.svg index 4bcb92c5..94fe82fd 100644 --- a/Models/Instruments/PFD/res/pfd.svg +++ b/Models/Instruments/PFD/res/pfd.svg @@ -1,19 +1,19 @@ + width="1024pt" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> @@ -37,17 +37,17 @@ units="pt" inkscape:snap-global="false" showguides="true" - inkscape:current-layer="svg2" + inkscape:current-layer="ALT_group" inkscape:window-maximized="1" - inkscape:window-y="-8" - inkscape:window-x="-8" - inkscape:cy="245.80636" - inkscape:cx="411.71903" - inkscape:zoom="0.35355341" + inkscape:window-y="-11" + inkscape:window-x="-11" + inkscape:cy="673.69595" + inkscape:cx="1065.6983" + inkscape:zoom="5.6568545" showgrid="false" id="namedview371" - inkscape:window-height="657" - inkscape:window-width="1280" + inkscape:window-height="974" + inkscape:window-width="1920" inkscape:pageshadow="2" inkscape:pageopacity="1" guidetolerance="10" @@ -230,8 +230,7 @@ y="480.29712" id="text4718" transform="scale(0.95383277,1.0484018)" - inkscape:label="#text975" - sodipodi:linespacing="0%">0000 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:45px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.657577">0000 1 + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:29.7717px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#ffffff;fill-opacity:1;stroke-width:0.657577">1 6 + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:29.7717px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#ffffff;fill-opacity:1;stroke-width:0.657577">6 2 + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:31.756px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#ffffff;fill-opacity:1;stroke-width:0.657577">2 00 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.657577">00 MAN + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:34px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.657577">MAN MAN PITCH TRIM ONLY + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:34px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ff0000;fill-opacity:1;stroke-width:0.657577">MAN PITCH TRIM ONLY G/S + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:34px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.657577">G/S LOC + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:34px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.657577">LOC NAV + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:34px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.657577">NAV STD + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.3994px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.75">STD @@ -2253,7 +2226,7 @@ id="tspan4800" x="890.99316" y="506.26898" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48.83480072px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1;stroke-width:0.75">000 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48.8348px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1;stroke-width:0.75">000 QNH + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.756px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#ffffff;fill-opacity:1;stroke-width:0.657577">QNH 00 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48.8348px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#0dc04b;fill-opacity:1;stroke-width:0.75">00 1 FD 2 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:34px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.657577">1 FD 2 CAT 3 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:34px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.657577">CAT 3 NO RADIO + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:34px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.657577">NO RADIO SPEED + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:34px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.657577">SPEED 0250 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:34px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.657577">0250 @@ -4083,7 +4054,7 @@ +40 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:34px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.657577">+40 000 - . SLOW + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.1749px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.657577">SLOW ALT 402000806040200080FLX + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:34px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.657577">FLX NE-800 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:33px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.657577">-800 11070 M + style="font-size:38.3994px;line-height:1.25;fill:#179ab7;fill-opacity:1;stroke-width:0.75">M Date: Fri, 28 Jan 2022 18:50:48 +0000 Subject: [PATCH 6/9] Closest airports page formatting + accoutn for 360 degrees --- Nasal/MCDU/CLOSESTAIRPORT.nas | 45 +++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/Nasal/MCDU/CLOSESTAIRPORT.nas b/Nasal/MCDU/CLOSESTAIRPORT.nas index 0732fe06..a389b1f7 100644 --- a/Nasal/MCDU/CLOSESTAIRPORT.nas +++ b/Nasal/MCDU/CLOSESTAIRPORT.nas @@ -98,22 +98,57 @@ var closestAirportPage = { var magvarLocal = magvar(); if (size(me.airports) >= 1) { me.cdVector[0] = courseAndDistance(me.airports[0]); - me.C1 = [sprintf("%03d",me.cdVector[0][0] - magvarLocal) ~ "° " ~ math.round(me.cdVector[0][1]), " BRG DIST", "grn"]; + me.brg = me.cdVector[0][0] - magvarLocal; + if (me.brg > 360) { + me.brg -= 360; + } else if (me.brg < 0) { + me.brg += 360; + } + + me.C1 = [sprintf("%03d°",me.brg) ~ " " ~ sprintf("%4d",math.round(me.cdVector[0][1])), " BRG DIST", "grn"]; } if (size(me.airports) >= 2) { me.cdVector[1] = courseAndDistance(me.airports[1]); - me.C2 = [sprintf("%03d",me.cdVector[1][0] - magvarLocal) ~ "° " ~ math.round(me.cdVector[1][1]) , nil, "grn"]; + me.brg = me.cdVector[1][0] - magvarLocal; + if (me.brg > 360) { + me.brg -= 360; + } else if (me.brg < 0) { + me.brg += 360; + } + + me.C2 = [sprintf("%03d°",me.brg) ~ " " ~ sprintf("%4d",math.round(me.cdVector[1][1])), nil, "grn"]; } if (size(me.airports) >= 3) { me.cdVector[2] = courseAndDistance(me.airports[2]); - me.C3 = [sprintf("%03d",me.cdVector[2][0] - magvarLocal) ~ "° " ~ math.round(me.cdVector[2][1]), nil, "grn"]; + me.brg = me.cdVector[2][0] - magvarLocal; + if (me.brg > 360) { + me.brg -= 360; + } else if (me.brg < 0) { + me.brg += 360; + } + + me.C3 = [sprintf("%03d°",me.brg) ~ " " ~ sprintf("%4d",math.round(me.cdVector[2][1])), nil, "grn"]; } if (size(me.airports) >= 4) { me.cdVector[3] = courseAndDistance(me.airports[3]); - me.C4 = [sprintf("%03d",me.cdVector[3][0] - magvarLocal) ~ "° " ~ math.round(me.cdVector[3][1]), nil, "grn"]; + me.brg = me.cdVector[3][0] - magvarLocal; + if (me.brg > 360) { + me.brg -= 360; + } else if (me.brg < 0) { + me.brg += 360; + } + + me.C4 = [sprintf("%03d°",me.brg) ~ " " ~ sprintf("%4d",math.round(me.cdVector[3][1])), nil, "grn"]; } if (me.manAirport != nil) { - me.C5 = [sprintf("%03d",courseAndDistance(me.manAirport)[0] - magvarLocal) ~ "° " ~ math.round(courseAndDistance(me.manAirport)[1]), me.frozen ? "LIST FROZEN" : nil, "grn"]; + me.brg = courseAndDistance(me.manAirport)[0] - magvarLocal; + if (me.brg > 360) { + me.brg -= 360; + } else if (me.brg < 0) { + me.brg += 360; + } + + me.C5 = [sprintf("%03d°",me.brg) ~ " " ~ sprintf("%4d",math.round(courseAndDistance(me.manAirport)[1])), me.frozen ? "LIST FROZEN" : nil, "grn"]; } canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); }, From 8da8981acf3e47ba1870653613fc86ce8732b498 Mon Sep 17 00:00:00 2001 From: Inuyaksa Date: Fri, 28 Jan 2022 00:14:32 +0100 Subject: [PATCH 7/9] autoland alarm fix - alert as specs and correct sound --- Sounds/A320-common-sound.xml | 2 +- Systems/a320-fwc.xml | 40 ++++++++++++++++++------------------ 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Sounds/A320-common-sound.xml b/Sounds/A320-common-sound.xml index ae370208..0ac0dc3b 100644 --- a/Sounds/A320-common-sound.xml +++ b/Sounds/A320-common-sound.xml @@ -1013,7 +1013,7 @@ autolandwarning-single once - Aircraft/A320-family/Sounds/Cockpit/calvary-charge-once.wav + Aircraft/A320-family/Sounds/Cockpit/click.wav /instrumentation/pfd/logic/autoland/autoland-alarm diff --git a/Systems/a320-fwc.xml b/Systems/a320-fwc.xml index fcdeb317..99080c7a 100644 --- a/Systems/a320-fwc.xml +++ b/Systems/a320-fwc.xml @@ -2519,32 +2519,32 @@ - /instrumentation/pfd/logic/autoland/autoland-armed eq 1 - /instrumentation/pfd/logic/autoland/pitch-land eq 1 - + /instrumentation/pfd/logic/autoland/autoland-armed eq 1 + /instrumentation/pfd/logic/autoland/pitch-land eq 1 /it-autoflight/output/ap1 eq 0 /it-autoflight/output/ap2 eq 0 - - /instrumentation/radar-altimeter-difference-ft gt 15 - - - /instrumentation/nav[0]/gs-needle-deflection-norm gt 0.5 - /instrumentation/nav[0]/gs-needle-deflection-norm lt -0.5 + + + /instrumentation/radar-altimeter-difference-ft gt 15 + + + /instrumentation/nav[0]/gs-needle-deflection-norm gt 0.5 + /instrumentation/nav[0]/gs-needle-deflection-norm lt -0.5 + + /position/gear-agl-ft ge 100 - /position/gear-agl-ft ge 100 - - - - /instrumentation/nav[0]/heading-needle-deflection-norm gt 0.125 - /instrumentation/nav[0]/heading-needle-deflection-norm lt -0.125 + + + /instrumentation/nav[0]/heading-needle-deflection-norm gt 0.125 + /instrumentation/nav[0]/heading-needle-deflection-norm lt -0.125 + + /position/gear-agl-ft ge 15 - /position/gear-agl-ft ge 15 + - - From c3ec55a21fb6409c19ae8762c2975e608c313948 Mon Sep 17 00:00:00 2001 From: Inuyaksa Date: Fri, 28 Jan 2022 23:13:39 +0100 Subject: [PATCH 8/9] Fix autoland alarm - trigger when AP switched off below 200ft --- Models/Instruments/PFD/PFD.nas | 1 + Nasal/FMGC/FCU.nas | 3 +++ Systems/a320-fwc.xml | 14 ++++++++------ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas index 22496380..be3efb55 100644 --- a/Models/Instruments/PFD/PFD.nas +++ b/Models/Instruments/PFD/PFD.nas @@ -43,6 +43,7 @@ var du6_offtime = props.globals.initNode("/instrumentation/du/du6-off-time", 0.0 var autoland_alarm = props.globals.initNode("/instrumentation/pfd/logic/autoland/autoland-alarm", 0, "BOOL"); var autoland_pulse = props.globals.initNode("/instrumentation/pfd/logic/autoland/autoland-sw-pulse", 0, "BOOL"); var autoland_pitch_land = props.globals.initNode("/instrumentation/pfd/logic/autoland/pitch-land", 0, "BOOL"); +var autoland_ap_disc_ft = props.globals.initNode("/instrumentation/pfd/logic/autoland/ap-disc-ft", 0, "INT"); var canvas_pfd = { middleOffset: 0, diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index 334c5c9c..5bf5a76d 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -507,6 +507,9 @@ var apOff = func(type, side) { } elsif (side == 2) { fmgc.Input.ap2.setValue(0); } + + var radarft = (side == 2) ? getprop("/instrumentation/radar-altimeter[1]/radar-altitude-ft-corrected") : getprop("/instrumentation/radar-altimeter[0]/radar-altitude-ft-corrected"); + setprop("/instrumentation/pfd/logic/autoland/ap-disc-ft",radarft); } # Autothrust Disconnection diff --git a/Systems/a320-fwc.xml b/Systems/a320-fwc.xml index 99080c7a..3feb1cee 100644 --- a/Systems/a320-fwc.xml +++ b/Systems/a320-fwc.xml @@ -2499,6 +2499,7 @@ + /instrumentation/pfd/logic/autoland/pitch-land eq 1 /systems/electrical/bus/ac-2 ge 110 /systems/electrical/bus/ac-ess-shed ge 110 @@ -2519,13 +2520,14 @@ - /instrumentation/pfd/logic/autoland/autoland-armed eq 1 - /instrumentation/pfd/logic/autoland/pitch-land eq 1 - - /it-autoflight/output/ap1 eq 0 - /it-autoflight/output/ap2 eq 0 - + /instrumentation/pfd/logic/autoland/autoland-armed eq 1 + + /it-autoflight/output/ap1 eq 0 + /it-autoflight/output/ap2 eq 0 + /instrumentation/pfd/logic/autoland/ap-disc-ft lt 200 + /instrumentation/pfd/logic/autoland/ap-disc-ft gt 0 + /instrumentation/radar-altimeter-difference-ft gt 15 From 1ac305d1838fec2e5808b0c7edb9642fd95fd182 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sat, 29 Jan 2022 11:22:46 +0000 Subject: [PATCH 9/9] Fix missed degrees symbol --- Models/Instruments/MCDU/MCDU.nas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index a3b3b86e..beabc38b 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -4661,7 +4661,7 @@ var canvas_MCDU_base = { var result = myDESWIND[math.abs(i-1)].returnGRND(); me["Simple_L3"].setText(sprintf("%03.0f°", result[0]) ~ sprintf("/%.0f", result[1])); } else { - me["Simple_L3"].setText("---g/---"); + me["Simple_L3"].setText("---°/---"); } }