Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

ECEF Class Reference
[Data classes]

Earth-centered, earth-fixed coordinates. More...

#include <GeoPos.h>

Inheritance diagram for ECEF:

Vector3 BaseType List of all members.

Public Methods

 ECEF ()
 Construct a default ECEF (at the center of the Earth).

 ECEF (double x_, double y_, double z_)
 Construct a new ECEF.

 ECEF (UTM const &, ReferenceEllipsoid const &=GeoRef::WGS84)
 Copy constructor to convert from UTM.

 ECEF (LLA const &, ReferenceEllipsoid const &=GeoRef::WGS84)
 Copy constructor to convert from LLA.

ECEF const & operator= (UTM const &)
 Convert from UTM to ECEF (using WGS84).

ECEF const & operator= (LLA const &)
 Convert from UTM to ECEF (using WGS84).

virtual std::string typeString () const
 Return a string representation of the type.

virtual ~ECEF ()
bool operator== (const Vector3 &v) const
 Test for equality with another vectors.

bool operator!= (const Vector3 &v) const
 Test for inequality with another vectors.

void set (double x_, double y_, double z_)
 Set the vector components.

double & operator[] (int i)
 Get a reference to vector component by numeric index.

double operator[] (int i) const
 Get the value of a vector component by numeric index.

double & x ()
 Get a reference to the x-component.

double x () const
 Get the value of the x-component.

double & y ()
 Get a reference to the y-component.

double y () const
 Get the value of the y-component.

double & z ()
 Get a reference to the z-component.

double z () const
 Get the value of the z-component.

bool valid () const
 Test if all components are valid floating point values.

bool isNaN () const
 Test if any components are NaN (not-a-number).

bool isZero () const
double operator * (const Vector3 &rhs) const
 Compute the dot product with another vector.

const Vector3 operator * (double rhs) const
 Multiply by a scalar.

const Vector3 operator^ (const Vector3 &rhs) const
 Compute the cross product with another vector.

Vector3operator *= (double rhs)
 Unary multiply by a scalar.

const Vector3 operator/ (double rhs) const
 Divide by a scalar.

Vector3operator/= (double rhs)
 Unary divide by a scalar.

const Vector3 operator+ (const Vector3 &rhs) const
 Binary vector addition.

Vector3operator+= (const Vector3 &rhs)
 Unary vector addition.

const Vector3 operator- (const Vector3 &rhs) const
 Binary vector subtraction.

const Vector3 operator- () const
 Negation operator; returns the negative of the vector.

Vector3operator-= (const Vector3 &rhs)
 Unary vector subtraction.

double length () const
 Get the length of the vector = sqrt(v*v).

double length2 () const
 Get the length squared of the vector = v*v.

double normalize ()
 Normalize the vector so that it has length unity.

const Vector3 normalized () const
 Get a unit vector in the direction of this vector.

Matrix3 starMatrix () const
 Compute the star matrix of this vector.

void bound (Vector3 &min, Vector3 &max)
 Update bounding vectors.

std::vector< double > getElements () const
 Get the components of this vector as a std::vector<double>.

void setElements (std::vector< double > const &v)
 Set the components of this vector from a std::vector<double>.

virtual std::string asString () const
 String representation.

virtual void serialize (Archive &)
 Serialize to or from a data archive.

virtual void parseXML (const char *)
 Parse the character data from an XML <Vector> tag.

virtual void convertXML ()
 Convert XML data to internal format prior to serialization.


Static Public Attributes

const Vector3 ZERO
 Null vector.

const Vector3 XAXIS
 Unit vector along the x-axis.

const Vector3 YAXIS
 Unit vector along the y-axis.

const Vector3 ZAXIS
 Unit vector along the z-axis.


Protected Attributes

double _x
 The x component.

double _y
 The y component.

double _z
 The z component.


Friends

Vector3 operator * (double lhs, const Vector3 &rhs)
 Multiply a vector by a scalar on the left.

double dot (const Vector3 &a, const Vector3 &b)
 Compute the dot product of two vectors.

const Vector3 cross (const Vector3 &a, const Vector3 &b)
 Compute the cross product of two vectors.

SIMDATA_EXPORT std::ostream & operator<< (std::ostream &output, const Vector3 &vec)
 Format to an output string.


Detailed Description

Earth-centered, earth-fixed coordinates.

A geospatial coordinate class representing Earth Centered, Earth Fixed coordinates.

The XML format for this type is <ECEF> X Y Z </ECEF>


Constructor & Destructor Documentation

ECEF::ECEF   [inline]
 

Construct a default ECEF (at the center of the Earth).

ECEF::ECEF double    x_,
double    y_,
double    z_
[inline]
 

Construct a new ECEF.

ECEF::ECEF UTM const &   ,
ReferenceEllipsoid const &    = GeoRef::WGS84
 

Copy constructor to convert from UTM.

ECEF::ECEF LLA const &   ,
ReferenceEllipsoid const &    = GeoRef::WGS84
 

Copy constructor to convert from LLA.

virtual ECEF::~ECEF   [inline, virtual]
 


Member Function Documentation

std::string Vector3::asString   [virtual, inherited]
 

String representation.

Implements BaseType.

Reimplemented in GeoPos.

void Vector3::bound Vector3   min,
Vector3   max
[inline, inherited]
 

Update bounding vectors.

The components of min and max are updated to contain the corresponding components of this vector.

void BaseType::convertXML   [virtual, inherited]
 

Convert XML data to internal format prior to serialization.

This method is currently only called by the XML parser for Object classes. If another BaseType class requires this method, a call must be added to the appropriate XML handler in the parser.

