public class EnuFrame
extends java.lang.Object
I like the idea of hiding the detail of the transformation from the user. The user needs no detailed knowledge of mathematics and if we change the algorithm, nobody will be affected.
Author: Robert Hayes
Modifier and Type | Field and Description |
---|---|
protected float |
x
The x component of the coordinate (EAST).
|
protected float |
y
The y component of the coordinate (NORTH).
|
protected float |
z
The z component of the coordinate (UP).
|
Constructor and Description |
---|
EnuFrame()
Construct a default EnuFrame.
|
EnuFrame(double[] ecefv,
LatLonPoint llpt)
Construct a EnuFrame from a ECEF vector and a LatLonPoint.
|
Modifier and Type | Method and Description |
---|---|
void |
ecef2enu(double[] ecefVector,
double latitude,
double longitude,
double[] enuVector)
Internal conversion routine.
|
protected void |
enu2ecef(double[] ecefVector,
double latitude,
double longitude,
double[] enuVector)
Internal conversion routine.
|
float |
getX()
Get x.
|
float |
getY()
Get Y.
|
float |
getZ()
Get Z.
|
void |
setX(float pX)
Set x.
|
void |
setXYZ(float v1,
float v2,
float v3)
Set x,y,z.
|
void |
setY(float pY)
Set y.
|
void |
setZ(float pZ)
Set z.
|
void |
toDirectionVector(double degrees,
double latitude,
double longitude,
double[] ecefVector)
To get the direction as a vector.
|
double[] |
toGeocentricFrame(LatLonPoint llpt)
Convert to geocentric frame using a LatLonPoint.
|
protected float x
protected float y
protected float z
public EnuFrame()
public EnuFrame(double[] ecefv, LatLonPoint llpt)
llpt
- LatLonPoint.ecefv
- representing an ecef vector.public double[] toGeocentricFrame(LatLonPoint llpt)
llpt
- public void ecef2enu(double[] ecefVector, double latitude, double longitude, double[] enuVector)
ecefVector
- vectorlatitude
- in radians.longitude
- in radiansenuVector
- vectorprotected void enu2ecef(double[] ecefVector, double latitude, double longitude, double[] enuVector)
ecefVector
- vectorlatitude
- in radians.longitude
- in radiansenuVector
- vectorpublic void setX(float pX)
pX
- in meters.public void setY(float pY)
pY
- in meters.public void setZ(float pZ)
pZ
- in meters.public void setXYZ(float v1, float v2, float v3)
v1
- East.v2
- North.v3
- Up.public float getX()
public float getY()
public float getZ()
public void toDirectionVector(double degrees, double latitude, double longitude, double[] ecefVector)
degrees
- is heading 0-360latitude
- in degrees.longitude
- in degrees.ecefVector
- vectorCopyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details