low.nas 950 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. ##### low level animation loop
  2. setlistener("/sim/signals/fdm-initialized", func {
  3. settimer(low_loop, 1);
  4. });
  5. var low_loop = func {
  6. var calt = getprop("position/altitude-agl-ft");
  7. var cspd = getprop("velocities/groundspeed-kt");
  8. var burn0 = getprop("controls/engines/engine[0]/afterburner");
  9. var burn1 = getprop("controls/engines/engine[1]/afterburner");
  10. if((calt <= 300) and (cspd >= 450)) {
  11. setprop("controls/state/low_level", 1);
  12. } elsif ((calt <= 300) and ((burn0 == 1) or (burn1 == 1))) {
  13. setprop("controls/state/low_level", 1);
  14. } else {
  15. setprop("controls/state/low_level", 0);
  16. }
  17. settimer(low_loop, 1);
  18. }
  19. #### low level models position
  20. #var low_model = func {
  21. #var state = getprop("controls/state/low_level");
  22. #if(state == 1) {
  23. #var long = getprop("position/longitude-deg");
  24. #var lat = getprop("position/latitude-deg");
  25. #geo.put_model("Aircraft/Jaguar/Models/Effects/aircraft_wash.xml", lat, long);
  26. #}
  27. #settimer(low_model, 1);
  28. #}