VR-Engage  2.2
Loading...
Searching...
No Matches
vreRtd Namespace Reference

Classes

class  DtVreRtdGlobal
 
class  DtVreRtdPrinterListener
 
class  DtVreRtdTerrainQueryHighFidelity
 
class  DtVreRtdTickCallback
 
class  DtVreRtdTraitJoyControllerExtension
 
class  DtVreRtdTraitTerrainQuery
 

Functions

bool RTD_VRF_BACKEND_PLUGIN_EXPORT readConfigFile ()
 
void setDeadreckoningThresholds (DtLocalObject *entity, double transThreshold, double rotationThreshold)
 
smVec3r VRFOriToRTDHPR (const DtTaitBryan &ori)
 
DtTaitBryan HprToVRFOri (const smVec3r &hpr)
 
smVec3r VRFWorldOriToRTDWorldHPR (const DtTaitBryan &ori)
 
DtTaitBryan RTDWorldHprToVRFWorldOri (const smVec3r &hpr)
 
smVec3r VRFRotVelToRTDRotVelWCS (const DtTaitBryan &entityWorldOrientation, const DtVector &rotationalVelocity)
 
DtVector RTDRotVelWCSToVRFRotVel (const DtTaitBryan &entityWorldOrientation, const smVec3r &rotationalVelocity)
 
DtTaitBryan TopoToLocalWrtDatabase (DtPhysicalWorld *physicalWorld, const DtVector &localPosition, const DtTaitBryan &topographicOrientation)
 
DtVector TopoToLocalWrtDatabase (DtPhysicalWorld *physicalWorld, const DtVector &localPosition, const DtVector &vec)
 
DtTaitBryan LocalWrtDatabaseToTopo (DtPhysicalWorld *physicalWorld, const DtVector &localPosition, const DtTaitBryan &localOrientation)
 
smReal compute2DDist (const smVec3r &pnt1, const DtVector &pnt2)
 
smVec3r getHeadingAlignedSpeedVector (const smVec3r &hpr, smReal speed, bool xyOnly=false)
 
smVec3r getHeadingAlignedSpeedVector (FixedWingLibCGF::AirplaneBot *bot, smReal speed, bool xyOnly=false)
 
DtVector getVecMatchingDirection (DtPhysicalWorld *physicalWorld, DtVrfObjectStateRepository *sr, DtReal vecMagnitude)
 
void applyAltitudeLimit (RTD::VehicleBase *vehicle, const smReal &maxAltitude)
 
void applySpeedLimit (RTD::VehicleBase *vehicle, const smReal &maxSpeed)
 
void applyWind (DtPhysicalWorld *physicalWorld, RTD::VehicleBase *vehicle)
 
void applyWind (RTD::VehicleBase *vehicle, double vrfWindDir, double vrfWindSpeed)
 
bool computeTerrainHeight (const DtSimulationServices *simMan, const DtVector &localPosition, double &result)
 
double getTerrainHeight (const DtSimulationServices *simMan, const DtVector &localPosition)
 
double getHAT (const DtSimulationServices *simMan, const DtGeodeticCoord &pos)
 

Function Documentation

◆ readConfigFile()

bool RTD_VRF_BACKEND_PLUGIN_EXPORT vreRtd::readConfigFile ( )

Reads the RTD configuration file.

Returns
True if the configuration file was successfully read, false otherwise

Reads and processes the configuration file for VREngage RTD components, loading parameters and settings that control the real-time dynamics behavior. This function should be called during application initialization before creating any RTD components.

◆ setDeadreckoningThresholds()

void vreRtd::setDeadreckoningThresholds ( DtLocalObject * entity,
double transThreshold,
double rotationThreshold )

Utility functions for VREngage Real-Time Dynamics (RTD) components.

This namespace contains various utility functions for coordinate transformations, terrain queries, and other operations used by the VREngage RTD components.

Sets dead reckoning thresholds for an entity

Parameters
entityThe entity to set thresholds for
transThresholdTranslational threshold in meters
rotationThresholdRotational threshold in radians

Sets the translational and rotational thresholds used for dead reckoning calculations for the specified entity. These thresholds control when position updates are sent across the network.

◆ VRFOriToRTDHPR()

smVec3r vreRtd::VRFOriToRTDHPR ( const DtTaitBryan & ori)

Converts from a VRF/DtTaitBryan orientation to RTD/HPR.

Parameters
oriThe VRF orientation to convert
Returns
The equivalent RTD HPR orientation

