VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes
DtUtmReferencePoint Class Reference

DtUtmReferencePoints are used to represent an independent reference point for a UTM coordinate system. More...

+ Collaboration diagram for DtUtmReferencePoint:

Public Member Functions

 DtUtmReferencePoint ()
 Default CTOR.
 DtUtmReferencePoint (const DtDegMinSec &latRef, const DtDegMinSec &lonRef, int standardOffsets=1, long zone=0, const DtMapDatum &mapDatum=DtCurrentMapDatum(), double scaleFactor=0.9996)
 Constructor lat lon are represented by deg, min, sec, direction, where positive direction is north & WEST.
virtual ~DtUtmReferencePoint ()
 Default DTOR.
virtual void geod2utm (double alat, double alon, double *x, double *y)
 Convert between geodetic and utm (geodetic lat & lon need to be in radians)
virtual void utm2geod (double x, double y, double *lat, double *lon)
 Convert between utm and geodetic (geodetic lat & lon will be in radians)
virtual const DtMapDatummapDatum () const
 get the MAP Datum to be used with this reference point
virtual void useMapDatum (const DtMapDatum &mapDatum)
 set the MAP Datum to be used with this reference point
virtual const
DtReferenceEllipsoid
ellipsoid () const
 return the reference ellipsoid used by our DtMapDatum
void init (const DtDegMinSec &latRef, const DtDegMinSec &lonRef, int standardOffsets=1, long zone=0, const DtMapDatum &mapDatum=DtCurrentMapDatum())
 Initializes the UTM reference point.
virtual void uninitialize ()
 Uninitializes the reference point.
virtual bool isInitialized () const
 Returns true if the reference point is initialized, and false otherwise.
virtual double scale () const
 Returns the UTM scale.
virtual void setScale (double scale)
 Sets the UTM scale.
virtual double xOrigin () const
virtual void setXOrgin (double x_origin)
virtual double yOrigin () const
virtual void setYOrgin (double y_origin)
virtual int standardOffsets () const
virtual void setStandardOffsets (int so)
virtual DtDegMinSec latRef () const
virtual void setLatRef (const DtDegMinSec &lat_ref)
virtual DtDegMinSec longRef () const
virtual void setLongRef (const DtDegMinSec &lat_ref)
virtual long zoneOrigin () const
virtual void setZoneOrigin (long zo)
virtual double standardFalseEasting () const
virtual void setStandardFalseEasting (double sfe)
virtual double standardFalseNorthing () const
virtual void setStandardFalseNorthing (double sfn)
virtual double standardFalseNorthingCrossover () const
 The false northing crossover value can be used to specify the range in which conversions between UTM to geodetic can take place.
virtual void setStandardFalseNorthingCrossover (double sfnc)

Protected Member Functions

void initDatumConstants ()
void initUtm (const double lat[4], const double lon[4], long zone=0)
void degree (const double a[3], double *b) const
virtual void geod2utm (double lat, double lon, long *zone, double *northing, double *easting)
 These conversion utilities do all the hard work lat and lon are always in deg,min,sec format.
virtual void utm2geod (double northing, double easting, long zone, double *lat, double *lon)
 These conversion utilities do all the hard work lat and lon are always in deg,min,sec format.

Static Protected Member Functions

static void setLongitudeFudgeFactor (double val)
 Set a small value to be added to the reference longitude to prevent floating point error when the longitude is right on a zone boundary.

Protected Attributes

int myInited
int myStandardOffsets
double myXOrigin
double myYOrigin
long myZoneOrigin
DtDegMinSec myLatRef
DtDegMinSec myLonRef
DtReferenceEllipsoid myEllipsoid
 reference ellipsoid
DtFloat64 mySemiMajor
 Used for conversion calculations.
DtFloat64 mySemiMinor
DtFloat64 myE_sq
DtFloat64 myEp_sq
DtFloat64 myEf
DtFloat64 myScale
double myStandardFalseEasting
 These are used when we're using standard offsets.
