CEarthCoordinate

$Revision: 3 $

Description

This class encapsulates an Earth-Centered-Earth-Fixed coordinate. This is also known as a cartesian coordinate. It is made up of three distances all originating at the center of the Earth.

Constructors

CEarthCoordinate()
CEarthCoordinate( const CEarthCoordinate& source )
Constructs an empty coordinate or copies another CEarthCoordinate.

Methods

void Copy( const CEarthCoordinate& coordinate )
Copies the contents of another CEarthCoordinate.
void Get( double& x_coordinate, double& y_coordinate, double& z_coordinate )
This allows you to retrieve all the data members in one function call.
double GetXCoordinateInMeters( void ) const
This method returns the X axis coordinate in meters. Positive values point towards the intersection of the Prime Meridian and the Equator.
double GetYCoordinateInMeters( void ) const
This method returns the Y axis coordinate in meters. Positive values point towards the intersection of 90 degrees east of Prime Meridian and the Equator.
double GetZCoordinateInMeters( void ) const
This method returns the Z axis coordinate in meters. Positive values point towards the North Pole, negative values towards the South Pole.
void Set( double x_coordinate, double y_coordinate, double z_coordinate )
This lets you set all of the data members in a single function call.
void SetXCoordinateInMeters( double x_coordinate )
This method sets the X axis coordinate in meters.
void SetYCoordinateInMeters( double y_coordinate )
This method sets the Y axis coordinate in meters.
void SetZCoordinateInMeters( double z_coordinate )
This method sets the Z axis coordinate in meters.

Operators

= ( const CEarthCoordinate& source )
Basically calls Copy().

Example

#include <stdio.h>
#include <GFC.h>
#pragma hdrstop

void main( void )
{
   CPolarCoordinate here;
   CEarthCoordinate there;

   // here is 39 degrees 12.152 minutes North Latitude, 76 degrees 46.795 minutes West Longitude
   here.SetUpDownAngleInDegrees(     CMath::ConvertDegreesMinutesSecondsCoordinateToDecimalDegrees(  39.0, 12.152, 0.0 ) );
   here.SetLeftRightAngleInDegrees(  CMath::ConvertDegreesMinutesSecondsCoordinateToDecimalDegrees( -76.0, 46.795, 0.0 ) );
   here.SetDistanceFromSurfaceInMeters( 1000.0 );

   CEarth earth;
   
   earth.Convert( here, there );
}
Copyright, 1997, Samuel R. Blackburn
$Workfile: CEarthCoordinate.cpp $
$Modtime: 5/21/97 6:11a $