public abstract class CoordinateSystem extends Object
A Cartesian coordinate system laid on top of a Datum
.
Modifier and Type | Field and Description |
---|---|
protected boolean |
rightGrid |
Modifier | Constructor and Description |
---|---|
protected |
CoordinateSystem(boolean rightHanded)
Constructs a coordinate system.
|
Modifier and Type | Method and Description |
---|---|
CartAcceleration |
fromECEF(ECEFAcceleration ecef)
Converts the given
ECEFAcceleration to this coordinate system. |
CartLocation |
fromECEF(ECEFLocation ecef)
Converts the given
ECEFLocation to this coordinate system. |
CartVelocity |
fromECEF(ECEFVelocity ecef)
Converts the given
ECEFVelocity to this coordinate system. |
abstract void |
fromECEF(Vector3 ecef,
Vector3 vecOut)
Converts a non-location vector from ECEF coordinates to this coordinate system.
|
abstract void |
fromECEFLocation(Vector3 ecef,
Vector3 vecOut)
Converts a location vector from ECEF coordinates to this coordinate system.
|
PolarAcceleration |
fromPolar(CartLocation cartLoc,
CartAcceleration cartVel)
Converts an acceleration vector in this coordinate system from a Cartesian to a polar representation.
|
PolarVelocity |
fromPolar(CartLocation cartLoc,
CartVelocity cartVel)
Converts a velocity vector in this coordinate system from a Cartesian to a polar representation.
|
CartLocation |
fromPolar(PolarLocation polar)
Converts a location vector in this coordinate system from a polar to Cartesian representation.
|
CartAcceleration |
fromPolar(PolarLocation polarLoc,
PolarAcceleration polarAcc)
Converts an acceleration vector in this coordinate system from a polar to Cartesian representation.
|
CartVelocity |
fromPolar(PolarLocation polarLoc,
PolarVelocity polarVel)
Converts a velocity vector in this coordinate system from a polar to Cartesian representation.
|
abstract ECEFLocation |
getOrigin()
The coordinate system’s origin (in ECEF coordinates) with respect to the datum.
|
ECEFAcceleration |
toECEF(CartAcceleration vec)
Converts the given
CartAcceleration in this coordinate system to ECEF. |
ECEFLocation |
toECEF(CartLocation vec)
Converts the given
CartLocation in this coordinate system to ECEF. |
ECEFVelocity |
toECEF(CartVelocity vec)
Converts the given
CartVelocity in this coordinate system to ECEF. |
abstract void |
toECEF(Vector3 vec,
Vector3 ecefOut)
Converts a non-location vector from this coordinate system to ECEF.
|
abstract void |
toECEFLocation(Vector3 vec,
Vector3 ecefOut)
Converts a location vector from this coordinate system to ECEF.
|
static double |
toElevation(CartVelocity vel)
Converts the given
CartVelocity , in this coordinate system, to an elevation angle, measured from the XY plane, in radians |
static double |
toHeading(CartVelocity vel) |
PolarLocation |
toPolar(CartLocation cart)
Converts a location vector in this coordinate system from a Cartesian to a polar representation.
|
protected CoordinateSystem(boolean rightHanded)
Constructs a coordinate system.
rightHanded
- whether this coordinate system is right-handed.public abstract ECEFLocation getOrigin()
The coordinate system’s origin (in ECEF coordinates) with respect to the datum.
public abstract void toECEFLocation(Vector3 vec, Vector3 ecefOut)
Converts a location vector from this coordinate system to ECEF.
vec
- a location vector in this coordinate systemecefOut
- a vector into which the result (in ECEF coordinates) will be written.public abstract void fromECEFLocation(Vector3 ecef, Vector3 vecOut)
Converts a location vector from ECEF coordinates to this coordinate system.
ecef
- a location vector in ECEF coordinates.vecOut
- a vector into which the result (in this coordinate system) will be written.public abstract void toECEF(Vector3 vec, Vector3 ecefOut)
Converts a non-location vector from this coordinate system to ECEF. Unlike toECEFLocation
, this method does not translate the vector.
vec
- a non-location vector in this coordinate systemecefOut
- a vector into which the result (in ECEF coordinates) will be written.public abstract void fromECEF(Vector3 ecef, Vector3 vecOut)
Converts a non-location vector from ECEF coordinates to this coordinate system. Unlike toECEFLocation
, this method does not translate the vector.
ecef
- a non-location vector in ECEF coordinates.vecOut
- a vector into which the result (in this coordinate system) will be written.public CartLocation fromECEF(ECEFLocation ecef)
Converts the given ECEFLocation
to this coordinate system.
ecef
- an ECEFLocation
vector.CartLocation
vector in this coordinate system.public CartVelocity fromECEF(ECEFVelocity ecef)
Converts the given ECEFVelocity
to this coordinate system.
ecef
- an ECEFVelocity
vector.CartVelocity
vector in this coordinate system.public CartAcceleration fromECEF(ECEFAcceleration ecef)
Converts the given ECEFAcceleration
to this coordinate system.
ecef
- an ECEFAcceleration
vector.CartAcceleration
vector in this coordinate system.public ECEFLocation toECEF(CartLocation vec)
Converts the given CartLocation
in this coordinate system to ECEF.
vec
- a CartLocation
in this coordinate system to ECEF.public ECEFVelocity toECEF(CartVelocity vec)
Converts the given CartVelocity
in this coordinate system to ECEF.
vec
- a CartVelocity
in this coordinate system to ECEF.public ECEFAcceleration toECEF(CartAcceleration vec)
Converts the given CartAcceleration
in this coordinate system to ECEF.
vec
- a CartAcceleration
in this coordinate system to ECEF.public CartLocation fromPolar(PolarLocation polar)
Converts a location vector in this coordinate system from a polar to Cartesian representation.
public CartVelocity fromPolar(PolarLocation polarLoc, PolarVelocity polarVel)
Converts a velocity vector in this coordinate system from a polar to Cartesian representation.
polarLoc
- the location of the moving objectpolarVel
- the polar velocity of the moving objectpublic CartAcceleration fromPolar(PolarLocation polarLoc, PolarAcceleration polarAcc)
Converts an acceleration vector in this coordinate system from a polar to Cartesian representation.
polarLoc
- the location of the moving objectpolarAcc
- the polar acceleration of the moving objectpublic PolarLocation toPolar(CartLocation cart)
Converts a location vector in this coordinate system from a Cartesian to a polar representation.
public PolarVelocity fromPolar(CartLocation cartLoc, CartVelocity cartVel)
Converts a velocity vector in this coordinate system from a Cartesian to a polar representation.
cartLoc
- the location of the moving objectcartVel
- the Cartesian velocity of the moving objectpublic PolarAcceleration fromPolar(CartLocation cartLoc, CartAcceleration cartVel)
Converts an acceleration vector in this coordinate system from a Cartesian to a polar representation.
cartLoc
- the location of the moving objectcartVel
- the Cartesian acceleration of the moving objectpublic static double toHeading(CartVelocity vel)
public static double toElevation(CartVelocity vel)
Converts the given CartVelocity
, in this coordinate system, to an elevation angle, measured from the XY plane, in radians
vel
- a CartVelocity
vector