Hello Guest  /  Join  /  Sign In  /  Get Desura
Avatar

blahdy

James joined Jan 3, 2010

Offline Since
Jan 26, 2014
Country
United States United States
Gender
Male
Contact
Private Message
Email
Members Only
XFire
blahdy

Shockwave Level

23
  • Reaching for the stars <3
  • Scenes from MW Mod 4.2
  • Scenes from MW Mod 4.2
  • Scenes from MW Mod 4.2
Blog RSS Report abuse Command to LOS (CLOS) Guidance Implementation

0 comments by blahdy on Oct 26th, 2013

Implementing the Command to Line of Sight (CLOS) guidance method in World in Conflict (also can be ported to other game environments).

YouTube Video:
Link - Youtube.com


python code:
def GCFLINT_Command_to_LOS( msl_pos, launcher_pos, tgt_pos, latax, cre_data, beam_motion_data ):
  """
    Command to Line of Sight (CLOS) Guidance
   
    msl_pos     = (Vector3) missile's current position
    launcher_pos  = (Vector3) launcher's current position
    tgt_pos     = (Vector3) target's current position
    latax       = (Mutable Vector3) mutable object for providing guidance command
    cre_data    = (Mutable dict) dict object for Kalman estimation states on CRE
    beam_motion_data = (Mutable Vector3) mutable object for recording previous
               beam motion
 
    Command to LOS (CLOS) Guidance or "three point guidance" is probably the
    oldest and the first rudimentary form of missile guidance methods.  
    Tracing its roots back to the Nazi Germany's Wasserfall experimental SAM
    and early forms of anti-shipping guided PGMs, it was originally conceived
    as Manual Command to LOS (MaCLOS or MCLOS), where a human operator
    remotely steered the missile along his visible line of sight toward the
    target.
   
    After the World War, MCLOS was further modified with improvements in
    sensors and analog computing technology, spawning new derivatives such as
    Semi-Automatic Command to LOS (SACLOS), Automatic Command to LOS (ACLOS or
    simply CLOS) and Beamriding Guidance.  In case of SACLOS, the operator has
    to maintain his sight on the target and the guidance computer will
    automatically generate the necessary steering commands to the outgoing
    missile -- a good example of this is BGM-71 TOW missile.  Fully automatic
    CLOS (ACLOS) was used on first generation SAMs (i.e. Talos, Nike Zeus, etc).
    Even to this day, ACLOS is widely popular for cheap short-range AA uses
    (i.e. SA-22 Pantsir/SA-19 Tunguska, Crotale, RBS-70, Roland, etc), because
    the missile is very cheap to manufacture (there is no need for seeker and
    complex embedded electronics).
   
   
   
    CLOS works on the premise that the target, outgoing missile and the launcher
    are all on the same Line of Sight (LOS) line.  As missile is outgoing, the
    guidance computer on the launcher will steer the missile to snap it on its
    sightline/LOS toward the target.
   
    The outgoing missile's distance normal to the launcher-to-target LOS (that
    is, how far the missile is off from the LOS line) is known as the
    'Cross Range Error' or 'CRE'.  It is this 'CRE' that the guidance computer
    will have to reduce to zero in order to get the outgoing missile to snap
    back on the LOS line toward the target.  CRE is to be calculated as follows:
   
    CRE = |radar_to_missile| x<cross product> |radar_to_target|
        -----------------------------------------------------
                |radar_to_target|
   
    The guidance computer will calculate the required lateral acceleration to
    bring CRE to zero, where:
   
      required acceleration = K * CRE + Beam_Motion_Term
      K = optional Guidance Gain
   
    Because CLOS relies on the launcher-target LOS as its principal tracking
    reference, it is quite vulnerable to high velocity situations, especially in
    situations where the target is crossing; in such cases, it can behave as bad
    as pure-pursuit/tail-chase homing guidance.  To help mitigate the increased
    acceleration requirements against crossing targets, a "Beam motion" term is
    added after the guidance command.  Beam motion is the target's acceleration
    normal to the launcher-target LOS.
   
    Addition of beam motion term allows CLOS missile to more quickly react to
    changing LOS rate, but ultimately, CLOS is at best, good for producing lot
    of cheap anti-aircraft and anti-slow-moving (i.e. tank) missiles.  For
    intercepting high performance targets with good accuracy, or to achieve
    sophisticated "hit to kill" type of interception, you would want to use one
    of the modern derivatives of Proportional Navigation (PN) family of
    guidance methods.
   
  """

  import wic.common.math as math
  from predictorFCS_flint__includes__ import EXFLINT_Kalman_Filter
 
  launcher_to_msl = math.Vector3( msl_pos ) - launcher_pos
  msl_heading_direction = ( math.Vector3( tgt_pos ) - msl_pos ).NormalizeSafe()
  command_los = math.Vector3( tgt_pos ) - launcher_pos
 
  # Cross Range Error (CRE) -
  # radar_to_msl <X cross product> radar_to_tgt * ( 1.0 / radar_to_target )
  CRE = EXFLINT_Kalman_Filter( cre_data, ( launcher_to_msl.Cross(command_los) * ( 1.0 / command_los.Length() ) ).Length() )
 
  # Beam motion term -- perceived target's inertial acceleration normal
  # to Line of Sight
  Bmp = math.Vector3( tgt_pos ) - beam_motion_data
  beam_motion_data = math.Vector3( tgt_pos )
 
  # Now, calculate the final Lateral Acceleration required for our missile
  # to home into our target.
  latax = msl_heading_direction * CRE + Bmp
 
  # my job is done, it's now up to EXFLINT.Integrate() to steer the missile.
  return True
 
