Profile image

Sea-skimming Missile (Like the JASSM missile,I'm pretty sure)

1,102 GeorgianSpecialAirforce  1.1 years ago

Anybody know how to make a sea-skimming missile?
I've been trying but almost never works out

  • Log in to leave a comment
  • Profile image

    Das some good info,thanks!!!

    1.1 years ago
  • Profile image
    6,361 11qazxc

    FCLongitude,FCAltitude,FCLatitude are coords of missile

    TD=sqrt( pow(Longitude-FCLongitude+TargetDistance*cos(TargetElevation)*sin(TargetHeading),2) + pow(Latitude-FCLatitude+TargetDistance*cos(TargetElevation)*cos(TargetHeading),2) )

    TAlt=Altitude+TargetDistance*sin(TargetElevation)

    h=5+195*(.5+.5*cos(clamp(0.1*TD+20,0,340)))+1800*(.5+.5*cos(clamp(.01*(TD-45000),0,180)))

    __D is dampener, __P is gain
    PCi=(lerp(TAlt,h,pow(TD/200,2))-FCAltitude+rate(lerp(TAlt,h,pow(TD/200,2))-FCAltitude)*__D)*__P

    40 here is some distance after which missile surely can't damage airplane
    Missile's pitch angle=smooth((abs(Longitude-FCLongitude)+abs(Latitude-FCLatitude))<40|(PCi!=PCi)?0:sign(PCi)*90,(PCi!=PCi)?0:abs(PCi))

    Be carefull, SP forum might not display full expressions

    +1 1.1 years ago