Class KinematicVector2d
- java.lang.Object
-
- com.metsci.glimpse.util.geo.projection.KinematicVector2d
-
public final class KinematicVector2d extends Object
Represents kinematic state (position and velocity) within a two coordinate projection of the surface of the Earth (GeoProjection). The projection itself is not identified within instances of this class. Immutable.- Author:
- moskowitz
-
-
Constructor Summary
Constructors Constructor Description KinematicVector2d(Vector2d pos, Vector2d vel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Stringformat(String coordFormat)Get formatted String representation.Vector2dgetPosition()Vector2dgetVelocity()inthashCode()KinematicVector2dtimeUpdatedConstantVelocity(double deltaT)Returns the KinematicVector2d produced by time updating with constant velocity motion for for the given amount of time forward.StringtoString()
-
-
-
Method Detail
-
getPosition
public Vector2d getPosition()
-
getVelocity
public Vector2d getVelocity()
-
timeUpdatedConstantVelocity
public KinematicVector2d timeUpdatedConstantVelocity(double deltaT)
Returns the KinematicVector2d produced by time updating with constant velocity motion for for the given amount of time forward.- Parameters:
deltaT- amount of time forward- Returns:
- new kinematic vector
-
format
public String format(String coordFormat)
Get formatted String representation.- Parameters:
coordFormat- format applied to each coordinate (as in String.format)- Returns:
- formatted string with comma separated coordinates
-
-