- Messages
- 40
- Country

Hello:
I am flying a supersonic airplane and have some problems controlling it, even when using AP.
I would like that if the airplane reaches some altitude, it does not climb anymore. Also, I want to avoid the airplane pitch exceeds 40 deg, since it easily enters in lost.
For that, I am using this in my autopilot:
The above code checks pitch, and if it is less than -40 deg ( -0.61 rad ), it would set the pitch to the limit: -0.61 rad (note that less pitch would be -45, -50 deg... it's measured in negative numbers when pitch points upwards)
This part of code does not work.
Next segment checks altitude, when 40000 feet are reached, FSX does freeze altitude: airplane does not climb anymore. But it won't descend, I can't unfreeze it. Maybe I could use pitch indicator, but... I am confused!
Thanks!
I am flying a supersonic airplane and have some problems controlling it, even when using AP.
I would like that if the airplane reaches some altitude, it does not climb anymore. Also, I want to avoid the airplane pitch exceeds 40 deg, since it easily enters in lost.
For that, I am using this in my autopilot:
Code:
<update id="UpdateAP">
<script>
(A:PLANE PITCH DEGREES, radians) -0.61 <= if{ -0.61 (>K:AXIS_PAN_PITCH, radians) }
(A:PLANE ALTITUDE, feet) 40000 >=
if{
0 (>L:AtFr,bool)
1 (>K:FREEZE_ALTITUDE_TOGGLE, bool)
40000 (>K:FREEZE_ALTITUDE_SET, feet)
(A:VERTICAL SPEED, feet) 0 <= if{ 0 (>K:FREEZE_ALTITUDE_TOGGLE, bool) }
1 (>L:AtFr,bool)
}
<script>
</update>
The above code checks pitch, and if it is less than -40 deg ( -0.61 rad ), it would set the pitch to the limit: -0.61 rad (note that less pitch would be -45, -50 deg... it's measured in negative numbers when pitch points upwards)
This part of code does not work.
Next segment checks altitude, when 40000 feet are reached, FSX does freeze altitude: airplane does not climb anymore. But it won't descend, I can't unfreeze it. Maybe I could use pitch indicator, but... I am confused!
Thanks!