std::vector<double> Vector3::getElements   const [inline, inherited]
 

Get the components of this vector as a std::vector<double>.

bool Vector3::isNaN   const [inline, inherited]
 

Test if any components are NaN (not-a-number).

bool Vector3::isZero   const [inline, inherited]
 

double Vector3::length   const [inline, inherited]
 

Get the length of the vector = sqrt(v*v).

double Vector3::length2   const [inline, inherited]
 

Get the length squared of the vector = v*v.

double Vector3::normalize   [inline, inherited]
 

Normalize the vector so that it has length unity.

Returns:
The original length of the vector.

const Vector3 Vector3::normalized   const [inline, inherited]
 

Get a unit vector in the direction of this vector.

const Vector3 Vector3::operator * double    rhs const [inline, inherited]
 

Multiply by a scalar.

double Vector3::operator * const Vector3   rhs const [inline, inherited]
 

Compute the dot product with another vector.

Vector3& Vector3::operator *= double    rhs [inline, inherited]
 

Unary multiply by a scalar.

bool Vector3::operator!= const Vector3   v const [inline, inherited]
 

Test for inequality with another vectors.

const Vector3 Vector3::operator+ const Vector3   rhs const [inline, inherited]
 

Binary vector addition.

Vector3& Vector3::operator+= const Vector3   rhs [inline, inherited]
 

Unary vector addition.

const Vector3 Vector3::operator-   const [inline, inherited]
 

Negation operator; returns the negative of the vector.

const Vector3 Vector3::operator- const Vector3   rhs const [inline, inherited]
 

Binary vector subtraction.

Vector3& Vector3::operator-= const Vector3   rhs [inline, inherited]
 

Unary vector subtraction.

const Vector3 Vector3::operator/ double    rhs const [inline, inherited]
 

Divide by a scalar.

Vector3& Vector3::operator/= double    rhs [inline, inherited]
 

Unary divide by a scalar.

ECEF const & ECEF::operator= LLA const &   
 

Convert from UTM to ECEF (using WGS84).

ECEF const & ECEF::operator= UTM const &   
 

Convert from UTM to ECEF (using WGS84).

bool Vector3::operator== const Vector3   v const [inline, inherited]
 

Test for equality with another vectors.

double Vector3::operator[] int    i const [inline, inherited]
 

Get the value of a vector component by numeric index.

The index starts at zero (=x), and an IndexException is thrown for invalid indices.

Returns:
The value of the specified component.

double& Vector3::operator[] int    i [inline, inherited]
 

Get a reference to vector component by numeric index.

The index starts at zero (=x), and an IndexException is thrown for invalid indices.

Returns:
A reference to the specified component.

const Vector3 Vector3::operator^ const Vector3   rhs const [inline, inherited]
 

Compute the cross product with another vector.

void Vector3::parseXML const char *    [virtual, inherited]
 

Parse the character data from an XML <Vector> tag.

The three components must be separated by whitespace.

Reimplemented from BaseType.

Reimplemented in GeoPos.

void Vector3::serialize Archive   [virtual, inherited]
 

Serialize to or from a data archive.

Reimplemented from BaseType.

Reimplemented in GeoPos.

void Vector3::set double    x_,
double    y_,
double    z_
[inline, inherited]
 

Set the vector components.

void Vector3::setElements std::vector< double > const &    v [inline, inherited]
 

Set the components of this vector from a std::vector<double>.

Matrix3 Vector3::starMatrix   [inherited]
 

Compute the star matrix of this vector.

virtual std::string ECEF::typeString   const [inline, virtual]
 

Return a string representation of the type.

Reimplemented from Vector3.

bool Vector3::valid   const [inline, inherited]
 

Test if all components are valid floating point values.

double Vector3::x   const [inline, inherited]
 

Get the value of the x-component.

double& Vector3::x   [inline, inherited]
 

Get a reference to the x-component.

double Vector3::y   const [inline, inherited]
 

Get the value of the y-component.

double& Vector3::y   [inline, inherited]
 

Get a reference to the y-component.

double Vector3::z   const [inline, inherited]
 

Get the value of the z-component.

double& Vector3::z   [inline, inherited]
 

Get a reference to the z-component.


Friends And Related Function Documentation

const Vector3 cross const Vector3   a,
const Vector3   b
[friend, inherited]
 

Compute the cross product of two vectors.

double dot const Vector3   a,
const Vector3   b
[friend, inherited]
 

Compute the dot product of two vectors.

Vector3 operator * double    lhs,
const Vector3   rhs
[friend, inherited]
 

Multiply a vector by a scalar on the left.

SIMDATA_EXPORT std::ostream& operator<< std::ostream &    os,
const Vector3   v
[friend, inherited]
 

Format to an output string.


Member Data Documentation

double Vector3::_x [protected, inherited]
 

The x component.

double Vector3::_y [protected, inherited]
 

The y component.

double Vector3::_z [protected, inherited]
 

The z component.

const Vector3 Vector3::XAXIS [static, inherited]
 

Unit vector along the x-axis.

const Vector3 Vector3::YAXIS [static, inherited]
 

Unit vector along the y-axis.

const Vector3 Vector3::ZAXIS [static, inherited]
 

Unit vector along the z-axis.

NAMESPACE_SIMDATA const Vector3 Vector3::ZERO [static, inherited]
 

Null vector.


The documentation for this class was generated from the following files:
SimData version pre-0.4.0. For more information on SimData, visit the SimData Homepage.

Generated on Tue Oct 14 12:06:40 2003, using Doxygen 1.2.18.

[SF.net]