VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Protected Member Functions | Protected Attributes
makVrv::DtDisplayUnitsConverter Class Reference

Utility class for doing global unit conversion. All conversions functions use the following naming conventions: convert{A}{B}{C}to{D}(); or convert{A}{B}{C}to{D}String(); Where {A} is the type of Unit Where {B} is the type of Conversion, for example Unit Where {C} is the Input conversion system, for example Native Where {D} is the Output conversion system, for example Display.

Example: convertVelocityUnitNativeToDisplay() will take a velocity in Native units and convert it to a velocity in display units.

Unit types: Velocity, Acceleration, AccelerationMagnitude, Speed, Orientation, Distance, Altitude, Angle, HeadingPitchRoll, RotationalVelocity

Terms:

SystemAndUnit: The function will do both coordinate system and unit conversion.

Unit The function will only do unit conversion.

Native: Refers to VR-Vantage's native units. VR-Vantage's native units are Meters, Radians, Meter/Second, Meters/Second/Second the local coordinate system and all internal values are in native units.

Display: Refers to VR-Vantage's current Display units and current Display coordinate system.

Geocentric: Refers to values in the geocentric coordinate system. ALl units will be assumed to be native.

Public Types

typedef
makArchives::DtDisplayUnitsSettingsRecord::CoordSys 
CoordSys
 
typedef
makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits 
DistanceUnits
 
typedef
makArchives::DtDisplayUnitsSettingsRecord::VelocityUnits 
VelocityUnits
 
typedef
makArchives::DtDisplayUnitsSettingsRecord::AccelerationUnits 
AccelerationUnits
 
typedef
makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits 
OrientationUnits
 
typedef
makArchives::DtDisplayUnitsSettingsRecord::RotVelocityUnits 
RotVelocityUnits
 
typedef
makArchives::DtDisplayUnitsSettingsRecord::TemperatureUnits 
TemperatureUnits
 
typedef
makArchives::DtDisplayUnitsSettingsRecord::PressureUnits 
PressureUnits
 
typedef
makArchives::DtDisplayUnitsSettingsRecord::NorthUnits 
NorthUnits
 
typedef std::tuple
< DistanceUnits, DtUnicode,
unsigned int
DistanceUnitInformation
 
typedef std::tuple
< OrientationUnits, DtUnicode,
unsigned int
OrientationUnitInformation
 
typedef std::tuple< NorthUnits,
DtUnicode, bool
NorthUnitInformation
 

Public Member Functions

 DtDisplayUnitsConverter (DtWorldMagneticModel &magModel, const DtCoordinateSystem &cs, DtSharedSettingsManager &sm)
 
DtCoordinateDisplaycurrentCoordinateDisplay ()
 
const DtCoordinateDisplaycurrentCoordinateDisplay () const
 
double convertLocationToMagneticDeclination (const DtVector &geocLoc) const
 
double convertLocationToGridDeclination (const DtVector &geocLoc) const
 
Current Unit Accessors
CoordSys currentCoordinateDisplaySystem () const
 
DistanceUnits currentDistanceUnit (const DtUnicode &displayUnitCollectionName, const DtUnicode &displayUnitName) const
 
VelocityUnits currentVelocityUnit (const DtUnicode &displayUnitCollectionName, const DtUnicode &displayUnitName) const
 
OrientationUnits currentOrientationUnit (const DtUnicode &displayUnitCollectionName, const DtUnicode &displayUnitName) const
 
NorthUnits currentNorthUnit (const DtUnicode &displayUnitCollectionName, const DtUnicode &displayUnitName) const
 
AccelerationUnits currentAccelerationUnit (const DtUnicode &displayUnitCollectionName, const DtUnicode &displayUnitName) const
 
RotVelocityUnits currentRotationalVelocityUnit (const DtUnicode &displayUnitCollectionName, const DtUnicode &displayUnitName) const
 
TemperatureUnits currentTemperatureUnit (const DtUnicode &displayUnitCollectionName, const DtUnicode &displayUnitName) const
 
PressureUnits currentPressureUnit (const DtUnicode &displayUnitCollectionName, const DtUnicode &displayUnitName) const
 
unsigned int displayUnitUnit (const DtUnicode &displayUnitCollectionName, const DtUnicode &displayUnitName) const
 
unsigned int displayUnitDecimals (const DtUnicode &displayUnitCollectionName, const DtUnicode &displayUnitName) const
 
DtUnicode displayUnitNotation (const DtUnicode &displayUnitCollectionName, const DtUnicode &displayUnitName) const
 
Unit Accessors
DtUnicode coordinateSystemNotation (CoordSys cs) const
 
DtUnicode distanceUnitNotation (DistanceUnits distUnit) const
 
DtUnicode velocityUnitNotation (VelocityUnits velocityUnit) const
 
DtUnicode orientationUnitNotation (OrientationUnits oriUnit) const
 
DtUnicode accelerationUnitNotation (AccelerationUnits accelUnit) const
 
DtUnicode rotationalVelocityUnitNotation (RotVelocityUnits wUnit) const
 
DtUnicode temperatureUnitNotation (TemperatureUnits tempUnit) const
 
DtUnicode pressureUnitNotation (PressureUnits pressureUnit) const
 
DtUnicode northUnitNotation (NorthUnits wUnit) const
 
Complex Accessors
void coordinateSystemLabels (DtUnicode &x, DtUnicode &y, DtUnicode &z) const
 
void coordinateSystemLabels (CoordSys coordSystem, DtUnicode &x, DtUnicode &y, DtUnicode &z) const
 
void regularExpressionValidators (std::string &x, std::string &y, std::string &z) const
 
void regularExpressionValidators (CoordSys cs, std::string &x, std::string &y, std::string &z) const
 
std::vector< DtUnicodeconvertPositionToNotatedStringList (CoordSys coordSys, const DtVector &pos, DistanceUnits coordinateSystemUnit, unsigned int coordinateSystemDecimals, DistanceUnits altitudeUnit, unsigned int altitudeDecimals, bool minimal=false) const
 