double myStandardFalseNorthing
double myStandardFalseNorthingCrossover

Static Protected Attributes

static double theLongitudeFudgeFactor

Detailed Description

DtUtmReferencePoints are used to represent an independent reference point for a UTM coordinate system.

In older versions of VR-Link UTM conversions depended on a single Reference point which was set with the DtUtmInit call. All UTM conversions later were preformed with regards to that initial point. This class is used to allow the user to choose a different point for every conversion. An example of this is provided in the VR-Link users guide in section 5.12

Constructor & Destructor Documentation

DtUtmReferencePoint::DtUtmReferencePoint ( )

Default CTOR.

DtUtmReferencePoint::DtUtmReferencePoint ( const DtDegMinSec latRef,
const DtDegMinSec lonRef,
int  standardOffsets = 1,
long  zone = 0,
const DtMapDatum mapDatum = DtCurrentMapDatum(),
double  scaleFactor = 0.9996 
)

Constructor lat lon are represented by deg, min, sec, direction, where positive direction is north & WEST.

virtual DtUtmReferencePoint::~DtUtmReferencePoint ( )
virtual

Default DTOR.

Member Function Documentation

void DtUtmReferencePoint::degree ( const double  a[3],
double b 
) const
protected
virtual const DtReferenceEllipsoid* DtUtmReferencePoint::ellipsoid ( ) const
virtual

return the reference ellipsoid used by our DtMapDatum

virtual void DtUtmReferencePoint::geod2utm ( double  alat,
double  alon,
double x,
double y 
)
virtual

Convert between geodetic and utm (geodetic lat & lon need to be in radians)

virtual void DtUtmReferencePoint::geod2utm ( double  lat,
double  lon,
long *  zone,
double northing,
double easting 
)
protectedvirtual

These conversion utilities do all the hard work lat and lon are always in deg,min,sec format.

Exceptions
DtExceptionBoth functions throw DtException if the reference point is not initialized.
void DtUtmReferencePoint::init ( const DtDegMinSec latRef,
const DtDegMinSec lonRef,
int  standardOffsets = 1,
long  zone = 0,
const DtMapDatum mapDatum = DtCurrentMapDatum() 
)

Initializes the UTM reference point.

void DtUtmReferencePoint::initDatumConstants ( )
protected
void DtUtmReferencePoint::initUtm ( const double  lat[4],
const double  lon[4],
long  zone = 0 
)
protected
virtual bool DtUtmReferencePoint::isInitialized ( ) const
virtual

Returns true if the reference point is initialized, and false otherwise.

virtual DtDegMinSec DtUtmReferencePoint::latRef ( ) const
virtual
virtual DtDegMinSec DtUtmReferencePoint::longRef ( ) const
virtual
virtual const DtMapDatum& DtUtmReferencePoint::mapDatum ( ) const
virtual

get the MAP Datum to be used with this reference point

virtual double DtUtmReferencePoint::scale ( ) const
virtual

Returns the UTM scale.

virtual void DtUtmReferencePoint::setLatRef ( const DtDegMinSec lat_ref)
virtual
static void DtUtmReferencePoint::setLongitudeFudgeFactor ( double  val)
staticprotected

Set a small value to be added to the reference longitude to prevent floating point error when the longitude is right on a zone boundary.

virtual void DtUtmReferencePoint::setLongRef ( const DtDegMinSec lat_ref)
virtual
virtual void DtUtmReferencePoint::setScale ( double  scale)
virtual

Sets the UTM scale.

