![]() |
VR-Forces Developer's Guide
|
This class will maintain information about the units, display units, and coordinate systems used in VR-Vantage.
Definitions:
Example 'Display Unit' use cases this class addresses are:
The class defaults are defined in DtSharedDisplayUnitsSettings::initEntries.
This class maintains information about the following units of measurements for distance:
This class maintains information about the following units of measurements for velocity:
This class maintains information about the following units of measurements for acceleration:
This class maintains information about the following units of measurements for orientation:
This class maintains information about the following units of measurements for rotational velocity:
This class maintains information about the following units of measurements for pressure:
This class maintains information about the following units of measurements for temperature:
This class maintains multiple collections of display units by name. This class defines the following collections by default:
By default, the 'Application' display units are defined as:
By default, the 'Weather' display units are defined as:
By default, the 'Default', 'Fixed Wing', 'Rotary Wing', 'Surface', 'Subsurface', and 'Space' display units are defined as:
This class maintains information about the following coordinate systems:
This class maintains information about the following heading types:
This class provides methods that allows users to access unit of measurement information. For example, to get information about all the units of measurements for Distance: Units foundUnits; getUnitAttributes(DtUnitConverterCollection::Distance, foundUnits);
This class considers each coordinate system as a 'unit of measurement' for the 'Coordinate System' display unit type. Thus getting information about all supported coordinate systems is the same as getting information about another display unit type. For example, for coordinate systems: Units foundAttributes; getUnitAttributes(DtUnitConverterCollection::CoordinateSystem, foundAttributes);
This class provides methods that allows users to access display unit information by name. For example, to get display unit information for Visibility, in the context of Weather, users of this class would do the following: DisplayAttributes desiredDisplayUnitAttributes; getDisplayUnitAttributes(theWeatherDisplayUnitCollectionName, theVisibilityDisplayUnitName, desiredDisplayUnitAttributes); or by doing the following: DisplayAttributes* desiredDisplayUnitAttributes; desiredDisplayUnitAttributes = findDisplayUnitAttributes( theWeatherDisplayUnitCollectionName, theVisibilityDisplayUnitName);

Classes | |
| struct | UnitEntry |
Protected Member Functions | |
| DtSharedDisplayUnitsSettings (DtSharedSettingsManager &manager) | |
| bool | applyFactoryOverrides (makArchives::DtDisplayUnitsSettingsRecord &rec) const |
| CoordSys | currentCoordSysIndex () const |
| int | currentCoordSysDecimals () const |
| std::string | valueToText (double value, int decimals) const |
| void | initEntries () |
Static Protected Member Functions | |
| static const std::string & | className () |
Protected Attributes | |
| UnitMap | myUnits |
| DisplayUnitCollectionMap | myDisplayUnits |
| bool | mySuppressMagneticNorthNotationEnabled |
| DtDisplayUnitsSettingsBackup * | mySettingsBackup |
Protected Attributes inherited from makVrv::DtSharedSettings | |
| const DtSharedSettingsManager & | myManager |
| boost::shared_mutex | myMutex |
| std::vector< std::function < void()> > | myEventSignalsToEmit |
| typedef makArchives::DtDisplayUnitsSettingsRecord::CoordSys makVrv::DtSharedDisplayUnitsSettings::CoordSys |
| typedef makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits makVrv::DtSharedDisplayUnitsSettings::DistanceUnits |
| typedef makArchives::DtDisplayUnitsSettingsRecord::VelocityUnits makVrv::DtSharedDisplayUnitsSettings::VelocityUnits |
| typedef makArchives::DtDisplayUnitsSettingsRecord::AccelerationUnits makVrv::DtSharedDisplayUnitsSettings::AccelerationUnits |
| typedef makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits makVrv::DtSharedDisplayUnitsSettings::OrientationUnits |
| typedef makArchives::DtDisplayUnitsSettingsRecord::RotVelocityUnits makVrv::DtSharedDisplayUnitsSettings::RotVelocityUnits |
| typedef makArchives::DtDisplayUnitsSettingsRecord::TemperatureUnits makVrv::DtSharedDisplayUnitsSettings::TemperatureUnits |
| typedef makArchives::DtDisplayUnitsSettingsRecord::PressureUnits makVrv::DtSharedDisplayUnitsSettings::PressureUnits |
| typedef makArchives::DtDisplayUnitsSettingsRecord::NorthUnits makVrv::DtSharedDisplayUnitsSettings::NorthUnits |
| typedef makArchives::DtDisplayUnitsSettingsRecord::DisplayUnitAttributes makVrv::DtSharedDisplayUnitsSettings::DisplayAttributes |
| typedef std::vector<UnitEntry> makVrv::DtSharedDisplayUnitsSettings::Units |
A vector of unit names and unit notations.
| typedef std::unordered_map<makArchives::DtDisplayUnitsSettingsRecord::DisplayUnitType, Units> makVrv::DtSharedDisplayUnitsSettings::UnitMap |
A mapping of display unit types to the unit of measurements that can measure that display unit type. For example, for the 'Distance' display unit type, we can use units of measurements like Meters, Feet, etc. You could not use Minutes...
| typedef std::map<std::string, DisplayAttributes> makVrv::DtSharedDisplayUnitsSettings::DisplayUnitMap |
A mapping of a display unit's name to the attributes for that display unit.
| typedef std::unordered_map<std::string, DisplayUnitMap> makVrv::DtSharedDisplayUnitsSettings::DisplayUnitCollectionMap |
A mapping of a display unit collection's name to the collection of display units.
|
virtual |
DTOR.
|
protected |
Protected CTOR Use DtReadSettingsLock and DtWriteSettingsLock.
| void makVrv::DtSharedDisplayUnitsSettings::setUnitAttributes | ( | makArchives::DtDisplayUnitsSettingsRecord::DisplayUnitType | displayUnitType, |
| const Units & | data | ||
| ) |
Define a new unit of measurement for a display unit type For example, some units of measurements for Distance are:
| bool makVrv::DtSharedDisplayUnitsSettings::getUnitAttributes | ( | makArchives::DtDisplayUnitsSettingsRecord::DisplayUnitType | displayUnitType, |
| Units & | value | ||
| ) | const |
Get all the units of measurement for a given display unit type.
| displayUnitType | The type of display unit to get units of measurement for. |
| value | Argument in which the data is returned. |
| const DisplayUnitCollectionMap& makVrv::DtSharedDisplayUnitsSettings::displayUnitCollectionMap | ( | ) | const |
Get a const reference to the internal display unit collection map.
| DisplayUnitCollectionMap& makVrv::DtSharedDisplayUnitsSettings::displayUnitCollectionMap | ( | ) |
Get a reference to the internal display unit collection map.
| void makVrv::DtSharedDisplayUnitsSettings::setDisplayUnitAttributes | ( | const DtUnicode & | displayUnitCollectionName, |
| const DtUnicode & | displayUnitName, | ||
| const DisplayAttributes & | data | ||
| ) |
Set the attributes for a given 'display unit'.
| displayUnitCollectionName | The name of the collection the 'display unit' is a part of. |
| displayUnitName | The name of the 'display unit'. |
| data | The display attributes to set. |
| bool makVrv::DtSharedDisplayUnitsSettings::getDisplayUnitAttributes | ( | const DtUnicode & | displayUnitCollectionName, |
| const DtUnicode & | displayUnitName, | ||
| DisplayAttributes & | value | ||
| ) | const |
Get the attributes for a given 'display unit'.
| displayUnitCollectionName | The name of the collection the 'display unit' is a part of. |
| displayUnitName | The name of the 'display unit'. |
| value | Argument in which the data is returned. |
| DisplayAttributes* makVrv::DtSharedDisplayUnitsSettings::findDisplayUnitAttributes | ( | const DtUnicode & | displayUnitCollectionName, |
| const DtUnicode & | displayUnitName | ||
| ) |
Find the attributes for a given 'display unit'.
| displayUnitCollectionName | The name of the collection the 'display unit' is a part of. |
| displayUnitName | The name of the 'display unit'. |
| const DisplayAttributes* makVrv::DtSharedDisplayUnitsSettings::findDisplayUnitAttributes | ( | const DtUnicode & | displayUnitCollectionName, |
| const DtUnicode & | displayUnitName | ||
| ) | const |
Find the attributes for a given 'display unit' - const version.
| displayUnitCollectionName | The name of the collection the 'display unit' is a part of. |
| displayUnitName | The name of the 'display unit'. |
| void makVrv::DtSharedDisplayUnitsSettings::setSuppressMagneticNorthNotationEnabled | ( | bool | isEnabled | ) |
Set whether or not to suppress the Heading Notation when using Magnetic North.
| isEnabled | Whether or not to suppress Magnetic North Heading Notation The default value is false. |
| bool makVrv::DtSharedDisplayUnitsSettings::isSuppressMagneticNorthNotationEnabled | ( | ) | const |
Get whether or not to suppress the Heading Notation when using Magnetic North.
| void makVrv::DtSharedDisplayUnitsSettings::setCoordinateSystem | ( | CoordSys | cs | ) |
Set the Coordinate System display unit in the 'Application' collection Akin to calling: setDisplayUnitUnit(theApplicationDisplayUnitCollectionName, theCoordinateSystemDisplayUnitName, cs)
| void makVrv::DtSharedDisplayUnitsSettings::setDisplayUnitUnit | ( | const DtUnicode & | displayUnitCollectionName, |
| const DtUnicode & | displayUnitName, | ||
| unsigned int | unitEnumerationValue | ||
| ) |
Update the unit of measurement used for a given 'display unit'.
| displayUnitCollectionName | The name of the collection the 'display unit' is a part of. |
| displayUnitName | The name of the 'display unit'. |
| unitEnumerationValue | The enumeration value of the specific unit of measurement. Emits the DtDisplayUnitsSettingsSignaler::signal_displayUnitChanged(...) signal |
| void makVrv::DtSharedDisplayUnitsSettings::setDisplayUnitDecimals | ( | const DtUnicode & | displayUnitCollectionName, |
| const DtUnicode & | displayUnitName, | ||
| unsigned int | decimals | ||
| ) |
Update the number of decimals used for a given 'display unit'.
| displayUnitCollectionName | The name of the collection the 'display unit' is a part of. |
| displayUnitName | The name of the 'display unit'. |
| decimals | The number of decimals to use. |
| unsigned int makVrv::DtSharedDisplayUnitsSettings::displayUnitUnit | ( | const DtUnicode & | displayUnitCollectionName, |
| const DtUnicode & | displayUnitName | ||
| ) | const |
Returns the enumeration value of the specific unit of measurement to use for a display unit.
| displayUnitCollectionName | The name of the collection the 'display unit' is a part of. |
| displayUnitName | The name of the 'display unit'. |
| unsigned int makVrv::DtSharedDisplayUnitsSettings::displayUnitDecimals | ( | const DtUnicode & | displayUnitCollectionName, |
| const DtUnicode & | displayUnitName | ||
| ) | const |
Returns the number of decimal places to use for a display unit.
| displayUnitCollectionName | The name of the collection the display unit is in |
| displayUnitName | The 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::DtSharedDisplayUnitsSettings::displayUnitNotation | ( | const DtUnicode & | displayUnitCollectionName, |
| const DtUnicode & | displayUnitName | ||
| ) | const |
Returns the notation to use for a display unit.
| displayUnitCollectionName | The name of the collection the display unit is in |
| displayUnitName | The 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::DtSharedDisplayUnitsSettings::distanceUnitNotation | ( | DistanceUnits | distUnit | ) | const |
| DtUnicode makVrv::DtSharedDisplayUnitsSettings::velocityUnitNotation | ( | VelocityUnits | velocityUnit | ) | const |
| DtUnicode makVrv::DtSharedDisplayUnitsSettings::orientationUnitNotation | ( | OrientationUnits | oriUnit | ) | const |
| DtUnicode makVrv::DtSharedDisplayUnitsSettings::accelerationUnitNotation | ( | AccelerationUnits | accelUnit | ) | const |
| DtUnicode makVrv::DtSharedDisplayUnitsSettings::rotationalVelocityUnitNotation | ( | RotVelocityUnits | wUnit | ) | const |
| DtUnicode makVrv::DtSharedDisplayUnitsSettings::temperatureUnitNotation | ( | TemperatureUnits | tempUnit | ) | const |
| DtUnicode makVrv::DtSharedDisplayUnitsSettings::pressureUnitNotation | ( | PressureUnits | pressureUnit | ) | const |
| DtUnicode makVrv::DtSharedDisplayUnitsSettings::northUnitNotation | ( | NorthUnits | northUnit | ) | const |
| CoordSys makVrv::DtSharedDisplayUnitsSettings::currentCoordinateSystem | ( | ) | const |
| int makVrv::DtSharedDisplayUnitsSettings::currentCoordinateSystemDecimals | ( | ) | const |
| DtUnicode makVrv::DtSharedDisplayUnitsSettings::currentCoordinateSystemNotation | ( | ) | const |
| void makVrv::DtSharedDisplayUnitsSettings::coordinateSystemLabels | ( | const DtCoordinateSystem & | displayCS, |
| DtUnicode & | x, | ||
| DtUnicode & | y, | ||
| DtUnicode & | z | ||
| ) | const |
Retrieve the X/Y/Z axis labels for the provided display coordinate system, by reference. For example, return 'Lat' for the X axis, 'Lon' for the Y axis, and 'Alt' for the Z axis for geodetic coordinate systems (like DMS and DDM).
| void makVrv::DtSharedDisplayUnitsSettings::coordinateSystemLabels | ( | const DtCoordinateSystem & | displayCS, |
| CoordSys | coordSys, | ||
| DtUnicode & | x, | ||
| DtUnicode & | y, | ||
| DtUnicode & | z | ||
| ) | const |
Retrieve the X/Y/Z axis labels for the provided display coordinate system, by reference. For example, return 'Lat' for the X axis, 'Lon' for the Y axis, and 'Alt' for the Z axis for geodetic coordinate systems (like DMS and DDM).
| DtUnicode makVrv::DtSharedDisplayUnitsSettings::xyUnitNotation | ( | const DtCoordinateSystem & | displayCS | ) | const |
| DtUnicode makVrv::DtSharedDisplayUnitsSettings::xyUnitNotation | ( | const DtCoordinateSystem & | displayCS, |
| CoordSys | coordSys | ||
| ) | const |
| DtUnicode makVrv::DtSharedDisplayUnitsSettings::zUnitNotation | ( | const DtCoordinateSystem & | displayCS | ) | const |
| DtUnicode makVrv::DtSharedDisplayUnitsSettings::zUnitNotation | ( | const DtCoordinateSystem & | displayCS, |
| CoordSys | coordSys | ||
| ) | const |
| void makVrv::DtSharedDisplayUnitsSettings::setFromRecord | ( | const makArchives::DtDisplayUnitsSettingsRecord & | rec | ) |
Restore the settings from a record.
| void makVrv::DtSharedDisplayUnitsSettings::getRecord | ( | makArchives::DtDisplayUnitsSettingsRecord & | rec | ) | const |
Get the settings as a record.
|
virtual |
Accessor for the settings backup (const).
Reimplemented from makVrv::DtSharedSettings.
|
virtual |
Accessor for the settings backup.
Reimplemented from makVrv::DtSharedSettings.
|
virtual |
Called to back up the settings.
Reimplemented from makVrv::DtSharedSettings.
|
protected |
Get overrides to the factory record, if any. If there are overrides, this function returns true. This is an internal utility function used by VR-Vantage engineers to update factory defaults. As a result, this function returns false in releases but can be overriden by toolkit users if desired; however, generally toolkit users can and should use DtDeInitializer::addDefaultSettingsRecord(...) instead.
|
protected |
Get the current coordinate system index.
|
protected |
Get the decimals for the current coordinate system.
|
protected |
|
staticprotected |
|
protected |
Set up the map of attribute data. Creates the map of attribute data for storing the different display unit parameters.
|
friend |
|
friend |
Use the DtReadSettingsLock to read the object.
|
friend |
Use the DtWriteSettingsLock to write to the object.
|
friend |
|
static |
The DtUnicode names used for the display unit collections.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
The DtUnicode names used for the display units.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
protected |
|
protected |
|
protected |
|
protected |