- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

# Y:/msp/devkits/temp_geotrans/master/geotrans3.1/CCS/src/dtcc/CoordinateSystems/ellipse/Ellipsoid.cpp

Go to the documentation of this file.

    00001 // CLASSIFICATION: UNCLASSIFIED
    00002
    00003
    00004
    00005 /***************************************************************************/
    00006 /*
    00007  *                               INCLUDES
    00008  */
    00009
    00010 #include <string.h>
    00011 #include "Ellipsoid.h"
    00012
    00013
    00014 using namespace MSP::CCS;
    00015
    00016
    00017 /************************************************************************/
    00018 /*                              FUNCTIONS
    00019  *
    00020  */
    00021
    00022 Ellipsoid::Ellipsoid() :
    00023    _index( 0 ),
    00024    _semiMajorAxis( 6378137.0 ),
    00025    _semiMinorAxis( 6356752.3142 ),
    00026    _flattening( 1 / 298.257223563 ),
    00027    _eccentricitySquared( 0.0066943799901413800 ),
    00028    _userDefined( 0 ),
    00029    _code( 0 ),
    00030    _name( 0 )
    00031
    00032 {
    00033 }
    00034
    00035
    00036 Ellipsoid::Ellipsoid( long __index, char* __code,  char* __name, double __semiMajorAxis, double __semiMinorAxis, double __flattening, double __eccentricitySquared, bool __userDefined ) :
    00037    _index( __index ),
    00038    _semiMajorAxis( __semiMajorAxis ),
    00039    _semiMinorAxis( __semiMinorAxis ),
    00040    _flattening( __flattening ),
    00041    _eccentricitySquared( __eccentricitySquared ),
    00042    _userDefined( __userDefined )
    00043 {
    00044   _code = new char[ strlen( __code ) + 1 ];
    00045  strcpy( _code,  __code );
    00046
    00047   _name = new char[ strlen( __name ) + 1 ];
    00048  strcpy( _name, __name );
    00049 }
    00050
    00051
    00052 Ellipsoid::~Ellipsoid()
    00053 {
    00054   delete [] _code;
    00055   _code = 0;
    00056
    00057   delete [] _name;
    00058   _name = 0;
    00059 }
    00060
    00061
    00062 long Ellipsoid::index() const
    00063 {
    00064   return _index;
    00065 }
    00066
    00067
    00068 char* Ellipsoid::code() const
    00069 {
    00070   return _code;
    00071 }
    00072
    00073
    00074 char* Ellipsoid::name() const
    00075 {
    00076   return _name;
    00077 }
    00078
    00079
    00080 double Ellipsoid::semiMajorAxis() const
    00081 {
    00082   return _semiMajorAxis;
    00083 }
    00084
    00085
    00086 double Ellipsoid::semiMinorAxis() const
    00087 {
    00088   return _semiMinorAxis;
    00089 }
    00090
    00091
    00092 double Ellipsoid::flattening() const
    00093 {
    00094   return _flattening;
    00095 }
    00096
    00097
    00098 double Ellipsoid::eccentricitySquared() const
    00099 {
    00100   return _eccentricitySquared;
    00101 }
    00102
    00103
    00104 bool Ellipsoid::userDefined() const
    00105 {
    00106   return _userDefined;
    00107 }
    00108
    00109 // CLASSIFICATION: UNCLASSIFIED