## com.bbn.openmap.proj.coords
Class EnuFrame

    java.lang.Object
      com.bbn.openmap.proj.coords.EnuFrame

public class EnuFrame
extends java.lang.Object

Encapsulates the ENU (East-North-Up) coordinate system.

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

Field Summary
`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 Summary
`EnuFrame()` Construct a default EnuFrame.
`EnuFrame(double[] ecefv, LatLonPoint llpt)` Construct a EnuFrame from a ECEF vector and a LatLonPoint.

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### x

    protected float x

  The x component of the coordinate (EAST).

### y

    protected float y

  The y component of the coordinate (NORTH).

### z

    protected float z

  The z component of the coordinate (UP).

Constructor Detail

### EnuFrame

    public EnuFrame()

  Construct a default EnuFrame. x,y,z are all set to zero.

### EnuFrame

    public EnuFrame(double[] ecefv,
                    LatLonPoint llpt)

  Construct a EnuFrame from a ECEF vector and a LatLonPoint.

Parameters:
  `llpt` - LatLonPoint.
  `ecefv` - representing an ecef vector.

Method Detail

### toGeocentricFrame

    public double[] toGeocentricFrame(LatLonPoint llpt)

  Convert to geocentric frame using a LatLonPoint.

  Parameters:
    `llpt` -
  Returns:
    a double of ecef values

### ecef2enu

    public void ecef2enu(double[] ecefVector,
                         double latitude,
                         double longitude,
                         double[] enuVector)

  Internal conversion routine.

  Parameters:
    `ecefVector` - vector
    `latitude` - in radians.
    `longitude` - in radians
    `enuVector` - vector

### enu2ecef

    protected void enu2ecef(double[] ecefVector,
                            double latitude,
                            double longitude,
                            double[] enuVector)

  Internal conversion routine.

  Parameters:
    `ecefVector` - vector
    `latitude` - in radians.
    `longitude` - in radians
    `enuVector` - vector

### setX

    public void setX(float pX)

  Set x.

  Parameters:
    `pX` - in meters.

### setY

    public void setY(float pY)

  Set y.

  Parameters:
    `pY` - in meters.

### setZ

    public void setZ(float pZ)

  Set z.

  Parameters:
    `pZ` - in meters.

### setXYZ

    public void setXYZ(float v1,
                       float v2,
                       float v3)

  Set x,y,z.

  Parameters:
    `v1` - East.
    `v2` - North.
    `v3` - Up.

### getX

    public float getX()

  Get x.

  Returns:
    float x.

### getY

    public float getY()

  Get Y.

  Returns:
    float y.

### getZ

    public float getZ()

  Get Z.

  Returns:
    float z.

### toDirectionVector

    public void toDirectionVector(double degrees,
                                  double latitude,
                                  double longitude,
                                  double[] ecefVector)

  To get the direction as a vector.

  Parameters:
    `degrees` - is heading 0-360
    `latitude` - in degrees.
    `longitude` - in degrees.
    `ecefVector` - vector

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details