From 328b11980c19e86f743d688cb541815616f622e6 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R <legoboyvdlp@gmail.com> Date: Mon, 2 Aug 2021 17:47:42 +0100 Subject: [PATCH 1/3] Remove battery failure --- A320-main.xml | 2 -- AircraftConfig/fail.xml | 20 -------------------- Nasal/Systems/electrical.nas | 4 ---- Systems/a320-electrical.xml | 24 ++++++++++-------------- 4 files changed, 10 insertions(+), 40 deletions(-) diff --git a/A320-main.xml b/A320-main.xml index 1905d347..e37243c5 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -1298,8 +1298,6 @@ <ac-ess-bus type="bool">0</ac-ess-bus> <ac-1-bus type="bool">0</ac-1-bus> <ac-2-bus type="bool">0</ac-2-bus> - <bat-1 type="bool">0</bat-1> - <bat-2 type="bool">0</bat-2> <dc-bat-bus type="bool">0</dc-bat-bus> <dc-ess-bus type="bool">0</dc-ess-bus> <dc-1-bus type="bool">0</dc-1-bus> diff --git a/AircraftConfig/fail.xml b/AircraftConfig/fail.xml index 2f821e17..aaf02c67 100644 --- a/AircraftConfig/fail.xml +++ b/AircraftConfig/fail.xml @@ -412,26 +412,6 @@ <live>true</live> </checkbox> - <checkbox> - <label>BATTERY 1</label> - <halign>left</halign> - <property>/systems/failures/electrical/bat-1</property> - <binding> - <command>dialog-apply</command> - </binding> - <live>true</live> - </checkbox> - - <checkbox> - <label>BATTERY 2</label> - <halign>left</halign> - <property>/systems/failures/electrical/bat-2</property> - <binding> - <command>dialog-apply</command> - </binding> - <live>true</live> - </checkbox> - <checkbox> <label>DC ESS BUS</label> <halign>left</halign> diff --git a/Nasal/Systems/electrical.nas b/Nasal/Systems/electrical.nas index 2849bb63..300cfc89 100644 --- a/Nasal/Systems/electrical.nas +++ b/Nasal/Systems/electrical.nas @@ -32,8 +32,6 @@ var ELEC = { acEssBusFault: props.globals.getNode("/systems/failures/electrical/ac-ess-bus"), ac1BusFault: props.globals.getNode("/systems/failures/electrical/ac-1-bus"), ac2BusFault: props.globals.getNode("/systems/failures/electrical/ac-2-bus"), - bat1Fault: props.globals.getNode("/systems/failures/electrical/bat-1"), - bat2Fault: props.globals.getNode("/systems/failures/electrical/bat-2"), dcEssBusFault: props.globals.getNode("/systems/failures/electrical/dc-ess-bus"), dc1BusFault: props.globals.getNode("/systems/failures/electrical/dc-1-bus"), dc2BusFault: props.globals.getNode("/systems/failures/electrical/dc-2-bus"), @@ -194,8 +192,6 @@ var ELEC = { me.Fail.acEssBusFault.setBoolValue(0); me.Fail.ac1BusFault.setBoolValue(0); me.Fail.ac2BusFault.setBoolValue(0); - me.Fail.bat1Fault.setBoolValue(0); - me.Fail.bat2Fault.setBoolValue(0); me.Fail.dcEssBusFault.setBoolValue(0); me.Fail.dc1BusFault.setBoolValue(0); me.Fail.dc2BusFault.setBoolValue(0); diff --git a/Systems/a320-electrical.xml b/Systems/a320-electrical.xml index e9f1d84f..95ebf1db 100644 --- a/Systems/a320-electrical.xml +++ b/Systems/a320-electrical.xml @@ -25,14 +25,12 @@ </difference> <table> <independentVar lookup="row">/systems/electrical/sources/bat-1/percent</independentVar> - <independentVar lookup="column">/systems/failures/electrical/bat-1</independentVar> <tableData> - 0 1 - 0 0.0 0.0 - 10 24.0 4.0 - 50 25.5 5.0 - 85 26.5 6.0 - 100 31.0 7.0 + 0 0.0 + 10 24.0 + 50 25.5 + 85 26.5 + 100 31.0 </tableData> </table> </sum> @@ -270,14 +268,12 @@ </difference> <table> <independentVar lookup="row">/systems/electrical/sources/bat-2/percent</independentVar> - <independentVar lookup="column">/systems/failures/electrical/bat-2</independentVar> <tableData> - 0 1 - 0 0.0 0.0 - 10 24.0 4.0 - 50 25.5 5.0 - 85 26.5 6.0 - 100 31.0 7.0 + 0 0.0 + 10 24.0 + 50 25.5 + 85 26.5 + 100 31.0 </tableData> </table> </sum> From 2611f3d3a210155bca8e84e0f32aea2af2e0ba37 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R <legoboyvdlp@gmail.com> Date: Tue, 3 Aug 2021 12:00:39 +0100 Subject: [PATCH 2/3] Hydraulics: init with some accumulator pressure --- Nasal/Systems/hydraulics.nas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Nasal/Systems/hydraulics.nas b/Nasal/Systems/hydraulics.nas index 7e75f138..9de480f2 100644 --- a/Nasal/Systems/hydraulics.nas +++ b/Nasal/Systems/hydraulics.nas @@ -7,7 +7,7 @@ var HYD = { lcont: 0, rcont: 0, Brakes: { - accumPressPsi: props.globals.initNode("/systems/hydraulic/yellow-accumulator-psi-cmd", 0, "INT"), + accumPressPsi: props.globals.initNode("/systems/hydraulic/yellow-accumulator-psi-cmd", 3000, "INT"), leftPressPsi: props.globals.initNode("/systems/hydraulic/brakes/pressure-left-psi", 0, "INT"), rightPressPsi: props.globals.initNode("/systems/hydraulic/brakes/pressure-right-psi", 0, "INT"), mode: props.globals.initNode("/systems/hydraulic/brakes/mode", 0, "INT"), @@ -74,6 +74,7 @@ var HYD = { me.Switch.rat.setValue(0); me.Switch.yellowEDP.setValue(1); me.Switch.yellowElec.setValue(0); + me.Brakes.accumPressPsi.setValue(3000); }, resetFail: func() { me.Fail.blueElec.setBoolValue(0); @@ -109,7 +110,7 @@ var HYD = { me.Brakes.accumPressPsi.setValue(0); } } - + # Braking Pressure if (notification.brakesMode == 1 or (notification.brakesMode == 2 and notification.green >= 2500)) { # Normal braking - Green OK From c7f2ebdc959a038edf0fa99326b3d8445d0e4c8d Mon Sep 17 00:00:00 2001 From: legoboyvdlp R <legoboyvdlp@gmail.com> Date: Tue, 3 Aug 2021 14:02:25 +0100 Subject: [PATCH 3/3] PFD: add tailstrike indicator --- Models/Instruments/PFD/PFD.nas | 8 +++++++- Models/Instruments/PFD/res/pfd.svg | 15 +++++++++++---- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas index e5c2fee4..4fd4074b 100644 --- a/Models/Instruments/PFD/PFD.nas +++ b/Models/Instruments/PFD/PFD.nas @@ -221,7 +221,7 @@ var canvas_PFD_base = { "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_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","HDG_target","HDG_scale", "HDG_one","HDG_two","HDG_three","HDG_four","HDG_five","HDG_six","HDG_seven","HDG_digit_L","HDG_digit_R","HDG_error","HDG_group","HDG_frame","TRK_pointer","machError","ilsError","ils_code","ils_freq","dme_dist","dme_dist_legend","ILS_HDG_R","ILS_HDG_L", - "ILS_right","ILS_left","outerMarker","middleMarker","innerMarker","v1_group","v1_text","vr_speed","F_target","S_target","FS_targets","flap_max","clean_speed","ground","ground_ref","FPV","spdLimError","vsFMArate"]; + "ILS_right","ILS_left","outerMarker","middleMarker","innerMarker","v1_group","v1_text","vr_speed","F_target","S_target","FS_targets","flap_max","clean_speed","ground","ground_ref","FPV","spdLimError","vsFMArate","tailstrikeInd"]; }, off: 0, on: 0, @@ -395,6 +395,12 @@ var canvas_PFD_base = { me["AI_agl"].setText(sprintf("%s", math.round(math.clamp(gear_agl_cur, 0, 2500)))); + if (gear_agl_cur < 400 and pts.Velocities.groundspeed.getValue() > 50 and pts.Controls.Engines.Engine.throttlePos[0].getValue() < 0.78 and pts.Controls.Engines.Engine.throttlePos[1].getValue() < 0.78) { + me["tailstrikeInd"].show(); + } else { + me["tailstrikeInd"].hide(); + } + if (fmgc.FMGCInternal.phase < 3 or fmgc.flightPlanController.arrivalDist >= 250) { me["FMA_dh_box"].hide(); me["FMA_dh"].hide(); diff --git a/Models/Instruments/PFD/res/pfd.svg b/Models/Instruments/PFD/res/pfd.svg index 23653432..7eb9c07a 100644 --- a/Models/Instruments/PFD/res/pfd.svg +++ b/Models/Instruments/PFD/res/pfd.svg @@ -41,9 +41,9 @@ inkscape:window-maximized="1" inkscape:window-y="-8" inkscape:window-x="-8" - inkscape:cy="683.12157" - inkscape:cx="1026.1197" - inkscape:zoom="1.8101934" + inkscape:cy="876.13786" + inkscape:cx="522.86542" + inkscape:zoom="5.6568542" showgrid="true" id="namedview371" inkscape:window-height="705" @@ -580,6 +580,13 @@ id="path886" d="m 448.25473,1194.8172 66.90422,59.142 h -59.49742 v -14.7583 h 11.11022 l -18.51702,-19.615 -18.51702,19.615 h 11.11022 v 14.7583 h -59.49741 z" style="fill:none;stroke:#ff0000;stroke-width:7.42499971;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <path + sodipodi:nodetypes="ccccccc" + inkscape:connector-curvature="0" + id="tailstrikeInd" + d="m 408.59584,403.53091 h 13.2497 l 26.49939,39.11651 26.49939,-39.11651 h 13.2497 l -39.74909,57.25812 z" + style="fill:none;stroke:#ff0000;stroke-width:4.19999981;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:label="#tailstrikeInd" /> </g> <g transform="translate(0,97.082371)" @@ -6256,7 +6263,7 @@ x="823.7511" sodipodi:role="line" id="tspan1797">G</tspan></text> - <text + <text inkscape:label="#text983" xml:space="preserve" style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:0.65757698"