public abstract class MovingObject extends WorldObject
potentialVector| Constructor and Description | 
|---|
| MovingObject(double[] position,
            double direction,
            double speed,
            double time,
            double standoff)Constructor | 
| MovingObject(double time,
            double standoff)Constructor for a zero-velocity object that will be placed at the origin with zero velocity | 
| MovingObject(double x,
            double y,
            double direction,
            double speed,
            double time,
            double standoff)Constructor | 
| MovingObject(Point position,
            double direction,
            double speed,
            double time,
            double standoff)Constructor | 
| Modifier and Type | Method and Description | 
|---|---|
| void | copyStateInfo(MovingObject source)Copies the state information (location and velocity) from one moving object to another | 
| double | getDirection() | 
| double | getPostureTime() | 
| protected double | getPotentialForce(double[] position)Computes the of the potential vector directing the owning vehicle away from this object | 
| protected double | getPotentialForce(double x,
                 double y)Computes the of the potential vector directing the owning vehicle away from this object | 
| protected double | getPotentialForce(Point position)Computes the of the potential vector directing the owning vehicle away from this object | 
| double[] | getPotentialVector(double[] position,
                  double maxDofConcern)Computes and returns a potential vector for directing the owning vehicle
 towards a goal point while avoiding this object | 
| double[] | getPotentialVector(double x,
                  double y)Computes and returns a potential vector for directing the owning vehicle away from this object | 
| double[] | getPotentialVector(Point position)Computes and returns a potential vector for directing the owning vehicle
 towards a goal point while avoiding this object | 
| double | getSpeed() | 
| boolean | isLocated() | 
| boolean | isTooClose(double x,
          double y)Determines whether or not any moving objects are too close to the vehicle | 
| void | setDirection(double newDirection)Sets a new direction of movement for the object | 
| void | setPosit(double[] newPosit)Resets the object's position in the world | 
| void | setPosit(double newX,
        double newY)Resets the object's position in the world | 
| void | setPosit(Point newPosit)Resets the object's position in the world | 
| void | setSpeed(double newDirection,
        double newSpeed)Sets a new speed for the object | 
| void | setVelocity(double newDirection,
           double newSpeed)Sets a new velocity (direction and speed) for the object | 
| String | toString()Generates a string representation of the wall object | 
| void | updatePositionDR(double newTime)Updates the position using dead reckoning
 WARNING:  Does not do anything to prevent moving "backwards" in time | 
| void | updatePositionFix(double[] newPosit,
                 double time)Updates the position using dead reckoning
 WARNING:  Does not do anything to prevent moving "backwards" in time | 
| void | updatePositionFix(double newX,
                 double newY,
                 double time)Updates the position using dead reckoning
 WARNING:  Does not do anything to prevent moving "backwards" in time | 
| void | updatePositionFix(Point newPosit,
                 double time)Updates the position using dead reckoning
 WARNING:  Does not do anything to prevent moving "backwards" in time | 
getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistanceOfConcern, getPosit, getPotentialForceDirection, getPotentialForceDirection, getPotentialForceDirection, getStandoff, getXPosit, getYPosit, setStandoffpublic MovingObject(double x,
            double y,
            double direction,
            double speed,
            double time,
            double standoff)
x - north/south Cartesian coordinate of the object's location in the worldy - east/west Cartesian coordinate of the object's location in the worlddirection - direction (degrees) that the object is movingspeed - speed at which the object is moving (m/sec)time - mission time (secs from mission start) that the object is first entered into the systemstandoff - required distance (meters) that the vehicle must remain clear from this objectpublic MovingObject(double[] position,
            double direction,
            double speed,
            double time,
            double standoff)
position - 2-element array with the Cartesian coordinates of the object's location in the worlddirection - direction (degrees) that the object is movingspeed - speed at which the object is moving (m/sec)time - mission time (secs from mission start) that the object is first entered into the systemstandoff - required distance (meters) that the vehicle must remain clear from this objectpublic MovingObject(Point position, double direction, double speed, double time, double standoff)
position - 2-element array with the Cartesian coordinates of the object's location in the worlddirection - direction (degrees) that the object is movingspeed - speed at which the object is moving (m/sec)time - mission time (secs from mission start) that the object is first entered into the systemstandoff - required distance (meters) that the vehicle must remain clear from this objectpublic MovingObject(double time,
            double standoff)
time - mission time (secs from mission start) that the object is first entered into the systemstandoff - required distance (meters) that the vehicle must remain clear from this objectpublic void copyStateInfo(MovingObject source)
source - moving object from which the state info is to be copiedpublic boolean isLocated()
public void updatePositionDR(double newTime)
newTime - mission time (secs from mission start) that the vehicle's position is being computed forpublic void updatePositionFix(double newX,
                     double newY,
                     double time)
newX - north/south Cartesian coordinate of the object's new location in the worldnewY - east/west Cartesian coordinate of the object's new location in the worldtime - mission time (secs from mission start) that the vehicle's position is being computed forpublic void updatePositionFix(double[] newPosit,
                     double time)
newPosit - Cartesian coordinates (2x1 array) of the object's new location in the worldtime - mission time (secs from mission start) that the vehicle's position is being computed forpublic void updatePositionFix(Point newPosit, double time)
newPosit - Cartesian coordinates (2x1 array) of the object's new location in the worldtime - mission time (secs from mission start) that the vehicle's position is being computed forpublic void setPosit(double newX,
            double newY)
setPosit in class WorldObjectnewX - newY - public void setPosit(double[] newPosit)
setPosit in class WorldObjectnewPosit - 2-element array containing the new Cartesian positionpublic void setPosit(Point newPosit)
setPosit in class WorldObjectnewPosit - 2-element array containing the new Cartesian positionpublic void setVelocity(double newDirection,
               double newSpeed)
newDirection - new direction (degrees) that the object is movingnewSpeed - new speed at which the object is moving (m/sec)public void setDirection(double newDirection)
newDirection - new direction (degrees) that the object is movingpublic double getDirection()
public void setSpeed(double newDirection,
            double newSpeed)
newSpeed - new speed at which the object is moving (m/sec)public double getSpeed()
public double getPostureTime()
public double[] getPotentialVector(double[] position,
                          double maxDofConcern)
getPotentialVector in class WorldObjectposition - Cartesian coordinates (2x1 double[]) defining the owning vehicle's current positionmaxDofConcern - the maximum distance at which this object is relevant for obstacle avoidance purposespublic double[] getPotentialVector(Point position)
getPotentialVector in class WorldObjectposition - Cartesian coordinates (2x1 double[]) defining the owning vehicle's current positionpublic double[] getPotentialVector(double x,
                          double y)
getPotentialVector in class WorldObjectx - north/south Cartesian coordinates defining the owning vehicle's current positiony - east/west Cartesian coordinates defining the owning vehicle's current positionprotected double getPotentialForce(double[] position)
getPotentialForce in class WorldObjectposition - Cartesian coordinates (2x1 double[]) defining the owning vehicle's current positionprotected double getPotentialForce(Point position)
getPotentialForce in class WorldObjectposition - Cartesian coordinates (2x1 double[]) defining the owning vehicle's current positionprotected double getPotentialForce(double x,
                       double y)
getPotentialForce in class WorldObjectx - north/south Cartesian coordinates defining the owning vehicle's current positiony - east/west Cartesian coordinates defining the owning vehicle's current positionpublic boolean isTooClose(double x,
                 double y)
x - north/south coordinate of the vehicley - east/west coordinate of the vehiclepublic String toString()
toString in class WorldObject