From dbc4a91b9a1c7531bf8fc4deec3c76241f725e40 Mon Sep 17 00:00:00 2001 From: BobDotCom <71356958+BobDotCom@users.noreply.github.com> Date: Wed, 23 Oct 2024 18:45:34 -0500 Subject: [PATCH] Systems: Auto-GCAS --- Systems/jsb-autoflight.xml | 56 +++++++++++++++++++++---- Systems/jsb-misc.xml | 84 ++++++++++++++++++++++++++++++++++++++ f16-base.xml | 9 ++++ 3 files changed, 142 insertions(+), 7 deletions(-) diff --git a/Systems/jsb-autoflight.xml b/Systems/jsb-autoflight.xml index 13eab29e..a38f0753 100644 --- a/Systems/jsb-autoflight.xml +++ b/Systems/jsb-autoflight.xml @@ -62,11 +62,17 @@ position/wow eq 1 + elec/bus/emergency-dc-2 lt 20 + + + + /systems/agcas/engage eq 1 + + attitude/roll-rad gt 1.0472 attitude/roll-rad lt -1.0472 attitude/pitch-rad lt -1.0472 attitude/pitch-rad gt 1.0472 - elec/bus/emergency-dc-2 lt 20 @@ -128,11 +134,15 @@ /sim/time/elapsed-sec lt autoflight/ss/reset-time-delay - + - - autoflight/switch-pitch ne 0 + + + autoflight/switch-pitch ne 0 + + /systems/agcas/roll-cmd ne 0 + autoflight/can-engage eq 1 autoflight/ss/force eq 0 position/wow eq 0 @@ -142,7 +152,11 @@ - autoflight/switch-pitch ne 0 + + autoflight/switch-pitch ne 0 + + /systems/agcas/pitch-cmd ne 0 + autoflight/can-engage eq 1 autoflight/ss/force eq 0 position/wow eq 0 @@ -422,6 +436,10 @@ + + autoflight/output/roll-master eq 1 + /systems/agcas/roll-cmd eq 3 + autoflight/output/roll-master eq 1 autoflight/switch-roll ne 0 @@ -561,7 +579,8 @@ - + + autoflight/output/roll-master eq 1 @@ -572,6 +591,19 @@ + + + + autoflight/output/roll-master ne 1 + + + /systems/agcas/roll-cmd eq 1 + + + /systems/agcas/roll-cmd eq 2 + + + @@ -791,7 +823,8 @@ - + + autoflight/output/pitch-master eq 1 @@ -802,6 +835,15 @@ + + + + autoflight/output/pitch-master ne 1 + + + /systems/agcas/pitch-cmd ne 0 + + \ No newline at end of file diff --git a/Systems/jsb-misc.xml b/Systems/jsb-misc.xml index db31c04c..0608b4a5 100644 --- a/Systems/jsb-misc.xml +++ b/Systems/jsb-misc.xml @@ -1254,4 +1254,88 @@ + + + + + /systems/agcas/switch == 1 + + + + + + Engage auto-gcas when flyup is initiated (8s before predicted impact time) + + + + + /systems/agcas/switch == 0 + + + /systems/agcas/manual-enable == 1 + + + + + /instrumentation/radar/time-till-crash gt 0 + /instrumentation/radar/time-till-crash lt 8 + + + + /instrumentation/radar/time-till-crash == 15 + + + /systems/agcas/engage == 1 + + + + + Roll to wings-level (180 deg/sec) + + + + /systems/agcas/engage == 0 + + + /orientation/roll-deg lt 20 + /orientation/roll-deg gt -20 + + + /orientation/roll-deg lt 0 + + + /orientation/roll-deg gt 0 + + + + + Pull-up command (4G/sec) + + + /systems/agcas/engage == 0 + + /orientation/roll-deg gt 90 + /orientation/roll-deg lt -90 + + + + + /orientation/alpha-deg gt 20 + + + + + + diff --git a/f16-base.xml b/f16-base.xml index 7307bfbd..b0a7f346 100644 --- a/f16-base.xml +++ b/f16-base.xml @@ -992,6 +992,15 @@ 0.68 6000 + + false + false + 0 + 0 + true + 1 + true +