A3XX: Add better NAV system and very basic predictive turning
This commit is contained in:
parent
ea0db7b865
commit
31423c830c
3 changed files with 64 additions and 22 deletions
|
@ -14,6 +14,7 @@ setprop("/it-autoflight/internal/track-deg", 0);
|
|||
setprop("/it-autoflight/internal/vert-speed-fpm", 0);
|
||||
setprop("/it-autoflight/internal/heading-5-sec-ahead", 0);
|
||||
setprop("/it-autoflight/internal/altitude-5-sec-ahead", 0);
|
||||
setprop("/it-autoflight/internal/lnav-advance-nm", 1);
|
||||
|
||||
setlistener("/sim/signals/fdm-initialized", func {
|
||||
var trueSpeedKts = getprop("/instrumentation/airspeed-indicator/true-speed-kt");
|
||||
|
@ -535,7 +536,7 @@ var ap_various = func {
|
|||
}
|
||||
|
||||
if (getprop("/autopilot/route-manager/route/num") > 0 and getprop("/autopilot/route-manager/active") == 1) {
|
||||
if (getprop("/autopilot/route-manager/wp/dist") <= 1.0) {
|
||||
if (getprop("/autopilot/route-manager/wp/dist") <= getprop("/it-autoflight/internal/lnav-advance-nm")) {
|
||||
if ((getprop("/autopilot/route-manager/current-wp") + 1) < getprop("/autopilot/route-manager/route/num")) {
|
||||
setprop("/autopilot/route-manager/current-wp", getprop("/autopilot/route-manager/current-wp") + 1);
|
||||
}
|
||||
|
@ -543,7 +544,7 @@ var ap_various = func {
|
|||
}
|
||||
|
||||
if (getprop("/it-autoflight/output/ap1") == 1 or getprop("/it-autoflight/output/ap2") == 1) {
|
||||
if (getprop("/controls/flight/aileron") > 0.3 or getprop("/controls/flight/aileron") < -0.3 or getprop("/controls/flight/elevator") > 0.3 or getprop("/controls/flight/elevator") < -0.3) {
|
||||
if (getprop("/controls/flight/aileron") > 0.3 or getprop("/controls/flight/aileron") < -0.2 or getprop("/controls/flight/elevator") > 0.3 or getprop("/controls/flight/elevator") < -0.2) {
|
||||
setprop("/it-autoflight/input/ap1", 0);
|
||||
setprop("/it-autoflight/input/ap2", 0);
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
<filter>
|
||||
<name>AUTOLAND FD FPM</name>
|
||||
<type>gain</type>
|
||||
<gain>1</gain>
|
||||
<gain>1.0</gain>
|
||||
<update-interval-secs type="double">0.05</update-interval-secs>
|
||||
<input>
|
||||
<expression>
|
||||
|
@ -128,7 +128,7 @@
|
|||
<filter>
|
||||
<name>AUTOLAND FPM</name>
|
||||
<type>gain</type>
|
||||
<gain>1</gain>
|
||||
<gain>1.0</gain>
|
||||
<update-interval-secs type="double">0.05</update-interval-secs>
|
||||
<input>
|
||||
<expression>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<filter>
|
||||
<name>FMGC MNG SPD</name>
|
||||
<type>gain</type>
|
||||
<gain>1</gain>
|
||||
<gain>1.0</gain>
|
||||
<update-interval-secs type="double">0.05</update-interval-secs>
|
||||
<input>
|
||||
<expression>
|
||||
|
@ -170,7 +170,7 @@
|
|||
<filter>
|
||||
<name>FMGC MNG MACH</name>
|
||||
<type>gain</type>
|
||||
<gain>1</gain>
|
||||
<gain>1.0</gain>
|
||||
<update-interval-secs type="double">0.05</update-interval-secs>
|
||||
<input>
|
||||
<expression>
|
||||
|
@ -194,7 +194,7 @@
|
|||
<filter>
|
||||
<name>FMGC Target IAS PFD</name>
|
||||
<type>gain</type>
|
||||
<gain>1</gain>
|
||||
<gain>1.0</gain>
|
||||
<update-interval-secs type="double">0.1</update-interval-secs>
|
||||
<input>
|
||||
<condition>
|
||||
|
@ -355,7 +355,7 @@
|
|||
<filter>
|
||||
<name>IAS SYNC</name>
|
||||
<type>gain</type>
|
||||
<gain>1</gain>
|
||||
<gain>1.0</gain>
|
||||
<enable>
|
||||
<condition>
|
||||
<equals>
|
||||
|
@ -372,7 +372,7 @@
|
|||
<filter>
|
||||
<name>MACH SYNC</name>
|
||||
<type>gain</type>
|
||||
<gain>1</gain>
|
||||
<gain>1.0</gain>
|
||||
<enable>
|
||||
<condition>
|
||||
<equals>
|
||||
|
@ -437,11 +437,42 @@
|
|||
<output>/it-autoflight/internal/track-deg</output>
|
||||
<output>/instrumentation/pfd/track-deg</output>
|
||||
</filter>
|
||||
|
||||
|
||||
<filter>
|
||||
<name>LNAV ADVANCE</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<expression>
|
||||
<sum>
|
||||
<table>
|
||||
<property>/velocities/groundspeed-kt</property>
|
||||
<entry><ind>120</ind><dep>1.0</dep></entry>
|
||||
<entry><ind>400</ind><dep>1.2</dep></entry>
|
||||
</table>
|
||||
<table>
|
||||
<abs>
|
||||
<dif>
|
||||
<property>/autopilot/route-manager/wp[1]/true-bearing-deg</property>
|
||||
<property>/autopilot/route-manager/wp[0]/true-bearing-deg</property>
|
||||
</dif>
|
||||
</abs>
|
||||
<entry><ind>30</ind><dep>0.0</dep></entry>
|
||||
<entry><ind>70</ind><dep>1.5</dep></entry>
|
||||
</table>
|
||||
</sum>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/it-autoflight/internal/lnav-advance-nm</output>
|
||||
<min>1.0</min>
|
||||
<max>10.0</max>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>HEADING ERROR DEG</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<condition>
|
||||
<and>
|
||||
|
@ -487,11 +518,22 @@
|
|||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/autopilot/settings/true-heading-deg</property>
|
||||
<offset>
|
||||
<property>/orientation/heading-deg</property>
|
||||
<scale>-1.0</scale>
|
||||
</offset>
|
||||
<expression>
|
||||
<product>
|
||||
<sum>
|
||||
<property>/autopilot/route-manager/wp[0]/true-bearing-deg</property>
|
||||
<product>
|
||||
<property>/autopilot/internal/drift-angle-deg</property>
|
||||
<value>-1</value>
|
||||
</product>
|
||||
<product>
|
||||
<property>/orientation/heading-deg</property>
|
||||
<value>-1</value>
|
||||
</product>
|
||||
</sum>
|
||||
<value>1.5</value>
|
||||
</product>
|
||||
</expression>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
|
@ -513,7 +555,6 @@
|
|||
<min>-180</min>
|
||||
<max>180</max>
|
||||
</period>
|
||||
<gain>1.0</gain>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
|
@ -585,6 +626,7 @@
|
|||
<name>NAV ERROR DEG</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<property>/instrumentation/nav[0]/radials/target-auto-hdg-deg</property>
|
||||
<offset>
|
||||
|
@ -597,22 +639,22 @@
|
|||
<min>-180</min>
|
||||
<max>180</max>
|
||||
</period>
|
||||
<gain>1.0</gain>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>INTERNAL VERTICAL SPEED COMPUTER</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>55.5</gain>
|
||||
<input>/velocities/vertical-speed-fps</input>
|
||||
<output>/it-autoflight/internal/vert-speed-fpm</output>
|
||||
<gain>55.5</gain>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>INTERNAL VERTICAL SPEED COMPUTER SYNC 4</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>55.5</gain>
|
||||
<enable>
|
||||
<condition>
|
||||
<and>
|
||||
|
@ -629,13 +671,13 @@
|
|||
</enable>
|
||||
<input>/velocities/vertical-speed-fps</input>
|
||||
<output>/it-autoflight/internal/target-fpm-b</output>
|
||||
<gain>55.5</gain>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>INTERNAL VERTICAL SPEED COMPUTER SYNC 5</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>55.5</gain>
|
||||
<enable>
|
||||
<condition>
|
||||
<not-equals>
|
||||
|
@ -646,16 +688,15 @@
|
|||
</enable>
|
||||
<input>/velocities/vertical-speed-fps</input>
|
||||
<output>/it-autoflight/internal/target-fpm-d</output>
|
||||
<gain>55.5</gain>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>NAV1 G/S FPM Calc</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>/instrumentation/nav[0]/gs-rate-of-climb-fpm</input>
|
||||
<output>/it-autoflight/internal/nav1-rate-of-climb-fpm</output>
|
||||
<gain>1.0</gain>
|
||||
<min>
|
||||
<condition>
|
||||
<not-equals>
|
||||
|
|
|
@ -1 +1 @@
|
|||
4009
|
||||
4010
|
Reference in a new issue