std::vector< DtUnicodeconvertPositionToNotatedStringList (const DtVector &pos, DistanceUnits coordinateSystemUnit, unsigned int coordinateSystemDecimals, DistanceUnits altitudeUnit, unsigned int altitudeDecimals, bool minimal=false) const
 
std::vector< std::string > convertPositionToStringList (CoordSys coordSys, const DtVector &pos, DistanceUnits coordinateSystemUnit, unsigned int coordinateSystemDecimals, DistanceUnits altitudeUnit, unsigned int altitudeDecimals) const
 
std::vector< std::string > convertPositionToStringList (const DtVector &pos, DistanceUnits coordinateSystemUnit, unsigned int coordinateSystemDecimals, DistanceUnits altitudeUnit, unsigned int altitudeDecimals) const
 
Angle Converting: Non-spacial unit type.
double convertAngleUnitNativeToDisplay (double angle, OrientationUnits unit) const
 
double convertAngleUnitDisplayToNative (double angle, OrientationUnits unit) const
 
std::string convertAngleUnitNativeToDisplayString (double angle, OrientationUnits unit, unsigned int decimals, bool additionalFormatting=false) const
 
DtUnicode convertAngleUnitNativeToNotatedDisplayString (double angle, const OrientationUnitInformation &orientationUnitInformation, bool additionalFormatting=false) const
 
Heading Converting: Non-spacial unit type.
double convertHeadingUnitNativeToDisplay (const DtVector &geocLoc, double heading, NorthUnits unit, bool convertDisplayToDegrees=true) const
 
double convertHeadingUnitDisplayToNative (const DtVector &geocLoc, double heading, NorthUnits unit, bool convertNativeToRadians=true) const
 
DtUnicode convertHeadingUnitNativeToNotatedDisplayString (const DtVector &geocLoc, double heading, const OrientationUnitInformation &orientationUnitInformation, const NorthUnitInformation &northUnitInformation) const
 
DtUnicode convertHeadingUnitNativeToNotatedDisplayString (const DtVector &geocLoc, double heading, const NorthUnitInformation &northUnitInformation) const
 
Distance Converters: Spacial unit type.
double convertDistanceUnitNativeToDisplay (double distance, DistanceUnits unit) const
 
double convertDistanceUnitDisplayToNative (double distance, DistanceUnits unit) const
 
std::string convertDistanceUnitNativeToDisplayString (double dist, DistanceUnits unit, unsigned int decimals) const
 
DtUnicode convertDistanceUnitNativeToNotatedDisplayString (double dist, const DistanceUnitInformation &distanceUnitInfo) const
 
DtUnicode smartConvertDistanceUnitNativeToNotatedDisplayString (double distanceInMeters, const DistanceUnitInformation &distanceUnitInfo) const
 
Velocity Converters: Spacial unit type.

}

DtVector convertVelocityUnitNativeToDisplay (const DtVector &vel, VelocityUnits unit) const
 
DtVector convertVelocityUnitDisplayToNative (const DtVector &vel, VelocityUnits unit) const
 
DtVector convertVelocitySystemAndUnitGeocentricToDisplay (const DtVector &geocLoc, const DtVector &geocVel, VelocityUnits unit) const
 
std::string convertVelocityUnitNativeToDisplayString (const DtVector &vel, VelocityUnits unit, unsigned int decimals) const
 
std::string convertVelocitySystemAndUnitGeocentricToDisplayString (const DtVector &geocLoc, const DtVector &geocVel, VelocityUnits unit, unsigned int decimals) const
 
Acceleration Converters: Spacial unit type.
DtVector convertAccelerationUnitNativeToDisplay (const DtVector &accel, AccelerationUnits unit) const
 
DtVector convertAccelerationUnitDisplayToNative (const DtVector &accel, AccelerationUnits unit) const
 
std::string convertAccelerationUnitNativeToDisplayString (const DtVector &accel, AccelerationUnits unit, unsigned int decimals) const
 
DtVector convertAccelerationSystemAndUnitGeocentricToDisplay (const DtVector &geocLoc, const DtVector &accel, AccelerationUnits unit) const
 
std::string convertAccelerationSystemAndUnitGeocentricToDisplayString (const DtVector &geocLoc, const DtVector &accel, AccelerationUnits unit, unsigned int decimals) const
 
Orientation Converters: Spacial unit type.
DtTaitBryan convertOrientationUnitNativeToDisplay (const DtTaitBryan &ori, OrientationUnits unit) const
 
DtTaitBryan convertOrientationUnitDisplayToNative (const DtTaitBryan &ori, OrientationUnits unit) const
 
std::vector< std::string > convertOrientationUnitNativeToDisplayStrings (const DtTaitBryan &ori, OrientationUnits unit, unsigned int decimals, NorthUnits northUnit, bool formatPsi=false, bool formatTheta=false, bool formatPhi=false) const
 
std::vector< DtUnicodeconvertOrientationUnitNativeToNotatedDisplayStrings (const DtTaitBryan &ori, const OrientationUnitInformation &orientationUnitInformation, const NorthUnitInformation &northUnitInformation, bool formatPsi=false, bool formatTheta=false, bool formatPhi=false) const
 
Rotational Velocity Converters: Spacial unit type.
DtVector convertRotationalVelocityUnitNativeToDisplay (const DtVector &rotVel, RotVelocityUnits unit) const
 
DtVector convertRotationalVelocityUnitDisplayToNative (const DtVector &rotVel, RotVelocityUnits unit) const
 
std::string convertRotationalVelocityUnitNativeToDisplayString (const DtVector &rotVel, RotVelocityUnits unit, unsigned int decimals) const
 
DtVector convertRotationalVelocitySystemAndUnitGeocentricToDisplay (const DtVector &rotVel, RotVelocityUnits unit) const
 
std::string convertRotationalVelocitySystemAndUnitGeocentricToDisplayString (const DtVector &rotVel, RotVelocityUnits unit, unsigned int decimals) const
 
Speed Converters: Spacial-Derived unit type.
double convertSpeedUnitNativeToDisplay (const DtVector &velocity, VelocityUnits unit) const
 
