- Messages
- 371
- Country

Hello,
As you know, FSX has a bad management of AP turn anticipation with big aircraft at high speed. With my FMC project, this may occur problem xith some approaches. As I am working to adapt my FMC on B747, this problem is amplified. So I decide to write code to calculate amount of turn and apply a coefficient according this amoount of turn and aircraft speed.
So, as my knowledge in mathematic is very poor, I present my code to you because I found the solution but with an empiric method and I would like to know if there is a better solution to calculate this amount.
I found that there is 3 ways according current heading and next heading:
first way:
if current heading and next heading are both greater or smaller than 180, the amount of turn == abs (Current heading - next heading)
if one of the headings < 180 and the other >180, there are 2 ways :
the bigger heading - 180 is greater than the smallest heading, amount of turn == (Biggest heading - 180) + smallest heading
the bigger heading -180 is smaller than the smallest heading, amount of turn == biggest heading - smallest heading.
Is there a a more simply method to get this amount ?
Thanks
Francois
As you know, FSX has a bad management of AP turn anticipation with big aircraft at high speed. With my FMC project, this may occur problem xith some approaches. As I am working to adapt my FMC on B747, this problem is amplified. So I decide to write code to calculate amount of turn and apply a coefficient according this amoount of turn and aircraft speed.
So, as my knowledge in mathematic is very poor, I present my code to you because I found the solution but with an empiric method and I would like to know if there is a better solution to calculate this amount.
Code:
(L:NB_list_WYPT,number) 2 >
(A:RADIO HEIGHT,feet) 2000 > and
(A:GPS WP Distance,nmiles) 10 < and
(L:Init_FMC,bool) and
(L:CSTR_hold,bool) ! and
(L:ARC_DME,bool) ! and
(L:Leg_segment,bool) ! and if{ (L:TimerCycle,number) 100 < if{ (L:TimerCycle,number) ++ (>L:TimerCycle,number) } els{ 0 (>L:TimerCycle,number) }
(C:fs9gps:FlightPlanActiveWaypoint) (>C:fs9gps:FlightPlanWaypointIndex)
(C:fs9gps:FlightPlanWaypointMagneticHeading,degrees) (>L:CurrentTrack,number)
(C:fs9gps:FlightPlanWaypointIndex) 1 + (>C:fs9gps:FlightPlanWaypointIndex)
(C:fs9gps:FlightPlanWaypointMagneticHeading,degrees) (>L:NextTrack,number)
(L:CurrentTrack,number) 180 < (L:NextTrack,number) 180 < and
(L:CurrentTrack,number) 180 > (L:NextTrack,number) 180 > and or if{ (L:CurrentTrack,number) (L:NextTrack,number) - abs (>L:DeltaTurnAnticipation,number) }
els{ (L:CurrentTrack,number) (L:NextTrack,number) max (>L:Biggest,number) (L:CurrentTrack,number) (L:NextTrack,number) min (>L:Smallest,number)
(L:Biggest,number) 180 - (L:Smallest,number) > if{ (L:Biggest,number) 180 - (L:Smallest,number) + (>L:DeltaTurnAnticipation,number) }
els{ (L:Biggest,number) (L:Smallest,number) - (>L:DeltaTurnAnticipation,number) }
}
(L:DeltaTurnAnticipation,number) (L:DeltaTurnCoef,number) / s0 (A:GPS GROUND SPEED,knots) 200 / s1 l0 l1 * (>L:DeltaTurnAnticipationMiles,number)
(A:GPS WP Distance,nmiles) (L:DeltaTurnAnticipationMiles,number) < (L:TimerCycle,number) 98 > and if{ (C:fs9gps:FlightPlanActiveWaypoint) 1 + (>C:fs9gps:FlightPlanActiveWaypoint) 0 (>L:TimerCycle,number) }
}
first way:
if current heading and next heading are both greater or smaller than 180, the amount of turn == abs (Current heading - next heading)
if one of the headings < 180 and the other >180, there are 2 ways :
the bigger heading - 180 is greater than the smallest heading, amount of turn == (Biggest heading - 180) + smallest heading
the bigger heading -180 is smaller than the smallest heading, amount of turn == biggest heading - smallest heading.
Is there a a more simply method to get this amount ?
Thanks
Francois

