VR-Forces 4.0.4 Class Documentation
include/terrainCS/flatEarthCrdSys.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2004 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: flatEarthCrdSys.h,v $ $Revision: 1.14 $ $State: Exp $
00007 *********************************************************************/
00008 #ifndef flatEarthCrdSys_H_
00009 #define flatEarthCrdSys_H_
00010 
00011 //
00012 // \file flatEarthCrdSys.h Contains the flat earth coordinate system class declaration.
00013 // 
00014 
00015 #include "terrainCS/terrainCSDefines.h"
00016 #include "terrainCS/coordSystem.h"
00017 
00018 //
00019 // Instances of DtFlatEarthCS are used by the terrain objects
00020 // for performing coordinate conversions from geocentric to flat earth.
00021 class DT_DLL_terrainCS DtFlatEarthCS : public Coordinate_System
00022 {
00023 public:
00024    // constructor
00025    DtFlatEarthCS(double refLatitude,
00026       double refLongitude, bool setUseDynamicSceneOrigin = false,
00027       double dynamicSceneOriginDeadband = 0.0);
00028 
00029    DtFlatEarthCS(bool setUseDynamicSceneOrigin = false,
00030       double dynamicSceneOriginDeadband = 0.0);
00031 
00032    // copy constructor
00033    DtFlatEarthCS(const DtFlatEarthCS& orig);
00034 
00035    // destructor
00036    virtual ~DtFlatEarthCS();
00037 
00038    // assignment operator
00039    DtFlatEarthCS& operator=(const DtFlatEarthCS& orig);
00040 
00041    // Clone operator
00042    virtual Coordinate_System* clone() const;
00043 
00044    // coordinates in the local (i.e., projected) coordinate system only
00045    // consist of X and Y, but we use a three element vector to store them so a
00046    // programmer can use the Z value for height above terrain.
00047    virtual void dis2local(const DtVector& in, DtVector& out) const;
00048    virtual void local2dis(const DtVector& in, DtVector& out) const;
00049 
00050    virtual DtVector down(const DtVector& location) const;
00051    virtual void topoToLocal(const DtVector& localPosition, DtDcm& topoToLocal) const;
00052    virtual void localToTopo(const DtVector& localPosition, DtDcm& localToTopo) const;
00053 
00054    // Returns the geodetic coordinate for a given local position.
00055    virtual void localToGeodetic(const DtVector& localPosition,
00056       DtGeodeticCoord& geodeticPosition) const;
00057 
00058    // Returns the local coordinate for a given geodetic position.
00059    virtual void geodeticToLocal(const DtGeodeticCoord& geodeticPosition,
00060       DtVector& localPosition) const;
00061 
00062    virtual void initFromLatLon(double latRadians, double lonRadians);
00063 
00064    virtual void init();
00065 
00066    // Returns name of coordinate system
00067    virtual DtString coordinateSystemName() const;
00068    virtual void setOrigin(const DtGeodeticCoord& c);
00069 
00070    // Override as UTM grid declination calculations should not be used for this
00071    virtual DtDcm topoToUtmMatrix(const DtVector& geocLoc) const;
00072    virtual DtDcm utmToTopoMatrix(const DtVector& geocLoc) const;
00073 
00074 protected:
00075    double myRefLatitude;
00076    double myRefLongitude;
00077 
00078 public:
00079    // Radius of the earth used in the Multigen Flat Earth projection.
00080    // (defined to be 6366707.02 meters).
00081    // This value was taken from the SRM_EOR_MFE enumerant in the 
00082    // SRM_Ellipsoid_Of_Revolution table on the SEDRIS web site 
00083    // (www.sedris.org).
00084    static const double theMultigenFlatEarthRadius;
00085 };
00086 
00087 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)