double convertSpeedUnitNativeToDisplay (double speed, VelocityUnits unit) const
 
double convertSpeedUnitDisplayToNative (double speed, VelocityUnits unit) const
 
double convertSpeedSystemAndUnitGeocentricToDisplay (const DtVector &geocLoc, const DtVector &velocity, VelocityUnits unit) const
 
std::string convertSpeedUnitNativeToDisplayString (const DtVector &velocity, VelocityUnits unit, unsigned int decimals) const
 
std::string convertSpeedUnitNativeToDisplayString (double speed, VelocityUnits unit, unsigned int decimals) const
 
std::string convertSpeedSystemAndUnitGeocentricToDisplayString (const DtVector &geocLoc, const DtVector &velocity, VelocityUnits unit, unsigned int decimals) const
 
Acceleration Magnitude Converters: Spacial-Derived unit type.
double convertAccelerationMagnitudeUnitNativeToDisplay (const DtVector &accel, AccelerationUnits unit) const
 
double convertAccelerationMagnitudeUnitNativeToDisplay (double accel, AccelerationUnits unit) const
 
double convertAccelerationMagnitudeUnitDisplayToNative (double acc, AccelerationUnits unit) const
 
std::string convertAccelerationMagnitudeUnitNativeToDisplayString (const DtVector &accel, AccelerationUnits unit, unsigned int decimals) const
 
std::string convertAccelerationMagnitudeUnitNativeToDisplayString (double accel, AccelerationUnits unit, unsigned int decimals) const
 
double convertAccelerationMagnitudeSystemAndUnitGeocentricToDisplay (const DtVector &geocLoc, const DtVector &accel, AccelerationUnits unit) const
 
std::string convertAccelerationMagnitudeSystemAndUnitGeocentricToDisplayString (const DtVector &geocLoc, const DtVector &accel, AccelerationUnits unit, unsigned int decimals) const
 
Heading/Pitch/Roll conversions: Spacial-Derived unit type.
DtTaitBryan convertHeadingPitchRollSystemAndUnitGeocentricToDisplay (const DtVector &geocLoc, const DtTaitBryan &geocOri, OrientationUnits unit) const
 
std::vector< DtUnicodeconvertHeadingPitchRollSystemAndUnitGeocentricToNotatedDisplayStrings (const DtVector &geocLoc, const DtTaitBryan &geocOri, const OrientationUnitInformation &orientationUnitInformation, const NorthUnitInformation &northUnitInformation, bool formatHeading=false, bool formatPitch=false, bool formatRoll=false) const
 
std::vector< std::string > convertHeadingPitchRollSystemAndUnitGeocentricToDisplayStrings (const DtVector &geocLoc, const DtTaitBryan &geocOri, OrientationUnits unit, unsigned int decimals, NorthUnits northUnit, bool formatHeading=false, bool formatPitch=false, bool formatRoll=false) const
 
Temperature Converters: Temperature unit type.
double convertTemperatureUnitNativeToDisplay (double temperature, TemperatureUnits unit) const
 
double convertTemperatureUnitDisplayToNative (double temperature, TemperatureUnits unit) const
 
std::string convertTemperatureUnitNativeToDisplayString (double temperature, TemperatureUnits unit, unsigned int decimals) const
 
Pressure Converters: Pressure unit type.
double convertPressureUnitNativeToDisplay (double pressure, PressureUnits unit) const
 
double convertPressureUnitDisplayToNative (double pressure, PressureUnits unit) const
 
std::string convertPressureUnitNativeToDisplayString (double pressure, PressureUnits unit, unsigned int decimals) const
 

Static Protected Member Functions

static std::string orientationValueToText (double value, int decimals, bool additionalFormatting)
 
static std::string orientationValuesToText (const DtVector &ori, int decimals, bool formatPsi=false, bool formatTheta=false, bool formatPhi=false)
 
static std::string valueToText (double value, int decimals)
 
static std::string valuesToText (const DtVector &localVelocity, int decimals)
 

Protected Attributes

DtWorldMagneticModelmyWorldMagneticModel
 
const DtCoordinateSystemmyCoordinateSystem
 
DtSharedSettingsManagermySharedSettingsManager
 
std::unordered_map
< makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits,
DtUnicode
myDistanceNotationCache
 
std::unordered_map
< makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits,
DtUnicode
myOrientationNotationCache
 
std::unordered_map
< makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits,
DtUnicode
myNorthNotationCache
 

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtDisplayUnitsConverter::DtDisplayUnitsConverter ( DtWorldMagneticModel magModel,
const DtCoordinateSystem cs,
DtSharedSettingsManager sm 
)

Member Function Documentation

DtCoordinateDisplay* makVrv::DtDisplayUnitsConverter::currentCoordinateDisplay ( )

Get the current coordinate display.

const DtCoordinateDisplay* makVrv::DtDisplayUnitsConverter::currentCoordinateDisplay ( ) const

Get the current coordinate display.

CoordSys makVrv::DtDisplayUnitsConverter::currentCoordinateDisplaySystem ( ) const

Returns the distance unit of measurement to use for a given display unit.

Parameters
displayUnitCollectionNameThe name of the collection the display unit is in
displayUnitNameThe name of the display unit of interest The function will return 0 if a display unit collection OR display unit with the provided names cannot be found.
DistanceUnits makVrv::DtDisplayUnitsConverter::currentDistanceUnit ( const DtUnicode displayUnitCollectionName,
const DtUnicode displayUnitName 
) const

Returns the distance unit of measurement to use for a given display unit.

Parameters
displayUnitCollectionNameThe name of the collection the display unit is in
displayUnitNameThe name of the display unit of interest The function will return 0 if a display unit collection OR display unit with the provided names cannot be found.
VelocityUnits makVrv::DtDisplayUnitsConverter::currentVelocityUnit ( const DtUnicode displayUnitCollectionName,
const DtUnicode displayUnitName 
) const

Returns the velocity unit of measurement to use for a given display unit.