Converts from a VRF/DtTaitBryan orientation to RTD/HPR orientation. DtTaitBryan orientation is expected to be a rotation in the coordinate system with x straight, y right, z down. HPR is expected to be a rotation in the coordinate system with y straight, x right, z up. A DtTaitBryan(0,0,0) is hpr(0,0,0). A DtTaitBryan(pi/2,0,0) is hpr(-90,0,0) for example.

◆ HprToVRFOri()

DtTaitBryan vreRtd::HprToVRFOri ( const smVec3r & hpr)

Converts from an RTD/HPR orientation to VRF/DtTaitBryan.

Parameters
hprThe RTD HPR orientation to convert
Returns
The equivalent VRF/DtTaitBryan orientation

Inverse transform of VRFOriToRTDHPR, converting from RTD HPR to VRF orientation.

◆ VRFWorldOriToRTDWorldHPR()

smVec3r vreRtd::VRFWorldOriToRTDWorldHPR ( const DtTaitBryan & ori)

Converts airplane world orientation from VRF to RTD HPR.

Parameters
oriThe VRF world orientation to convert
Returns
The equivalent RTD world HPR orientation

Converts airplane world orientation from VRF to RTD HPR. Even if VRF world coordinate system and RTD world coordinate system are both WGS84, airplanes are differently oriented in their local coordinate systems:

  • In RTD, airplanes point along y-axis with z-axis up
  • In VRF, airplanes point along x-axis with z-axis down

An RTD airplane with zero rotation (in world coordinates) points to WGS84 y-axis with 'up' pointing along WGS84 z-axis. A VRF airplane with zero rotation (in world coordinates) points to WGS84 x-axis with 'up' pointing along WGS84 -z-axis (upside down).

◆ RTDWorldHprToVRFWorldOri()

DtTaitBryan vreRtd::RTDWorldHprToVRFWorldOri ( const smVec3r & hpr)

Converts airplane world orientation from RTD HPR to VRF.

Parameters
hprThe RTD world HPR orientation to convert
Returns
The equivalent VRF world orientation

Inverse of VRFWorldOriToRTDWorldHPR, converting from RTD world HPR to VRF world orientation.

◆ VRFRotVelToRTDRotVelWCS()

smVec3r vreRtd::VRFRotVelToRTDRotVelWCS ( const DtTaitBryan & entityWorldOrientation,
const DtVector & rotationalVelocity )

Converts rotational velocity from VRF to RTD world coordinate system.

Parameters
entityWorldOrientationThe entity's world orientation
rotationalVelocityThe rotational velocity in VRF coordinate system
Returns
The equivalent rotational velocity in RTD world coordinate system

Converts a rotational velocity vector from VRF to RTD world coordinate system.

◆ RTDRotVelWCSToVRFRotVel()

DtVector vreRtd::RTDRotVelWCSToVRFRotVel ( const DtTaitBryan & entityWorldOrientation,
const smVec3r & rotationalVelocity )

Converts rotational velocity from RTD to VRF coordinate system.

Parameters
entityWorldOrientationThe entity's world orientation
rotationalVelocityThe rotational velocity in RTD world coordinate system
Returns
The equivalent rotational velocity in VRF coordinate system

Converts a rotational velocity vector from RTD world coordinate system to VRF.

◆ TopoToLocalWrtDatabase() [1/2]

DtTaitBryan vreRtd::TopoToLocalWrtDatabase ( DtPhysicalWorld * physicalWorld,
const DtVector & localPosition,
const DtTaitBryan & topographicOrientation )

Converts topographic orientation to local orientation.

Parameters
physicalWorldPointer to the physical world
localPositionThe local position to convert at
topographicOrientationThe topographic orientation to convert
Returns
The equivalent local orientation with respect to the database

Converts a topographic orientation to a local orientation with respect to the database.

◆ TopoToLocalWrtDatabase() [2/2]

DtVector vreRtd::TopoToLocalWrtDatabase ( DtPhysicalWorld * physicalWorld,
const DtVector & localPosition,
const DtVector & vec )

Converts topographic vector to local vector.

Parameters
physicalWorldPointer to the physical world
localPositionThe local position to convert at
vecThe topographic vector to convert
Returns
The equivalent local vector with respect to the database

Converts a topographic vector to a local vector with respect to the database.

◆ LocalWrtDatabaseToTopo()

DtTaitBryan vreRtd::LocalWrtDatabaseToTopo ( DtPhysicalWorld * physicalWorld,
const DtVector & localPosition,
const DtTaitBryan & localOrientation )

Converts local orientation to topographic orientation.

Parameters
physicalWorldPointer to the physical world
localPositionThe local position to convert at
localOrientationThe local orientation to convert
Returns
The equivalent topographic orientation

