VR-Forces 4.0.4 Class Documentation
include/terrainCS/csysutil.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2003 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: csysutil.h,v $ $Revision: 1.17 $ $State: Exp $
00007 *******************************************************************************/
00008 #ifndef csysutil_H_
00009 #define csysutil_H_
00010 
00011 //
00012 // \file csysutil.h  This file contains coordinate conversion convenience routines.
00013 //
00014 #include "terrainCS/terrainCSDefines.h"
00015 #include "terrainCS/coordSystem.h"
00016 #include <matrix/utmCoord.h>
00017 #include <vl/utmView.h>
00018 
00019 #define LAT_MIN_DEGREES -90.0
00020 #define LAT_MAX_DEGREES 90.0
00021 #define LON_MIN_DEGREES -180
00022 #define LON_MAX_DEGREES 180.0
00023 
00024 #define LAT_MIN_RADIANS DtDeg2Rad(LAT_MIN_DEGREES)
00025 #define LAT_MAX_RADIANS DtDeg2Rad(LAT_MAX_DEGREES)
00026 #define LON_MIN_RADIANS DtDeg2Rad(LON_MIN_DEGREES)
00027 #define LON_MAX_RADIANS DtDeg2Rad(LON_MAX_DEGREES)
00028 
00029 DT_DLL_terrainCS void setDtDegMinSecFromDegrees(DtDegMinSec &dms, double deg);
00030 
00031 // DMS string is of format <deg>:<min>:<sec>
00032 DT_DLL_terrainCS void setDtDegMinSecFromString(DtDegMinSec &dms, const char* dmsString);
00033 DT_DLL_terrainCS void setLatDtDegMinSecFromString(DtDegMinSec &dms, const char* dmsString);
00034 DT_DLL_terrainCS void setLonDtDegMinSecFromString(DtDegMinSec &dms, const char* dmsString);
00035 
00036 DT_DLL_terrainCS void setLatDtDegMinSecFromDegrees(DtDegMinSec &dms, double deg);
00037 DT_DLL_terrainCS void setLonDtDegMinSecFromDegrees(DtDegMinSec &dms, double deg);
00038 DT_DLL_terrainCS void setUtmOriginLatLonFromZone(long zone, double northing, double easting, double scaleFactor = 0.9996);
00039 DT_DLL_terrainCS void degreesFromDegMinSec(double& deg, DtDegMinSec &dms);
00040 
00041 DT_DLL_terrainCS void newGeod2Utm(double  lat, double  lon, long *zone, double *northing, double *easting);
00042 DT_DLL_terrainCS void newUtm2Geod(double northing, double easting, long zone, double *lat, double *lon);
00043 
00044 DT_DLL_terrainCS bool operator==(const DtDegMinSec& lhs, const DtDegMinSec& rhs);
00045 DT_DLL_terrainCS bool operator!=(const DtDegMinSec& lhs, const DtDegMinSec& rhs);
00046 
00047 DT_DLL_terrainCS void xformLocationViaGeocentric(Coordinate_System* csFrom, Coordinate_System* csTo, DtPoint& in, DtPoint& out, const DtVector* offset=0);
00048 DT_DLL_terrainCS void xformLocationViaGeodetic(Coordinate_System* csFrom, Coordinate_System* csTo, DtPoint& in, DtPoint& out, const DtVector* offset=0);
00049 
00050 #endif
00051 

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)