virtual void DtUtmReferencePoint::setStandardFalseEasting ( double  sfe)
virtual
virtual void DtUtmReferencePoint::setStandardFalseNorthing ( double  sfn)
virtual
virtual void DtUtmReferencePoint::setStandardFalseNorthingCrossover ( double  sfnc)
virtual
virtual void DtUtmReferencePoint::setStandardOffsets ( int  so)
virtual
virtual void DtUtmReferencePoint::setXOrgin ( double  x_origin)
virtual
virtual void DtUtmReferencePoint::setYOrgin ( double  y_origin)
virtual
virtual void DtUtmReferencePoint::setZoneOrigin ( long  zo)
virtual
virtual double DtUtmReferencePoint::standardFalseEasting ( ) const
virtual
virtual double DtUtmReferencePoint::standardFalseNorthing ( ) const
virtual
virtual double DtUtmReferencePoint::standardFalseNorthingCrossover ( ) const
virtual

The false northing crossover value can be used to specify the range in which conversions between UTM to geodetic can take place.

In UTM, northing values run from 0 - 10000000 from the south pole to the equator and 0 - 10000000 from the equator to the north pole. This means that based solely on the northing value we cannot determine whether we are in the southern or northern hemisphere. The false northing crossover tells us at what value to assume that we are in the southern hemisphere. Any northing values above the crossover value will be assumed to be southern, any values below will be assumed to be northern. The default value is

virtual int DtUtmReferencePoint::standardOffsets ( ) const
virtual
virtual void DtUtmReferencePoint::uninitialize ( )
virtual

Uninitializes the reference point.

Any UTM coordinate using this reference point will become essentially invalid, as the reference point will move to lat/lon of 0/0. Will set all values to default and the reference ellipsoid to WGS84.

virtual void DtUtmReferencePoint::useMapDatum ( const DtMapDatum mapDatum)
virtual

set the MAP Datum to be used with this reference point

virtual void DtUtmReferencePoint::utm2geod ( double  x,
double  y,
double lat,
double lon 
)
virtual

Convert between utm and geodetic (geodetic lat & lon will be in radians)

virtual void DtUtmReferencePoint::utm2geod ( double  northing,
double  easting,
long  zone,
double lat,
double lon 
)
protectedvirtual

These conversion utilities do all the hard work lat and lon are always in deg,min,sec format.

Exceptions
DtExceptionBoth functions throw DtException if the reference point is not initialized.
virtual double DtUtmReferencePoint::xOrigin ( ) const
virtual
virtual double DtUtmReferencePoint::yOrigin ( ) const
virtual
virtual long DtUtmReferencePoint::zoneOrigin ( ) const
virtual

Member Data Documentation

DtFloat64 DtUtmReferencePoint::myE_sq
protected
DtFloat64 DtUtmReferencePoint::myEf
protected
DtReferenceEllipsoid DtUtmReferencePoint::myEllipsoid
protected

reference ellipsoid

DtFloat64 DtUtmReferencePoint::myEp_sq
protected
int DtUtmReferencePoint::myInited
protected
DtDegMinSec DtUtmReferencePoint::myLatRef
protected
DtDegMinSec DtUtmReferencePoint::myLonRef
protected
DtFloat64 DtUtmReferencePoint::myScale
protected
DtFloat64 DtUtmReferencePoint::mySemiMajor
protected

Used for conversion calculations.

DtFloat64 DtUtmReferencePoint::mySemiMinor
protected
double DtUtmReferencePoint::myStandardFalseEasting
protected

These are used when we're using standard offsets.

double DtUtmReferencePoint::myStandardFalseNorthing
protected
double DtUtmReferencePoint::myStandardFalseNorthingCrossover
protected
int DtUtmReferencePoint::myStandardOffsets
protected
double DtUtmReferencePoint::myXOrigin
protected
double DtUtmReferencePoint::myYOrigin
protected
long DtUtmReferencePoint::myZoneOrigin
protected
double DtUtmReferencePoint::theLongitudeFudgeFactor
staticprotected

The documentation for this class was generated from the following file:

Document ID: Generated on Mon Jun 22 21:18:40 EDT 2020 from SVN revision 213785
Copyright © 2005-2018 MAK Technologies. All Rights Reserved (www.mak.com)