- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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

Go to the documentation of this file.

    00001 // CLASSIFICATION: UNCLASSIFIED
    00002
    00003 #include "CoordinateSystem.h"
    00004
    00005
    00006 using namespace MSP::CCS;
    00007
    00008
    00009 CoordinateSystem::CoordinateSystem() :
    00010   semiMajorAxis( 6378137.0  ),
    00011   flattening( 1 / 298.257223563 )
    00012 {
    00013 /*
    00014  * The constructor defaults the ellipsoid parameters to WGS84.
    00015  *
    00016  */
    00017 }
    00018
    00019
    00020 CoordinateSystem::CoordinateSystem( double _semiMajorAxis, double _flattening ) :
    00021   semiMajorAxis( _semiMajorAxis  ),
    00022   flattening( _flattening )
    00023 {
    00024 /*
    00025  * The constructor receives the ellipsoid parameters and
    00026  * as inputs.
    00027  *
    00028  *    ellipsoidSemiMajorAxis  : Semi-major axis of ellipsoid, in meters   (input)
    00029  *    ellipsoidFlattening     : Flattening of ellipsoid                   (input)
    00030  */
    00031 }
    00032
    00033
    00034 CoordinateSystem::~CoordinateSystem()
    00035 {
    00036   semiMajorAxis = 0;
    00037   flattening = 0;
    00038 }
    00039
    00040
    00041 /*long CoordinateSystem::setParameters( double _semiMajorAxis, double _flattening )
    00042 {
    00043
    00044  * The function setParameters sets the current ellipsoid
    00045  * parameters.
    00046  *
    00047  *    ellipsoidSemiMajorAxis  : Semi-major axis of ellipsoid, in meters   (input)
    00048  *    ellipsoidFlattening     : Flattening of ellipsoid                   (input)
    00049
    00050
    00051   semiMajorAxis = _semiMajorAxis;
    00052   flattening = _flattening;
    00053
    00054   return 0;
    00055 }*/
    00056
    00057
    00058 void CoordinateSystem::getEllipsoidParameters( double* _semiMajorAxis, double* _flattening )
    00059 {
    00060 /*
    00061  * The function getParameters returns the current ellipsoid
    00062  * parameters.
    00063  *
    00064  *    ellipsoidSemiMajorAxis  : Semi-major axis of ellipsoid, in meters   (output)
    00065  *    ellipsoidFlattening     : Flattening of ellipsoid                   (output)
    00066  */
    00067
    00068   *_semiMajorAxis = semiMajorAxis;
    00069   *_flattening = flattening;
    00070
    00071 }
    00072
    00073 // CLASSIFICATION: UNCLASSIFIED