Sign in to follow this  
cjordan

Need help, probably going about this all the wrong way.

Recommended Posts

I have been trying to built an Auto Reverser, but hit a snag. everything works as it should until I land. The reversers come on if the aircraft is on the ground and airspeed above 60 knots, then they turn off, the probblem is I don't have a clue how to change it so they stay off. The engine is set to go to "0" to get the reversers to turn off. And as I see it, the aircraft is on the ground and so the "CaseValue" stay the same and It won't speed up the throttles because they are set to "0" when I disable that part its fine until I hit 60 knots the the reversers come on. ???? any help would be great I should have picked an easier one for a first project......... This is the code....(L:CaseValue, number)(A:SIM ON GROUND, bool) (A:AIRSPEED TRUE, knots) 60 > + 2 == if{ 2 (>L:CaseValue, number) -16383 (>K:THROTTLE_SET) } (A:SIM ON GROUND, bool) (A:AIRSPEED TRUE, knots) 60 < + 2 == if{ (>L:CaseValue, number) 0 (>K:THROTTLE_SET) } (L:CaseValue, number) 0 == if{ 1 (>L:CaseValue, number) } els{ 0 (>L:CaseValue, number) }

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

I assume the "+ 2 ==" test is your way of coding a logical AND ??There are better ways to do that ;-)And secondly, you better test on A:GROUND VELOCITY and NOT Airspeed, because you don't want it to be wind-dependant.Also, the ARMED state makes it a bit complex, because you still want the gauge to do something (force reversers off)So, a more simple version would do this:- OFF: gauge not active- ON: - When speed > 60 knots and on ground: reversers forced on. - When speed < 60 knots and on ground: reversers forced off.Which would give eg. this code.(L:CaseValue, bool) (A:SIM ON GROUND, bool) (L:CaseValue, bool) && if{ (A:GROUND VELOCITY, knots) 60 > if{ -16383(>K:THROTTLE_SET) } els{ (A:GENERAL ENG1 THROTTLE LEVER POSITION,percent) 0 < if{ 0 (>K:THROTTLE1_SET) } (A:GENERAL ENG2 THROTTLE LEVER POSITION,percent) 0 < if{ 0 (>K:THROTTLE2_SET) } (A:GENERAL ENG3 THROTTLE LEVER POSITION,percent) 0 < if{ 0 (>K:THROTTLE3_SET) } (A:GENERAL ENG4 THROTTLE LEVER POSITION,percent) 0 < if{ 0 (>K:THROTTLE4_SET) } } } (L:CaseValue, bool) ! (>L:CaseValue, bool)of course, with this code, the pilot should set the gauge OFF before takeoff run (otherwise the reverse thrusters will engage when > 60 knots.Also, you can make the gauge more complex (with an ARMED state), but then should first describe exactly what the state transitions should be.Cheers, ROb Barendregt

Share this post


Link to post
Share on other sites

Thanks, I got your code to work, I had this before but didn't like it because the engines go to 0 in flight when it is turned on. I guess back to the drawing board. I think with the armed would be of more use.

Share this post


Link to post
Share on other sites

Sorry, but I don't understand this.With the way it is coded above, (unless I made a coding error), the gauge does nothing when the aircraft is in the air; it only gives throttle commands when the aircraft is on the ground.So when you activate the gauge while in the air, nothing will happen.Rob

Share this post


Link to post
Share on other sites

Seems to me when I tried it it locked the throttles in the air so I fixed that and it worked good, other than there wasn't an "Arm" function. Well I went back to the drawing board and got one to work with the Arming feature. Click the arm on the ground and it doesn't do anything, in the air it will arm and on landing the Engines go into reverse, spoilers deploy and flaps go to max. at about 60 knots Spoilers retract, flaps retract, and the engines go to idle. I surprized myself. and only used 4 cases to do it. But thanks for your help. everything helps with this stuff. As my first gauge I should have picked a toggle switch. LOL But I have learned alot doing this. Patients for one, and if you think you have pulled all your hair out, there is always a bit more to pull... Thanks again.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this