Comments  (0 - 10 of 24)
GeneralKong
GeneralKong Sep 18 2013, 9:39pm said:

hey blahdy, I was wondering there was a way of adding a unit to be spawnable by the anhcheats?

+1 vote     reply to
blahdy
blahdy Sep 23 2013, 4:37pm replied:

Any unit is spawnable by anhcheats. Try using shift+alt, and you should see a menu of all available units to spawn.

+1 vote     reply to
NobleSeven
NobleSeven Mar 25 2013, 5:21am said:

I absolutely love your MW Mod history, it's inspiring, and sad at times. I heard of this mod several years ago, by that time you guys are still in MW 2.0 and I had barely any knowledge about you guys until I heard of the fixed wing aircraft, something new! Since then I followed the mod faithfully until now. And now that you wrote this, I fully know how much struggle had you guys experienced just to get us a wonderful mod for a dead game (worthless is may seem) but WiC had always been my favorite RTS as well, followed by Company of Heroes. By the time I reached the last part of your writing, I felt sad that how could they kill a game so fun and great, not only is it made by the same team behind Homeworld, but it's also the game with best story. I know I have said my thanks to you guys, but now that I know more I want to thank you guys more for this mod. So far the mod had been the best mod for any game out there, better than GMod. Have you guys think of moving to Supreme Commander? The game had mod capabilities, not much I should say. But the upcoming Arma 3 is promising, good luck to you guys :) and once again very big thanks to you guys :) BEST MOD EVER!!!

+1 vote     reply to
DEathgod65
DEathgod65 Sep 11 2012, 11:54am said:

After following the WiC: MW Mod, you seem like one of the smartest guys on Moddb to be honest! And have you considered working with the developer of Vector Thrust? Seems that a arcade style flight simulator with realistic missiles and aerial defence seems like the logical next step for the expertise of the MW Developers!

+1 vote     reply to
freeders
freeders Jul 29 2012, 8:06pm said:

Hey, I was super impressed to see that you were still around and working on the MW mod after all of this time, nice work. I'm still majorly bummed though that the Black Hawk Down never quite got off its feet and I know there's still players that are interested in it, so I've thought about taking it upon myself to update the mod to the latest WiC patch and maybe get some people back but I want to know where to start. What would of broke the mod after patch 10 came out and what exactly should be done to make it compatible with patch 11 from patch 9?

+1 vote     reply to
blahdy
blahdy Aug 8 2012, 9:22pm replied:

So, from patch 9 -> patch 10, they reformatted some components of unittypes_wic.juice (the file that lists all in-game units) which made pre-patch 10 games incompatible.

To fix this, you need to contact the author of the mod to get you the source files (the actual unittypes_wic.juice text file), and you need to manually diff out the differences between pre-patch 10 and post-patch 10 wic, or simply re-add the custom units he created onto a new fresh copy of unittypes_wic.juice.

It's a major pain in the butt, and part of me is glad that WiC is not updated anymore, as modding becomes easier to maintain.

+1 vote     reply to
m1a1driver
m1a1driver Mar 24 2012, 6:51pm said:

Excellent work man. very nice. 10 out 0f 10. only little things is some wheels are static on movng vehicles. but thats a simple animation fix form someone like you who develpoed this whole thing. great job

+1 vote     reply to
blahdy
blahdy Jul 29 2012, 1:53am replied:

Thanks!

+1 vote     reply to
TehSTIG
TehSTIG Mar 4 2012, 10:50pm said:

I recently downloaded this mod and do enjoy it, but I cannot find the UAV or the F-22 (i think that's what it is based on the picture in your videos) in the tactical aid menu. They do occasionally appear as my units on the bottom of the screen but I never called them in (since I can't find them) and I can't control them.

+1 vote     reply to
dhannemon13
dhannemon13 May 2 2012, 7:33am replied:

Err......
You can use the FARP to spawn these planes.
And for balancing, blahdy didn't let player to control the planes. Use the JTAC or FAC to give them attack coordinates.

+1 vote     reply to
Post a Comment
click to sign in and comment

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

ModDB
ModDB Web & Community group with 3,660 members
Aircraft Lovers Group
Aircraft Lovers Group Hobbies & Interests group with 1,300 members
Anti-Aircraft Lovers Group
Anti-Aircraft Lovers Group Hobbies & Interests group with 318 members
United States of America
United States of America Geographic group with 244 members
WIC : Modern Warfare Mod Team
WIC : Modern Warfare Mod Team Developer with 21 members
Friends
MoralProfligacy
MoralProfligacy friends since Jul 10, 2011
Markwar
Markwar friends since Nov 24, 2012
dhannemon13
dhannemon13 friends since May 28, 2012
Kommandant.12
Kommandant.12 friends since Mar 2, 2012
BIGsmalll
BIGsmalll friends since Feb 24, 2012
Havoc_frost
Havoc_frost friends since Aug 15, 2010
z741
z741 friends since Dec 8, 2013
Sgt.Ghost
Sgt.Ghost friends since Mar 9, 2013
Tyen901
Tyen901 friends since Sep 2, 2012
Keksz
Keksz friends since Aug 1, 2011
Accolades
ModDB
Statistics
Activity Points
2,647
Rank
473 of 466,389
Watchers
13 members
Time Online
1 minute
Comments
690
Site Visits
6,767
Profile Visitors
13,901 (1 today)