Parameters
displayUnitCollectionNameThe name of the collection the display unit is in
displayUnitNameThe name of the display unit of interest The function will return 0 if a display unit collection OR display unit with the provided names cannot be found.
OrientationUnits makVrv::DtDisplayUnitsConverter::currentOrientationUnit ( const DtUnicode displayUnitCollectionName,
const DtUnicode displayUnitName 
) const

Returns the orientation unit of measurement to use for a given display unit.

Parameters
displayUnitCollectionNameThe name of the collection the display unit is in
displayUnitNameThe name of the display unit of interest The function will return 0 if a display unit collection OR display unit with the provided names cannot be found.
NorthUnits makVrv::DtDisplayUnitsConverter::currentNorthUnit ( const DtUnicode displayUnitCollectionName,
const DtUnicode displayUnitName 
) const

Returns the north unit of measurement to use for a given display unit.

Parameters
displayUnitCollectionNameThe name of the collection the display unit is in
displayUnitNameThe name of the display unit of interest The function will return 0 if a display unit collection OR display unit with the provided names cannot be found.
AccelerationUnits makVrv::DtDisplayUnitsConverter::currentAccelerationUnit ( const DtUnicode displayUnitCollectionName,
const DtUnicode displayUnitName 
) const

Returns the acceleration unit of measurement to use for a given display unit.

Parameters
displayUnitCollectionNameThe name of the collection the display unit is in
displayUnitNameThe name of the display unit of interest The function will return 0 if a display unit collection OR display unit with the provided names cannot be found.
RotVelocityUnits makVrv::DtDisplayUnitsConverter::currentRotationalVelocityUnit ( const DtUnicode displayUnitCollectionName,
const DtUnicode displayUnitName 
) const

Returns the rotational velocity unit of measurement to use for a given display unit.

Parameters
displayUnitCollectionNameThe name of the collection the display unit is in
displayUnitNameThe name of the display unit of interest The function will return 0 if a display unit collection OR display unit with the provided names cannot be found.
TemperatureUnits makVrv::DtDisplayUnitsConverter::currentTemperatureUnit ( const DtUnicode displayUnitCollectionName,
const DtUnicode displayUnitName 
) const

Returns the temperature unit of measurement to use for a given display unit.

Parameters
displayUnitCollectionNameThe name of the collection the display unit is in
displayUnitNameThe name of the display unit of interest The function will return 0 if a display unit collection OR display unit with the provided names cannot be found.
PressureUnits makVrv::DtDisplayUnitsConverter::currentPressureUnit ( const DtUnicode displayUnitCollectionName,
const DtUnicode displayUnitName 
) const

Returns the pressure unit of measurement to use for a given display unit.

Parameters
displayUnitCollectionNameThe name of the collection the display unit is in
displayUnitNameThe name of the display unit of interest The function will return 0 if a display unit collection OR display unit with the provided names cannot be found.
unsigned int makVrv::DtDisplayUnitsConverter::displayUnitUnit ( const DtUnicode displayUnitCollectionName,
const DtUnicode displayUnitName 
) const

Returns the unit of measurement to use for a display unit.

Parameters
displayUnitCollectionNameThe name of the collection the display unit is in
displayUnitNameThe name of the display unit of interest The function will return 0 if a display unit collection OR display unit with the provided names cannot be found.
unsigned int makVrv::DtDisplayUnitsConverter::displayUnitDecimals ( const DtUnicode displayUnitCollectionName,
const DtUnicode displayUnitName 
) const

Returns the number of decimal places to use for a display unit.

Parameters
displayUnitCollectionNameThe name of the collection the display unit is in
displayUnitNameThe name of the display unit of interest The function will return 0 if a display unit collection OR display unit with the provided names cannot be found.
DtUnicode makVrv::DtDisplayUnitsConverter::displayUnitNotation ( const DtUnicode displayUnitCollectionName,
const DtUnicode displayUnitName 
) const

Returns the notation to use for a display unit.

Parameters
displayUnitCollectionNameThe name of the collection the display unit is in
displayUnitNameThe name of the display unit of interest The function will return an empty DtUnicode if a display unit collection OR display unit with the provided names cannot be found.
DtUnicode makVrv::DtDisplayUnitsConverter::coordinateSystemNotation ( CoordSys  cs) const
DtUnicode makVrv::DtDisplayUnitsConverter::distanceUnitNotation ( DistanceUnits  distUnit) const
DtUnicode makVrv::DtDisplayUnitsConverter::velocityUnitNotation ( VelocityUnits  velocityUnit) const
DtUnicode makVrv::DtDisplayUnitsConverter::orientationUnitNotation ( OrientationUnits  oriUnit) const
DtUnicode makVrv::DtDisplayUnitsConverter::accelerationUnitNotation ( AccelerationUnits  accelUnit) const
DtUnicode makVrv::DtDisplayUnitsConverter::rotationalVelocityUnitNotation ( RotVelocityUnits  wUnit) const
DtUnicode makVrv::DtDisplayUnitsConverter::temperatureUnitNotation ( TemperatureUnits  tempUnit) const
DtUnicode makVrv::DtDisplayUnitsConverter::pressureUnitNotation ( PressureUnits  pressureUnit) const
DtUnicode makVrv::DtDisplayUnitsConverter::northUnitNotation ( NorthUnits  wUnit) const
void makVrv::DtDisplayUnitsConverter::coordinateSystemLabels ( DtUnicode x,
DtUnicode y,
DtUnicode z 
) const

Gets the coordinate system labels for the current coordinate system.

void makVrv::DtDisplayUnitsConverter::coordinateSystemLabels ( CoordSys  coordSystem,
DtUnicode x,
DtUnicode y,
DtUnicode z 
) const

Gets the coordinate system labels for the given coordinate system.

void makVrv::DtDisplayUnitsConverter::regularExpressionValidators ( std::string &  x,
std::string &  y,
std::string &  z 
) const

Gets the regex validators for the current coordinate system.

void makVrv::DtDisplayUnitsConverter::regularExpressionValidators ( CoordSys  cs,
std::string &  x,
std::string &  y,
std::string &  z 
) const

Gets the regex validators for the given coordinate system.

std::vector<DtUnicode> makVrv::DtDisplayUnitsConverter::convertPositionToNotatedStringList ( CoordSys  coordSys,
const DtVector &  pos,
DistanceUnits  coordinateSystemUnit,
unsigned int  coordinateSystemDecimals,
DistanceUnits  altitudeUnit,
unsigned int  altitudeDecimals,
bool  minimal = false 
) const

Convert the geocentric position to a vector of notated strings.

Parameters
coordSysThe coordinate system to use for the conversion
posThe position to get the display string for
minimalReturn a 'minimal' version of the position string list behavior is defined by the coordinate display class used
std::vector<DtUnicode> makVrv::DtDisplayUnitsConverter::convertPositionToNotatedStringList ( const DtVector &  pos,
DistanceUnits  coordinateSystemUnit,
unsigned int  coordinateSystemDecimals,
DistanceUnits  altitudeUnit,
unsigned int  altitudeDecimals,
bool  minimal = false 
) const

Convert the geocentric position to a vector of notated strings.

Parameters
posThe position to get the display string for
minimalReturn a 'minimal' version of the position string list behavior is defined by the coordinate display class used
std::vector<std::string> makVrv::DtDisplayUnitsConverter::convertPositionToStringList ( CoordSys  coordSys,
const DtVector &  pos,
DistanceUnits  coordinateSystemUnit,
unsigned int  coordinateSystemDecimals,
DistanceUnits  altitudeUnit,
unsigned int  altitudeDecimals 
) const

Converts the given position to list of strings in the given units and decimals. Performs the conversion for the given coordinate system (coordSys)

std::vector<std::string> makVrv::DtDisplayUnitsConverter::convertPositionToStringList ( const DtVector &  pos,
DistanceUnits  coordinateSystemUnit,
unsigned int  coordinateSystemDecimals,
DistanceUnits  altitudeUnit,
unsigned int  altitudeDecimals 
) const

Converts the given position to list of strings in the given units and decimals. Performs the conversion for the current coordinate system.

double makVrv::DtDisplayUnitsConverter::convertAngleUnitNativeToDisplay ( double  angle,
OrientationUnits  unit 
) const

Converts the angle to the current orientation units.

double makVrv::DtDisplayUnitsConverter::convertAngleUnitDisplayToNative ( double  angle,
OrientationUnits  unit 
) const

Converts the angle from the current units to radians.

std::string makVrv::DtDisplayUnitsConverter::convertAngleUnitNativeToDisplayString ( double  angle,
OrientationUnits  unit,
unsigned int  decimals,
bool  additionalFormatting = false 
) const

Formats the provided angle as a string with the specified orientation units and decimal places. Additional formatting can be applied only when unit is equal to OrientationUnits::UnitsDegrees.

Parameters
angleThe angle to convert to a string
unitThe unit of measurement the resulting string will be expressed in
decimalsThe number of decimal places to use in the resulting string
additionalFormattingWhether or not to use additional formatting in the resulting string
See Also
orientationValueToText For more information about the additional formatting used
DtUnicode makVrv::DtDisplayUnitsConverter::convertAngleUnitNativeToNotatedDisplayString ( double  angle,
const OrientationUnitInformation orientationUnitInformation,
bool  additionalFormatting = false 
) const

Formats the provided angle as a string with the specified orientation units, decimal places, and unit notation. Additional formatting can be applied only when unit is equal to OrientationUnits::UnitsDegrees.

Parameters
angleThe angle to convert to a string
unitThe unit of measurement the resulting string will be expressed in
decimalsThe number of decimal places to use in the resulting string
additionalFormattingWhether or not to use additional formatting in the resulting string
See Also
orientationValueToText For more information about the additional formatting used
double makVrv::DtDisplayUnitsConverter::convertHeadingUnitNativeToDisplay ( const DtVector &  geocLoc,
double  heading,
NorthUnits  unit,
bool  convertDisplayToDegrees = true 
) const

Converts the heading to the specified North unit.

Parameters
geocLocThe geocentric location the heading is relative to
headingThe heading to convert
unitThe North Unit the resulting heading will be expressed in
convertDisplayToDegreesWhether or not to convert to degrees before returning Native is True North. The heading parameter is assumed to be in radians and, by default, the returned display value is in degrees (since convertDisplayToDegrees is true).
double makVrv::DtDisplayUnitsConverter::convertHeadingUnitDisplayToNative ( const DtVector &  geocLoc,
double  heading,
NorthUnits  unit,
bool  convertNativeToRadians = true 
) const

Converts the heading from the specified North Unit to True North.

Parameters
geocLocThe geocentric location the heading is relative to
headingThe heading to convert
unitThe North Unit the resulting heading will be expressed in
convertNativeToRadiansWhether or not to convert to radians before returning Native is True North. The heading parameter is assumed to be in degrees and, by default, the returned native value is in radians (since convertNativeToRadians is true).
DtUnicode makVrv::DtDisplayUnitsConverter::convertHeadingUnitNativeToNotatedDisplayString ( const DtVector &  geocLoc,
double  heading,
const OrientationUnitInformation orientationUnitInformation,
const NorthUnitInformation northUnitInformation 
) const

Formats the provided heading as a notated string with the specified North Unit. Thread-Safe.

Parameters
geocLocThe geocentric location the heading is relative to
headingThe heading to convert to a string
unitThe North Unit the resulting string will be expressed in
unitNotationThe North Unit Notation to use in the resulting string
suppressMagneticNorthNotationWhether or not to suppress the magnetic north notation, if its used. Native is True North. The heading parameter is assumed to be in radians. The resulting string will always be expressed in degrees with 0 decimal places along with additional formatting described in orientationValueToText(...)
DtUnicode makVrv::DtDisplayUnitsConverter::convertHeadingUnitNativeToNotatedDisplayString ( const DtVector &  geocLoc,
double  heading,
const NorthUnitInformation northUnitInformation 
) const

Formats the provided heading as a notated string with the specified North Unit. Thread-Safe.

Parameters
geocLocThe geocentric location the heading is relative to
headingThe heading to convert to a string
unitThe North Unit the resulting string will be expressed in
unitNotationThe North Unit Notation to use in the resulting string
suppressMagneticNorthNotationWhether or not to suppress the magnetic north notation, if its used. Native is True North. The heading parameter is assumed to be in radians. The resulting string will always be expressed in degrees with 0 decimal places along with additional formatting described in orientationValueToText(...)
double makVrv::DtDisplayUnitsConverter::convertLocationToMagneticDeclination ( const DtVector &  geocLoc) const

Converts the geocentric location to magnetic declination.

Parameters
geocLocThe geocentric location to compute the magnetic declination at.
double makVrv::DtDisplayUnitsConverter::convertLocationToGridDeclination ( const DtVector &  geocLoc) const

Converts the geocentric location to grid declination.

Parameters
geocLocThe geocentric location to compute the grid declination at. Grid declination here is also called grid convergence, the difference between true north and grid north in radians
double makVrv::DtDisplayUnitsConverter::convertDistanceUnitNativeToDisplay ( double  distance,
DistanceUnits  unit 
) const

Converts the distance to the current distance units.

double makVrv::DtDisplayUnitsConverter::convertDistanceUnitDisplayToNative ( double  distance,
DistanceUnits  unit 
) const

Converts the distance from the current units to meters.

std::string makVrv::DtDisplayUnitsConverter::convertDistanceUnitNativeToDisplayString ( double  dist,
DistanceUnits  unit,
unsigned int  decimals 
) const

Converts the distance to the current distance units. Formats the converted value as a string with the correct precision.

DtUnicode makVrv::DtDisplayUnitsConverter::convertDistanceUnitNativeToNotatedDisplayString ( double  dist,
const DistanceUnitInformation distanceUnitInfo 
) const

Converts the distance to the current distance units with unit notation included. Formats the converted value as a string with the correct precision.

DtUnicode makVrv::DtDisplayUnitsConverter::smartConvertDistanceUnitNativeToNotatedDisplayString ( double  distanceInMeters,
const DistanceUnitInformation distanceUnitInfo 
) const

Converts the distance to the current distance units.

DtVector makVrv::DtDisplayUnitsConverter::convertVelocityUnitNativeToDisplay ( const DtVector &  vel,
VelocityUnits  unit 
) const

Converts the altitude to the current altitude units.

DtVector makVrv::DtDisplayUnitsConverter::convertVelocityUnitDisplayToNative ( const DtVector &  vel,
VelocityUnits  unit 
) const

Converts the velocity from the current velocity units to the native units.

DtVector makVrv::DtDisplayUnitsConverter::convertVelocitySystemAndUnitGeocentricToDisplay ( const DtVector &  geocLoc,
const DtVector &  geocVel,
VelocityUnits  unit 
) const

Converts the geocentric velocity to the current display coordinate system and the current display units.

std::string makVrv::DtDisplayUnitsConverter::convertVelocityUnitNativeToDisplayString ( const DtVector &  vel,
VelocityUnits  unit,
unsigned int  decimals 
) const

Converts the velocity to the current display units. Formats the converted value as a string with the correct precision.

std::string makVrv::DtDisplayUnitsConverter::convertVelocitySystemAndUnitGeocentricToDisplayString ( const DtVector &  geocLoc,
const DtVector &  geocVel,
VelocityUnits  unit,
unsigned int  decimals 
) const

Converts the geocentric velocity to the current display coordinate system and the current display units. Formats the converted value as a string with the correct precision.

DtVector makVrv::DtDisplayUnitsConverter::convertAccelerationUnitNativeToDisplay ( const DtVector &  accel,
AccelerationUnits  unit 
) const

Converts the acceleration to the current acceleration units.

DtVector makVrv::DtDisplayUnitsConverter::convertAccelerationUnitDisplayToNative ( const DtVector &  accel,
AccelerationUnits  unit 
) const

Converts the acceleration from the current acceleration units to the native units.

std::string makVrv::DtDisplayUnitsConverter::convertAccelerationUnitNativeToDisplayString ( const DtVector &  accel,
AccelerationUnits  unit,
unsigned int  decimals 
) const

Converts the acceleration to the current acceleration units. Formats the converted value as a string with the correct precision.

DtVector makVrv::DtDisplayUnitsConverter::convertAccelerationSystemAndUnitGeocentricToDisplay ( const DtVector &  geocLoc,
const DtVector &  accel,
AccelerationUnits  unit 
) const

Converts the acceleration to the current acceleration units.

std::string makVrv::DtDisplayUnitsConverter::convertAccelerationSystemAndUnitGeocentricToDisplayString ( const DtVector &  geocLoc,
const DtVector &  accel,
AccelerationUnits  unit,
unsigned int  decimals 
) const

Converts the acceleration to the current acceleration units. Formats the converted value as a string with the correct precision.

DtTaitBryan makVrv::DtDisplayUnitsConverter::convertOrientationUnitNativeToDisplay ( const DtTaitBryan &  ori,
OrientationUnits  unit 
) const

Converts the orientation to the current orientation units.

DtTaitBryan makVrv::DtDisplayUnitsConverter::convertOrientationUnitDisplayToNative ( const DtTaitBryan &  ori,
OrientationUnits  unit 
) const

Converts the orientation from the current units to radians.

std::vector<std::string> makVrv::DtDisplayUnitsConverter::convertOrientationUnitNativeToDisplayStrings ( const DtTaitBryan &  ori,
OrientationUnits  unit,
unsigned int  decimals,
NorthUnits  northUnit,
bool  formatPsi = false,
bool  formatTheta = false,
bool  formatPhi = false 
) const

Converts the orientation to the current orientation units. Formats the converted value as a string with the correct precision. Additional formatting can be applied only when unit is equal to OrientationUnits::UnitsDegrees.

