From 9b265969b59cc2dc085d25c4c7212e7ed89fdb16 Mon Sep 17 00:00:00 2001 From: Joshua Davidson Date: Sun, 4 Nov 2018 23:12:31 -0500 Subject: [PATCH 1/4] Sim: Update instrumentation file --- Systems/instrumentation.xml | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/Systems/instrumentation.xml b/Systems/instrumentation.xml index 7f415277..1c9651d8 100644 --- a/Systems/instrumentation.xml +++ b/Systems/instrumentation.xml @@ -6,28 +6,7 @@ ############################################## --> - + @@ -194,8 +173,8 @@ file, these values will be used (they are hardcoded). - mk-viii - 0 + mk-viii + 0 From aae575169ba9067d5a5dfd7eb8b5cf402878e884 Mon Sep 17 00:00:00 2001 From: Joshua Davidson Date: Wed, 7 Nov 2018 00:01:11 -0500 Subject: [PATCH 2/4] Control: Fix FBW Pitch CStar oscilation --- Systems/fbw-pitch.xml | 32 ++++++++++++++++++++------------ revision.txt | 2 +- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/Systems/fbw-pitch.xml b/Systems/fbw-pitch.xml index 3247bd11..c17033c7 100644 --- a/Systems/fbw-pitch.xml +++ b/Systems/fbw-pitch.xml @@ -6,7 +6,7 @@ ############################################## --> - + @@ -15,17 +15,19 @@ FBW PITCH G PI false - - /fdm/jsbsim/fbw/pitch/g-error - - - 0 - - - /fdm/jsbsim/fbw/pitch/g-pi - + /fdm/jsbsim/fbw/pitch/g-error + 0 + /fdm/jsbsim/fbw/pitch/g-pi - -1.5 + + + + /fdm/jsbsim/velocities/vc-kts + 140-1.5 + 350-0.6 +
+
+
@@ -45,7 +47,13 @@ - -1.5 + + + /fdm/jsbsim/velocities/vc-kts + 140-1.5 + 350-0.6 +
+
0.0 diff --git a/revision.txt b/revision.txt index 4a57c83e..421c7926 100644 --- a/revision.txt +++ b/revision.txt @@ -1 +1 @@ -4690 \ No newline at end of file +4691 \ No newline at end of file From ab3b492e0430c60c4b02ee6338f5efb2a420d3e1 Mon Sep 17 00:00:00 2001 From: merspieler Date: Wed, 7 Nov 2018 11:19:11 +0100 Subject: [PATCH 3/4] Ported changes fom autopush as requested Signed-off-by: merspieler --- Nasal/autopush.nas | 1 + Nasal/autopush_route.nas | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Nasal/autopush.nas b/Nasal/autopush.nas index 18dbb4f5..d024c7e2 100644 --- a/Nasal/autopush.nas +++ b/Nasal/autopush.nas @@ -42,6 +42,7 @@ var _loop = func() { var time = getprop("/sim/time/elapsed-sec"); var prop = math.min(math.max(_K_p * deltaV, -_F_p), _F_p); var speedup = getprop("/sim/speed-up"); + var deriv = 0; dt = time - _time; # XXX Sanitising dt. Smaller chance of freakout on lag spike. if(dt > 0.0) { diff --git a/Nasal/autopush_route.nas b/Nasal/autopush_route.nas index 606c9ff5..4e57284b 100644 --- a/Nasal/autopush_route.nas +++ b/Nasal/autopush_route.nas @@ -26,9 +26,13 @@ var _D_min = nil; var _add = func(pos) { if (_N) { var (A, S) = courseAndDistance(_user_points.arr[_N - 1], pos); - if (S * NM2M < 3 * _D_min) { + S *= NM2M; + if (S < 3 * _D_min) { gui.popupTip("Too close to the previous point,\ntry again"); return; + }else if (S > 10000.0) { + gui.popupTip("Too far from the previous point,\ntry again"); + return; } } _user_points.add(geo.Coord.new(pos)); @@ -126,7 +130,7 @@ var _clear_waypoint_models = func() { } var _set_view = func() { - if(!getprop("/sim/current-view/internal")){ + if (!getprop("/sim/current-view/internal")){ _view_changed_or_external = 1; return; } From d2c39ef3897927f2430374f7fad0707dc157e412 Mon Sep 17 00:00:00 2001 From: Joshua Davidson Date: Wed, 7 Nov 2018 17:18:17 -0500 Subject: [PATCH 4/4] Sim: Fix bugs in lighting --- A320-main.xml | 2 ++ Models/Instruments/Lower-ECAM/Lower-ECAM.nas | 2 +- Models/Instruments/PFD/PFD.nas | 4 ++-- Models/Instruments/Upper-ECAM/Upper-ECAM.nas | 2 +- Nasal/MCDU1/MCDU.nas | 1 - Nasal/MCDU2/MCDU.nas | 1 - Nasal/buttons.nas | 2 ++ revision.txt | 2 +- 8 files changed, 9 insertions(+), 7 deletions(-) diff --git a/A320-main.xml b/A320-main.xml index 666e4916..32884265 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -599,6 +599,8 @@ 1 1 1 + 1 + 1 0 0 diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas index f9dc911d..c8cc4833 100644 --- a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas +++ b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas @@ -110,7 +110,7 @@ var canvas_lowerECAM_base = { setprop("/instrumentation/du/du4-test", 0); } - if (getprop("/systems/electrical/bus/ac2") >= 110 and getprop("/controls/lighting/DU/du4") > 0) { + if (getprop("/systems/electrical/bus/ac2") >= 110 and getprop("/controls/lighting/DU/du4") > 0.01) { if (getprop("/instrumentation/du/du4-test-time") + getprop("/instrumentation/du/du4-test-amount") >= elapsedtime) { lowerECAM_apu.page.hide(); lowerECAM_bleed.page.hide(); diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas index 300cf3c1..b61ada7f 100644 --- a/Models/Instruments/PFD/PFD.nas +++ b/Models/Instruments/PFD/PFD.nas @@ -246,7 +246,7 @@ var canvas_PFD_base = { if (acconfig_mismatch.getValue() == "0x000") { PFD_1_mismatch.page.hide(); PFD_2_mismatch.page.hide(); - if (acess.getValue() >= 110 and du1_lgt.getValue() > 0) { + if (acess.getValue() >= 110 and du1_lgt.getValue() > 0.01) { if (du1_test_time.getValue() + du1_test_amount.getValue() >= elapsedtime_act and cpt_du_xfr.getValue() != 1) { PFD_1_test.update(); updateL = 0; @@ -269,7 +269,7 @@ var canvas_PFD_base = { PFD_1_test.page.hide(); PFD_1.page.hide(); } - if (ac2.getValue() >= 110 and du6_lgt.getValue() > 0) { + if (ac2.getValue() >= 110 and du6_lgt.getValue() > 0.01) { if (du6_test_time.getValue() + du6_test_amount.getValue() >= elapsedtime_act and fo_du_xfr.getValue() != 1) { PFD_2_test.update(); updateR = 0; diff --git a/Models/Instruments/Upper-ECAM/Upper-ECAM.nas b/Models/Instruments/Upper-ECAM/Upper-ECAM.nas index 557b275e..3af40c9e 100644 --- a/Models/Instruments/Upper-ECAM/Upper-ECAM.nas +++ b/Models/Instruments/Upper-ECAM/Upper-ECAM.nas @@ -138,7 +138,7 @@ var canvas_upperECAM_base = { } cur_eng_option = eng_option.getValue(); - if (acess.getValue() >= 110 and du3_lgt.getValue() > 0) { + if (acess.getValue() >= 110 and du3_lgt.getValue() > 0.01) { if (du3_test_time.getValue() + du3_test_amount.getValue() >= elapsedtime) { upperECAM_cfm_eis2.page.hide(); upperECAM_iae_eis2.page.hide(); diff --git a/Nasal/MCDU1/MCDU.nas b/Nasal/MCDU1/MCDU.nas index 9091098f..d5e06011 100644 --- a/Nasal/MCDU1/MCDU.nas +++ b/Nasal/MCDU1/MCDU.nas @@ -5,7 +5,6 @@ ############################################## var MCDU_init = func { - setprop("/MCDU[0]/brightness", "1.0"); MCDU_reset(); # Reset MCDU, clears data } diff --git a/Nasal/MCDU2/MCDU.nas b/Nasal/MCDU2/MCDU.nas index 12640f77..c8f7b4d5 100644 --- a/Nasal/MCDU2/MCDU.nas +++ b/Nasal/MCDU2/MCDU.nas @@ -5,7 +5,6 @@ ############################################## var MCDU_init = func { - setprop("/MCDU[1]/brightness", "1.0"); MCDU_reset(); # Reset MCDU, clears data } diff --git a/Nasal/buttons.nas b/Nasal/buttons.nas index 525f2ffd..072407e2 100644 --- a/Nasal/buttons.nas +++ b/Nasal/buttons.nas @@ -48,6 +48,8 @@ var variousReset = func { setprop("/controls/lighting/DU/du4", 1); setprop("/controls/lighting/DU/du5", 1); setprop("/controls/lighting/DU/du6", 1); + setprop("/controls/lighting/DU/mcdu1", 1); + setprop("/controls/lighting/DU/mcdu2", 1); setprop("/modes/fcu/hdg-time", 0); setprop("/controls/switching/ATTHDG", 0); setprop("/controls/switching/AIRDATA", 0); diff --git a/revision.txt b/revision.txt index 421c7926..f392d694 100644 --- a/revision.txt +++ b/revision.txt @@ -1 +1 @@ -4691 \ No newline at end of file +4692 \ No newline at end of file