javascript: (() => {function resetLift2(){geofs.animation.values.liftLeftWing=-geofs.aircraft.instance.parts.wingleft.lift/2e5+geofs.animation.values.accZ/20,geofs.animation.values.liftRightWing=-geofs.aircraft.instance.parts.wingright.lift/2e5+geofs.animation.values.accZ/20}function getFlapChange(){geofs.animation.values.flapsPosition<geofs.animation.values.flapsTarget||geofs.animation.values.flapsPosition>geofs.animation.values.flapsTarget?(console.log("flaps extend"),geofs.animation.values.flapschange=1):geofs.animation.values.flapschange=0}geofs.aircraft.instance.setup.parts[3].animations[1].value="liftLeftWing",geofs.aircraft.instance.setup.parts[4].animations[1].value="liftLeftWing",geofs.aircraft.instance.setup.parts[5].animations[0].value="liftLeftWing",geofs.aircraft.instance.setup.parts[6].animations[0].value="liftLeftWing",geofs.aircraft.instance.setup.parts[7].animations[1].value="liftLeftWing",geofs.aircraft.instance.setup.parts[8].animations[1].value="liftRightWing",geofs.aircraft.instance.setup.parts[9].animations[0].value="liftRightWing",geofs.aircraft.instance.setup.parts[10].animations[0].value="liftRightWing",geofs.animation.values.flapschange=0,geofs.aircraft.instance.definition.sounds[8]={},geofs.aircraft.instance.definition.sounds[8].id="flapssound",geofs.aircraft.instance.definition.sounds[8].file="https://138772948-227015667470610340.preview.editmysite.com/uploads/1/3/8/7/138772948/777flap.mp3",geofs.aircraft.instance.definition.sounds[8].effects={start:{value:"flapschange"}},geofs.aircraft.instance.definition.sounds[9]={},geofs.aircraft.instance.definition.sounds[9].id="landinggearwarn",geofs.aircraft.instance.definition.sounds[9].file="https://138772948-227015667470610340.preview.editmysite.com/uploads/1/3/8/7/138772948/tlg.mp3",geofs.aircraft.instance.definition.sounds[9].effects={start:{value:"isGearWarn"}},geofs.aircraft.instance.definition.sounds[10]={},geofs.aircraft.instance.definition.sounds[10].id="flapswarn",geofs.aircraft.instance.definition.sounds[10].file="https://138772948-227015667470610340.preview.editmysite.com/uploads/1/3/8/7/138772948/tlf.mp3",geofs.aircraft.instance.definition.sounds[10].effects={start:{value:"isFlapsWarn"}},geofs.aircraft.instance.definition.sounds[11]={},geofs.aircraft.instance.definition.sounds[11].id="terrainwarn",geofs.aircraft.instance.definition.sounds[11].file="https://138772948-227015667470610340.preview.editmysite.com/uploads/1/3/8/7/138772948/tlt.mp3",geofs.aircraft.instance.definition.sounds[11].effects={start:{value:"isTerrainWarn"}},geofs.aircraft.instance.definition.sounds[12]={},geofs.aircraft.instance.definition.sounds[12].id="pullwarn",geofs.aircraft.instance.definition.sounds[12].file="https://138772948-227015667470610340.preview.editmysite.com/uploads/1/3/8/7/138772948/pullup.mp3",geofs.aircraft.instance.definition.sounds[12].effects={start:{value:"isPullupWarn"}},geofs.aircraft.instance.definition.sounds[13]={},geofs.aircraft.instance.definition.sounds[13].id="bankangle",geofs.aircraft.instance.definition.sounds[13].file="https://138772948-227015667470610340.preview.editmysite.com/uploads/1/3/8/7/138772948/bankangle.mp3",geofs.aircraft.instance.definition.sounds[13].effects={start:{value:"isBankWarn"}},geofs.aircraft.instance.definition.sounds[14]={},geofs.aircraft.instance.definition.sounds[14].id="1000",geofs.aircraft.instance.definition.sounds[14].file="https://138772948-227015667470610340.preview.editmysite.com/uploads/1/3/8/7/138772948/1000gpws_merged.mp3",geofs.aircraft.instance.definition.sounds[14].effects={start:{value:"gpws1000"}},geofs.aircraft.instance.definition.sounds[15]={},geofs.aircraft.instance.definition.sounds[15].id="500",geofs.aircraft.instance.definition.sounds[15].file="https://138772948-227015667470610340.preview.editmysite.com/uploads/1/3/8/7/138772948/500correct.mp3",geofs.aircraft.instance.definition.sounds[15].effects={start:{value:"gpws500"}},geofs.aircraft.instance.definition.sounds[16]={},geofs.aircraft.instance.definition.sounds[16].id="400",geofs.aircraft.instance.definition.sounds[16].file="https://138772948-227015667470610340.preview.editmysite.com/uploads/1/3/8/7/138772948/400gpws_merged.mp3",geofs.aircraft.instance.definition.sounds[16].effects={start:{value:"gpws400"}},geofs.aircraft.instance.definition.sounds[17]={},geofs.aircraft.instance.definition.sounds[17].id="300",geofs.aircraft.instance.definition.sounds[17].file="https://138772948-227015667470610340.preview.editmysite.com/uploads/1/3/8/7/138772948/300gpws_merged.mp3",geofs.aircraft.instance.definition.sounds[17].effects={start:{value:"gpws300"}},geofs.aircraft.instance.definition.sounds[18]={},geofs.aircraft.instance.definition.sounds[18].id="200",geofs.aircraft.instance.definition.sounds[18].file="https://138772948-227015667470610340.preview.editmysite.com/uploads/1/3/8/7/138772948/200gpws_merged.mp3",geofs.aircraft.instance.definition.sounds[18].effects={start:{value:"gpws200"}},geofs.aircraft.instance.definition.sounds[19]={},geofs.aircraft.instance.definition.sounds[19].id="100",geofs.aircraft.instance.definition.sounds[19].file="https://138772948-227015667470610340.preview.editmysite.com/uploads/1/3/8/7/138772948/100gpws_merged.mp3",geofs.aircraft.instance.definition.sounds[19].effects={start:{value:"gpws100"}},geofs.aircraft.instance.definition.sounds[20]={},geofs.aircraft.instance.definition.sounds[20].id="50",geofs.aircraft.instance.definition.sounds[20].file="https://138772948-227015667470610340.preview.editmysite.com/uploads/1/3/8/7/138772948/50gpws_merged.mp3",geofs.aircraft.instance.definition.sounds[20].effects={start:{value:"gpws50"}},geofs.aircraft.instance.definition.sounds[21]={},geofs.aircraft.instance.definition.sounds[21].id="40",geofs.aircraft.instance.definition.sounds[21].file="https://138772948-227015667470610340.preview.editmysite.com/uploads/1/3/8/7/138772948/40gpws_merged.mp3",geofs.aircraft.instance.definition.sounds[21].effects={start:{value:"gpws40"}},geofs.aircraft.instance.definition.sounds[22]={},geofs.aircraft.instance.definition.sounds[22].id="30",geofs.aircraft.instance.definition.sounds[22].file="https://138772948-227015667470610340.preview.editmysite.com/uploads/1/3/8/7/138772948/30gpws_merged.mp3",geofs.aircraft.instance.definition.sounds[22].effects={start:{value:"gpws30"}},geofs.aircraft.instance.definition.sounds[23]={},geofs.aircraft.instance.definition.sounds[23].id="20",geofs.aircraft.instance.definition.sounds[23].file="https://138772948-227015667470610340.preview.editmysite.com/uploads/1/3/8/7/138772948/20gpws_merged.mp3",geofs.aircraft.instance.definition.sounds[23].effects={start:{value:"gpws20"}},geofs.aircraft.instance.definition.sounds[24]={},geofs.aircraft.instance.definition.sounds[24].id="10",geofs.aircraft.instance.definition.sounds[24].file="https://138772948-227015667470610340.preview.editmysite.com/uploads/1/3/8/7/138772948/10gpws_merged.mp3",geofs.aircraft.instance.definition.sounds[24].effects={start:{value:"gpws10"}},geofs.aircraft.instance.definition.sounds[0].file="https://138772948-227015667470610340.preview.editmysite.com/uploads/1/3/8/7/138772948/777enginelow.mp3",geofs.aircraft.instance.definition.sounds[1].file="https://138772948-227015667470610340.preview.editmysite.com/uploads/1/3/8/7/138772948/777enginemid.mp3",geofs.aircraft.instance.definition.sounds[2].file="https://138772948-227015667470610340.preview.editmysite.com/uploads/1/3/8/7/138772948/777enginehigh.mp3",geofs.aircraft.instance.definition.sounds[3].file="https://138772948-227015667470610340.preview.editmysite.com/uploads/1/3/8/7/138772948/777enginehigh.mp3",audio.init(geofs.aircraft.instance.definition.sounds),geofs.aircraft.instance.definition.sounds[0].effects.volume.ratio=100,geofs.aircraft.instance.definition.sounds[0].effects.volume.ramp=[100,500,2e3,1e4],geofs.aircraft.instance.definition.sounds[1].effects.volume.ratio=100,geofs.aircraft.instance.definition.sounds[2].effects.volume.ratio=100,geofs.aircraft.instance.definition.sounds[3].effects.volume.ratio=100,geofs.aircraft.instance.definition.sounds[4].effects.volume.ratio=100;let pitchInputs=[0,0,0,0,0,0,0],rollInputs=[0,0,0,0,0,0,0],yawInputs=[0,0,0,0,0,0,0];function pushInputs(){pitchInputs.push(geofs.animation.values.computedPitch),rollInputs.push(geofs.animation.values.roll),yawInputs.push(geofs.animation.values.computedYaw)}function computeOutputs(){var a=movingAvg(pitchInputs,6,6),e=movingAvg(rollInputs,6,6),i=movingAvg(yawInputs,6,6);geofs.animation.values.averagePitch=a[a.length-3],geofs.animation.values.averageRoll=e[e.length-3],geofs.animation.values.averageYaw=i[i.length-3],geofs.animation.values.outerAveragePitch=clamp(geofs.animation.values.averagePitch/(geofs.animation.values.kias/200),-1,1),geofs.animation.values.outerAverageRoll=clamp(geofs.animation.values.averageRoll/(geofs.animation.values.kias/100),-1,1),geofs.animation.values.outerAverageYaw=clamp(geofs.animation.values.averageYaw/(geofs.animation.values.kias/100),-1,1)}function movingAvg(a,e,i){null==i&&(i=0);const n=[];for(let s=0;s<a.length;s++){const t=a.slice(Math.max(s-e,0),Math.min(s+i+1,a.length)),o=t.reduce((a,e)=>a+(isNaN(e)?0:e),0)/t.length;n.push(o)}return n}geofs.animation.values.averagePitch=null,geofs.animation.values.averageRoll=null,geofs.animation.values.averageYaw=null,geofs.animation.values.outerAveragePitch=null,geofs.animation.values.outerAverageRoll=null,geofs.animation.values.outerAverageYaw=null,geofs.aircraft.instance.parts.aileronleft.animations[0].value="outerAverageRoll",geofs.aircraft.instance.parts.aileronright.animations[0].value="outerAverageRoll",geofs.aircraft.instance.parts.flaperonleft.animations[0].value="averageRoll",geofs.aircraft.instance.parts.flaperonright.animations[0].value="averageRoll",geofs.aircraft.instance.parts.elevleft.animations[0].value="outerAveragePitch",geofs.aircraft.instance.parts.elevright.animations[0].value="outerAveragePitch",geofs.aircraft.instance.parts.rudder.animations[0].value="averageYaw",geofs.animation.values.computedPitch=0,geofs.animation.values.computedYaw=0,geofs.animation.values.computedRoll=0;let lastPitchValue=0,gLimitedPitch=0,increment=0,deadZone=.01,tiltToHold=0,pitchStage1=0;function computePitch(){geofs.animation.values.pitch<=deadZone&&geofs.animation.values.pitch>=-deadZone?pitchStage1=-(tiltToHold-geofs.animation.values.atilt)/10:(tiltToHold=geofs.animation.values.atilt,pitchStage1=geofs.animation.values.pitch),geofs.animation.values.computedPitch=clamp(pitchStage1,-1,1)}function computeYaw(){geofs.animation.values.atilt>=-70&&geofs.animation.values.atilt<=70?1==geofs.animation.values.gearPosition?(geofs.animation.values.aroll>=-75&&geofs.animation.values.aroll<=75&&(geofs.animation.values.computedYaw=clamp(geofs.animation.values.yaw-50*geofs.aircraft.instance.htrAngularSpeed[0],-1,1)),geofs.animation.values.aroll<=-75&&geofs.animation.values.aroll>=-90&&(geofs.animation.values.computedYaw=clamp(geofs.animation.values.yaw-50*geofs.aircraft.instance.htrAngularSpeed[0],-1,1)),geofs.animation.values.aroll<=-90&&geofs.animation.values.aroll>=-105&&(geofs.animation.values.computedYaw=clamp(geofs.animation.values.yaw+50*geofs.aircraft.instance.htrAngularSpeed[0],-1,1)),geofs.animation.values.aroll<=75&&geofs.animation.values.aroll>=90&&(geofs.animation.values.computedYaw=clamp(geofs.animation.values.yaw-50*geofs.aircraft.instance.htrAngularSpeed[0],-1,1)),geofs.animation.values.aroll<=90&&geofs.animation.values.aroll>=105&&(geofs.animation.values.computedYaw=clamp(geofs.animation.values.yaw+50*geofs.aircraft.instance.htrAngularSpeed[0],-1,1)),geofs.animation.values.aroll<=-75&&geofs.animation.values.aroll>=75&&(geofs.animation.values.computedYaw=clamp(geofs.animation.values.yaw+50*geofs.aircraft.instance.htrAngularSpeed[0],-1,1))):(geofs.animation.values.aroll>=-75&&geofs.animation.values.aroll<=75&&(geofs.animation.values.computedYaw=clamp(geofs.animation.values.yaw-50*geofs.aircraft.instance.htrAngularSpeed[0],-1,1)/2),geofs.animation.values.aroll<=-75&&geofs.animation.values.aroll>=-90&&(geofs.animation.values.computedYaw=clamp(geofs.animation.values.yaw-50*geofs.aircraft.instance.htrAngularSpeed[0],-1,1)/2),geofs.animation.values.aroll<=-90&&geofs.animation.values.aroll>=-105&&(geofs.animation.values.computedYaw=clamp(geofs.animation.values.yaw+50*geofs.aircraft.instance.htrAngularSpeed[0],-1,1)/2),geofs.animation.values.aroll<=75&&geofs.animation.values.aroll>=90&&(geofs.animation.values.computedYaw=clamp(geofs.animation.values.yaw-50*geofs.aircraft.instance.htrAngularSpeed[0],-1,1)/2),geofs.animation.values.aroll<=90&&geofs.animation.values.aroll>=105&&(geofs.animation.values.computedYaw=clamp(geofs.animation.values.yaw+50*geofs.aircraft.instance.htrAngularSpeed[0],-1,1)/2),geofs.animation.values.aroll>=75&&geofs.animation.values.aroll<=-75&&(geofs.animation.values.computedYaw=clamp(geofs.animation.values.yaw+50*geofs.aircraft.instance.htrAngularSpeed[0],-1,1)/2)):geofs.animation.values.computedYaw=geofs.animation.values.yaw}let restingPoint=16.152139372973117;function tiltGear(){geofs.animation.values.haglFeet<=18&&(geofs.animation.values.gearTilt=clamp(geofs.animation.values.haglFeet-18,-6,0))}geofs.animation.values.gearTilt=null,geofs.aircraft.instance.parts.bogeyright.animations[0].value="gearTilt",geofs.aircraft.instance.parts.bogeyleft.animations[0].value="gearTilt",geofs.aircraft.instance.parts.bogeyright.animations[0].offset=-27,geofs.aircraft.instance.parts.bogeyleft.animations[0].offset=-27,delete geofs.aircraft.instance.parts.bogeyright.animations[0].lt,delete geofs.aircraft.instance.parts.bogeyleft.animations[0].lt;let isApprConfig=!1;function testForAlarms(){geofs.animation.values.haglFeet<=500&&1==geofs.animation.values.gearPosition&&geofs.animation.values.climbrate<0?geofs.animation.values.isGearWarn=1:geofs.animation.values.isGearWarn=0,geofs.animation.values.haglFeet<=1e3&&0==geofs.animation.values.flapsPosition&&geofs.animation.values.climbrate<0?geofs.animation.values.isFlapsWarn=1:geofs.animation.values.isFlapsWarn=0,geofs.animation.values.haglFeet<=1e3&&geofs.animation.values.climbrate<=10&&geofs.animation.values.climbrate>=-2999&&0==geofs.animation.values.groundContact&&0==isApprConfig?geofs.animation.values.isTerrainWarn=1:geofs.animation.values.isTerrainWarn=0,geofs.animation.values.haglFeet<=1e3&&geofs.animation.values.climbrate<=-3e3&&0==geofs.animation.values.groundContact&&0==isApprConfig?geofs.animation.values.isPullupWarn=1:geofs.animation.values.isPullupWarn=0,geofs.animation.values.aroll<=45&&geofs.animation.values.aroll>=-45?geofs.animation.values.isBankWarn=0:geofs.animation.values.isBankWarn=1}function testForApproach(){isApprConfig=0==geofs.animation.values.isFlapsWarn&&0==geofs.animation.values.isGearWarn&&geofs.animation.values.climbrate<=-1}function doRadioAltCall(){isApprConfig&&(geofs.animation.values.haglFeet<=1e3+restingPoint&&geofs.animation.values.haglFeet>=900+restingPoint?geofs.animation.values.gpws1000=1:geofs.animation.values.gpws1000=0,geofs.animation.values.haglFeet<=500+restingPoint&&geofs.animation.values.haglFeet>=400+restingPoint?geofs.animation.values.gpws500=1:geofs.animation.values.gpws500=0,geofs.animation.values.haglFeet<=400+restingPoint&&geofs.animation.values.haglFeet>=300+restingPoint?geofs.animation.values.gpws400=1:geofs.animation.values.gpws400=0,geofs.animation.values.haglFeet<=300+restingPoint&&geofs.animation.values.haglFeet>=200+restingPoint?geofs.animation.values.gpws300=1:geofs.animation.values.gpws300=0,geofs.animation.values.haglFeet<=200+restingPoint&&geofs.animation.values.haglFeet>=100+restingPoint?geofs.animation.values.gpws200=1:geofs.animation.values.gpws200=0,geofs.animation.values.haglFeet<=100+restingPoint&&geofs.animation.values.haglFeet>=50+restingPoint?geofs.animation.values.gpws100=1:geofs.animation.values.gpws100=0,geofs.animation.values.haglFeet<=50+restingPoint&&geofs.animation.values.haglFeet>=40+restingPoint?geofs.animation.values.gpws50=1:geofs.animation.values.gpws50=0,geofs.animation.values.haglFeet<=40+restingPoint&&geofs.animation.values.haglFeet>=30+restingPoint?geofs.animation.values.gpws40=1:geofs.animation.values.gpws40=0,geofs.animation.values.haglFeet<=30+restingPoint&&geofs.animation.values.haglFeet>=20+restingPoint?geofs.animation.values.gpws30=1:geofs.animation.values.gpws30=0,geofs.animation.values.haglFeet<=20+restingPoint&&geofs.animation.values.haglFeet>=10+restingPoint?geofs.animation.values.gpws20=1:geofs.animation.values.gpws20=0,geofs.animation.values.haglFeet<=10+restingPoint&&geofs.animation.values.haglFeet>=5+restingPoint?geofs.animation.values.gpws10=1:geofs.animation.values.gpws10=0)}geofs.animation.values.isFlapsWarn=0,geofs.animation.values.isGearWarn=0,geofs.animation.values.isTerrainWarn=0,geofs.animation.values.isPullupWarn=0,geofs.animation.values.isBankWarn=0,geofs.animation.values.gpws1000=0,geofs.animation.values.gpws500=0,geofs.animation.values.gpws400=0,geofs.animation.values.gpws300=0,geofs.animation.values.gpws200=0,geofs.animation.values.gpws100=0,geofs.animation.values.gpws50=0,geofs.animation.values.gpws40=0,geofs.animation.values.gpws30=0,geofs.animation.values.gpws20=0,geofs.animation.values.gpws10=0,setInterval(function(){computeYaw(),tiltGear(),computePitch(),pushInputs(),computeOutputs(),resetLift2(),getFlapChange(),testForAlarms(),testForApproach(),doRadioAltCall()},20);})();