Converts a local orientation with respect to the database to a topographic orientation.

◆ compute2DDist()

smReal vreRtd::compute2DDist ( const smVec3r & pnt1,
const DtVector & pnt2 )

Computes the 2D distance between two points.

Parameters
pnt1The first point
pnt2The second point
Returns
The 2D distance between the two points

Computes the 2D distance between two points.

◆ getHeadingAlignedSpeedVector() [1/2]

smVec3r vreRtd::getHeadingAlignedSpeedVector ( const smVec3r & hpr,
smReal speed,
bool xyOnly = false )

Gets the heading-aligned speed vector.

Parameters
hprThe heading, pitch, and roll of the entity
speedThe speed of the entity
xyOnlyWhether to only consider the x and y components
Returns
The heading-aligned speed vector

Gets the heading-aligned speed vector for an entity.

◆ getHeadingAlignedSpeedVector() [2/2]

smVec3r vreRtd::getHeadingAlignedSpeedVector ( FixedWingLibCGF::AirplaneBot * bot,
smReal speed,
bool xyOnly = false )

Gets the heading-aligned speed vector for an airplane.

Parameters
botThe airplane entity
speedThe speed of the airplane
xyOnlyWhether to only consider the x and y components
Returns
The heading-aligned speed vector

Gets the heading-aligned speed vector for an airplane entity.

◆ getVecMatchingDirection()

DtVector vreRtd::getVecMatchingDirection ( DtPhysicalWorld * physicalWorld,
DtVrfObjectStateRepository * sr,
DtReal vecMagnitude )

Gets a vector matching the direction of an entity.

Parameters
physicalWorldPointer to the physical world
srPointer to the object state repository
vecMagnitudeThe magnitude of the vector
Returns
The vector matching the direction of the entity

Gets a vector matching the direction of an entity.

◆ applyAltitudeLimit()

void vreRtd::applyAltitudeLimit ( RTD::VehicleBase * vehicle,
const smReal & maxAltitude )

Applies an altitude limit to a vehicle.

Parameters
vehicleThe vehicle to apply the limit to
maxAltitudeThe maximum altitude

Applies an altitude limit to a vehicle.

◆ applySpeedLimit()

void vreRtd::applySpeedLimit ( RTD::VehicleBase * vehicle,
const smReal & maxSpeed )

Applies a speed limit to a vehicle.

Parameters
vehicleThe vehicle to apply the limit to
maxSpeedThe maximum speed

Applies a speed limit to a vehicle.

◆ applyWind() [1/2]

void vreRtd::applyWind ( DtPhysicalWorld * physicalWorld,
RTD::VehicleBase * vehicle )

Applies wind to a vehicle.

Parameters
physicalWorldPointer to the physical world
vehicleThe vehicle to apply wind to

Applies wind to a vehicle.

◆ applyWind() [2/2]

void vreRtd::applyWind ( RTD::VehicleBase * vehicle,
double vrfWindDir,
double vrfWindSpeed )

Applies wind to a vehicle.

Parameters
vehicleThe vehicle to apply wind to
vrfWindDirThe wind direction in VRF coordinates
vrfWindSpeedThe wind speed

Applies wind to a vehicle.

◆ computeTerrainHeight()

bool vreRtd::computeTerrainHeight ( const DtSimulationServices * simMan,
const DtVector & localPosition,
double & result )

Computes the terrain height at a specified local position.

Parameters
simManPointer to the simulation services
localPositionLocal position to query terrain height at
resultReference where the computed terrain height will be stored
Returns
True if terrain height computation was successful, false otherwise

Uses the terrain provider to compute the height of terrain at the specified local position. Returns false if the terrain query fails or the position is outside the terrain bounds.

◆ getTerrainHeight()

double vreRtd::getTerrainHeight ( const DtSimulationServices * simMan,
const DtVector & localPosition )

Gets the terrain height at a specified local position.

Parameters
simManPointer to the simulation services
localPositionLocal position to query terrain height at
Returns
Terrain height in meters, or 0.0 if computation fails

Convenience function that calls computeTerrainHeight and returns the result directly. Returns 0.0 if the terrain height could not be determined.

◆ getHAT()

double vreRtd::getHAT ( const DtSimulationServices * simMan,
const DtGeodeticCoord & pos )

Gets the height above terrain (HAT) for a geodetic position.

Parameters
simManPointer to the simulation services
posGeodetic position to query HAT for
Returns
Height above terrain in meters

Calculates the height above terrain by converting the geodetic position to local coordinates, determining the terrain height at that location, and subtracting it from the position's altitude.