Merge branch '3D' into 3D-canvas
This commit is contained in:
commit
01bbc21269
98 changed files with 3018 additions and 2560 deletions
|
@ -669,6 +669,7 @@
|
|||
<line7 type="string"></line7>
|
||||
<line8 type="string"></line8>
|
||||
</rightmsg>
|
||||
<warning-phase type="int">0</warning-phase>
|
||||
</ECAM>
|
||||
|
||||
<environment>
|
||||
|
@ -4549,13 +4550,13 @@
|
|||
<file>Aircraft/A320-family/Nasal/Autopush/autopush.nas</file>
|
||||
</autopush>
|
||||
<autopush_driver>
|
||||
<file>Aircraft/A320-family/Nasal/Autopush/autopush_driver.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/Autopush/driver.nas</file>
|
||||
</autopush_driver>
|
||||
<dynarr>
|
||||
<file>Aircraft/A320-family/Nasal/Autopush/dynarr.nas</file>
|
||||
</dynarr>
|
||||
<autopush_route>
|
||||
<file>Aircraft/A320-family/Nasal/Autopush/autopush_route.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/Autopush/route.nas</file>
|
||||
</autopush_route>
|
||||
<!-- Panels -->
|
||||
<rmp>
|
||||
|
|
|
@ -72,8 +72,7 @@ setprop("/systems/acconfig/out-of-date", 0);
|
|||
setprop("/systems/acconfig/mismatch-code", "0x000");
|
||||
setprop("/systems/acconfig/mismatch-reason", "XX");
|
||||
setprop("/systems/acconfig/options/keyboard-mode", 0);
|
||||
# TODO Revert default weight-kgs to 1, when fully implemented
|
||||
setprop("/systems/acconfig/options/weight-kgs", 0);
|
||||
setprop("/systems/acconfig/options/weight-kgs", 1);
|
||||
setprop("/systems/acconfig/options/adirs-skip", 0);
|
||||
setprop("/systems/acconfig/options/allow-oil-consumption", 0);
|
||||
setprop("/systems/acconfig/options/atis-server", "faa");
|
||||
|
|
|
@ -36,9 +36,9 @@
|
|||
<layout>vbox</layout>
|
||||
|
||||
<checkbox>
|
||||
<label>Welcome (F/A)</label>
|
||||
<label>F/A - Boarding</label>
|
||||
<halign>left</halign>
|
||||
<property>/sim/sounde/welcomefa</property>
|
||||
<property>/sim/sounde/fa_boarding</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
|
@ -46,9 +46,9 @@
|
|||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>Welcome (Capt)</label>
|
||||
<label>F/A - Welcome</label>
|
||||
<halign>left</halign>
|
||||
<property>/sim/sounde/welcomecapt</property>
|
||||
<property>/sim/sounde/fa_welcome</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
|
@ -56,9 +56,9 @@
|
|||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>Doors Departure</label>
|
||||
<label>Cpt - Welcome</label>
|
||||
<halign>left</halign>
|
||||
<property>/sim/sounde/doors</property>
|
||||
<property>/sim/sounde/cpt_welcome</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
|
@ -66,9 +66,9 @@
|
|||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>SafetyBrief</label>
|
||||
<label>Cpt - Doors Check</label>
|
||||
<halign>left</halign>
|
||||
<property>/sim/sounde/safety</property>
|
||||
<property>/sim/sounde/cpt_doors</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
|
@ -76,9 +76,9 @@
|
|||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>Prepare for Takeoff</label>
|
||||
<label>F/A - Safety Brief </label>
|
||||
<halign>left</halign>
|
||||
<property>/sim/sounde/prepareto</property>
|
||||
<property>/sim/sounde/fa_safety</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
|
@ -86,9 +86,49 @@
|
|||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>Seatbelt Turned Off</label>
|
||||
<label>Cpt - Prepare for Takeoff</label>
|
||||
<halign>left</halign>
|
||||
<property>/sim/sounde/seatbelt-10k</property>
|
||||
<property>/sim/sounde/cpt_takeoff</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>F/A - Seatbelt Turned Off</label>
|
||||
<halign>left</halign>
|
||||
<property>/sim/sounde/fa_seatbelt10k</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>F/A - Descent</label>
|
||||
<halign>left</halign>
|
||||
<property>/sim/sounde/fa_descent</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>Cpt - Prepare for Landing</label>
|
||||
<halign>left</halign>
|
||||
<property>/sim/sounde/cpt_landing</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>F/A - Landed</label>
|
||||
<halign>left</halign>
|
||||
<property>/sim/sounde/fa_landed</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
|
|
|
@ -27,9 +27,7 @@
|
|||
acconfig.writeSettings();
|
||||
canvas_pfd.rateApply();
|
||||
canvas_nd.rateApply();
|
||||
canvas_ecam.u_rateApply();
|
||||
canvas_ecam.l_rateApply();
|
||||
canvas_iesi.rateApply();
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
|
@ -256,9 +254,7 @@
|
|||
acconfig.writeSettings();
|
||||
canvas_pfd.rateApply();
|
||||
canvas_nd.rateApply();
|
||||
canvas_ecam.u_rateApply();
|
||||
canvas_ecam.l_rateApply();
|
||||
canvas_iesi.rateApply();
|
||||
</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
@ -272,9 +268,7 @@
|
|||
acconfig.writeSettings();
|
||||
canvas_pfd.rateApply();
|
||||
canvas_nd.rateApply();
|
||||
canvas_ecam.u_rateApply();
|
||||
canvas_ecam.l_rateApply();
|
||||
canvas_iesi.rateApply();
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
|
|
59
Announcements.txt
Normal file
59
Announcements.txt
Normal file
|
@ -0,0 +1,59 @@
|
|||
All voices created at http://www.fromtexttospeech.com/
|
||||
Captain voice: US English - John
|
||||
Mechanic voice: US English - George
|
||||
Flight attendant voice: US English - Daisy
|
||||
|
||||
|
||||
BOARDING (F/A) - fa_boarding
|
||||
Ladies and gentlemen, the Captain has turned on the Fasten Seat Belt sign. If you haven’t already done so, please stow your carry-on luggage underneath the seat in front of you or in an overhead bin. Please take your seat and fasten your seat belt. And also make sure your seat back and folding trays are in their full upright position.
|
||||
If you are seated next to an emergency exit, please read carefully the special instructions card located by your seat. If you do not wish to perform the functions described in the event of an emergency, please ask a flight attendant to reseat you.
|
||||
We remind you that this is a non-smoking flight. Smoking is prohibited on the entire aircraft, including the lavatories. Tampering with, disabling or destroying the lavatory smoke detectors is prohibited by law.
|
||||
If you have any questions about our flight today, please don’t hesitate to ask one of our flight attendants. Thank you.
|
||||
|
||||
|
||||
WELCOME (F/A) - fa_welcome
|
||||
Ladies and gentlemen, my name is Daisy and I’m your chief flight attendant. On behalf of the entire crew, welcome aboard this flight.
|
||||
At this time, make sure your seat backs and tray tables are in their full upright position and that your seat belt is correctly fastened. Also, your portable electronic devices must be set to ‘airplane’ mode until an announcement is made upon arrival. Thank you.
|
||||
|
||||
WELCOME (CPT) - cpt_welcome
|
||||
Ladies and gentlemen, this is your captain speaking. Welcome on board. We are all set and ready to go, just waiting for clearance to depart the gate. Please, make yourself comfortable, and I wish you a very pleasant flight.
|
||||
|
||||
DOORS CHECK (CPT) - cpt_doors
|
||||
Cabin Crew, doors on automatic, arm slides, cross-check and report. Thank you.
|
||||
|
||||
|
||||
SAFETY (F/A) - fa_safety
|
||||
Now we request your full attention as the flight attendants demonstrate the safety features of this aircraft.
|
||||
When the seat belt sign illuminates, you must fasten your seat belt. Insert the metal fittings one into the other, and tighten by pulling on the loose end of the strap. To release your seat belt, lift the upper portion of the buckle. We suggest that you keep your seat belt fastened throughout the flight, as we may experience turbulence.
|
||||
There are several emergency exits on this aircraft, two forward, two aft and two over each wing. Please take a few moments now to locate your nearest exit. In some cases, your nearest exit may be behind you. If we need to evacuate the aircraft, floor-level lighting will guide you towards the exit. Doors can be opened by moving the handle in the direction of the arrow. Each door is equipped with an inflatable slide which may also be detached and used as a life raft.
|
||||
Oxygen and the air pressure are always being monitored. In the event of a decompression, an oxygen mask will automatically appear in front of you. To start the flow of oxygen, pull the mask towards you. Place it firmly over your nose and mouth, secure the elastic band behind your head, and breathe normally. Although the bag does not inflate, oxygen is flowing to the mask. If you are travelling with a child or someone who requires assistance, secure your mask on first, and then assist the other person. Keep your mask on until a uniformed crew member advises you to remove it.
|
||||
In the event of an emergency, please assume the bracing position. Lean forward with your hands on top of your head and your elbows against your thighs. Ensure your feet are flat on the floor.
|
||||
A life vest is located in a pouch under your seat or between the armrests. When instructed to do so, open the plastic pouch and remove the vest. Slip it over your head. Pass the straps around your waist and adjust at the front. To inflate the vest, pull firmly on the red cord, only when leaving the aircraft. If you need to refill the vest, blow into the mouthpieces. Use the whistle and light to attract attention. Also, your seat bottom cushion can be used as a flotation device. Pull the cushion from the seat, slip your arms into the straps, and hug the cushion to your chest.
|
||||
At this time, your portable electronic devices must be set to ‘airplane’ mode until an announcement is made upon arrival.
|
||||
We remind you that this is a non-smoking flight. Tampering with, disabling, or destroying the smoke detectors located in the lavatories is prohibited by law.
|
||||
You will find this and all the other safety information in the card located in the seat pocket in front of you. We strongly suggest you read it before take-off. If you have any questions, please don’t hesitate to ask one of our crew members. We wish you all an enjoyable flight.
|
||||
|
||||
|
||||
TAKEOFF (CPT) - cpt_takeoff
|
||||
Cabin crew, prepare for take-off.
|
||||
|
||||
|
||||
SEATBELT OFF (F/A) - fa_seatbelt10k.wav
|
||||
Ladies and gentlemen, the Captain has turned off the Fasten Seat Belt sign, and you may now move around the cabin. However we always recommend to keep your seat belt fastened while you’re seated.
|
||||
In a few moments, the flight attendants will be passing around the cabin to offer you hot or cold drinks, as well as a snack. Alcoholic drinks are also available at a nominal charge. Now, sit back, relax, and enjoy the flight. Thank you.
|
||||
|
||||
|
||||
DESCENT (F/A) - fa_descent
|
||||
Ladies and gentlemen, as we start our descent, please make sure your seat backs and tray tables are in their full upright position. Make sure your seat belt is securely fastened and all carry-on luggage is stowed underneath the seat in front of you or in the overhead bins. Thank you.
|
||||
|
||||
|
||||
LANDING (CPT) - cpt_landing
|
||||
Cabin crew, prepare for landing.
|
||||
|
||||
|
||||
LANDED (F/A) - fa_landed
|
||||
Ladies and gentlemen, welcome to your destination Airport.
|
||||
For your safety and comfort, please remain seated with your seat belt fastened until the Captain turns off the Fasten Seat Belt sign. This will indicate that we have parked at the gate and that it is safe for you to move about. At this time, you may use your cellular phones if you wish.
|
||||
Please check around your seat for any personal belongings you may have brought on board with you and please use caution when opening the overhead bins, as heavy articles may have shifted around during the flight.
|
||||
If you require deplaning assistance, please remain in your seat until all other passengers have deplaned. One of our crew members will then be pleased to assist you.
|
||||
On behalf of the entire crew, I’d like to thank you for joining us on this trip and we are looking forward to seeing you on board again in the near future. Have a nice stay.
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/panel-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/pedestal-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/panel-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/panel-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<irradiance-map-type type="int">2</irradiance-map-type>
|
||||
<irradiance-map-strength type="float">0.33</irradiance-map-strength>
|
||||
<texture n="4">
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<irradiance-map-type type="int">1</irradiance-map-type>
|
||||
<irradiance-map-strength type="float">0.33</irradiance-map-strength>
|
||||
<texture n="4">
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>controls/lighting/panel-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/pedestal-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/panel-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/pedestal-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/panel-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/pedestal-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/pedestal-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/panel-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/panel-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/panel-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/panel-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/pedestal-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/pedestal-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/pedestal-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/pedestal-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/pedestal-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/pedestal-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/pedestal-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/pedestal-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/pedestal-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/pedestal-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/pedestal-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>panel</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/pedestal-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<name>tiller</name>
|
||||
<inherits-from>Effects/model-interior</inherits-from>
|
||||
<parameters>
|
||||
<shadow-mapping-enabled type="bool">true</shadow-mapping-enabled>
|
||||
<lightmap-enabled type="int">1</lightmap-enabled>
|
||||
<lightmap-factor type="float" n="0"><use>/controls/lighting/panel-light</use></lightmap-factor>
|
||||
<lightmap-color type="vec3d" n="0">1.0 1.0 1.0</lightmap-color>
|
||||
|
|
|
@ -6960,6 +6960,65 @@
|
|||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>rotate</type>
|
||||
<object-name>ecam_att_hdg</object-name>
|
||||
<object-name>ecam_att_hdg.mark</object-name>
|
||||
<factor>-30</factor>
|
||||
<property>controls/navigation/switching/att-hdg</property>
|
||||
<axis>
|
||||
<x1-m>-0.432428</x1-m>
|
||||
<y1-m>-0.067552</y1-m>
|
||||
<z1-m>-0.063695</z1-m>
|
||||
<x2-m>-0.432195</x2-m>
|
||||
<y2-m>-0.067552</y2-m>
|
||||
<z2-m>-0.062285</z2-m>
|
||||
</axis>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>pick</type>
|
||||
<object-name>ecam_att_hdg</object-name>
|
||||
<action>
|
||||
<button>0</button>
|
||||
<button>3</button>
|
||||
<repeatable>true</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
if (systems.SwitchingPanel.Switches.attHdg.getValue() != 1) {
|
||||
systems.SwitchingPanel.doAttHdg(systems.SwitchingPanel.Switches.attHdg.getValue() + 1);
|
||||
} else {
|
||||
systems.SwitchingPanel.doAttHdg(-1);
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/knb1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
<action>
|
||||
<button>2</button>
|
||||
<button>4</button>
|
||||
<repeatable>true</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
if (systems.SwitchingPanel.Switches.attHdg.getValue() != -1) {
|
||||
systems.SwitchingPanel.doAttHdg(systems.SwitchingPanel.Switches.attHdg.getValue() - 1);
|
||||
} else {
|
||||
systems.SwitchingPanel.doAttHdg(1);
|
||||
}
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/knb1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
<!-- Z Colors/Effects -->
|
||||
<animation>
|
||||
|
|
|
@ -2,147 +2,167 @@
|
|||
|
||||
# Copyright (c) 2020 Josh Davidson (Octal450)
|
||||
|
||||
var IESI = nil;
|
||||
var IESI_display = nil;
|
||||
var elapsedtime = 0;
|
||||
var ASI = 0;
|
||||
var alt = 0;
|
||||
var altTens = 0;
|
||||
var airspeed_act = 0;
|
||||
var mach_act = 0;
|
||||
|
||||
# props.nas nodes
|
||||
var iesi_init = props.globals.initNode("/instrumentation/iesi/iesi-init", 0, "BOOL");
|
||||
var iesi_reset = props.globals.initNode("/instrumentation/iesi/att-reset", 0, "DOUBLE");
|
||||
var iesi_brt = props.globals.getNode("/controls/lighting/DU/iesi", 1);
|
||||
var iesi_rate = props.globals.getNode("/systems/acconfig/options/iesi-rate", 1);
|
||||
var et = props.globals.getNode("/sim/time/elapsed-sec", 1);
|
||||
var aconfig = props.globals.getNode("/systems/acconfig/autoconfig-running", 1);
|
||||
|
||||
var airspeed = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-speed-kt", 1);
|
||||
var mach = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-mach", 1);
|
||||
var pitch = props.globals.getNode("/instrumentation/iesi/pitch-deg", 1);
|
||||
var skid = props.globals.getNode("/instrumentation/iesi/slip-skid", 1);
|
||||
var altitude = props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft", 1);
|
||||
var altitude_ind = props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft-pfd", 1);
|
||||
|
||||
var altimeter_mode = props.globals.getNode("/instrumentation/altimeter[0]/std", 1);
|
||||
var qnh_hpa = props.globals.getNode("/instrumentation/altimeter/setting-hpa", 1);
|
||||
var qnh_inhg = props.globals.getNode("/instrumentation/altimeter/setting-inhg", 1);
|
||||
|
||||
var ASI = 0;
|
||||
var _showIESI = 0;
|
||||
var _fast = 0;
|
||||
var _IESITime = 0;
|
||||
|
||||
var canvas_IESI_base = {
|
||||
init: func(canvas_group, file) {
|
||||
var font_mapper = func(family, weight) {
|
||||
var canvas_IESI = {
|
||||
new: func(svg, name) {
|
||||
var obj = {parents: [canvas_IESI] };
|
||||
obj.canvas = canvas.new({
|
||||
"name": "IESI",
|
||||
"size": [1024, 1024],
|
||||
"view": [1024, 1024],
|
||||
"mipmapping": 1,
|
||||
});
|
||||
|
||||
obj.canvas.addPlacement({"node": "iesi.screen"});
|
||||
obj.group = obj.canvas.createGroup();
|
||||
|
||||
obj.font_mapper = func(family, weight) {
|
||||
return "LiberationFonts/LiberationSans-Regular.ttf";
|
||||
};
|
||||
|
||||
canvas.parsesvg(canvas_group, file, {"font-mapper": font_mapper});
|
||||
|
||||
var svg_keys = me.getKeys();
|
||||
foreach(var key; svg_keys) {
|
||||
me[key] = canvas_group.getElementById(key);
|
||||
var svg_keys = me.getKeys();
|
||||
canvas.parsesvg(obj.group, svg, {"font-mapper": obj.font_mapper} );
|
||||
foreach(var key; obj.getKeys()) {
|
||||
obj[key] = obj.group.getElementById(key);
|
||||
|
||||
var clip_el = obj.group.getElementById(key ~ "_clip");
|
||||
if (clip_el != nil) {
|
||||
clip_el.setVisible(0);
|
||||
var tran_rect = clip_el.getTransformedBounds();
|
||||
|
||||
foreach (var key; svg_keys) {
|
||||
me[key] = canvas_group.getElementById(key);
|
||||
|
||||
var clip_el = canvas_group.getElementById(key ~ "_clip");
|
||||
if (clip_el != nil) {
|
||||
clip_el.setVisible(0);
|
||||
var tran_rect = clip_el.getTransformedBounds();
|
||||
|
||||
var clip_rect = sprintf("rect(%d,%d, %d,%d)",
|
||||
tran_rect[1], # 0 ys
|
||||
tran_rect[2], # 1 xe
|
||||
tran_rect[3], # 2 ye
|
||||
tran_rect[0]); #3 xs
|
||||
# coordinates are top,right,bottom,left (ys, xe, ye, xs) ref: l621 of simgear/canvas/CanvasElement.cxx
|
||||
me[key].set("clip", clip_rect);
|
||||
me[key].set("clip-frame", canvas.Element.PARENT);
|
||||
}
|
||||
var clip_rect = sprintf("rect(%d,%d, %d,%d)",
|
||||
tran_rect[1],
|
||||
tran_rect[2],
|
||||
tran_rect[3],
|
||||
tran_rect[0]);
|
||||
obj[key].set("clip", clip_rect);
|
||||
obj[key].set("clip-frame", canvas.Element.PARENT);
|
||||
}
|
||||
}
|
||||
};
|
||||
obj.AI_horizon_trans = obj["AI_horizon"].createTransform();
|
||||
obj.AI_horizon_rot = obj["AI_horizon"].createTransform();
|
||||
|
||||
me.AI_horizon_trans = me["AI_horizon"].createTransform();
|
||||
me.AI_horizon_rot = me["AI_horizon"].createTransform();
|
||||
obj.middleAltOffset = nil;
|
||||
|
||||
obj.update_items = [
|
||||
props.UpdateManager.FromHashValue("airspeed", nil, func(val) {
|
||||
# Subtract 30, since the scale starts at 30, but don't allow less than 0, or more than 520 knots
|
||||
if (val <= 30) {
|
||||
ASI = 0;
|
||||
} else if (val >= 520) {
|
||||
ASI = 490;
|
||||
} else {
|
||||
ASI = val - 30;
|
||||
}
|
||||
obj["ASI_scale"].setTranslation(0, ASI * 8.295);
|
||||
}),
|
||||
props.UpdateManager.FromHashList(["altitude","altitude_ind"], nil, func(val) {
|
||||
if (val.altitude > 50000) {
|
||||
val.altitude = 50000;
|
||||
} elsif (val.altitude < -2000) {
|
||||
val.altitude = -2000;
|
||||
}
|
||||
|
||||
if (val.altitude < 0) {
|
||||
obj["negText"].show();
|
||||
obj["negText2"].show();
|
||||
} else {
|
||||
obj["negText"].hide();
|
||||
obj["negText2"].hide();
|
||||
}
|
||||
|
||||
obj.altOffset = (val.altitude / 500) - int(val.altitude / 500);
|
||||
obj.middleAltText = roundaboutAlt(val.altitude / 100);
|
||||
if (obj.altOffset > 0.5) {
|
||||
obj.middleAltOffset = -(obj.altOffset - 1) * 258.5528;
|
||||
} else {
|
||||
obj.middleAltOffset = -obj.altOffset * 258.5528;
|
||||
}
|
||||
|
||||
obj["ALT_scale"].setTranslation(0, -obj.middleAltOffset);
|
||||
obj["ALT_scale"].update();
|
||||
obj["ALT_five"].setText(sprintf("%03d", abs(obj.middleAltText+10)));
|
||||
obj["ALT_four"].setText(sprintf("%03d", abs(obj.middleAltText+5)));
|
||||
obj["ALT_three"].setText(sprintf("%03d", abs(obj.middleAltText)));
|
||||
obj["ALT_two"].setText(sprintf("%03d", abs(obj.middleAltText-5)));
|
||||
obj["ALT_one"].setText(sprintf("%03d", abs(obj.middleAltText-10)));
|
||||
|
||||
|
||||
if (val.altitude < 0 and val.altitude_ind > 20) {
|
||||
val.altitude_ind = 20;
|
||||
} elsif (val.altitude > 0 and val.altitude_ind > 500) {
|
||||
val.altitude_ind = 500;
|
||||
}
|
||||
|
||||
obj["ALT_digits"].setText(sprintf("%s", val.altitude_ind));
|
||||
obj["ALT_meters"].setText(sprintf("%5.0f", math.round(val.altitude * 0.3048, 10)));
|
||||
obj.altTens = num(right(sprintf("%02d", val.altitude), 2));
|
||||
obj["ALT_tens"].setTranslation(0, obj.altTens * 3.16);
|
||||
}),
|
||||
props.UpdateManager.FromHashValue("mach", nil, func(val) {
|
||||
if (val >= 0.5) {
|
||||
obj._machWasAbove50 = 1;
|
||||
obj["ASI_mach_decimal"].show();
|
||||
obj["ASI_mach"].show();
|
||||
} elsif (val >= 0.45 and obj._machWasAbove50) {
|
||||
obj["ASI_mach_decimal"].show();
|
||||
obj["ASI_mach"].show();
|
||||
} else {
|
||||
obj._machWasAbove50 = 0;
|
||||
obj["ASI_mach_decimal"].hide();
|
||||
obj["ASI_mach"].hide();
|
||||
}
|
||||
|
||||
if (val >= 0.999) {
|
||||
obj["ASI_mach"].setText("99");
|
||||
} else {
|
||||
obj["ASI_mach"].setText(sprintf("%2.0f", val * 100));
|
||||
}
|
||||
}),
|
||||
props.UpdateManager.FromHashValue("pitch", nil, func(val) {
|
||||
obj.AI_horizon_trans.setTranslation(0, val * 16.74);
|
||||
}),
|
||||
props.UpdateManager.FromHashValue("roll", nil, func(val) {
|
||||
obj.AI_horizon_rot.setRotation(-val * D2R, obj["AI_center"].getCenter());
|
||||
obj["AI_bank"].setRotation(-val * D2R);
|
||||
}),
|
||||
props.UpdateManager.FromHashValue("skid", nil, func(val) {
|
||||
obj["AI_slipskid"].setTranslation(val, 0);
|
||||
}),
|
||||
props.UpdateManager.FromHashList(["altimeter_mode","qnh_hpa","qnh_inhg"], nil, func(val) {
|
||||
obj.updateQNH(val);
|
||||
}),
|
||||
];
|
||||
|
||||
_showIESI = 0;
|
||||
_fast = 0;
|
||||
_IESITime = 0.0;
|
||||
obj._cachedInhg = nil;
|
||||
|
||||
me.page = canvas_group;
|
||||
|
||||
return me;
|
||||
},
|
||||
getKeys: func() {
|
||||
return [];
|
||||
},
|
||||
update: func() {
|
||||
cur_time = et.getValue();
|
||||
# todo consider relay 7XB for power of DC HOT 1
|
||||
# todo transient max 0.2s
|
||||
# todo 20W power consumption
|
||||
if (iesi_reset.getValue() == 1) {
|
||||
if (iesi_init.getBoolValue() and _IESITime + 90 >= et.getValue()) {
|
||||
_fast = 1;
|
||||
} else {
|
||||
_fast = 0;
|
||||
}
|
||||
iesi_init.setBoolValue(0);
|
||||
}
|
||||
|
||||
if (systems.ELEC.Bus.dcEss.getValue() >= 25 or (systems.ELEC.Bus.dcHot1.getValue() >= 25 and airspeed.getValue() >= 50 and cur_time >= 5)) {
|
||||
_showIESI = 1;
|
||||
IESI.update();
|
||||
|
||||
if (aconfig.getValue() != 1 and iesi_init.getValue() != 1) {
|
||||
iesi_init.setBoolValue(1);
|
||||
if (_fast) {
|
||||
_IESITime = cur_time - 80;
|
||||
_fast = 0;
|
||||
} else {
|
||||
_IESITime = cur_time;
|
||||
}
|
||||
} else if (aconfig.getValue() == 1 and iesi_init.getValue() != 1) {
|
||||
iesi_init.setBoolValue(1);
|
||||
_IESITime = cur_time - 87;
|
||||
}
|
||||
} else {
|
||||
_showIESI = 0;
|
||||
iesi_init.setBoolValue(0);
|
||||
}
|
||||
|
||||
if (_showIESI and iesi_brt.getValue() > 0.01) {
|
||||
IESI.page.show();
|
||||
} else {
|
||||
IESI.page.hide();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
var canvas_IESI = {
|
||||
new: func(canvas_group, file) {
|
||||
var m = {parents: [canvas_IESI, canvas_IESI_base]};
|
||||
m.init(canvas_group, file);
|
||||
m._cachedInhg = -99;
|
||||
m._machWasAbove50 = 0;
|
||||
m._roll = 0;
|
||||
return m;
|
||||
},
|
||||
return obj;
|
||||
},
|
||||
getKeys: func() {
|
||||
return ["IESI","IESI_Init","ASI_scale","ASI_mach","ASI_mach_decimal","AI_center","AI_horizon","AI_bank","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"];
|
||||
},
|
||||
update: func() {
|
||||
if (qnh_inhg.getValue() != me._cachedInhg) {
|
||||
me._cachedInhg = qnh_inhg.getValue();
|
||||
me.updateQNH();
|
||||
update: func(notification) {
|
||||
if (notification.qnh_inhg != me._cachedInhg) {
|
||||
me._cachedInhg = notification.qnh_inhg;
|
||||
me.updateQNH(notification);
|
||||
}
|
||||
|
||||
if (_IESITime + 90 >= et.getValue()) {
|
||||
me.updatePower(notification);
|
||||
if (me.group.getVisible() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_IESITime + 90 >= notification.elapsedTime) {
|
||||
me["IESI"].hide();
|
||||
me["IESI_Init"].show();
|
||||
return;
|
||||
|
@ -151,137 +171,119 @@ var canvas_IESI = {
|
|||
me["IESI"].show();
|
||||
}
|
||||
|
||||
# Airspeed
|
||||
# Subtract 30, since the scale starts at 30, but don't allow less than 0, or more than 520 knots
|
||||
airspeed_act = airspeed.getValue();
|
||||
mach_act = mach.getValue();
|
||||
if (airspeed_act <= 30) {
|
||||
ASI = 0;
|
||||
} else if (airspeed_act >= 520) {
|
||||
ASI = 490;
|
||||
} else {
|
||||
ASI = airspeed_act - 30;
|
||||
}
|
||||
me["ASI_scale"].setTranslation(0, ASI * 8.295);
|
||||
|
||||
if (mach_act >= 0.5) {
|
||||
me._machWasAbove50 = 1;
|
||||
me["ASI_mach_decimal"].show();
|
||||
me["ASI_mach"].show();
|
||||
} elsif (mach_act >= 0.45 and me._machWasAbove50) {
|
||||
me["ASI_mach_decimal"].show();
|
||||
me["ASI_mach"].show();
|
||||
} else {
|
||||
me._machWasAbove50 = 0;
|
||||
me["ASI_mach_decimal"].hide();
|
||||
me["ASI_mach"].hide();
|
||||
}
|
||||
|
||||
if (mach_act >= 0.999) {
|
||||
me["ASI_mach"].setText("99");
|
||||
} else {
|
||||
me["ASI_mach"].setText(sprintf("%2.0f", mach_act * 100));
|
||||
}
|
||||
|
||||
# Attitude
|
||||
me._roll = pts.Orientation.roll.getValue();
|
||||
me.AI_horizon_trans.setTranslation(0, pitch.getValue() * 16.74);
|
||||
me.AI_horizon_rot.setRotation(-me._roll * D2R, me["AI_center"].getCenter());
|
||||
|
||||
me["AI_slipskid"].setTranslation(skid.getValue(), 0);
|
||||
me["AI_bank"].setRotation(-me._roll * D2R);
|
||||
|
||||
# Altitude
|
||||
me.altitude = altitude.getValue();
|
||||
if (me.altitude > 50000) {
|
||||
me.altitude = 50000;
|
||||
} elsif (me.altitude < -2000) {
|
||||
me.altitude = -2000;
|
||||
}
|
||||
|
||||
if (me.altitude < 0) {
|
||||
me["negText"].show();
|
||||
me["negText2"].show();
|
||||
} else {
|
||||
me["negText"].hide();
|
||||
me["negText2"].hide();
|
||||
}
|
||||
|
||||
me.altOffset = me.altitude / 500 - int(me.altitude / 500);
|
||||
me.middleAltText = roundaboutAlt(me.altitude / 100);
|
||||
me.middleAltOffset = nil;
|
||||
if (me.altOffset > 0.5) {
|
||||
me.middleAltOffset = -(me.altOffset - 1) * 258.5528;
|
||||
} else {
|
||||
me.middleAltOffset = -me.altOffset * 258.5528;
|
||||
}
|
||||
me["ALT_scale"].setTranslation(0, -me.middleAltOffset);
|
||||
me["ALT_scale"].update();
|
||||
me["ALT_five"].setText(sprintf("%03d", abs(me.middleAltText+10)));
|
||||
me["ALT_four"].setText(sprintf("%03d", abs(me.middleAltText+5)));
|
||||
me["ALT_three"].setText(sprintf("%03d", abs(me.middleAltText)));
|
||||
me["ALT_two"].setText(sprintf("%03d", abs(me.middleAltText-5)));
|
||||
me["ALT_one"].setText(sprintf("%03d", abs(me.middleAltText-10)));
|
||||
|
||||
me.altitudeText = altitude_ind.getValue();
|
||||
if (me.altitude < 0 and me.altitudeText > 20) {
|
||||
me.altitudeText = 20;
|
||||
} elsif (me.altitude > 0 and me.altitudeText > 500) {
|
||||
me.altitudeText = 500;
|
||||
}
|
||||
|
||||
me["ALT_digits"].setText(sprintf("%s", me.altitudeText));
|
||||
me["ALT_meters"].setText(sprintf("%5.0f", math.round(me.altitude * 0.3048, 10)));
|
||||
altTens = num(right(sprintf("%02d", me.altitude), 2));
|
||||
me["ALT_tens"].setTranslation(0, altTens * 3.16);
|
||||
foreach(var update_item; me.update_items)
|
||||
{
|
||||
update_item.update(notification);
|
||||
}
|
||||
},
|
||||
updateQNH: func() {
|
||||
if (altimeter_mode.getBoolValue()) {
|
||||
updateQNH: func(notification) {
|
||||
if (notification.altimeter_mode) {
|
||||
me["QNH_setting"].hide();
|
||||
me["QNH_std"].show();
|
||||
} else {
|
||||
me["QNH_setting"].setText(sprintf("%4.0f", qnh_hpa.getValue()) ~ "/" ~ sprintf("%2.2f", qnh_inhg.getValue()));
|
||||
me["QNH_setting"].setText(sprintf("%4.0f", notification.qnh_hpa) ~ "/" ~ sprintf("%2.2f", notification.qnh_inhg));
|
||||
me["QNH_setting"].show();
|
||||
me["QNH_std"].hide();
|
||||
}
|
||||
}
|
||||
},
|
||||
updatePower: func(notification) {
|
||||
# todo consider relay 7XB for power of DC HOT 1
|
||||
# todo transient max 0.2s
|
||||
# todo 20W power consumption
|
||||
if (notification.attReset == 1) {
|
||||
if (notification.iesiInit and _IESITime + 90 >= notification.elapsedTime) {
|
||||
_fast = 1;
|
||||
} else {
|
||||
_fast = 0;
|
||||
}
|
||||
iesi_init.setBoolValue(0);
|
||||
}
|
||||
|
||||
if (notification.dcEss >= 25 or (notification.dcHot1 >= 25 and notification.airspeed >= 50 and notification.elapsedTime >= 5)) {
|
||||
_showIESI = 1;
|
||||
if (notification.acconfig != 1 and notification.iesiInit != 1) {
|
||||
iesi_init.setBoolValue(1);
|
||||
if (_fast) {
|
||||
_IESITime = notification.elapsedTime - 80;
|
||||
_fast = 0;
|
||||
} else {
|
||||
_IESITime = notification.elapsedTime;
|
||||
}
|
||||
} else if (notification.acconfig == 1 and notification.iesiInit != 1) {
|
||||
iesi_init.setBoolValue(1);
|
||||
_IESITime = notification.elapsedTime - 87;
|
||||
}
|
||||
} else {
|
||||
_showIESI = 0;
|
||||
iesi_init.setBoolValue(0);
|
||||
}
|
||||
|
||||
if (_showIESI and notification.iesiBrt > 0.01) {
|
||||
me.group.setVisible(1);
|
||||
} else {
|
||||
me.group.setVisible(0);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
setlistener("sim/signals/fdm-initialized", func {
|
||||
IESI_display = canvas.new({
|
||||
"name": "IESI",
|
||||
"size": [1024, 1024],
|
||||
"view": [1024, 1024],
|
||||
"mipmapping": 1
|
||||
});
|
||||
IESI_display.addPlacement({"node": "iesi.screen"});
|
||||
var group_IESI = IESI_display.createGroup();
|
||||
|
||||
IESI = canvas_IESI.new(group_IESI, "Aircraft/A320-family/Models/Instruments/IESI/res/iesi.svg");
|
||||
|
||||
IESI.updateQNH();
|
||||
|
||||
IESI_update.start();
|
||||
if (iesi_rate.getValue() > 1) {
|
||||
rateApply();
|
||||
}
|
||||
});
|
||||
var IESIRecipient =
|
||||
{
|
||||
new: func(_ident)
|
||||
{
|
||||
var NewIESIRecipient = emesary.Recipient.new(_ident);
|
||||
NewIESIRecipient.MainScreen = nil;
|
||||
NewIESIRecipient.Receive = func(notification)
|
||||
{
|
||||
if (notification.NotificationType == "FrameNotification")
|
||||
{
|
||||
if (NewIESIRecipient.MainScreen == nil) {
|
||||
NewIESIRecipient.MainScreen = canvas_IESI.new("Aircraft/A320-family/Models/Instruments/IESI/res/iesi.svg", "A320 IESI");
|
||||
}
|
||||
|
||||
if (math.mod(notifications.frameNotification.FrameCount,2) == 0) {
|
||||
NewIESIRecipient.MainScreen.update(notification);
|
||||
}
|
||||
return emesary.Transmitter.ReceiptStatus_OK;
|
||||
}
|
||||
return emesary.Transmitter.ReceiptStatus_NotProcessed;
|
||||
};
|
||||
return NewIESIRecipient;
|
||||
},
|
||||
};
|
||||
|
||||
setlistener("/instrumentation/altimeter[0]/std", func() { if (IESI != nil) { IESI.updateQNH(); } }, 0, 0);
|
||||
var A320IESI = IESIRecipient.new("A320 IESI");
|
||||
emesary.GlobalTransmitter.Register(A320IESI);
|
||||
|
||||
var rateApply = func {
|
||||
IESI_update.restart(0.05 * iesi_rate.getValue());
|
||||
var input = {
|
||||
"acconfig": "/systems/acconfig/autoconfig-running",
|
||||
"airspeed": "/instrumentation/airspeed-indicator[0]/indicated-speed-kt",
|
||||
"altitude": "/instrumentation/altimeter/indicated-altitude-ft",
|
||||
"altitude_ind": "/instrumentation/altimeter/indicated-altitude-ft-pfd",
|
||||
"altimeter_mode": "/instrumentation/altimeter[0]/std",
|
||||
"attReset": "/instrumentation/iesi/att-reset",
|
||||
"dcEss": "/systems/electrical/bus/dc-ess",
|
||||
"dcHot1": "/systems/electrical/bus/dc-hot-1",
|
||||
"iesiBrt": "/controls/lighting/DU/iesi",
|
||||
"iesiInit": "/instrumentation/iesi/iesi-init",
|
||||
"mach": "/instrumentation/airspeed-indicator/indicated-mach",
|
||||
"pitch": "/instrumentation/iesi/pitch-deg",
|
||||
"qnh_hpa": "/instrumentation/altimeter[0]/setting-hpa",
|
||||
"qnh_inhg": "/instrumentation/altimeter[0]/setting-inhg",
|
||||
"roll": "/orientation/roll-deg",
|
||||
"skid": "/instrumentation/iesi/slip-skid",
|
||||
};
|
||||
|
||||
foreach (var name; keys(input)) {
|
||||
emesary.GlobalTransmitter.NotifyAll(notifications.FrameNotificationAddProperty.new("A320 IESI", name, input[name]));
|
||||
}
|
||||
|
||||
var IESI_update = maketimer(0.05, func {
|
||||
canvas_IESI_base.update();
|
||||
});
|
||||
|
||||
var showIESI = func {
|
||||
var dlg = canvas.Window.new([256, 256], "dialog").set("resize", 1);
|
||||
dlg.setCanvas(IESI_display);
|
||||
var dlg = canvas.Window.new([512, 512], "dialog").set("resize", 1);
|
||||
dlg.setCanvas(A320IESI.MainScreen.canvas);
|
||||
}
|
||||
|
||||
setlistener("", func() { if (A320IESI.MainScreen != nil) { A320IESI.MainScreen.updateQNH(notification); } }, 0, 0);
|
||||
|
||||
var roundabout = func(x) {
|
||||
var y = x - int(x);
|
||||
return y < 0.5 ? int(x) : 1 + int(x);
|
||||
|
|
|
@ -63,6 +63,7 @@ var myCockpit_switches = {
|
|||
"toggle_chrono": {path: "/inputs/CHRONO", value: 0, type: "INT"},
|
||||
"toggle_xtrk_error": {path: "/nd/xtrk-error", value: 0, type: "BOOL"},
|
||||
"toggle_trk_line": {path: "/nd/trk-line", value: 0, type: "BOOL"},
|
||||
"ADIRS3": {path: "/nd/ir-3", value: 0, type: "BOOL"},
|
||||
};
|
||||
|
||||
var canvas_nd_base = {
|
||||
|
@ -186,6 +187,8 @@ var canvas_ND_1 = {
|
|||
|
||||
# here we make the ND:
|
||||
me.NDCpt = ND.new("instrumentation/efis", myCockpit_switches, "Airbus");
|
||||
me.NDCpt.attitude_heading_setting = -1;
|
||||
me.NDCpt.adirs_property = props.globals.getNode("/instrumentation/efis[0]/nd/ir-1",1);
|
||||
me.NDCpt.newMFD(canvas_group);
|
||||
me.NDCpt.update();
|
||||
|
||||
|
@ -205,7 +208,10 @@ var canvas_ND_2 = {
|
|||
m.init(canvas_group);
|
||||
|
||||
# here we make the ND:
|
||||
myCockpit_switches["ADIRS"]= {path: "/nd/ir-2", value: 0, type: "BOOL"};
|
||||
me.NDFo = ND.new("instrumentation/efis[1]", myCockpit_switches, "Airbus");
|
||||
me.NDFo.attitude_heading_setting = 1;
|
||||
me.NDFo.adirs_property = props.globals.getNode("/instrumentation/efis[1]/nd/ir-2",1);
|
||||
me.NDFo.newMFD(canvas_group);
|
||||
me.NDFo.update();
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ var _MP_dbg_lvl = canvas._MP_dbg_lvl;
|
|||
var assert_m = canvas.assert_m;
|
||||
|
||||
var wxr_live_tree = "/instrumentation/wxr";
|
||||
var adirs_3 = props.globals.getNode("/instrumentation/efis[0]/nd/ir-3", 1);
|
||||
|
||||
canvas.NavDisplay.set_switch = func(s, v) {
|
||||
var switch = me.efis_switches[s];
|
||||
|
@ -160,6 +161,7 @@ canvas.NavDisplay.newMFD = func(canvas_group, parent=nil, nd_options=nil, update
|
|||
var make_event_handler = func(predicate, layer) func predicate(me, layer);
|
||||
|
||||
me.layers={}; # storage container for all ND specific layers
|
||||
me.predicates={};
|
||||
# look up all required layers as specified per the NDStyle hash and do the initial setup for event handling
|
||||
var default_opts = me.options != nil and contains(me.options, "defaults") ? me.options.defaults : nil;
|
||||
foreach(var layer; me.nd_style.layers) {
|
||||
|
@ -214,6 +216,7 @@ canvas.NavDisplay.newMFD = func(canvas_group, parent=nil, nd_options=nil, update
|
|||
# pass the ND instance and the layer handle to the predicate when it is called
|
||||
# so that it can directly access the ND instance and its own layer (without having to know the layer"s name)
|
||||
var event_handler = make_event_handler(layer.predicate, the_layer);
|
||||
me.predicates[layer.name] = event_handler;
|
||||
foreach(var event; layer.update_on) {
|
||||
# this handles timers
|
||||
if (typeof(event)=="hash" and contains(event, "rate_hz")) {
|
||||
|
@ -433,7 +436,7 @@ canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft spec
|
|||
me.symbols.selHdgLine2.setRotation(hdgBugRot);
|
||||
}
|
||||
|
||||
var staPtrVis = !me.in_mode("toggle_display_mode", ["PLAN"]);
|
||||
var staPtrVis = (!me.in_mode("toggle_display_mode", ["PLAN"]) and (me.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == me.attitude_heading_setting)));
|
||||
if((me.in_mode("toggle_display_mode", ["MAP"]) and me.get_switch("toggle_display_type") == "CRT")
|
||||
or (me.get_switch("toggle_track_heading") and me.get_switch("toggle_display_type") == "LCD"))
|
||||
{
|
||||
|
@ -459,7 +462,7 @@ canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft spec
|
|||
var adf1hdg = getprop("/instrumentation/adf[1]/indicated-bearing-deg");
|
||||
if(!me.get_switch("toggle_centered"))
|
||||
{
|
||||
if(me.in_mode("toggle_display_mode", ["PLAN"]))
|
||||
if(me.in_mode("toggle_display_mode", ["PLAN"]) or (me.adirs_property.getValue() != 1 and (adirs_3.getValue() != 1 or att_switch.getValue() != me.attitude_heading_setting)))
|
||||
me.symbols.trkInd.hide();
|
||||
else
|
||||
me.symbols.trkInd.show();
|
||||
|
|
File diff suppressed because it is too large
Load diff
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 134 KiB |
|
@ -7,6 +7,9 @@
|
|||
var ALWAYS = func 1;
|
||||
var NOTHING = func nil;
|
||||
|
||||
var att_switch = props.globals.getNode("/controls/navigation/switching/att-hdg", 1);
|
||||
var adirs_3 = props.globals.getNode("/instrumentation/efis[0]/nd/ir-3", 1);
|
||||
|
||||
canvas.NDStyles["Airbus"] = {
|
||||
font_mapper: func(family, weight) {
|
||||
if( family == "Liberation Sans" and weight == "normal" )
|
||||
|
@ -86,7 +89,7 @@ canvas.NDStyles["Airbus"] = {
|
|||
predicate: func(nd, layer) {
|
||||
var visible=nd.get_switch("toggle_weather") and
|
||||
nd.get_switch("toggle_weather_live") and
|
||||
nd.get_switch("toggle_display_mode") != "PLAN";
|
||||
nd.get_switch("toggle_display_mode") != "PLAN" and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
|
||||
layer.group.setVisible(visible);
|
||||
if (visible) {
|
||||
layer.update();
|
||||
|
@ -105,7 +108,7 @@ canvas.NDStyles["Airbus"] = {
|
|||
#print("Running storms predicate");
|
||||
var visible=nd.get_switch("toggle_weather") and
|
||||
!nd.get_switch("toggle_weather_live") and
|
||||
nd.get_switch("toggle_display_mode") != "PLAN";
|
||||
nd.get_switch("toggle_display_mode") != "PLAN" and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
|
||||
layer.group.setVisible(visible);
|
||||
if (visible) {
|
||||
#print("storms update requested! (timer issue when closing the dialog?)");
|
||||
|
@ -122,7 +125,7 @@ canvas.NDStyles["Airbus"] = {
|
|||
predicate: func(nd, layer) {
|
||||
var visible = nd.get_switch("toggle_waypoints") and
|
||||
nd.in_mode("toggle_display_mode", ["MAP"]) and
|
||||
(nd.rangeNm() <= 40);
|
||||
(nd.rangeNm() <= 40) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
|
||||
layer.group.setVisible( visible );
|
||||
if (visible)
|
||||
layer.update();
|
||||
|
@ -151,7 +154,7 @@ canvas.NDStyles["Airbus"] = {
|
|||
isMapStructure: 1,
|
||||
update_on: ["toggle_display_mode","toggle_range",{rate_hz: 2}],
|
||||
predicate: func(nd, layer) {
|
||||
var visible = nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]);# and nd.get_switch("toggle_fplan");
|
||||
var visible = nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
|
||||
layer.group.setVisible( visible );
|
||||
if (visible) {
|
||||
layer.update();
|
||||
|
@ -237,7 +240,7 @@ canvas.NDStyles["Airbus"] = {
|
|||
"toggle_display_mode"],
|
||||
predicate: func(nd, layer) {
|
||||
var visible = nd.get_switch("toggle_airports") and
|
||||
nd.in_mode("toggle_display_mode", ["MAP"]);
|
||||
nd.in_mode("toggle_display_mode", ["MAP"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
|
||||
layer.group.setVisible( visible );
|
||||
if (visible) {
|
||||
layer.update();
|
||||
|
@ -260,7 +263,7 @@ canvas.NDStyles["Airbus"] = {
|
|||
# toggle visibility here
|
||||
var visible = nd.get_switch("toggle_vor") and
|
||||
nd.in_mode("toggle_display_mode", ["MAP"]) and
|
||||
(nd.rangeNm() <= 40);
|
||||
(nd.rangeNm() <= 40) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
|
||||
layer.group.setVisible( visible );
|
||||
if (visible) {
|
||||
layer.update();
|
||||
|
@ -289,7 +292,7 @@ canvas.NDStyles["Airbus"] = {
|
|||
predicate: func(nd, layer) {
|
||||
var visible = nd.get_switch("toggle_dme") and
|
||||
nd.in_mode("toggle_display_mode", ["MAP"]) and
|
||||
(nd.rangeNm() <= 40);
|
||||
(nd.rangeNm() <= 40) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
|
||||
# toggle visibility here
|
||||
layer.group.setVisible( visible );
|
||||
if (visible) {
|
||||
|
@ -322,7 +325,7 @@ canvas.NDStyles["Airbus"] = {
|
|||
predicate: func(nd, layer) {
|
||||
var visible = nd.get_switch("toggle_ndb") and
|
||||
nd.in_mode("toggle_display_mode", ["MAP"]) and
|
||||
(nd.rangeNm() <= 40);
|
||||
(nd.rangeNm() <= 40) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
|
||||
# print("Running vor layer predicate");
|
||||
# toggle visibility here
|
||||
layer.group.setVisible( visible );
|
||||
|
@ -389,7 +392,6 @@ canvas.NDStyles["Airbus"] = {
|
|||
var visible = nd.get_switch("toggle_traffic");
|
||||
layer.group.setVisible( visible );
|
||||
if (visible) {
|
||||
#print("Updating MapStructure ND layer: TFC");
|
||||
layer.update();
|
||||
}
|
||||
}, # end of layer update predicate
|
||||
|
@ -400,7 +402,7 @@ canvas.NDStyles["Airbus"] = {
|
|||
update_on:["toggle_range","toggle_display_mode"],
|
||||
predicate: func(nd, layer) {
|
||||
var visible = (nd.rangeNm() <= 40) and
|
||||
nd.in_mode("toggle_display_mode", ["MAP","PLAN"]) ;
|
||||
nd.in_mode("toggle_display_mode", ["MAP","PLAN"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)) ;
|
||||
layer.group.setVisible( visible );
|
||||
if (visible) {
|
||||
layer.update();
|
||||
|
@ -420,7 +422,7 @@ canvas.NDStyles["Airbus"] = {
|
|||
always_update: 1,
|
||||
update_on:["toggle_range","toggle_display_mode","toggle_wpt_idx"],
|
||||
predicate: func(nd, layer) {
|
||||
var visible= nd.in_mode("toggle_display_mode", ["MAP","PLAN"]);
|
||||
var visible= nd.in_mode("toggle_display_mode", ["MAP","PLAN"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
|
||||
layer.group.setVisible( visible );
|
||||
if (visible) {
|
||||
layer.update();
|
||||
|
@ -452,7 +454,7 @@ canvas.NDStyles["Airbus"] = {
|
|||
update_on:["toggle_range","toggle_display_mode", "toggle_cstr",
|
||||
"toggle_wpt_idx"],
|
||||
predicate: func(nd, layer) {
|
||||
var visible= (nd.in_mode("toggle_display_mode", ["MAP","PLAN"]));
|
||||
var visible= (nd.in_mode("toggle_display_mode", ["MAP","PLAN"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)));
|
||||
layer.group.setVisible( visible );
|
||||
if (visible) {
|
||||
layer.update();
|
||||
|
@ -517,7 +519,7 @@ canvas.NDStyles["Airbus"] = {
|
|||
missed_constraint_color: [1,0.57,0.14]
|
||||
},
|
||||
predicate: func(nd, layer) {
|
||||
var visible= (nd.in_mode("toggle_display_mode", ["MAP","PLAN"]));
|
||||
var visible= (nd.in_mode("toggle_display_mode", ["MAP","PLAN"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)));
|
||||
layer.group.setVisible( visible );
|
||||
if (visible) {
|
||||
layer.toggle_cstr = nd.get_switch("toggle_cstr");
|
||||
|
@ -542,7 +544,7 @@ canvas.NDStyles["Airbus"] = {
|
|||
isMapStructure: 1,
|
||||
update_on: ["toggle_display_mode","toggle_range",{rate_hz: 2}],
|
||||
predicate: func(nd, layer) {
|
||||
var visible = nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]);
|
||||
var visible = nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
|
||||
layer.group.setVisible( visible );
|
||||
if (visible) {
|
||||
layer.update();
|
||||
|
@ -563,7 +565,7 @@ canvas.NDStyles["Airbus"] = {
|
|||
isMapStructure: 1,
|
||||
update_on: ["toggle_display_mode","toggle_range"],
|
||||
predicate: func(nd, layer) {
|
||||
var visible = nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]);
|
||||
var visible = nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
|
||||
layer.group.setVisible( visible );
|
||||
if (visible) {
|
||||
layer.update();
|
||||
|
@ -593,7 +595,7 @@ canvas.NDStyles["Airbus"] = {
|
|||
always_update: 1,
|
||||
update_on:["toggle_display_mode"],
|
||||
predicate: func(nd, layer) {
|
||||
var visible = nd.get_switch("toggle_display_mode") == "PLAN";
|
||||
var visible = (nd.get_switch("toggle_display_mode") == "PLAN" and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)));
|
||||
layer.group.setVisible( visible );
|
||||
if (visible) {
|
||||
layer.update();
|
||||
|
@ -671,6 +673,24 @@ canvas.NDStyles["Airbus"] = {
|
|||
is_false: func(nd) nd.symbols.compass_mask_ctr.hide(),
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "nd_warn_memo",
|
||||
impl: {
|
||||
init: func(nd, symbol),
|
||||
predicate: ALWAYS,
|
||||
is_true: func(nd) nd.symbols.nd_warn_memo.hide(),
|
||||
is_false: func(nd),
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "nd_warn_msgbox",
|
||||
impl: {
|
||||
init: func(nd, symbol),
|
||||
predicate: ALWAYS,
|
||||
is_true: func(nd) nd.symbols.nd_warn_msgbox.hide(),
|
||||
is_false: func(nd),
|
||||
},
|
||||
},
|
||||
{
|
||||
# TODO: taOnly doesn"t need to use getprop polling in update(), use a listener instead!
|
||||
id: "taOnly", # the SVG ID
|
||||
|
@ -742,7 +762,7 @@ canvas.NDStyles["Airbus"] = {
|
|||
init: func(nd,symbol),
|
||||
predicate: func(nd) getprop("/FMGC/flightplan[2]/current-leg") != nil and
|
||||
getprop("/FMGC/flightplan[2]/active") and
|
||||
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
|
||||
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)),
|
||||
is_true: func(nd) {
|
||||
nd.symbols.wpActiveId.setText(getprop("/FMGC/flightplan[2]/current-leg"));
|
||||
nd.symbols.wpActiveId.show();
|
||||
|
@ -756,7 +776,7 @@ canvas.NDStyles["Airbus"] = {
|
|||
init: func(nd,symbol),
|
||||
predicate: func(nd) getprop("/FMGC/flightplan[2]/current-leg") != nil and
|
||||
getprop("/FMGC/flightplan[2]/active") and
|
||||
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
|
||||
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)),
|
||||
is_true: func(nd) {
|
||||
#var cur_wp = getprop("/autopilot/route-manager/current-wp");
|
||||
var deg = nil;
|
||||
|
@ -779,9 +799,10 @@ canvas.NDStyles["Airbus"] = {
|
|||
id: "wpActiveDist",
|
||||
impl: {
|
||||
init: func(nd,symbol),
|
||||
predicate: func(nd) getprop("/FMGC/flightplan[2]/current-leg-dist") != nil and
|
||||
predicate: func(nd) (getprop("/FMGC/flightplan[2]/current-leg-dist") != nil and
|
||||
getprop("/FMGC/flightplan[2]/active") and
|
||||
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
|
||||
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"])
|
||||
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
|
||||
is_true: func(nd) {
|
||||
var dst = getprop("/FMGC/flightplan[2]/current-leg-dist");
|
||||
nd.symbols.wpActiveDist.setText(sprintf("%3.01f",dst));
|
||||
|
@ -794,7 +815,8 @@ canvas.NDStyles["Airbus"] = {
|
|||
id: "wpActiveDistLbl",
|
||||
impl: {
|
||||
init: func(nd,symbol),
|
||||
predicate: func(nd) getprop("/FMGC/flightplan[2]/current-leg-dist") != nil and getprop("/FMGC/flightplan[2]/active") and nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
|
||||
predicate: func(nd) getprop("/FMGC/flightplan[2]/current-leg-dist") != nil and getprop("/FMGC/flightplan[2]/active") and nd.in_mode("toggle_display_mode", ["MAP", "PLAN"])
|
||||
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)),
|
||||
is_true: func(nd) {
|
||||
nd.symbols.wpActiveDistLbl.show();
|
||||
if(getprop("/FMGC/flightplan[2]/current-leg-dist") > 1000)
|
||||
|
@ -807,7 +829,8 @@ canvas.NDStyles["Airbus"] = {
|
|||
id: "eta",
|
||||
impl: {
|
||||
init: func(nd,symbol),
|
||||
predicate: func(nd) getprop("/autopilot/route-manager/wp/eta") != nil and getprop("/FMGC/flightplan[2]/active") and nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
|
||||
predicate: func(nd) getprop("/autopilot/route-manager/wp/eta") != nil and getprop("/FMGC/flightplan[2]/active") and nd.in_mode("toggle_display_mode", ["MAP", "PLAN"])
|
||||
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)),
|
||||
is_true: func(nd) {
|
||||
var etaSec = getprop("/sim/time/utc/day-seconds")+
|
||||
getprop("/autopilot/route-manager/wp/eta-seconds");
|
||||
|
@ -900,11 +923,70 @@ canvas.NDStyles["Airbus"] = {
|
|||
is_false: func(nd) {},#nd.symbols.gs.hide(),
|
||||
},
|
||||
},
|
||||
{
|
||||
id:"nd_warn_hdg",
|
||||
impl: {
|
||||
init: func(nd,symbol),
|
||||
common: func(nd),
|
||||
predicate: func(nd) (nd.adirs_property.getValue() != 1 and (adirs_3.getValue() != 1 or att_switch.getValue() != nd.attitude_heading_setting)),
|
||||
is_true: func(nd) {
|
||||
nd.symbols.nd_warn_hdg.show();
|
||||
},
|
||||
is_false: func(nd) {
|
||||
nd.symbols.nd_warn_hdg.hide();
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id:"nd_warn_map",
|
||||
impl: {
|
||||
init: func(nd,symbol),
|
||||
common: func(nd),
|
||||
predicate: func(nd) (nd.adirs_property.getValue() != 1 and (adirs_3.getValue() != 1 or att_switch.getValue() != nd.attitude_heading_setting)),
|
||||
is_true: func(nd) {
|
||||
nd.symbols.nd_warn_map.show();
|
||||
},
|
||||
is_false: func(nd) {
|
||||
nd.symbols.nd_warn_map.hide();
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id:"unavailARC",
|
||||
impl: {
|
||||
init: func(nd,symbol),
|
||||
common: func(nd),
|
||||
predicate: func(nd) (!nd.get_switch("toggle_centered") and nd.get_switch("toggle_display_mode") != "PLAN"
|
||||
and (nd.adirs_property.getValue() != 1 and (adirs_3.getValue() != 1 or att_switch.getValue() != nd.attitude_heading_setting))),
|
||||
is_true: func(nd) {
|
||||
nd.symbols.unavailARC.show();
|
||||
},
|
||||
is_false: func(nd) {
|
||||
nd.symbols.unavailARC.hide();
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id:"unavailNAV",
|
||||
impl: {
|
||||
init: func(nd,symbol),
|
||||
common: func(nd),
|
||||
predicate: func(nd) (nd.get_switch("toggle_centered")
|
||||
and (nd.adirs_property.getValue() != 1 and (adirs_3.getValue() != 1 or att_switch.getValue() != nd.attitude_heading_setting))),
|
||||
is_true: func(nd) {
|
||||
nd.symbols.unavailNAV.show();
|
||||
},
|
||||
is_false: func(nd) {
|
||||
nd.symbols.unavailNAV.hide();
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id:"compass",
|
||||
impl: {
|
||||
init: func(nd,symbol),
|
||||
predicate: func(nd) (!nd.get_switch("toggle_centered") and nd.get_switch("toggle_display_mode") != "PLAN"),
|
||||
predicate: func(nd) (!nd.get_switch("toggle_centered") and nd.get_switch("toggle_display_mode") != "PLAN"
|
||||
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
|
||||
is_true: func(nd) {
|
||||
nd.symbols.compass.setRotation(-nd.userHdgTrk*D2R);
|
||||
nd.symbols.compass.show()
|
||||
|
@ -916,7 +998,8 @@ canvas.NDStyles["Airbus"] = {
|
|||
id:"compassApp",
|
||||
impl: {
|
||||
init: func(nd,symbol),
|
||||
predicate: func(nd) (nd.get_switch("toggle_centered") and nd.get_switch("toggle_display_mode") != "PLAN"),
|
||||
predicate: func(nd) (nd.get_switch("toggle_centered") and nd.get_switch("toggle_display_mode") != "PLAN"
|
||||
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
|
||||
is_true: func(nd) {
|
||||
nd.symbols.compassApp.setRotation(-nd.userHdgTrk*D2R);
|
||||
nd.symbols.compassApp.show()
|
||||
|
@ -928,7 +1011,7 @@ canvas.NDStyles["Airbus"] = {
|
|||
id:"northUp",
|
||||
impl: {
|
||||
init: func(nd,symbol),
|
||||
predicate: func(nd) nd.get_switch("toggle_display_mode") == "PLAN",
|
||||
predicate: func(nd) (nd.get_switch("toggle_display_mode") == "PLAN" and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
|
||||
is_true: func(nd) nd.symbols.northUp.show(),
|
||||
is_false: func(nd) nd.symbols.northUp.hide(),
|
||||
}, # of northUp.impl
|
||||
|
@ -937,7 +1020,8 @@ canvas.NDStyles["Airbus"] = {
|
|||
id:"planArcs",
|
||||
impl: {
|
||||
init: func(nd,symbol),
|
||||
predicate: func(nd) ((nd.in_mode("toggle_display_mode", ["APP","VOR","PLAN"])) or ((nd.get_switch("toggle_display_mode") == "MAP") and (nd.get_switch("toggle_centered")))),
|
||||
predicate: func(nd) (((nd.in_mode("toggle_display_mode", ["APP","VOR","PLAN"])) or ((nd.get_switch("toggle_display_mode") == "MAP") and (nd.get_switch("toggle_centered"))))
|
||||
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
|
||||
is_true: func(nd) nd.symbols.planArcs.show(),
|
||||
is_false: func(nd) nd.symbols.planArcs.hide(),
|
||||
}, # of planArcs.impl
|
||||
|
@ -946,7 +1030,8 @@ canvas.NDStyles["Airbus"] = {
|
|||
id:"rangeArcs",
|
||||
impl: {
|
||||
init: func(nd,symbol),
|
||||
predicate: func(nd) ((nd.get_switch("toggle_display_mode") == "MAP") and (!nd.get_switch("toggle_centered"))),
|
||||
predicate: func(nd) ((nd.get_switch("toggle_display_mode") == "MAP") and (!nd.get_switch("toggle_centered"))
|
||||
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
|
||||
is_true: func(nd) nd.symbols.rangeArcs.show(),
|
||||
is_false: func(nd) nd.symbols.rangeArcs.hide(),
|
||||
}, # of rangeArcs.impl
|
||||
|
@ -1047,7 +1132,8 @@ canvas.NDStyles["Airbus"] = {
|
|||
id:"aplSymMap",
|
||||
impl: {
|
||||
init: func(nd,symbol),
|
||||
predicate: func(nd) (nd.get_switch("toggle_display_mode") == "MAP" and !nd.get_switch("toggle_centered")),
|
||||
predicate: func(nd) (nd.get_switch("toggle_display_mode") == "MAP" and !nd.get_switch("toggle_centered")
|
||||
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
|
||||
is_true: func(nd) {
|
||||
nd.symbols.aplSymMap.set("z-index", 10);
|
||||
nd.symbols.aplSymMap.show();
|
||||
|
@ -1060,7 +1146,8 @@ canvas.NDStyles["Airbus"] = {
|
|||
id:"aplSymMapCtr",
|
||||
impl: {
|
||||
init: func(nd,symbol),
|
||||
predicate: func(nd) ((nd.get_switch("toggle_display_mode") == "MAP" and nd.get_switch("toggle_centered")) or nd.in_mode("toggle_display_mode", ["APP","VOR"])),
|
||||
predicate: func(nd) (((nd.get_switch("toggle_display_mode") == "MAP" and nd.get_switch("toggle_centered")) or nd.in_mode("toggle_display_mode", ["APP","VOR"]))
|
||||
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
|
||||
is_true: func(nd) {
|
||||
nd.symbols.aplSymMapCtr.set("z-index", 10);
|
||||
nd.symbols.aplSymMapCtr.show();
|
||||
|
@ -1157,8 +1244,8 @@ canvas.NDStyles["Airbus"] = {
|
|||
id:"trkInd2",
|
||||
impl: {
|
||||
init: func(nd,symbol),
|
||||
predicate: func(nd) (nd.in_mode("toggle_display_mode", ["APP","VOR","MAP"]) and
|
||||
nd.get_switch("toggle_centered")),
|
||||
predicate: func(nd) (nd.in_mode("toggle_display_mode", ["APP","VOR","MAP"]) and nd.get_switch("toggle_centered")
|
||||
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
|
||||
is_true: func(nd) {
|
||||
nd.symbols.trkInd2.show();
|
||||
nd.symbols.trkInd2.setRotation((nd.aircraft_source.get_trk_mag()-nd.aircraft_source.get_hdg_mag())*D2R);
|
||||
|
@ -1172,7 +1259,8 @@ canvas.NDStyles["Airbus"] = {
|
|||
init: func(nd,symbol),
|
||||
predicate: func(nd) (nd.get_switch("toggle_display_mode") == "MAP" and
|
||||
nd.get_switch("toggle_centered") and
|
||||
getprop(nd.options.defaults.lat_ctrl) != nd.options.defaults.managed_val),
|
||||
getprop(nd.options.defaults.lat_ctrl) != nd.options.defaults.managed_val and
|
||||
(nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
|
||||
is_true: func(nd) {
|
||||
nd.symbols.trkline2.show();
|
||||
},
|
||||
|
|
|
@ -5773,7 +5773,7 @@
|
|||
</condition>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
if (getprop("controls/apu/master") == 1) {
|
||||
if (systems.APUNodes.Controls.master.getBoolValue()) {
|
||||
systems.APUController.APU.startCommand();
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -109,8 +109,8 @@ var athr = props.globals.getNode("/it-autoflight/output/athr", 1);
|
|||
var gear_agl = props.globals.getNode("/position/gear-agl-ft", 1);
|
||||
var aileron_input = props.globals.getNode("/controls/flight/aileron-input-fast", 1);
|
||||
var elevator_input = props.globals.getNode("/controls/flight/elevator-input-fast", 1);
|
||||
var att_switch = props.globals.getNode("/controls/switching/ATTHDG", 1);
|
||||
var air_switch = props.globals.getNode("/controls/switching/AIRDATA", 1);
|
||||
var att_switch = props.globals.getNode("/controls/navigation/switching/att-hdg", 1);
|
||||
var air_switch = props.globals.getNode("/controls/navigation/switching/air-data", 1);
|
||||
var appr_enabled = props.globals.getNode("/it-autoflight/output/appr-armed/", 1);
|
||||
var loc_enabled = props.globals.getNode("/it-autoflight/output/loc-armed/", 1);
|
||||
var vert_gs = props.globals.getNode("/it-autoflight/output/vert/", 1);
|
||||
|
@ -1088,7 +1088,7 @@ var canvas_PFD_1 = {
|
|||
wow2_act = wow2.getValue();
|
||||
|
||||
# Errors
|
||||
if (systems.ADIRS.ADIRunits[0].aligned == 1 or (systems.ADIRS.ADIRunits[2].aligned == 1 and att_switch.getValue() == -1)) {
|
||||
if (systems.ADIRS.ADIRunits[0].operating == 1 or (systems.ADIRS.ADIRunits[2].operating == 1 and att_switch.getValue() == -1)) {
|
||||
me["AI_group"].show();
|
||||
me["HDG_group"].show();
|
||||
me["AI_error"].hide();
|
||||
|
@ -1132,7 +1132,7 @@ var canvas_PFD_1 = {
|
|||
me["FPV"].hide();
|
||||
} else {
|
||||
var aoa = me.getAOAForPFD1();
|
||||
if (aoa == nil or (systems.ADIRS.ADIRunits[0].aligned != 1 and att_switch.getValue() == 0) or (systems.ADIRS.ADIRunits[2].aligned != 1 and att_switch.getValue() == -1)){
|
||||
if (aoa == nil or (systems.ADIRS.ADIRunits[0].operating != 1 and att_switch.getValue() == 0) or (systems.ADIRS.ADIRunits[2].operating != 1 and att_switch.getValue() == -1)){
|
||||
me["FPV"].hide();
|
||||
} else {
|
||||
var roll_deg = roll.getValue() or 0;
|
||||
|
@ -1870,7 +1870,7 @@ var canvas_PFD_2 = {
|
|||
wow2_act = wow2.getValue();
|
||||
|
||||
# Errors
|
||||
if (systems.ADIRS.ADIRunits[1].aligned == 1 or (systems.ADIRS.ADIRunits[2].aligned == 1 and att_switch.getValue() == 1)) {
|
||||
if (systems.ADIRS.ADIRunits[1].operating == 1 or (systems.ADIRS.ADIRunits[2].operating == 1 and att_switch.getValue() == 1)) {
|
||||
me["AI_group"].show();
|
||||
me["HDG_group"].show();
|
||||
me["AI_error"].hide();
|
||||
|
@ -1907,7 +1907,7 @@ var canvas_PFD_2 = {
|
|||
me["FPV"].hide();
|
||||
} else {
|
||||
var aoa = me.getAOAForPFD2();
|
||||
if (aoa == nil or (systems.ADIRS.ADIRunits[1].aligned != 1 and att_switch.getValue() == 0) or (systems.ADIRS.ADIRunits[2].aligned != 1 and att_switch.getValue() == 1)) {
|
||||
if (aoa == nil or (systems.ADIRS.ADIRunits[1].operating != 1 and att_switch.getValue() == 0) or (systems.ADIRS.ADIRunits[2].operating != 1 and att_switch.getValue() == 1)) {
|
||||
me["FPV"].hide();
|
||||
} else {
|
||||
var roll_deg = roll.getValue() or 0;
|
||||
|
|
|
@ -68,6 +68,7 @@ var canvas_upperECAM = {
|
|||
obj[key].set("clip-frame", canvas.Element.PARENT);
|
||||
}
|
||||
};
|
||||
|
||||
canvas.parsesvg(obj.test, "Aircraft/A320-family/Models/Instruments/Common/res/du-test.svg", {"font-mapper": obj.font_mapper} );
|
||||
foreach(var key; obj.getKeysTest()) {
|
||||
obj[key] = obj.test.getElementById(key);
|
||||
|
@ -451,8 +452,6 @@ var canvas_upperECAM = {
|
|||
obj["ECAMR7"].setFont("LiberationMonoCustom.ttf");
|
||||
obj["ECAMR8"].setFont("LiberationMonoCustom.ttf");
|
||||
|
||||
obj.page = obj.group;
|
||||
|
||||
# cache
|
||||
obj._cachedN1 = [nil, nil];
|
||||
obj._cachedN2 = [nil, nil];
|
||||
|
@ -973,15 +972,14 @@ var UpperECAMRecipient =
|
|||
EWDRecipient.MainScreen = canvas_upperECAM.new("Aircraft/A320-family/Models/Instruments/Upper-ECAM/res/cfm-eis2.svg", "A320 E/WD CFM", "CFM");
|
||||
}
|
||||
}
|
||||
|
||||
#if (!math.mod(notifications.frameNotification.FrameCount,2)){
|
||||
if (math.mod(notifications.frameNotification.FrameCount,2) == 0) {
|
||||
if (EWDRecipient.type) {
|
||||
EWDRecipient.MainScreen.updateIAE(notification);
|
||||
} else {
|
||||
EWDRecipient.MainScreen.updateCFM(notification);
|
||||
|
||||
}
|
||||
#}
|
||||
}
|
||||
return emesary.Transmitter.ReceiptStatus_OK;
|
||||
}
|
||||
return emesary.Transmitter.ReceiptStatus_NotProcessed;
|
||||
|
@ -1090,7 +1088,7 @@ var showUpperECAM = func {
|
|||
}
|
||||
|
||||
setlistener("/systems/electrical/bus/ac-ess", func() {
|
||||
A320EWD.MainScreen.powerTransient();
|
||||
if (A320EWD.MainScreen != nil) { A320EWD.MainScreen.powerTransient() }
|
||||
}, 0, 0);
|
||||
|
||||
var slatLockTimer = maketimer(0.50, func {
|
||||
|
|
BIN
Models/Liveries/A320/PW-NEO/Alitalia-eng.png
Normal file
BIN
Models/Liveries/A320/PW-NEO/Alitalia-eng.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 131 KiB |
BIN
Models/Liveries/A320/PW-NEO/Alitalia.png
Normal file
BIN
Models/Liveries/A320/PW-NEO/Alitalia.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 509 KiB |
14
Models/Liveries/A320/PW-NEO/Alitalia.xml
Normal file
14
Models/Liveries/A320/PW-NEO/Alitalia.xml
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<PropertyList>
|
||||
<sim>
|
||||
<model>
|
||||
<livery>
|
||||
<name>Alitalia EI-MSK</name>
|
||||
<texture>Liveries/A320/PW-NEO/Alitalia.png</texture>
|
||||
</livery>
|
||||
<eng>
|
||||
<texture>Liveries/A320/PW-NEO/Alitalia-eng.png</texture>
|
||||
</eng>
|
||||
</model>
|
||||
</sim>
|
||||
</PropertyList>
|
|
@ -35,8 +35,8 @@ var _loop = func() {
|
|||
var y = 0.0;
|
||||
var z = 0.0;
|
||||
# Rollspeed is only adequate if the wheel is touching the ground.
|
||||
if (getprop("gear/gear[0]/wow")) {
|
||||
var V = getprop("gear/gear[0]/rollspeed-ms") * 3.6;
|
||||
if (getprop("/gear/gear[0]/wow")) {
|
||||
var V = getprop("/gear/gear[0]/rollspeed-ms") * 3.6;
|
||||
var deltaV = getprop("/sim/model/autopush/target-speed-km_h") - V;
|
||||
var minus_dV = _V - V;
|
||||
var time = getprop("/sim/time/elapsed-sec");
|
||||
|
@ -59,9 +59,9 @@ var _loop = func() {
|
|||
_V = V;
|
||||
_time = time;
|
||||
if (!_yasim) {
|
||||
force = accel * getprop("fdm/jsbsim/inertia/weight-lbs") * _unitconv;
|
||||
force = accel * getprop("/fdm/jsbsim/inertia/weight-lbs") * _unitconv;
|
||||
} else {
|
||||
force = accel * getprop("fdm/yasim/gross-weight-lbs") * _unitconv;
|
||||
force = accel * getprop("/fdm/yasim/gross-weight-lbs") * _unitconv;
|
||||
}
|
||||
var pitch = getprop("/sim/model/autopush/pitch-deg") * D2R;
|
||||
z = math.sin(pitch);
|
||||
|
@ -85,12 +85,13 @@ var _loop = func() {
|
|||
}
|
||||
|
||||
var _timer = maketimer(0.0167, func{_loop()});
|
||||
_timer.simulatedTime = 1;
|
||||
|
||||
var _start = func() {
|
||||
# Else overwritten by dialog.
|
||||
settimer(func() {
|
||||
setprop("/sim/model/autopush/target-speed-km_h", 0.0)
|
||||
}, 0.1);
|
||||
}, 0.1, 1);
|
||||
_K_p = getprop("/sim/model/autopush/K_p");
|
||||
_F_p = getprop("/sim/model/autopush/F_p");
|
||||
_K_i = getprop("/sim/model/autopush/K_i");
|
||||
|
|
|
@ -54,7 +54,7 @@ var _loop = func() {
|
|||
D *= NM2M;
|
||||
var (psi_leg, D_leg) = courseAndDistance(_route[_to_wp - 1], _route[_to_wp]);
|
||||
var deltapsi = geo.normdeg180(A - psi_leg);
|
||||
var psi = getprop("orientation/heading-deg") + _push * 180.0;
|
||||
var psi = getprop("/orientation/heading-deg") + _push * 180.0;
|
||||
var deltaA = math.min(math.max(_K_psi * geo.normdeg180(A - psi), -_F_psi), _F_psi);
|
||||
var time = getprop("/sim/time/elapsed-sec");
|
||||
var dt = time - _time;
|
||||
|
@ -88,6 +88,7 @@ var _loop = func() {
|
|||
}
|
||||
|
||||
var _timer = maketimer(0.051, func{_loop()});
|
||||
_timer.simulatedTime = 1;
|
||||
|
||||
var _done = func() {
|
||||
stop();
|
||||
|
@ -123,7 +124,7 @@ var start = func() {
|
|||
_debug = getprop("/sim/model/autopush/debug") or 0;
|
||||
if (!_to_wp) {
|
||||
var (psi_park, D_park) = courseAndDistance(_route[0], _route[1]);
|
||||
_push = (abs(geo.normdeg180(getprop("orientation/heading-deg") - psi_park)) > 90.0);
|
||||
_push = (abs(geo.normdeg180(getprop("/orientation/heading-deg") - psi_park)) > 90.0);
|
||||
_sign = 1.0 - 2.0 * _push;
|
||||
_advance_wp();
|
||||
_psi = 0.0;
|
|
@ -89,7 +89,7 @@ var _stop = func(fail = 0) {
|
|||
settimer(func() {
|
||||
_finalize_top_view();
|
||||
gui.popupTip("Done");
|
||||
}, 1.0);
|
||||
}, 1.0, 1);
|
||||
} else {
|
||||
_finalize_top_view();
|
||||
}
|
||||
|
@ -365,12 +365,12 @@ var enter = func() {
|
|||
var wingspan = getprop("/sim/model/autopush/route/wingspan-m");
|
||||
if ((wingspan == nil) or (wingspan == 0.0)) {
|
||||
# JSBSim
|
||||
wingspan = getprop("fdm/jsbsim/metrics/bw-ft");
|
||||
wingspan = getprop("/fdm/jsbsim/metrics/bw-ft");
|
||||
if (wingspan != nil) {
|
||||
wingspan *= FT2M;
|
||||
} else {
|
||||
# YAsim
|
||||
wingspan = getprop("fdm/yasim/model/wings/wing/wing-span");
|
||||
wingspan = getprop("/fdm/yasim/model/wings/wing/wing-span");
|
||||
}
|
||||
setprop("/sim/model/autopush/route/wingspan-m", wingspan);
|
||||
}
|
|
@ -26,6 +26,7 @@ var flash = 0;
|
|||
var hasCleared = 0;
|
||||
var statusFlag = 0;
|
||||
var counter = 0;
|
||||
var counterClear = 0;
|
||||
var noMainMsg = 0;
|
||||
var storeFirstWarning = nil;
|
||||
|
||||
|
@ -260,22 +261,16 @@ var status = {
|
|||
var ECAM_controller = {
|
||||
_recallCounter: 0,
|
||||
_noneActive: 0,
|
||||
counter: 0,
|
||||
_ready: 0,
|
||||
init: func() {
|
||||
ECAMloopTimer.start();
|
||||
me.counter = 0;
|
||||
me.reset();
|
||||
me._ready = 1;
|
||||
},
|
||||
loop: func() {
|
||||
loop: func(notification) {
|
||||
if (!me._ready) {
|
||||
return;
|
||||
}
|
||||
if ((systems.ELEC.Bus.acEss.getValue() >= 110 or systems.ELEC.Bus.ac2.getValue() >= 110) and !pts.Acconfig.running.getBoolValue()) {
|
||||
# update FWC phases
|
||||
if (me.counter == 0) {
|
||||
phaseLoop();
|
||||
me.counter = 1;
|
||||
return;
|
||||
}
|
||||
me.counter = 0;
|
||||
|
||||
# check active messages
|
||||
messages_priority_3();
|
||||
messages_priority_2();
|
||||
|
@ -303,7 +298,7 @@ var ECAM_controller = {
|
|||
}
|
||||
|
||||
# write to ECAM
|
||||
var counter = 0;
|
||||
counter = 0;
|
||||
|
||||
if (!pts.Acconfig.running.getBoolValue()) {
|
||||
foreach (var w; warnings.vector) {
|
||||
|
@ -352,6 +347,7 @@ var ECAM_controller = {
|
|||
}
|
||||
},
|
||||
reset: func() {
|
||||
me._ready = 0;
|
||||
foreach (var w; warnings.vector) {
|
||||
if (w.active == 1) {
|
||||
w.active = 0;
|
||||
|
@ -390,15 +386,15 @@ var ECAM_controller = {
|
|||
},
|
||||
clear: func() {
|
||||
hasCleared = 0;
|
||||
counter = 0;
|
||||
counterClear = 0;
|
||||
noMainMsg = 0;
|
||||
storeFirstWarning = nil;
|
||||
|
||||
# first go through the first eight, see how many mainMsg there are
|
||||
foreach (var w; warnings.vector) {
|
||||
if (counter >= 8) { break; }
|
||||
if (counterClear >= 8) { break; }
|
||||
if (w.active == 1 and w.clearFlag != 1 and w.isMemo != 1) {
|
||||
counter += 1;
|
||||
counterClear += 1;
|
||||
if (w.isMainMsg == 1) {
|
||||
if (noMainMsg == 0) {
|
||||
storeFirstWarning = w;
|
||||
|
@ -410,11 +406,11 @@ var ECAM_controller = {
|
|||
|
||||
# then, if there is an overflow and noMainMsg == 1, we clear the first shown ones
|
||||
if (leftOverflow.getBoolValue() and noMainMsg == 1) {
|
||||
counter = 0;
|
||||
counterClear = 0;
|
||||
foreach (var w; warnings.vector) {
|
||||
if (counter >= 8) { break; }
|
||||
if (counterClear >= 8) { break; }
|
||||
if (w.active == 1 and w.clearFlag != 1 and w.isMemo != 1) {
|
||||
counter += 1;
|
||||
counterClear += 1;
|
||||
if (w.isMainMsg == 1) { continue; }
|
||||
w.clearFlag = 1;
|
||||
hasCleared = 1;
|
||||
|
@ -482,10 +478,6 @@ setlistener("/systems/electrical/bus/dc-ess", func {
|
|||
}
|
||||
}, 0, 0);
|
||||
|
||||
var ECAMloopTimer = maketimer(0.15, func {
|
||||
ECAM_controller.loop();
|
||||
});
|
||||
|
||||
# Flash Master Warning Light
|
||||
var shutUpYou = func() {
|
||||
lights[0].setBoolValue(0);
|
||||
|
|
|
@ -1314,12 +1314,18 @@ var messages_priority_2 = func {
|
|||
ECAM_controller.warningReset(athr_lim_1);
|
||||
}
|
||||
|
||||
if (getprop("instrumentation/tcas/serviceable") == 0 and phaseVar2 != 3 and phaseVar2 != 4 and phaseVar2 != 7 and systems.ELEC.Bus.ac1.getValue() >= 110 and pts.Instrumentation.TCAS.Inputs.mode.getValue() != 1 and tcasFault.clearFlag == 0) {
|
||||
if (getprop("/instrumentation/tcas/serviceable") == 0 and phaseVar2 != 1 and phaseVar2 != 3 and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8 and phaseVar2 != 10 and systems.ELEC.Bus.ac1.getValue() >= 110 and pts.Instrumentation.TCAS.Inputs.mode.getValue() != 1 and tcasFault.clearFlag == 0) {
|
||||
tcasFault.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(tcasFault);
|
||||
}
|
||||
|
||||
if (phaseVar2 == 6 and pts.Instrumentation.TCAS.Inputs.mode.getValue() == 1 and !tcasFault.active and (atc.Transponders.vector[0].condition != 0 and atc.Transponders.vector[1].condition != 0) and tcasStby.clearFlag == 0) {
|
||||
tcasStby.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(tcasStby);
|
||||
}
|
||||
|
||||
if (gpwsTerrFault.clearFlag == 0 and warningNodes.Timers.navTerrFault.getValue() == 1 and (phaseVar2 == 2 or phaseVar2 == 6 or phaseVar2 == 7 or phaseVar2 == 9)) {
|
||||
gpwsTerrFault.active = 1;
|
||||
|
||||
|
@ -2552,6 +2558,17 @@ var messages_right_memo = func {
|
|||
ignition.active = 0;
|
||||
}
|
||||
|
||||
if ((atc.Transponders.vector[0].condition == 0 and atc.Transponders.vector[1].condition == 0) or (!getprop("/systems/navigation/adr/operating-1") and !getprop("/systems/navigation/adr/operating-2") and !getprop("/systems/navigation/adr/operating-3")) or pts.Instrumentation.TCAS.Inputs.mode.getValue() == 1) {
|
||||
if (phaseVarMemo3 == 6) {
|
||||
tcas_stby.colour = "a";
|
||||
} else {
|
||||
tcas_stby.colour = "g";
|
||||
}
|
||||
tcas_stby.active = 1;
|
||||
} else {
|
||||
tcas_stby.active = 0;
|
||||
}
|
||||
|
||||
if ((phaseVarMemo3 <= 2 or phaseVarMemo3 == 6 or phaseVarMemo3 >= 9) and atsu.CompanyCall.frequency != 999.99 and !atsu.CompanyCall.received) {
|
||||
company_call.active = 1;
|
||||
} else {
|
||||
|
|
|
@ -5,17 +5,12 @@
|
|||
|
||||
var ap_active = 0;
|
||||
var athr_active = 0;
|
||||
var phase = 0;
|
||||
var aileron = 0;
|
||||
var elevator = 0;
|
||||
var stateL = 0;
|
||||
var stateR = 0;
|
||||
var engModeSel = 0;
|
||||
var APUMaster = 0;
|
||||
var APURPM = 0;
|
||||
var elapsedSec = 0;
|
||||
var gearDown = 0;
|
||||
var agl = 0;
|
||||
var apOffTime = 0;
|
||||
var athrOffTime = 0;
|
||||
var apWarnNode = 0;
|
||||
|
@ -23,165 +18,128 @@ var athrWarnNode = 0;
|
|||
var engStrtTimeSw = 0;
|
||||
var engStrtTime = 0;
|
||||
var page = 0;
|
||||
var apuLight = 0;
|
||||
var bleedLight = 0;
|
||||
var condLight = 0;
|
||||
var doorLight = 0;
|
||||
var elecLight = 0;
|
||||
var engLight = 0;
|
||||
var fctlLight = 0;
|
||||
var fuelLight = 0;
|
||||
var hydLight = 0;
|
||||
var pressLight = 0;
|
||||
var stsLight = 0;
|
||||
var wheelLight = 0;
|
||||
var clrLight = 0;
|
||||
|
||||
var ECAM = {
|
||||
_cachePage: "",
|
||||
init: func() {
|
||||
setprop("/systems/gear/landing-gear-warning-light", 0);
|
||||
page = props.globals.initNode("/ECAM/Lower/page", "door", "STRING");
|
||||
apuLight = props.globals.initNode("/ECAM/Lower/light/apu", 0, "BOOL");
|
||||
bleedLight = props.globals.initNode("/ECAM/Lower/light/bleed", 0, "BOOL");
|
||||
condLight = props.globals.initNode("/ECAM/Lower/light/cond", 0, "BOOL");
|
||||
doorLight = props.globals.initNode("/ECAM/Lower/light/door", 0, "BOOL");
|
||||
elecLight = props.globals.initNode("/ECAM/Lower/light/elec", 0, "BOOL");
|
||||
engLight = props.globals.initNode("/ECAM/Lower/light/eng", 0, "BOOL");
|
||||
fctlLight = props.globals.initNode("/ECAM/Lower/light/fctl", 0, "BOOL");
|
||||
fuelLight = props.globals.initNode("/ECAM/Lower/light/fuel", 0, "BOOL");
|
||||
hydLight = props.globals.initNode("/ECAM/Lower/light/hyd", 0, "BOOL");
|
||||
pressLight = props.globals.initNode("/ECAM/Lower/light/press", 0, "BOOL");
|
||||
stsLight = props.globals.initNode("/ECAM/Lower/light/sts", 0, "BOOL");
|
||||
wheelLight = props.globals.initNode("/ECAM/Lower/light/wheel", 0, "BOOL");
|
||||
clrLight = props.globals.initNode("/ECAM/Lower/light/clr", 0, "BOOL");
|
||||
|
||||
phase = props.globals.initNode("/ECAM/warning-phase", 0, "INT");
|
||||
apOffTime = props.globals.initNode("/ECAM/ap-off-time", 0, "INT");
|
||||
athrOffTime = props.globals.initNode("/ECAM/athr-off-time", 0, "INT");
|
||||
apOffTime = props.globals.initNode("/ECAM/warnings/ap-off-time", 0, "INT");
|
||||
athrOffTime = props.globals.initNode("/ECAM/warnings/athr-off-time", 0, "INT");
|
||||
engStrtTimeSw = props.globals.initNode("/ECAM/engine-start-time-switch", 0, "BOOL");
|
||||
engStrtTime = props.globals.initNode("/ECAM/engine-start-time", 0.0, "DOUBLE");
|
||||
apWarnNode = props.globals.initNode("/it-autoflight/output/ap-warning", 0, "INT");
|
||||
athrWarnNode = props.globals.initNode("/it-autoflight/output/athr-warning", 0, "INT");
|
||||
me.reset();
|
||||
},
|
||||
reset: func() {
|
||||
setprop("ECAM/msg/line1", "");
|
||||
setprop("ECAM/msg/line2", "");
|
||||
setprop("ECAM/msg/line3", "");
|
||||
setprop("ECAM/msg/line4", "");
|
||||
setprop("ECAM/msg/line5", "");
|
||||
setprop("ECAM/msg/line6", "");
|
||||
setprop("ECAM/msg/line7", "");
|
||||
setprop("ECAM/msg/line8", "");
|
||||
setprop("ECAM/msg/linec1", "w");
|
||||
setprop("ECAM/msg/linec2", "w");
|
||||
setprop("ECAM/msg/linec3", "w");
|
||||
setprop("ECAM/msg/linec4", "w");
|
||||
setprop("ECAM/msg/linec5", "w");
|
||||
setprop("ECAM/msg/linec6", "w");
|
||||
setprop("ECAM/msg/linec7", "w");
|
||||
setprop("ECAM/msg/linec8", "w");
|
||||
setprop("ECAM/rightmsg/line1", "");
|
||||
setprop("ECAM/rightmsg/line2", "");
|
||||
setprop("ECAM/rightmsg/line3", "");
|
||||
setprop("ECAM/rightmsg/line4", "");
|
||||
setprop("ECAM/rightmsg/line5", "");
|
||||
setprop("ECAM/rightmsg/line6", "");
|
||||
setprop("ECAM/rightmsg/line7", "");
|
||||
setprop("ECAM/rightmsg/line8", "");
|
||||
setprop("ECAM/rightmsg/linec1", "w");
|
||||
setprop("ECAM/rightmsg/linec2", "w");
|
||||
setprop("ECAM/rightmsg/linec3", "w");
|
||||
setprop("ECAM/rightmsg/linec4", "w");
|
||||
setprop("ECAM/rightmsg/linec5", "w");
|
||||
setprop("ECAM/rightmsg/linec6", "w");
|
||||
setprop("ECAM/rightmsg/linec7", "w");
|
||||
setprop("ECAM/rightmsg/linec8", "w");
|
||||
|
||||
page.setValue("door");
|
||||
apuLight.setValue(0);
|
||||
bleedLight.setValue(0);
|
||||
condLight.setValue(0);
|
||||
doorLight.setValue(0);
|
||||
elecLight.setValue(0);
|
||||
engLight.setValue(0);
|
||||
fctlLight.setValue(0);
|
||||
fuelLight.setValue(0);
|
||||
hydLight.setValue(0);
|
||||
pressLight.setValue(0);
|
||||
stsLight.setValue(0);
|
||||
wheelLight.setValue(0);
|
||||
clrLight.setValue(0);
|
||||
},
|
||||
loop: func() {
|
||||
stateL = pts.Engines.Engine.state[0].getValue();
|
||||
stateR = pts.Engines.Engine.state[1].getValue();
|
||||
wow = pts.Gear.wow[0].getValue();
|
||||
elapsedTime = pts.Sim.Time.elapsedSec.getValue();
|
||||
|
||||
if (stateL != 3 or stateR != 3) {
|
||||
if (engStrtTimeSw.getBoolValue()) {
|
||||
update_items: [
|
||||
props.UpdateManager.FromHashList(["ap1","ap2","apWarn"], nil, func(val) {
|
||||
if (val.apWarn == 2 and (val.ap1 or val.ap2)) {
|
||||
apWarnNode.setValue(0);
|
||||
ecam.lights[0].setBoolValue(0);
|
||||
}
|
||||
}),
|
||||
props.UpdateManager.FromHashList(["athr","athrWarn"], nil, func(val) {
|
||||
if (val.athrWarn == 2 and val.athr) {
|
||||
athrWarnNode.setValue(0);
|
||||
}
|
||||
}),
|
||||
props.UpdateManager.FromHashList(["engine1State","engine2State","gear0Wow"], nil, func(val) {
|
||||
if (val.engine1State != 3 or val.engine2State != 3) {
|
||||
engStrtTimeSw.setBoolValue(0);
|
||||
engStrtTime.setValue(0);
|
||||
}
|
||||
} else if (stateL == 3 and stateR == 3 and wow == 1) {
|
||||
if (!engStrtTimeSw.getBoolValue()) {
|
||||
engStrtTime.setValue(elapsedTime);
|
||||
} else if (val.engine1State == 3 and val.engine2State == 3 and val.gear0Wow) {
|
||||
engStrtTime.setValue(val.elapsedTime);
|
||||
engStrtTimeSw.setBoolValue(1);
|
||||
}
|
||||
} else if (wow == 1) {
|
||||
if (engStrtTimeSw.getBoolValue()) {
|
||||
} else if (val.gear0Wow) {
|
||||
engStrtTimeSw.setBoolValue(0);
|
||||
}
|
||||
}),
|
||||
],
|
||||
lights: {
|
||||
"apu": props.globals.initNode("/ECAM/Lower/light/apu", 0, "BOOL"),
|
||||
"bleed": props.globals.initNode("/ECAM/Lower/light/bleed", 0, "BOOL"),
|
||||
"cond": props.globals.initNode("/ECAM/Lower/light/cond", 0, "BOOL"),
|
||||
"door": props.globals.initNode("/ECAM/Lower/light/door", 0, "BOOL"),
|
||||
"elec": props.globals.initNode("/ECAM/Lower/light/elec", 0, "BOOL"),
|
||||
"eng": props.globals.initNode("/ECAM/Lower/light/eng", 0, "BOOL"),
|
||||
"fctl": props.globals.initNode("/ECAM/Lower/light/fctl", 0, "BOOL"),
|
||||
"fuel": props.globals.initNode("/ECAM/Lower/light/fuel", 0, "BOOL"),
|
||||
"hyd": props.globals.initNode("/ECAM/Lower/light/hyd", 0, "BOOL"),
|
||||
"press": props.globals.initNode("/ECAM/Lower/light/press", 0, "BOOL"),
|
||||
"sts": props.globals.initNode("/ECAM/Lower/light/sts", 0, "BOOL"),
|
||||
"wheel": props.globals.initNode("/ECAM/Lower/light/wheel", 0, "BOOL"),
|
||||
"clr": props.globals.initNode("/ECAM/Lower/light/clr", 0, "BOOL"),
|
||||
},
|
||||
reset: func() {
|
||||
for (var i = 0; i <= 8; i = i + 1) {
|
||||
setprop("ECAM/msg/line" ~ i, "");
|
||||
setprop("ECAM/rightmsg/line" ~ i, "");
|
||||
setprop("ECAM/msg/linec" ~ i, "w");
|
||||
setprop("ECAM/rightmsg/linec" ~ i, "w");
|
||||
}
|
||||
|
||||
page.setValue("door");
|
||||
me.lights.apu.setValue(0);
|
||||
me.lights.bleed.setValue(0);
|
||||
me.lights.cond.setValue(0);
|
||||
me.lights.door.setValue(0);
|
||||
me.lights.elec.setValue(0);
|
||||
me.lights.eng.setValue(0);
|
||||
me.lights.fctl.setValue(0);
|
||||
me.lights.fuel.setValue(0);
|
||||
me.lights.hyd.setValue(0);
|
||||
me.lights.press.setValue(0);
|
||||
me.lights.sts.setValue(0);
|
||||
me.lights.wheel.setValue(0);
|
||||
me.lights.clr.setValue(0);
|
||||
},
|
||||
loop: func(notification) {
|
||||
# AP / ATHR warnings
|
||||
if (ap_active == 1 and apWarnNode.getValue() == 0) {
|
||||
if (ap_active == 1 and !notification.apWarn) {
|
||||
ap_active = 0;
|
||||
} elsif (ap_active == 1 and apWarnNode.getValue() == 1 and elapsedTime > (apOffTime.getValue() + 9)) {
|
||||
} elsif (ap_active == 1 and notification.apWarn == 1 and notification.elapsedTime > (notification.apOffTime + 9)) {
|
||||
ap_active = 0;
|
||||
apWarnNode.setValue(0);
|
||||
} elsif (ap_active == 0 and apWarnNode.getValue() != 0) {
|
||||
} elsif (ap_active == 0 and notification.apWarn != 0) {
|
||||
ap_active = 1;
|
||||
}
|
||||
|
||||
if (ap_active == 1 and apWarnNode.getValue() == 1 and elapsedTime > (apOffTime.getValue() + 3) and ecam.lights[0].getBoolValue()) {
|
||||
if (ap_active == 1 and notification.apWarn == 1 and notification.elapsedTime > (notification.apOffTime + 3) and notification.masterWarn) {
|
||||
ecam.lights[0].setBoolValue(0);
|
||||
}
|
||||
|
||||
if (apWarnNode.getValue() == 2 and (fmgc.Output.ap1.getValue() == 1 or fmgc.Output.ap2.getValue() == 1)) {
|
||||
apWarnNode.setValue(0);
|
||||
}
|
||||
|
||||
if (athr_active == 1 and athrWarnNode.getValue() == 0) {
|
||||
if (athr_active == 1 and !notification.athrWarn) {
|
||||
athr_active = 0;
|
||||
} elsif (athr_active == 1 and athrWarnNode.getValue() == 1 and elapsedTime > (athrOffTime.getValue() + 9)) {
|
||||
} elsif (athr_active == 1 and notification.athrWarn == 1 and notification.elapsedTime > (notification.athrOffTime + 9)) {
|
||||
athr_active = 0;
|
||||
athrWarnNode.setValue(0);
|
||||
} elsif (athr_active == 0 and athrWarnNode.getValue() != 0) {
|
||||
} elsif (athr_active == 0 and notification.athrWarn != 0) {
|
||||
athr_active = 1;
|
||||
}
|
||||
|
||||
|
||||
if (athr_active == 1 and athrWarnNode.getValue() == 1 and elapsedTime > (athrOffTime.getValue() + 3) and ecam.lights[1].getBoolValue()) {
|
||||
if (athr_active == 1 and notification.athrWarn == 1 and notification.elapsedTime > (notification.athrOffTime + 3) and notification.masterCaution) {
|
||||
ecam.lights[1].setValue(0);
|
||||
}
|
||||
|
||||
if (athrWarnNode.getValue() == 2 and fmgc.Output.athr.getValue() == 1) {
|
||||
athrWarnNode.setValue(0);
|
||||
foreach (var update_item; me.update_items) {
|
||||
update_item.update(notification);
|
||||
}
|
||||
|
||||
SystemDisplay.update();
|
||||
SystemDisplay.update(notification);
|
||||
|
||||
if (me._cachePage != SystemDisplay.page) {
|
||||
me._cachePage = SystemDisplay.page;
|
||||
page.setValue(SystemDisplay.page);
|
||||
me.updateSDPage(SystemDisplay.page);
|
||||
}
|
||||
},
|
||||
updateSDPage: func(newPage) {
|
||||
me._cachePage = newPage;
|
||||
page.setValue(newPage);
|
||||
},
|
||||
clrLight: func() {
|
||||
clrLight.setValue(1);
|
||||
}
|
||||
me.lights.clr.setValue(1);
|
||||
},
|
||||
};
|
||||
|
||||
var SystemDisplay = {
|
||||
|
@ -217,12 +175,10 @@ var SystemDisplay = {
|
|||
me.page = page;
|
||||
}
|
||||
},
|
||||
update: func() {
|
||||
phase = pts.ECAM.fwcWarningPhase.getValue();
|
||||
update: func(notification) {
|
||||
APUMaster = systems.APUNodes.Controls.master.getValue();
|
||||
APURPM = pts.APU.rpm.getValue();
|
||||
engModeSel = pts.Controls.Engines.startSw.getValue();
|
||||
elapsedSec = pts.Sim.Time.elapsedSec.getValue();
|
||||
|
||||
if (APUMaster == 1 and me.APU10sec != 1) {
|
||||
me.autoCall("apu");
|
||||
|
@ -230,10 +186,10 @@ var SystemDisplay = {
|
|||
|
||||
if (me.APU10sec == 9 and APURPM >= 95.0) {
|
||||
me.APU10sec = 0;
|
||||
me._apuTime = elapsedSec;
|
||||
me._apuTime = notification.elapsedTime;
|
||||
}
|
||||
|
||||
if (me.APU10sec != 9 and elapsedSec > me._apuTime + 10) {
|
||||
if (me.APU10sec != 9 and notification.elapsedTime > me._apuTime + 10) {
|
||||
me.APU10sec = 1;
|
||||
}
|
||||
} elsif (engModeSel == 0 or engModeSel == 2 or (engModeSel == 1 and me.eng10sec == 0)) {
|
||||
|
@ -242,10 +198,10 @@ var SystemDisplay = {
|
|||
|
||||
if (me.eng10sec == 9 and engModeSel == 1) {
|
||||
me.eng10sec = 0;
|
||||
me._engTime = elapsedSec;
|
||||
me._engTime = notification.elapsedTime;
|
||||
}
|
||||
|
||||
if (me.eng10sec != 9 and elapsedSec > me._engTime + 10) {
|
||||
if (me.eng10sec != 9 and notification.elapsedTime > me._engTime + 10) {
|
||||
me.eng10sec = 1;
|
||||
}
|
||||
} else {
|
||||
|
@ -256,49 +212,43 @@ var SystemDisplay = {
|
|||
me.eng10sec = 9;
|
||||
|
||||
# Phase logic
|
||||
if (phase == 1) {
|
||||
if (notification.FWCPhase == 1) {
|
||||
me.autoCall("door");
|
||||
me.fctl20sec = 9;
|
||||
} elsif (phase == 2) {
|
||||
aileron = pts.Fdm.JSBsim.Fbw.aileron.getValue();
|
||||
elevator = pts.Fdm.JSBsim.Fbw.elevator.getValue();
|
||||
|
||||
if (abs(aileron) >= 0.15 or abs(elevator) >= 0.15 and me.fctl20sec == 9) {
|
||||
} elsif (notification.FWCPhase == 2) {
|
||||
if (notification.aileronFBW >= 0.15 or notification.elevatorFBW >= 0.15 and me.fctl20sec == 9) {
|
||||
me.autoCall("fctl");
|
||||
|
||||
if (me.fctl20sec == 9) {
|
||||
me.fctl20sec = 0;
|
||||
me._fctlTime = elapsedSec;
|
||||
me._fctlTime = notification.elapsedTime;
|
||||
}
|
||||
|
||||
if (me.fctl20sec != 9 and elapsedSec > me._fctlTime + 20) {
|
||||
if (me.fctl20sec != 9 and notification.elapsedTime > me._fctlTime + 20) {
|
||||
me.fctl20sec = 1;
|
||||
}
|
||||
} elsif (me.fctl20sec == 0) {
|
||||
if (me.fctl20sec != 9 and elapsedSec > me._fctlTime + 20) {
|
||||
if (me.fctl20sec != 9 and notification.elapsedTime > me._fctlTime + 20) {
|
||||
me.fctl20sec = 1;
|
||||
}
|
||||
} else {
|
||||
me.autoCall("wheel");
|
||||
me.fctl20sec = 9;
|
||||
}
|
||||
} elsif (phase >= 3 and phase <= 5) {
|
||||
} elsif (notification.FWCPhase >= 3 and notification.FWCPhase <= 5) {
|
||||
me.autoCall("eng");
|
||||
me.fctl20sec = 9;
|
||||
} elsif (phase == 6) {
|
||||
gearLever = pts.Controls.Gear.gearDown.getValue();
|
||||
agl = pts.Position.gearAglFt.getValue();
|
||||
|
||||
if (gearLever and agl <= 16000) {
|
||||
} elsif (notification.FWCPhase == 6) {
|
||||
if (notification.gearLever and notification.agl <= 16000) {
|
||||
me.autoCall("wheel");
|
||||
} else {
|
||||
me.autoCall("crz");
|
||||
}
|
||||
me.fctl20sec = 9;
|
||||
} elsif (phase >= 7 and phase <= 9) {
|
||||
} elsif (notification.FWCPhase >= 7 and notification.FWCPhase <= 9) {
|
||||
me.autoCall("wheel");
|
||||
me.fctl20sec = 9;
|
||||
} elsif (phase == 10) {
|
||||
} elsif (notification.FWCPhase == 10) {
|
||||
me.autoCall("door");
|
||||
me.fctl20sec = 9;
|
||||
}
|
||||
|
@ -357,35 +307,13 @@ var ECAMControlPanel = {
|
|||
emerCancBtn: func() {
|
||||
# todo
|
||||
},
|
||||
lightOff: func(page) {
|
||||
if (page == "clr") { clrLight.setBoolValue(0); }
|
||||
elsif (page == "apu") { apuLight.setBoolValue(0); }
|
||||
elsif (page == "bleed") { bleedLight.setBoolValue(0); }
|
||||
elsif (page == "cond") { condLight.setBoolValue(0); }
|
||||
elsif (page == "door") { doorLight.setBoolValue(0); }
|
||||
elsif (page == "elec") { elecLight.setBoolValue(0); }
|
||||
elsif (page == "eng") { engLight.setBoolValue(0); }
|
||||
elsif (page == "fctl") { fctlLight.setBoolValue(0); }
|
||||
elsif (page == "fuel") { fuelLight.setBoolValue(0); }
|
||||
elsif (page == "hyd") { hydLight.setBoolValue(0); }
|
||||
elsif (page == "press") { pressLight.setBoolValue(0); }
|
||||
elsif (page == "sts") { stsLight.setBoolValue(0); }
|
||||
elsif (page == "wheel") { wheelLight.setBoolValue(0); }
|
||||
lightOff: func(pageLightOff) {
|
||||
if (pageLightOff == "crz") { return; }
|
||||
ECAM.lights[pageLightOff].setBoolValue(0);
|
||||
},
|
||||
lightOn: func(page) {
|
||||
if (page == "clr") { clrLight.setBoolValue(1); }
|
||||
elsif (page == "apu") { apuLight.setBoolValue(1); }
|
||||
elsif (page == "bleed") { bleedLight.setBoolValue(1); }
|
||||
elsif (page == "cond") { condLight.setBoolValue(1); }
|
||||
elsif (page == "door") { doorLight.setBoolValue(1); }
|
||||
elsif (page == "elec") { elecLight.setBoolValue(1); }
|
||||
elsif (page == "eng") { engLight.setBoolValue(1); }
|
||||
elsif (page == "fctl") { fctlLight.setBoolValue(1); }
|
||||
elsif (page == "fuel") { fuelLight.setBoolValue(1); }
|
||||
elsif (page == "hyd") { hydLight.setBoolValue(1); }
|
||||
elsif (page == "press") { pressLight.setBoolValue(1); }
|
||||
elsif (page == "sts") { stsLight.setBoolValue(1); }
|
||||
elsif (page == "wheel") { wheelLight.setBoolValue(1); }
|
||||
lightOn: func(pageLightOn) {
|
||||
if (pageLightOn == "crz") { return; }
|
||||
ECAM.lights[pageLightOn].setBoolValue(1);
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -414,4 +342,54 @@ var doApWarn = func(type) {
|
|||
apWarnNode.setValue(2);
|
||||
# master warning handled by warning system in this case
|
||||
}
|
||||
}
|
||||
|
||||
# Emesary
|
||||
var ECAMRecipient =
|
||||
{
|
||||
new: func(_ident)
|
||||
{
|
||||
var NewECAMRecipient = emesary.Recipient.new(_ident);
|
||||
NewECAMRecipient.Receive = func(notification)
|
||||
{
|
||||
if (notification.NotificationType == "FrameNotification")
|
||||
{
|
||||
if (math.mod(notifications.frameNotification.FrameCount,5) == 0) {
|
||||
ECAM.loop(notification);
|
||||
}
|
||||
if (math.mod(notifications.frameNotification.FrameCount,10) == 0) {
|
||||
phaseLoop();
|
||||
}
|
||||
if (math.mod(notifications.frameNotification.FrameCount,10) == 5) {
|
||||
ECAM_controller.loop(notification);
|
||||
}
|
||||
return emesary.Transmitter.ReceiptStatus_OK;
|
||||
}
|
||||
return emesary.Transmitter.ReceiptStatus_NotProcessed;
|
||||
};
|
||||
return NewECAMRecipient;
|
||||
},
|
||||
};
|
||||
|
||||
var A320ECAM = ECAMRecipient.new("A320 ECAM");
|
||||
emesary.GlobalTransmitter.Register(A320ECAM);
|
||||
|
||||
var input = {
|
||||
"aileronFBW": "/fdm/jsbsim/fbw/aileron-sidestick",
|
||||
"agl": "/position/gear-agl-ft",
|
||||
"athr": "/it-autoflight/output/athr",
|
||||
"athrWarn": "/it-autoflight/output/athr-warning",
|
||||
"athrOffTime": "/ECAM/warnings/athr-off-time",
|
||||
"ap1": "/it-autoflight/output/ap1",
|
||||
"ap2": "/it-autoflight/output/ap2",
|
||||
"apWarn": "/it-autoflight/output/ap-warning",
|
||||
"apOffTime": "/ECAM/warnings/ap-off-time",
|
||||
"elevatorFBW": "/fdm/jsbsim/fbw/elevator-sidestick",
|
||||
"gearLever": "/controls/gear/gear-down",
|
||||
"masterCaution": "/ECAM/warnings/master-caution-light",
|
||||
"masterWarn": "/ECAM/warnings/master-warning-light",
|
||||
};
|
||||
|
||||
foreach (var name; keys(input)) {
|
||||
emesary.GlobalTransmitter.NotifyAll(notifications.FrameNotificationAddProperty.new("A320 ECAM", name, input[name]));
|
||||
}
|
|
@ -275,6 +275,7 @@ var warnings = std.Vector.new([
|
|||
|
||||
# TCAS FAULT
|
||||
var tcasFault = warning.new(msg: "NAV TCAS FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
|
||||
var tcasStby = warning.new(msg: "NAV TCAS STBY", colour: "a", aural: 1, light: 1, isMainMsg: 1),
|
||||
var gpwsFault = warning.new(msg: "NAV GPWS FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
|
||||
var gpwsFaultOff = warning.new(msg: "-GPWS...............OFF", colour: "c"),
|
||||
var gpwsTerrFault = warning.new(msg: "NAV GPWS TERR DET FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
|
||||
|
@ -542,7 +543,7 @@ var memos = std.Vector.new([
|
|||
var cabin_ready = memo.new(msg: "CABIN READY" ), # Not yet implemented
|
||||
var pred_ws_off = memo.new(msg: "PRED W/S OFF"), # Not yet implemented
|
||||
var terr_stby = memo.new(msg: "TERR STBY" ), # Not yet implemented
|
||||
var tcas_stby = memo.new(msg: "TCAS STBY" ), # Not yet implemented
|
||||
var tcas_stby = memo.new(msg: "TCAS STBY" ),
|
||||
var company_call = memo.new(msg: "COMPANY CALL"),
|
||||
var satcom_alert = memo.new(msg: "SATCOM ALERT"), # Not yet implemented
|
||||
var company_msg = memo.new(msg: "COMPANY MSG" ),
|
||||
|
|
|
@ -46,7 +46,7 @@ var FWC = {
|
|||
recallOutput: props.globals.initNode("/ECAM/flipflop/recall-output", 0, "BOOL"),
|
||||
},
|
||||
Logic: {
|
||||
gnd: props.globals.getNode("/ECAM/ground-calc-immediate"),
|
||||
gnd: props.globals.getNode("/ECAM/logic/ground-calc-immediate"),
|
||||
IRSinAlign: props.globals.initNode("/ECAM/irs-in-align", 0, "BOOL"),
|
||||
feet1500: props.globals.getNode("/ECAM/phases/phase-calculation/altitude-ge-1500"),
|
||||
feet800: props.globals.getNode("/ECAM/phases/phase-calculation/altitude-ge-800"),
|
||||
|
@ -73,6 +73,7 @@ var FWC = {
|
|||
};
|
||||
|
||||
var phaseLoop = func() {
|
||||
if ((systems.ELEC.Bus.acEss.getValue() < 110 and systems.ELEC.Bus.ac2.getValue() < 110) or pts.Acconfig.running.getBoolValue()) { return; }
|
||||
if (pts.Sim.Replay.replayActive.getBoolValue()) { return; }
|
||||
|
||||
myPhase = pts.ECAM.fwcWarningPhase.getValue();
|
||||
|
@ -143,7 +144,7 @@ var phaseLoop = func() {
|
|||
}
|
||||
|
||||
# Actual Phases
|
||||
if ((!FWC.Logic.gnd.getBoolValue() and FWC.Timer.gnd2Sec.getValue() != 1 and FWC.Timer.eng1and2Off.getValue() and myPhase != 9) and !FWC.Monostable.phase1Output.getBoolValue()) {
|
||||
if ((FWC.Logic.gnd.getBoolValue() and FWC.Timer.eng1and2Off.getValue() and myPhase != 9) and !FWC.Monostable.phase1Output.getBoolValue()) {
|
||||
setPhase(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,10 +13,24 @@ var sec2 = 0;
|
|||
var sec3 = 0;
|
||||
var fac1 = 0;
|
||||
var fac2 = 0;
|
||||
|
||||
var dualELACFault = 0;
|
||||
var tripleSECFault = 0;
|
||||
var dualFACFault = 0;
|
||||
var adr1 = 0;
|
||||
var adr2 = 0;
|
||||
var adr3 = 0;
|
||||
var tripleADRFail = 0;
|
||||
var doubleADRFail = 0;
|
||||
var ir1 = 0;
|
||||
var ir2 = 0;
|
||||
var ir3 = 0;
|
||||
var tripleIRFail = 0;
|
||||
var doubleIRFail = 0;
|
||||
var blue = 0;
|
||||
var green = 0;
|
||||
var yellow = 0;
|
||||
var blueGreenFail = 0;
|
||||
var greenYellowFail = 0;
|
||||
var ail = 0;
|
||||
var roll = 0;
|
||||
var rollback = 0;
|
||||
|
@ -154,84 +168,81 @@ var update_loop = func {
|
|||
fac2 = FBW.Computers.fac2.getBoolValue();
|
||||
law = FBW.activeLaw.getValue();
|
||||
lawyaw = FBW.activeYawLaw.getValue();
|
||||
adr1 = systems.ADIRS.Operating.adr[0].getValue();
|
||||
adr2 = systems.ADIRS.Operating.adr[1].getValue();
|
||||
adr3 = systems.ADIRS.Operating.adr[2].getValue();
|
||||
ir1 = systems.ADIRS.ADIRunits[0].operating;
|
||||
ir2 = systems.ADIRS.ADIRunits[1].operating;
|
||||
ir3 = systems.ADIRS.ADIRunits[2].operating;
|
||||
|
||||
# Degrade logic, all failures which degrade FBW need to go here. -JD
|
||||
blue = systems.HYD.Psi.blue.getValue();
|
||||
green = systems.HYD.Psi.green.getValue();
|
||||
yellow = systems.HYD.Psi.yellow.getValue();
|
||||
if (!pts.Gear.wow[1].getBoolValue() and !pts.Gear.wow[2].getBoolValue()) {
|
||||
if (!elac1 and !elac2) {
|
||||
if (lawyaw == 0) {
|
||||
FBW.degradeYawLaw.setValue(1);
|
||||
}
|
||||
if (law == 0) {
|
||||
FBW.degradeLaw.setValue(1);
|
||||
FBW.apOff = 1;
|
||||
}
|
||||
}
|
||||
if ((!elac1 and elac2 and ((green < 1500 and yellow >= 1500) or (green >= 1500 and yellow < 1500))) or (!elac2 and elac1 and blue < 1500)) {
|
||||
if (lawyaw == 0) {
|
||||
FBW.degradeYawLaw.setValue(1);
|
||||
}
|
||||
if (law == 0) {
|
||||
FBW.degradeLaw.setValue(1);
|
||||
FBW.apOff = 1;
|
||||
}
|
||||
}
|
||||
if (!sec1 and !sec2 and !sec3) {
|
||||
if (lawyaw == 0) {
|
||||
FBW.degradeYawLaw.setValue(1);
|
||||
}
|
||||
if (law == 0) {
|
||||
FBW.degradeLaw.setValue(1);
|
||||
}
|
||||
}
|
||||
if (systems.ELEC.EmerElec.getBoolValue()) {
|
||||
if (lawyaw == 0 or lawyaw == 1) {
|
||||
} elsif (fac1 and lawyaw == 2) {
|
||||
FBW.degradeYawLaw.setValue(1);
|
||||
}
|
||||
if (law == 0) {
|
||||
FBW.degradeLaw.setValue(1);
|
||||
FBW.apOff = 1;
|
||||
}
|
||||
}
|
||||
if (blue < 1500 and green < 1500 and yellow >= 1500) {
|
||||
if (lawyaw == 0) {
|
||||
FBW.degradeYawLaw.setValue(1);
|
||||
}
|
||||
if (law == 0) {
|
||||
FBW.degradeLaw.setValue(1);
|
||||
FBW.apOff = 1;
|
||||
}
|
||||
}
|
||||
if ((!fac1 and !fac2) or !FBW.yawdamper.getValue() or (blue >= 1500 and green < 1500 and yellow < 1500)) {
|
||||
|
||||
dualELACFault = !elac1 and !elac2;
|
||||
tripleSECFault = !sec1 and !sec2 and !sec3;
|
||||
dualFACFault = !fac1 and !fac2;
|
||||
|
||||
blueGreenFail = blue < 1500 and green < 1500 and yellow >= 1500;
|
||||
greenYellowFail = blue >= 1500 and green < 1500 and yellow < 1500;
|
||||
tripleADRFail = !adr1 and !adr2 and !adr3;
|
||||
doubleADRFail = (!adr1 and !adr2 and adr3) or (adr1 and !adr2 and !adr3) or (!adr1 and adr2 and !adr3);
|
||||
tripleIRFail = !ir1 and !ir2 and !ir3;
|
||||
doubleIRFail = (!ir1 and !ir2 and ir3) or (ir1 and !ir2 and !ir3) or (!ir1 and ir2 and !ir3);
|
||||
|
||||
if (tripleADRFail or doubleADRFail or doubleIRFail or tripleIRFail or dualFACFault or !FBW.yawdamper.getValue() or greenYellowFail or blueGreenFail or dualELACFault or (!elac1 and elac2 and ((green < 1500 and yellow >= 1500) or (green >= 1500 and yellow < 1500))) or (!elac2 and elac1 and blue < 1500) or tripleSECFault or systems.ELEC.EmerElec.getBoolValue()) {
|
||||
if (dualFACFault or !FBW.yawdamper.getValue() or greenYellowFail or (systems.ELEC.EmerElec.getBoolValue() and !fac1) or tripleIRFail) {
|
||||
if (lawyaw == 0 or lawyaw == 1) {
|
||||
FBW.degradeYawLaw.setValue(2);
|
||||
}
|
||||
if (law == 0) {
|
||||
FBW.degradeLaw.setValue(1);
|
||||
} elsif (fac1 and lawyaw == 2 and systems.ELEC.EmerElec.getBoolValue()) {
|
||||
FBW.degradeYawLaw.setValue(1);
|
||||
} elsif (lawyaw == 0) {
|
||||
FBW.degradeYawLaw.setValue(1);
|
||||
}
|
||||
|
||||
if (law == 0 and !tripleIRFail) {
|
||||
FBW.degradeLaw.setValue(1);
|
||||
if (!tripleSECFault) {
|
||||
FBW.apOff = 1;
|
||||
}
|
||||
}
|
||||
if (!elac1 and !elac2 and !sec1 and !sec2 and !sec3 and !fac1 and !fac2) {
|
||||
FBW.degradeLaw.setValue(3);
|
||||
} elsif (tripleIRFail and (law == 0 or law == 1)) {
|
||||
FBW.degradeLaw.setValue(2);
|
||||
FBW.apOff = 1;
|
||||
}
|
||||
} else {
|
||||
FBW.degradeYawLaw.setValue(0);
|
||||
FBW.degradeLaw.setValue(0);
|
||||
FBW.apOff = 0;
|
||||
}
|
||||
|
||||
if (pts.Controls.Gear.gearDown.getBoolValue() and !fmgc.Input.ap1.getBoolValue() and !fmgc.Input.ap2.getBoolValue()) {
|
||||
if (law == 1) {
|
||||
FBW.degradeLaw.setValue(2);
|
||||
}
|
||||
if (dualELACFault and tripleSECFault and dualFACFault) {
|
||||
FBW.degradeLaw.setValue(3);
|
||||
FBW.apOff = 1;
|
||||
}
|
||||
|
||||
|
||||
# degrade loop runs faster; reset this variable
|
||||
law = FBW.activeLaw.getValue();
|
||||
|
||||
# Mech Backup can always return to direct, if it can.
|
||||
if (law == 3 and (elac1 or elac2 or sec1 or sec2 or sec3 or fac1 or fac2) and systems.ELEC.Bus.acEss.getValue() >= 110 and (green >= 1500 or blue >= 1500 or yellow >= 1500)) {
|
||||
FBW.degradeLaw.setValue(2);
|
||||
if (!pts.Gear.wow[1].getBoolValue() and !pts.Gear.wow[2].getBoolValue()) {
|
||||
if (pts.Controls.Gear.gearDown.getBoolValue()) {
|
||||
if (law == 1) {
|
||||
FBW.degradeLaw.setValue(2); # todo 3 sec timer
|
||||
}
|
||||
} else {
|
||||
if (law == 2 and !tripleIRFail) {
|
||||
FBW.degradeLaw.setValue(1); # todo 3 sec timer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# If they can, laws can go back to standard law
|
||||
if (law == 3) {
|
||||
if (!dualELACFault or !tripleSECFault or !dualFACFault) {
|
||||
FBW.degradeLaw.setValue(2);
|
||||
}
|
||||
}
|
||||
|
||||
cas = pts.Instrumentation.AirspeedIndicator.indicatedSpdKt.getValue();
|
||||
|
|
|
@ -381,10 +381,10 @@ var FCUController = {
|
|||
} else if (d == -10) {
|
||||
altTemp = altTemp - 1000;
|
||||
}
|
||||
if (altTemp < 0) {
|
||||
altSet.setValue(0);
|
||||
} else if (altTemp > 50000) {
|
||||
altSet.setValue(50000);
|
||||
if (altTemp < 100) {
|
||||
altSet.setValue(100);
|
||||
} else if (altTemp > 49000) {
|
||||
altSet.setValue(49000);
|
||||
} else {
|
||||
altSet.setValue(altTemp);
|
||||
}
|
||||
|
|
|
@ -62,8 +62,8 @@ var variousReset = func {
|
|||
setprop("/controls/lighting/DU/mcdu1", 1);
|
||||
setprop("/controls/lighting/DU/mcdu2", 1);
|
||||
setprop("modes/fcu/hdg-time", -45);
|
||||
setprop("/controls/switching/ATTHDG", 0);
|
||||
setprop("/controls/switching/AIRDATA", 0);
|
||||
setprop("/controls/navigation/switching/att-hdg", 0);
|
||||
setprop("/controls/navigation/switching/air-data", 0);
|
||||
setprop("/controls/switches/no-smoking-sign", 1);
|
||||
setprop("/controls/switches/seatbelt-sign", 1);
|
||||
}
|
||||
|
|
|
@ -255,7 +255,6 @@ var systemsLoop = maketimer(0.1, func {
|
|||
systems.ADIRS.loop();
|
||||
systems.APUController.loop();
|
||||
systems.BrakeSys.update();
|
||||
ecam.ECAM.loop();
|
||||
fadec.FADEC.loop();
|
||||
rmp.rmpUpdate();
|
||||
fcu.FCUController.loop();
|
||||
|
|
|
@ -58,7 +58,7 @@ var Controls = {
|
|||
};
|
||||
|
||||
var ECAM = {
|
||||
fwcWarningPhase: props.globals.initNode("/ECAM/warning-phase", 1, "INT"),
|
||||
fwcWarningPhase: props.globals.getNode("/ECAM/warning-phase"),
|
||||
};
|
||||
|
||||
var Engines = {
|
||||
|
|
|
@ -412,7 +412,8 @@ var departurePage = {
|
|||
me.arrowsMatrix[1][1] = 0;
|
||||
me.arrowsColour[1][1] = "ack";
|
||||
}
|
||||
} elsif (size(me.transitions) >= 2) {
|
||||
}
|
||||
if (size(me.transitions) >= 2) {
|
||||
me.R3 = [me.transitions[1] ~ " ", nil, "blu"];
|
||||
if (me.transitions[1] != me.selectedTransition) {
|
||||
me.arrowsMatrix[1][2] = 1;
|
||||
|
@ -421,7 +422,8 @@ var departurePage = {
|
|||
me.arrowsMatrix[1][2] = 0;
|
||||
me.arrowsColour[1][2] = "ack";
|
||||
}
|
||||
} elsif (size(me.transitions) >= 3) {
|
||||
}
|
||||
if (size(me.transitions) >= 3) {
|
||||
me.R4 = [me.transitions[2] ~ " ", nil, "blu"];
|
||||
if (me.transitions[2] != me.selectedTransition) {
|
||||
me.arrowsMatrix[1][3] = 1;
|
||||
|
@ -430,7 +432,8 @@ var departurePage = {
|
|||
me.arrowsMatrix[1][3] = 0;
|
||||
me.arrowsColour[1][3] = "ack";
|
||||
}
|
||||
} elsif (size(me.transitions) >= 4) {
|
||||
}
|
||||
if (size(me.transitions) >= 4) {
|
||||
me.R5 = [me.transitions[3] ~ " ", nil, "blu"];
|
||||
if (me.transitions[3] != me.selectedTransition) {
|
||||
me.arrowsMatrix[1][4] = 1;
|
||||
|
|
|
@ -25,6 +25,16 @@ var SwitchingPanel = {
|
|||
dmc.DMController.DMCs[1].changeActiveADIRS(1);
|
||||
}
|
||||
},
|
||||
doAttHdg: func(newAttHdg) {
|
||||
if (newAttHdg < -1 or newAttHdg > 1) { return; }
|
||||
me.Switches.attHdg.setValue(newAttHdg);
|
||||
foreach (var predicate; keys(canvas_nd.ND_1.NDCpt.predicates)) {
|
||||
call(canvas_nd.ND_1.NDCpt.predicates[predicate]);
|
||||
}
|
||||
foreach (var predicate; keys(canvas_nd.ND_2.NDFo.predicates)) {
|
||||
call(canvas_nd.ND_2.NDFo.predicates[predicate]);
|
||||
}
|
||||
},
|
||||
doEisDMC: func(newDMC) {
|
||||
if (newDMC < -1 or newDMC > 1) { return; }
|
||||
me.Switches.eisDMC.setValue(newDMC);
|
||||
|
|
|
@ -17,7 +17,7 @@ var Transponder = {
|
|||
code: "2000",
|
||||
selected: 0,
|
||||
electricalSrc: "",
|
||||
activeADIRS: 0,
|
||||
activeADIRS: 1,
|
||||
condition: 0,
|
||||
failed: 0,
|
||||
codeDigitsNodes: [props.globals.getNode("instrumentation/transponder/inputs/digit[0]", 1), props.globals.getNode("instrumentation/transponder/inputs/digit[1]", 1), props.globals.getNode("instrumentation/transponder/inputs/digit[2]", 1), props.globals.getNode("instrumentation/transponder/inputs/digit[3]", 1)],
|
||||
|
@ -244,6 +244,41 @@ var transponderPanel = {
|
|||
Transponders.vector[1].switchADIRS(2);
|
||||
}
|
||||
}
|
||||
|
||||
if (Transponders.vector[me.atcSel - 1].activeADIRS == 1) {
|
||||
me.updateADR1(systems.ADIRS.Operating.adr[0].getValue());
|
||||
} elsif (Transponders.vector[me.atcSel - 1].activeADIRS == 2) {
|
||||
me.updateADR2(systems.ADIRS.Operating.adr[1].getValue());
|
||||
} elsif (Transponders.vector[me.atcSel - 1].activeADIRS == 3) {
|
||||
me.updateADR3(systems.ADIRS.Operating.adr[2].getValue());
|
||||
}
|
||||
},
|
||||
updateADR1: func(val) {
|
||||
if (Transponders.vector[me.atcSel - 1].activeADIRS == 1) {
|
||||
if (val) {
|
||||
setprop("/instrumentation/tcas/serviceable", 1);
|
||||
} else {
|
||||
setprop("/instrumentation/tcas/serviceable", 0);
|
||||
}
|
||||
}
|
||||
},
|
||||
updateADR2: func(val) {
|
||||
if (Transponders.vector[me.atcSel - 1].activeADIRS == 2) {
|
||||
if (val) {
|
||||
setprop("/instrumentation/tcas/serviceable", 1);
|
||||
} else {
|
||||
setprop("/instrumentation/tcas/serviceable", 0);
|
||||
}
|
||||
}
|
||||
},
|
||||
updateADR3: func(val) {
|
||||
if (Transponders.vector[me.atcSel - 1].activeADIRS == 3) {
|
||||
if (val) {
|
||||
setprop("/instrumentation/tcas/serviceable", 1);
|
||||
} else {
|
||||
setprop("/instrumentation/tcas/serviceable", 0);
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -265,3 +300,15 @@ var Transponders = std.Vector.new([Transponder.new("/systems/electrical/bus/ac-e
|
|||
var transponderTimer = maketimer(0.1, func() {
|
||||
Transponders.vector[transponderPanel.atcSel - 1].update();
|
||||
});
|
||||
|
||||
setlistener("/systems/navigation/adr/operating-1", func() {
|
||||
transponderPanel.updateADR1(systems.ADIRS.Operating.adr[0].getValue());
|
||||
}, 1, 0);
|
||||
|
||||
setlistener("/systems/navigation/adr/operating-2", func() {
|
||||
transponderPanel.updateADR2(systems.ADIRS.Operating.adr[1].getValue());
|
||||
}, 1, 0);
|
||||
|
||||
setlistener("/systems/navigation/adr/operating-3", func() {
|
||||
transponderPanel.updateADR3(systems.ADIRS.Operating.adr[2].getValue());
|
||||
}, 1, 0);
|
|
@ -7,33 +7,34 @@ var _NUMADIRU = 3;
|
|||
|
||||
var _selfTestTime = nil;
|
||||
|
||||
var ADIRSnodesND = [props.globals.getNode("/instrumentation/efis[0]/nd/ir-1", 1),props.globals.getNode("/instrumentation/efis[1]/nd/ir-2", 1),props.globals.getNode("/instrumentation/efis[0]/nd/ir-3", 1)];
|
||||
|
||||
var ADIRU = {
|
||||
# local vars
|
||||
_alignTime: 0,
|
||||
_voltageMain: 0,
|
||||
_voltageBackup: 0,
|
||||
_voltageLimitedTime: 0,
|
||||
_noPowerTime: 0,
|
||||
_timeVar: 0,
|
||||
_roll: 0,
|
||||
_pitch: 0,
|
||||
_gs: 0,
|
||||
|
||||
num: 0,
|
||||
aligned: 0,
|
||||
inAlign: 0,
|
||||
outputOn: 1, # 0 = disc, 1 = normal
|
||||
mode: 0, # 0 = off, 1 = nav, 2 = att
|
||||
energised: 0, # 0 = off, 1 = on
|
||||
operative: 0, # 0 = off,
|
||||
alignTimer: nil,
|
||||
input: [],
|
||||
output: [],
|
||||
|
||||
# methods
|
||||
new: func(n) {
|
||||
var adiru = { parents:[ADIRU] };
|
||||
adiru.num = n;
|
||||
adiru._alignTime = 0;
|
||||
adiru._pfdTime = 0;
|
||||
adiru._voltageMain = 0;
|
||||
adiru._voltageBackup = 0;
|
||||
adiru._voltageLimitedTime = 0;
|
||||
adiru._noPowerTime = 0;
|
||||
adiru._timeVar = 0;
|
||||
adiru._roll = 0;
|
||||
adiru._pitch = 0;
|
||||
adiru._gs = 0;
|
||||
|
||||
adiru.aligned = 0;
|
||||
adiru.operating = 0; # ir operating - used for PFD + fbw failure
|
||||
adiru.inAlign = 0;
|
||||
adiru.outputOn = 1; # 0 = disc; 1 = normal
|
||||
adiru.mode = 0; # 0 = off; 1 = nav; 2 = att
|
||||
adiru.energised = 0; # 0 = off; 1 = on
|
||||
adiru.operative = 0; # 0 = off;
|
||||
adiru.alignTimer = nil;
|
||||
adiru.input = [];
|
||||
adiru.output = [];
|
||||
adiru.alignTimer = maketimer(0.1, adiru, me.alignLoop);
|
||||
|
||||
return adiru;
|
||||
|
@ -91,6 +92,7 @@ var ADIRU = {
|
|||
if (!ADIRS.skip.getValue()) {
|
||||
if (time > 0 and me.aligned == 0 and me.inAlign == 0 and me.operative == 1) {
|
||||
me._alignTime = pts.Sim.Time.elapsedSec.getValue() + time;
|
||||
me._pfdTime = pts.Sim.Time.elapsedSec.getValue() + 20 + (rand() * 5);
|
||||
me.inAlign = 1;
|
||||
if (me.alignTimer != nil) {
|
||||
me.alignTimer.start();
|
||||
|
@ -99,6 +101,7 @@ var ADIRU = {
|
|||
} else {
|
||||
if (me.aligned == 0 and me.inAlign == 0 and me.operative == 1) {
|
||||
me._alignTime = pts.Sim.Time.elapsedSec.getValue() + 5;
|
||||
me._pfdTime = pts.Sim.Time.elapsedSec.getValue() + 1;
|
||||
me.inAlign = 1;
|
||||
if (me.alignTimer != nil) {
|
||||
me.alignTimer.start();
|
||||
|
@ -110,18 +113,36 @@ var ADIRU = {
|
|||
print("Stopping alignment or setting unaligned state");
|
||||
me.inAlign = 0;
|
||||
me.aligned = 0;
|
||||
ADIRSnodesND[me.num].setValue(0);
|
||||
ADIRS.Operating.aligned[me.num].setValue(0);
|
||||
me.operating = 0;
|
||||
if (me.alignTimer != nil) {
|
||||
me.alignTimer.stop();
|
||||
}
|
||||
foreach (var predicate; keys(canvas_nd.ND_1.NDCpt.predicates)) {
|
||||
call(canvas_nd.ND_1.NDCpt.predicates[predicate]);
|
||||
}
|
||||
foreach (var predicate; keys(canvas_nd.ND_2.NDFo.predicates)) {
|
||||
call(canvas_nd.ND_2.NDFo.predicates[predicate]);
|
||||
}
|
||||
},
|
||||
irOperating: func() {
|
||||
me.operating = 1;
|
||||
},
|
||||
stopAlignAligned: func() {
|
||||
me.inAlign = 0;
|
||||
me.aligned = 1;
|
||||
ADIRSnodesND[me.num].setValue(1);
|
||||
ADIRS.Operating.aligned[me.num].setValue(1);
|
||||
if (me.alignTimer != nil) {
|
||||
me.alignTimer.stop();
|
||||
}
|
||||
foreach (var predicate; keys(canvas_nd.ND_1.NDCpt.predicates)) {
|
||||
call(canvas_nd.ND_1.NDCpt.predicates[predicate]);
|
||||
}
|
||||
foreach (var predicate; keys(canvas_nd.ND_2.NDFo.predicates)) {
|
||||
call(canvas_nd.ND_2.NDFo.predicates[predicate]);
|
||||
}
|
||||
},
|
||||
alignLoop: func() {
|
||||
me._roll = pts.Orientation.roll.getValue();
|
||||
|
@ -139,9 +160,14 @@ var ADIRU = {
|
|||
} elsif (pts.Sim.Time.elapsedSec.getValue() >= me._alignTime) {
|
||||
me.stopAlignAligned();
|
||||
}
|
||||
|
||||
if (!me.operating and pts.Sim.Time.elapsedSec.getValue() >= me._pfdTime) {
|
||||
me.irOperating();
|
||||
}
|
||||
},
|
||||
instAlign: func() {
|
||||
me.stopAlignAligned();
|
||||
me.irOperating();
|
||||
},
|
||||
# Update loop
|
||||
update: func() {
|
||||
|
|
|
@ -87,19 +87,25 @@ var APU = {
|
|||
powerOn: func() {
|
||||
# just in case
|
||||
me.resetStuff();
|
||||
if (systems.ELEC.Bus.dcBat.getValue() < 25) { return; }
|
||||
if (systems.ELEC.Bus.dcBat.getValue() < 25) {
|
||||
settimer(func() {
|
||||
if (systems.ELEC.Bus.dcBat.getValue() < 25) {
|
||||
me.resetStuff();
|
||||
return;
|
||||
}
|
||||
}, 0.2);
|
||||
}
|
||||
# apu able to receive emergency stop or start signals
|
||||
me.setState(1);
|
||||
me.fuelValveCmd.setValue(1);
|
||||
me.inletFlap.open();
|
||||
me.checkOil();
|
||||
me.listenSignals = 1;
|
||||
settimer(func() {
|
||||
if (APUNodes.Controls.master.getValue() and !getprop("/systems/acconfig/autoconfig-running")) {
|
||||
me.setState(2);
|
||||
}
|
||||
}, 3);
|
||||
settimer(func() { me.checkOil }, 8);
|
||||
settimer(func() { me.checkOil() }, 8);
|
||||
},
|
||||
startCommand: func(fast = 0) {
|
||||
if (me.listenSignals and (me.state == 1 or me.state == 2)) {
|
||||
|
@ -256,6 +262,7 @@ var APU = {
|
|||
APUNodes.Controls.bleed.setValue(0);
|
||||
me.bleedTime = pts.Sim.Time.elapsedSec.getValue();
|
||||
},
|
||||
_powerLost: 0,
|
||||
update: func() {
|
||||
me._count += 1;
|
||||
if (me._count == 5) {
|
||||
|
@ -263,14 +270,22 @@ var APU = {
|
|||
if (me.state == 5 and APUNodes.Oil.pressure.getValue() < 35 or APUNodes.Oil.temperature.getValue() > 135) {
|
||||
me.autoStop();
|
||||
}
|
||||
|
||||
if (systems.ELEC.Bus.dcBat.getValue() < 25) {
|
||||
if (me.GenericControls.starter.getValue()) {
|
||||
me.GenericControls.starter.setValue(0);
|
||||
}
|
||||
if (me.state != 0) {
|
||||
me.autoStop();
|
||||
if (!me._powerLost) {
|
||||
me._powerLost = 1;
|
||||
settimer(func() {
|
||||
if (me._powerLost) {
|
||||
if (me.GenericControls.starter.getValue()) {
|
||||
me.GenericControls.starter.setValue(0);
|
||||
}
|
||||
if (me.state != 0) {
|
||||
me.autoStop();
|
||||
}
|
||||
}
|
||||
}, 0.2);
|
||||
}
|
||||
} else {
|
||||
me._powerLost = 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -312,9 +312,9 @@ var ATIS = {
|
|||
return 1;
|
||||
}
|
||||
|
||||
var serverString = "https://api.flybywiresim.com/atis?source=" ~ me.serverSel.getValue() ~ "&icao=";
|
||||
var serverString = "https://api.flybywiresim.com/atis/" ~ airport ~ "?source=" ~ me.serverSel.getValue();
|
||||
|
||||
http.load(serverString ~ airport)
|
||||
http.load(serverString)
|
||||
.fail(func(r) return 3)
|
||||
.done(func(r) {
|
||||
var errs = [];
|
||||
|
@ -330,14 +330,14 @@ var ATIS = {
|
|||
},
|
||||
processATIS: func(r, i) {
|
||||
var raw = r.response;
|
||||
if (r.response == "FBW_ERROR: D-ATIS not available at this airport" or find("atis not avail",r.response) != -1) {
|
||||
if (r.response == "FBW_ERROR: D-ATIS not available at this airport" or find("atis not avail",r.response) != -1 or find('"statusCode":404',r.response) != -1) {
|
||||
me.received = 0;
|
||||
me.sent = 0;
|
||||
mcdu.mcdu_message(i,"NO D-ATIS AVAILABLE");
|
||||
return;
|
||||
}
|
||||
if (find("combined", raw) != -1) {
|
||||
raw = split('{"combined":"', raw)[1];
|
||||
raw = split('"combined":"', raw)[1];
|
||||
raw = split('"}', raw)[0];
|
||||
} else {
|
||||
if (me.type == 0) {
|
||||
|
|
|
@ -96,3 +96,8 @@ var FrameNotificationAddProperty =
|
|||
#
|
||||
var frameNotification = FrameNotification.new(1);
|
||||
|
||||
|
||||
# Frame count
|
||||
# 5 = ECAM
|
||||
# 7 = FWC phases
|
||||
# 10 = ECAM messages
|
|
@ -23,13 +23,11 @@ var frame_inc = 0;
|
|||
var cur_frame_inc = 0.05;
|
||||
var execLoop = func
|
||||
{
|
||||
#
|
||||
notifications.frameNotification.fetchvars();
|
||||
if (notifications.frameNotification.FrameCount >= 4) {
|
||||
if (notifications.frameNotification.FrameCount > 20) {
|
||||
notifications.frameNotification.FrameCount = 0;
|
||||
}
|
||||
emesary.GlobalTransmitter.NotifyAll(notifications.frameNotification);
|
||||
#
|
||||
|
||||
notifications.frameNotification.FrameCount = notifications.frameNotification.FrameCount + 1;
|
||||
|
||||
|
@ -57,8 +55,12 @@ var execLoop = func
|
|||
|
||||
# setup the properties to monitor for this system
|
||||
input = {
|
||||
frame_rate : "/sim/frame-rate",
|
||||
elapsed_seconds : "/sim/time/elapsed-sec",
|
||||
frame_rate: "/sim/frame-rate",
|
||||
elapsedTime: "/sim/time/elapsed-sec",
|
||||
FWCPhase: "/ECAM/warning-phase",
|
||||
gear0Wow: "/gear/gear[0]/wow",
|
||||
engine1State: "/engines/engine[0]/state",
|
||||
engine2State: "/engines/engine[1]/state",
|
||||
};
|
||||
|
||||
foreach (var name; keys(input)) {
|
||||
|
|
|
@ -89,9 +89,9 @@
|
|||
</hyd>
|
||||
|
||||
<announcement>
|
||||
<name>PurserSnacks</name>
|
||||
<name>cab_call</name>
|
||||
<mode>once</mode>
|
||||
<path>Aircraft/A320-family/Sounds/Announce/purserSnacks.wav</path>
|
||||
<path>Aircraft/A320-family/Sounds/Announce/cab_call.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/controls/switches/cabinCall</property>
|
||||
|
@ -1432,7 +1432,7 @@
|
|||
<sb>
|
||||
<mode>once</mode>
|
||||
<name>sb</name>
|
||||
<path>seatbelt.wav</path>
|
||||
<path>cabin-chime.wav</path>
|
||||
<condition>
|
||||
<and>
|
||||
<greater-than>
|
||||
|
@ -1450,7 +1450,7 @@
|
|||
<ns>
|
||||
<mode>once</mode>
|
||||
<name>ns</name>
|
||||
<path>nosmoko.wav</path>
|
||||
<path>cabin-chime.wav</path>
|
||||
<condition>
|
||||
<and>
|
||||
<greater-than>
|
||||
|
@ -1754,12 +1754,12 @@
|
|||
</relay>
|
||||
|
||||
<announcements>
|
||||
<name>welcomeFA</name>
|
||||
<name>fa_boarding</name>
|
||||
<mode>once</mode>
|
||||
<path>Aircraft/A320-family/Sounds/Announce/welcome.wav</path>
|
||||
<path>Aircraft/A320-family/Sounds/Announce/fa_boarding.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/sim/sounde/welcomefa</property>
|
||||
<property>/sim/sounde/fa_boarding</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
|
@ -1770,12 +1770,12 @@
|
|||
</announcements>
|
||||
|
||||
<announcements>
|
||||
<name>welcomeCA</name>
|
||||
<name>fa_welcome</name>
|
||||
<mode>once</mode>
|
||||
<path>Aircraft/A320-family/Sounds/Announce/captwelcome.wav</path>
|
||||
<path>Aircraft/A320-family/Sounds/Announce/fa_welcome.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/sim/sounde/welcomecapt</property>
|
||||
<property>/sim/sounde/fa_welcome</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
|
@ -1786,12 +1786,12 @@
|
|||
</announcements>
|
||||
|
||||
<announcements>
|
||||
<name>doorsDep</name>
|
||||
<name>cpt_welcome</name>
|
||||
<mode>once</mode>
|
||||
<path>Aircraft/A320-family/Sounds/Announce/doorsdepart.wav</path>
|
||||
<path>Aircraft/A320-family/Sounds/Announce/cpt_welcome.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/sim/sounde/doors</property>
|
||||
<property>/sim/sounde/cpt_welcome</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
|
@ -1802,12 +1802,12 @@
|
|||
</announcements>
|
||||
|
||||
<announcements>
|
||||
<name>PrepTo</name>
|
||||
<name>cpt_doors</name>
|
||||
<mode>once</mode>
|
||||
<path>Aircraft/A320-family/Sounds/Announce/takeoff.wav</path>
|
||||
<path>Aircraft/A320-family/Sounds/Announce/cpt_doors.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/sim/sounde/prepareto</property>
|
||||
<property>/sim/sounde/cpt_doors</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
|
@ -1818,12 +1818,12 @@
|
|||
</announcements>
|
||||
|
||||
<announcements>
|
||||
<name>seatbeltOff</name>
|
||||
<name>fa_safety</name>
|
||||
<mode>once</mode>
|
||||
<path>Aircraft/A320-family/Sounds/Announce/belt10k.wav</path>
|
||||
<path>Aircraft/A320-family/Sounds/Announce/fa_safety.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/sim/sounde/seatbelt-10k</property>
|
||||
<property>/sim/sounde/fa_safety</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
|
@ -1834,12 +1834,76 @@
|
|||
</announcements>
|
||||
|
||||
<announcements>
|
||||
<name>safety</name>
|
||||
<name>cpt_takeoff</name>
|
||||
<mode>once</mode>
|
||||
<path>Aircraft/A320-family/Sounds/Announce/safety.wav</path>
|
||||
<path>Aircraft/A320-family/Sounds/Announce/cpt_takeoff.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/sim/sounde/safety</property>
|
||||
<property>/sim/sounde/cpt_takeoff</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<volume>
|
||||
<property>/sim/current-view/internal</property>
|
||||
<factor>0.6</factor>
|
||||
</volume>
|
||||
</announcements>
|
||||
|
||||
<announcements>
|
||||
<name>fa_seatbelt10k</name>
|
||||
<mode>once</mode>
|
||||
<path>Aircraft/A320-family/Sounds/Announce/fa_seatbelt10k.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/sim/sounde/fa_seatbelt10k</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<volume>
|
||||
<property>/sim/current-view/internal</property>
|
||||
<factor>0.6</factor>
|
||||
</volume>
|
||||
</announcements>
|
||||
|
||||
<announcements>
|
||||
<name>fa_descent</name>
|
||||
<mode>once</mode>
|
||||
<path>Aircraft/A320-family/Sounds/Announce/fa_descent.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/sim/sounde/fa_descent</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<volume>
|
||||
<property>/sim/current-view/internal</property>
|
||||
<factor>0.6</factor>
|
||||
</volume>
|
||||
</announcements>
|
||||
|
||||
<announcements>
|
||||
<name>cpt_landing</name>
|
||||
<mode>once</mode>
|
||||
<path>Aircraft/A320-family/Sounds/Announce/cpt_landing.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/sim/sounde/cpt_landing</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<volume>
|
||||
<property>/sim/current-view/internal</property>
|
||||
<factor>0.6</factor>
|
||||
</volume>
|
||||
</announcements>
|
||||
|
||||
<announcements>
|
||||
<name>fa_landed</name>
|
||||
<mode>once</mode>
|
||||
<path>Aircraft/A320-family/Sounds/Announce/fa_landed.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/sim/sounde/fa_landed</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
|
@ -1888,6 +1952,7 @@
|
|||
<path>Aircraft/A320-family/Sounds/Cockpit/cricket.wav</path>
|
||||
<mode>looped</mode>
|
||||
<type>avionics</type>
|
||||
<delay-sec>1.5</delay-sec>
|
||||
<condition>
|
||||
<property>/sim/sound/warnings/cricket</property>
|
||||
</condition>
|
||||
|
@ -1917,7 +1982,7 @@
|
|||
|
||||
<stall-voice>
|
||||
<name>stall-voice</name>
|
||||
<mode>looped</mode>
|
||||
<mode>once</mode>
|
||||
<path>Aircraft/A320-family/Sounds/Cockpit/stall_voice.wav</path>
|
||||
<type>avionics</type>
|
||||
<condition>
|
||||
|
@ -2125,4 +2190,4 @@
|
|||
<max-dist>200.0</max-dist>
|
||||
</gear-screech-looped>
|
||||
</fx>
|
||||
</PropertyList>
|
||||
</PropertyList>
|
||||
|
|
Binary file not shown.
BIN
Sounds/Announce/cab_call.wav
Normal file
BIN
Sounds/Announce/cab_call.wav
Normal file
Binary file not shown.
Binary file not shown.
BIN
Sounds/Announce/cpt_doors.wav
Normal file
BIN
Sounds/Announce/cpt_doors.wav
Normal file
Binary file not shown.
BIN
Sounds/Announce/cpt_landing.wav
Normal file
BIN
Sounds/Announce/cpt_landing.wav
Normal file
Binary file not shown.
BIN
Sounds/Announce/cpt_takeoff.wav
Normal file
BIN
Sounds/Announce/cpt_takeoff.wav
Normal file
Binary file not shown.
BIN
Sounds/Announce/cpt_welcome.wav
Normal file
BIN
Sounds/Announce/cpt_welcome.wav
Normal file
Binary file not shown.
Binary file not shown.
BIN
Sounds/Announce/fa_boarding.wav
Normal file
BIN
Sounds/Announce/fa_boarding.wav
Normal file
Binary file not shown.
BIN
Sounds/Announce/fa_descent.wav
Normal file
BIN
Sounds/Announce/fa_descent.wav
Normal file
Binary file not shown.
BIN
Sounds/Announce/fa_landed.wav
Normal file
BIN
Sounds/Announce/fa_landed.wav
Normal file
Binary file not shown.
BIN
Sounds/Announce/fa_safety.wav
Normal file
BIN
Sounds/Announce/fa_safety.wav
Normal file
Binary file not shown.
BIN
Sounds/Announce/fa_seatbelt10k.wav
Normal file
BIN
Sounds/Announce/fa_seatbelt10k.wav
Normal file
Binary file not shown.
BIN
Sounds/Announce/fa_welcome.wav
Normal file
BIN
Sounds/Announce/fa_welcome.wav
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Sounds/cabin-chime.wav
Normal file
BIN
Sounds/cabin-chime.wav
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -8,7 +8,7 @@
|
|||
|
||||
<actuator name="/ECAM/timer/ground-calc">
|
||||
<description>Timer for the ECAM phase system</description>
|
||||
<input>/ECAM/ground-calc-immediate</input>
|
||||
<input>/ECAM/logic/ground-calc-immediate</input>
|
||||
<rate_limit sense="decr">120</rate_limit> <!-- Instant -->
|
||||
<rate_limit sense="incr">1</rate_limit> <!-- 1 second -->
|
||||
</actuator>
|
||||
|
@ -85,7 +85,7 @@
|
|||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/ECAM/ground-calc-immediate">
|
||||
<switch name="/ECAM/logic/ground-calc-immediate">
|
||||
<default value="0"/>
|
||||
<test logic="OR" value="1">
|
||||
/ECAM/flipflop/radar-altimeter-5-output eq 1
|
||||
|
|
|
@ -1710,7 +1710,7 @@
|
|||
<test logic="AND" value="1">
|
||||
/instrumentation/radar-altimeter[0]/radar-altitude-ft lt 1500
|
||||
/instrumentation/radar-altimeter[1]/radar-altitude-ft lt 1500
|
||||
<!-- /it-fbw/law ne 0 confirm -->
|
||||
/it-fbw/law ne 0
|
||||
/ECAM/warnings/logic/stall/phase-flipflop eq 1
|
||||
</test>
|
||||
</switch>
|
||||
|
@ -1736,7 +1736,7 @@
|
|||
</test>
|
||||
</test>
|
||||
</test>
|
||||
<!-- /it-fbw/law ne 0 confirm... -->
|
||||
/it-fbw/law ne 0
|
||||
<test logic="OR">
|
||||
/systems/navigation/adr/operating-1 eq 1
|
||||
/systems/navigation/adr/operating-2 eq 1
|
||||
|
|
|
@ -198,7 +198,7 @@
|
|||
<value>2.0</value>
|
||||
</time>
|
||||
<S>
|
||||
<property>/ECAM/ground-calc-immediate</property>
|
||||
<property>/ECAM/logic/ground-calc-immediate</property>
|
||||
</S>
|
||||
<output>ECAM/phases/monostable/gnd-output</output>
|
||||
</flipflop>
|
||||
|
@ -209,7 +209,7 @@
|
|||
<value>2.5</value>
|
||||
</time>
|
||||
<S>
|
||||
<property>/ECAM/ground-calc-immediate</property>
|
||||
<property>/ECAM/logic/ground-calc-immediate</property>
|
||||
</S>
|
||||
<output>ECAM/phases/monostable/gnd-output-2</output>
|
||||
</flipflop>
|
||||
|
|
|
@ -483,6 +483,7 @@ var refuelClass = {
|
|||
});
|
||||
|
||||
|
||||
systems.fuelSvc.Nodes.requestFuelLbs.setValue(pts.Consumables.Fuel.totalFuelLbs.getValue());
|
||||
amount.setValue(math.round((systems.fuelSvc.Nodes.requestFuelLbs.getValue() + systems.fuelSvc.Nodes.requestLbs.getValue()) / 1000, 0.1));
|
||||
|
||||
me._timerf();
|
||||
|
@ -593,11 +594,11 @@ var refuelClass = {
|
|||
if (acconfig_weight_kgs.getValue() == 1) {
|
||||
amount.setValue(target - 0.1 * LBS2KGS);
|
||||
if ((target - 0.1) * LBS2KGS >= 10.0) {
|
||||
me._FQI_pre.setText(sprintf("%2.1f", (target - 0.1) * LBS2KGS));
|
||||
me._FQI_pre.setText(sprintf("%2.1f", (target - (0.1 * LBS2KGS)) * LBS2KGS));
|
||||
} else {
|
||||
me._FQI_pre.setText(sprintf("%2.2f", (target - 0.1) * LBS2KGS));
|
||||
me._FQI_pre.setText(sprintf("%2.2f", (target - (0.1 * LBS2KGS)) * LBS2KGS));
|
||||
}
|
||||
systems.fuelSvc.Nodes.requestLbs.setValue((((target - 0.1) * LBS2KGS) - math.round(pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000, 0.1)) * 1000);
|
||||
systems.fuelSvc.Nodes.requestLbs.setValue(((target - 0.1) - math.round(pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000, 0.1)) * 1000);
|
||||
} else {
|
||||
amount.setValue(target - 0.1);
|
||||
if (target - 0.1 >= 10.0) {
|
||||
|
@ -615,11 +616,11 @@ var refuelClass = {
|
|||
if (acconfig_weight_kgs.getValue() == 1) {
|
||||
amount.setValue(target + 0.1);
|
||||
if ((target + 0.1) * LBS2KGS >= 10.0) {
|
||||
me._FQI_pre.setText(sprintf("%2.1f", (target + 0.1) * LBS2KGS));
|
||||
me._FQI_pre.setText(sprintf("%2.1f", (target + (0.1 * LBS2KGS)) * LBS2KGS));
|
||||
} else {
|
||||
me._FQI_pre.setText(sprintf("%2.2f", (target + 0.1) * LBS2KGS));
|
||||
me._FQI_pre.setText(sprintf("%2.2f", (target + (0.1 * LBS2KGS)) * LBS2KGS));
|
||||
}
|
||||
systems.fuelSvc.Nodes.requestLbs.setValue((((target + 0.1) * LBS2KGS) - math.round(pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000, 0.1)) * 1000);
|
||||
systems.fuelSvc.Nodes.requestLbs.setValue(((target + 0.1) - math.round(pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000, 0.1)) * 1000);
|
||||
} else {
|
||||
amount.setValue(target + 0.1);
|
||||
if (target + 0.1 >= 10.0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue