All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.nps.moves.deadreckoning.DIS_DR_FPW_02 Maven / Gradle / Ivy

Go to download

An open source implementation of the Distributed Interactive Simulation (DIS) IEEE-1278 protocol

There is a newer version: 5.8
Show newest version
package edu.nps.moves.deadreckoning;

import edu.nps.moves.deadreckoning.utils.*;

/**
 *
 * (PRIMARY Methods group) Fixed, Rate of Positon, World || Constant Linear motion
 * 
 * @author Sheldon L. Snyder
 */
public class DIS_DR_FPW_02 extends DIS_DeadReckoning
{
    
    /***************************************************************************
     * The driver for a DIS_DR_FPW_02 DR algorithm from the Runnable interface
     * 

* Updates the position of this entity *

* P_new = P_original + LinVel * delta * t *

* called by thread.start() in the super class *

* Velocity is the speed that a entity is moving...linear constant speed */ public void run() { while(true) { deltaCt++; try { Thread.sleep(stall); }catch (Exception e){} entityLocation_X += entityLinearVelocity_X * changeDelta; entityLocation_Y += entityLinearVelocity_Y * changeDelta; entityLocation_Z += entityLinearVelocity_Z * changeDelta; } }//run()-------------------------------------------------------------------- }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy