Profile image

Rear Aspect and All-Aspect Missiles

5,190 TheFighterHelmet  one month ago

Hello it's been 4 Months since my last post, but today I'm here to introduce a code that allows missiles to have an Rear-Aspect / All-Aspect Seeker


All-Aspect:
abs(atan2(rate(TargetDistance*cos(TargetElevation)*sin(TargetHeading)+Longitude),rate(TargetDistance*cos(TargetElevation)*cos(TargetHeading)+Latitude))-(Heading+(Heading<0?360:0)))<=70 | abs(atan2(rate(TargetDistance*cos(TargetElevation)*sin(TargetHeading)+Longitude),rate(TargetDistance*cos(TargetElevation)*cos(TargetHeading)+Latitude))-(Heading+(Heading<0?360:0)))>=290 & TargetDistance<=11000 ? 8 : (abs(atan2(rate(TargetDistance*cos(TargetElevation)*sin(TargetHeading)+Longitude),rate(TargetDistance*cos(TargetElevation)*cos(TargetHeading)+Latitude))-(Heading+(Heading<0?360:0)))>=70 | abs(atan2(rate(TargetDistance*cos(TargetElevation)*sin(TargetHeading)+Longitude),rate(TargetDistance*cos(TargetElevation)*cos(TargetHeading)+Latitude))-(Heading+(Heading<0?360:0)))<=290 & TargetDistance<=3000 ? 8 : !9)


Rear-Aspect:
abs(atan2(rate(TargetDistance*cos(TargetElevation)*sin(TargetHeading)+Longitude),rate(TargetDistance*cos(TargetElevation)*cos(TargetHeading)+Latitude))-(Heading+(Heading<0?360:0)))<=70 | abs(atan2(rate(TargetDistance*cos(TargetElevation)*sin(TargetHeading)+Longitude),rate(TargetDistance*cos(TargetElevation)*cos(TargetHeading)+Latitude))-(Heading+(Heading<0?360:0)))>=290 ? 8 : !9


Just Copy Code for whatever seeker your missile is for in the activationGroup field. The only only thing you need to change is TargetDistance for the All-Aspect Seeker, as the Rear-Aspect part will have much more locking range than the All-Aspect locking Range

For the Rear-Aspect, you just change the missile's maxRange value

References / Credits:
Target Velocity Heading
https://www.simpleplanes.com/Forums/View/1896019/Useful-FT-Codes-2-0

Non-Quaternion Heading Output
https://www.simpleplanes.com/Forums/View/1896019/Useful-FT-Codes-2-0