Parameters
oriThe orientation to convert to a display string
unitThe unit of measurement the resulting display string will use
decimalsThe number of decimal places the resulting display string will use
northUnitThe north unit of measurement the resulting display string will use
formatPsiWhether or not to apply additional formatting to the psi component
formatThetaWhether or not to apply additional formatting to the theta component
formatPhiWhether or not to apply additional formatting to the phi component
See Also
orientationValueToText For more information about the additional formatting used
std::vector<DtUnicode> makVrv::DtDisplayUnitsConverter::convertOrientationUnitNativeToNotatedDisplayStrings ( const DtTaitBryan &  ori,
const OrientationUnitInformation orientationUnitInformation,
const NorthUnitInformation northUnitInformation,
bool  formatPsi = false,
bool  formatTheta = false,
bool  formatPhi = false 
) const

Converts the orientation to the current orientation units. Formats the converted value as a notated string with the correct precision. Additional formatting can be applied only when unit is equal to OrientationUnits::UnitsDegrees.

Parameters
oriThe orientation to convert to a display string
unitThe unit of measurement the resulting display string will use
decimalsThe number of decimal places the resulting display string will use
northUnitThe north unit of measurement the resulting display string will use
formatPsiWhether or not to apply additional formatting to the psi component
formatThetaWhether or not to apply additional formatting to the theta component
formatPhiWhether or not to apply additional formatting to the phi component
See Also
orientationValueToText For more information about the additional formatting used
DtVector makVrv::DtDisplayUnitsConverter::convertRotationalVelocityUnitNativeToDisplay ( const DtVector &  rotVel,
RotVelocityUnits  unit 
) const

Converts the rotational velocity to the rotVel units.

DtVector makVrv::DtDisplayUnitsConverter::convertRotationalVelocityUnitDisplayToNative ( const DtVector &  rotVel,
RotVelocityUnits  unit 
) const

Converts the rotational velocity to the rotVel units.

std::string makVrv::DtDisplayUnitsConverter::convertRotationalVelocityUnitNativeToDisplayString ( const DtVector &  rotVel,
RotVelocityUnits  unit,
unsigned int  decimals 
) const

Converts the rotational velocity to the rotVel units.

DtVector makVrv::DtDisplayUnitsConverter::convertRotationalVelocitySystemAndUnitGeocentricToDisplay ( const DtVector &  rotVel,
RotVelocityUnits  unit 
) const

Converts the rotational velocity to the rotVel units.

std::string makVrv::DtDisplayUnitsConverter::convertRotationalVelocitySystemAndUnitGeocentricToDisplayString ( const DtVector &  rotVel,
RotVelocityUnits  unit,
unsigned int  decimals 
) const

Converts the rotational velocity to the rotVel units. Formats the converted value as a string with the correct precision.

double makVrv::DtDisplayUnitsConverter::convertSpeedUnitNativeToDisplay ( const DtVector &  velocity,
VelocityUnits  unit 
) const

Converts the speed to the current velocity units.

double makVrv::DtDisplayUnitsConverter::convertSpeedUnitNativeToDisplay ( double  speed,
VelocityUnits  unit 
) const

Converts the speed to the current velocity units.

double makVrv::DtDisplayUnitsConverter::convertSpeedUnitDisplayToNative ( double  speed,
VelocityUnits  unit 
) const

Converts the speed to the current velocity units.

double makVrv::DtDisplayUnitsConverter::convertSpeedSystemAndUnitGeocentricToDisplay ( const DtVector &  geocLoc,
const DtVector &  velocity,
VelocityUnits  unit 
) const

Converts the speed to the current velocity units.

std::string makVrv::DtDisplayUnitsConverter::convertSpeedUnitNativeToDisplayString ( const DtVector &  velocity,
VelocityUnits  unit,
unsigned int  decimals 
) const

Converts the speed to the current velocity units. Formats the converted value as a string with the correct precision.

std::string makVrv::DtDisplayUnitsConverter::convertSpeedUnitNativeToDisplayString ( double  speed,
VelocityUnits  unit,
unsigned int  decimals 
) const

Converts the speed to the current velocity units. Formats the converted value as a string with the correct precision.

std::string makVrv::DtDisplayUnitsConverter::convertSpeedSystemAndUnitGeocentricToDisplayString ( const DtVector &  geocLoc,
const DtVector &  velocity,
VelocityUnits  unit,
unsigned int  decimals 
) const

Converts the speed to the current velocity units. Formats the converted value as a string with the correct precision.

double makVrv::DtDisplayUnitsConverter::convertAccelerationMagnitudeUnitNativeToDisplay ( const DtVector &  accel,
AccelerationUnits  unit 
) const

Converts the acceleration magnitude to the current acceleration units.

double makVrv::DtDisplayUnitsConverter::convertAccelerationMagnitudeUnitNativeToDisplay ( double  accel,
AccelerationUnits  unit 
) const

Converts the acceleration magnitude to the current acceleration units.

double makVrv::DtDisplayUnitsConverter::convertAccelerationMagnitudeUnitDisplayToNative ( double  acc,
AccelerationUnits  unit 
) const

Converts the acceleration from the current units to m/s^2.

std::string makVrv::DtDisplayUnitsConverter::convertAccelerationMagnitudeUnitNativeToDisplayString ( const DtVector &  accel,
AccelerationUnits  unit,
unsigned int  decimals 
) const

Converts the acceleration to the current acceleration units. Formats the converted value as a string with the correct precision.

std::string makVrv::DtDisplayUnitsConverter::convertAccelerationMagnitudeUnitNativeToDisplayString ( double  accel,
AccelerationUnits  unit,
unsigned int  decimals 
) const

Converts the acceleration to the current acceleration units. Formats the converted value as a string with the correct precision.

double makVrv::DtDisplayUnitsConverter::convertAccelerationMagnitudeSystemAndUnitGeocentricToDisplay ( const DtVector &  geocLoc,
const DtVector &  accel,
AccelerationUnits  unit 
) const

Converts the acceleration magnitude to the current acceleration units.

std::string makVrv::DtDisplayUnitsConverter::convertAccelerationMagnitudeSystemAndUnitGeocentricToDisplayString ( const DtVector &  geocLoc,
const DtVector &  accel,
AccelerationUnits  unit,
unsigned int  decimals 
) const

Converts the acceleration magnitude to the current acceleration units.

DtTaitBryan makVrv::DtDisplayUnitsConverter::convertHeadingPitchRollSystemAndUnitGeocentricToDisplay ( const DtVector &  geocLoc,
const DtTaitBryan &  geocOri,
OrientationUnits  unit 
) const

Converts the orientation to HPR in the current orientation units.

std::vector<DtUnicode> makVrv::DtDisplayUnitsConverter::convertHeadingPitchRollSystemAndUnitGeocentricToNotatedDisplayStrings ( const DtVector &  geocLoc,
const DtTaitBryan &  geocOri,
const OrientationUnitInformation orientationUnitInformation,
const NorthUnitInformation northUnitInformation,
bool  formatHeading = false,
bool  formatPitch = false,
bool  formatRoll = false 
) const

Converts the orientation to HPR strings. Gets the HPR for the orientation with unit notation included. Degrees are displayed with 3 digits.

std::vector<std::string> makVrv::DtDisplayUnitsConverter::convertHeadingPitchRollSystemAndUnitGeocentricToDisplayStrings ( const DtVector &  geocLoc,
const DtTaitBryan &  geocOri,
OrientationUnits  unit,
unsigned int  decimals,
NorthUnits  northUnit,
bool  formatHeading = false,
bool  formatPitch = false,
bool  formatRoll = false 
) const

Converts the orientation to Heading, Pitch, and Roll strings. Additional formatting can be applied only when unit is equal to OrientationUnits::UnitsDegrees.

Parameters
geocLocThe geocentric location the geocentric orientation is relative to
geocOriThe geocentric orientation to convert to a display string
unitThe unit of measurement the resulting display string will use
decimalsThe number of decimal places the resulting display string will use
northUnitThe north unit of measurement the resulting display string will use
formatHeadingWhether or not to apply additional formatting to the psi component
formatPitchWhether or not to apply additional formatting to the theta component
formatRollWhether or not to apply additional formatting to the phi component
See Also
orientationValueToText For more information about the additional formatting used
double makVrv::DtDisplayUnitsConverter::convertTemperatureUnitNativeToDisplay ( double  temperature,
TemperatureUnits  unit 
) const

Converts the value from Kelvins to the passed in unit of measurement.

double makVrv::DtDisplayUnitsConverter::convertTemperatureUnitDisplayToNative ( double  temperature,
TemperatureUnits  unit 
) const

Converts the value from the passed in unit of measurement to Kelvins.

std::string makVrv::DtDisplayUnitsConverter::convertTemperatureUnitNativeToDisplayString ( double  temperature,
TemperatureUnits  unit,
unsigned int  decimals 
) const

Returns a string that represents the passed in value using the passed in unit of measurement and number of decimal places.

double makVrv::DtDisplayUnitsConverter::convertPressureUnitNativeToDisplay ( double  pressure,
PressureUnits  unit 
) const

Converts the value from Pascals to the passed in unit of measurement.

double makVrv::DtDisplayUnitsConverter::convertPressureUnitDisplayToNative ( double  pressure,
PressureUnits  unit 
) const

Converts the value from the passed in unit of measurement to Pascals.

std::string makVrv::DtDisplayUnitsConverter::convertPressureUnitNativeToDisplayString ( double  pressure,
PressureUnits  unit,
unsigned int  decimals 
) const

Returns a string that represents the passed in value using the passed in unit of measurement and number of decimal places.

static std::string makVrv::DtDisplayUnitsConverter::orientationValueToText ( double  value,
int  decimals,
bool  additionalFormatting 
)
staticprotected

Returns the passed in orientation value, expected to be in degrees, as a string with the given decimal count. If additional formatting is used, the integral portion of the double value will always be displayed with 3 digits. The value is normalized between +001 and +360 (000 will be displayed as 360) except in cases where the resulting string has a non-zero fractional portion. For example,.

  • 000 won't be returned but 360 would. Likewise, 000.0 won't be returned but 360.0 would.
  • 000.01 can be returned (and won't be turned into 360.01)
  • -90 won't be returned but 270 would.
static std::string makVrv::DtDisplayUnitsConverter::orientationValuesToText ( const DtVector &  ori,
int  decimals,
bool  formatPsi = false,
bool  formatTheta = false,
bool  formatPhi = false 
)
staticprotected

Returns the given values, expected to be in degrees, as a string with the given decimal count. Appends the 3 values in the vector using a single space to separate them. If additional formatting is used, the integral portion of the double value will always be displayed with 3 digits. The value is normalized between +001 and +360 (000 will be displayed as 360) except in cases where the resulting string has a non-zero fractional portion. For example,.

  • 000 won't be returned but 360 would. Likewise, 000.0 won't be returned but 360.0 would.
  • 000.01 can be returned (and won't be turned into 360.01)
  • -90 won't be returned but 270 would.
static std::string makVrv::DtDisplayUnitsConverter::valueToText ( double  value,
int  decimals 
)
staticprotected

Returns the given double value as a string with the given decimal count.

static std::string makVrv::DtDisplayUnitsConverter::valuesToText ( const DtVector &  localVelocity,
int  decimals 
)
staticprotected

Returns the given vector value as a string with the given decimal count. Appends the 3 values in the vector using a single space to separate them.

Member Data Documentation

DtWorldMagneticModel& makVrv::DtDisplayUnitsConverter::myWorldMagneticModel
protected
const DtCoordinateSystem& makVrv::DtDisplayUnitsConverter::myCoordinateSystem
protected
DtSharedSettingsManager& makVrv::DtDisplayUnitsConverter::mySharedSettingsManager
protected
std::unordered_map<makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits, DtUnicode> makVrv::DtDisplayUnitsConverter::myDistanceNotationCache
protected
std::unordered_map<makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits, DtUnicode> makVrv::DtDisplayUnitsConverter::myOrientationNotationCache
protected
std::unordered_map<makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits, DtUnicode> makVrv::DtDisplayUnitsConverter::myNorthNotationCache
protected

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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)