19#include <Physics/smVec3r.h>
22#include <matrix/vltaitbryan.h>
24#include <vrfobjcore/localObject.h>
29 class DtVrfObjectStateRepository;
30class DtSimulationServices;
32class DtSetDataRequest;
40#define GEODETIC_TO_LOCAL(geo, local) simulationServices()->physicalWorld()->geodeticToDatabase((geo), (local))
48#define LOCAL_TO_GEODETIC(local, geo) simulationServices()->physicalWorld()->databaseToGeodetic((local), (geo));
54#if RTD_VRF_PLUGIN_VER >= 440
55 #define VRF_OBJECT_GET_NAME markingText
57 #define VRF_OBJECT_GET_NAME objectName
66#define GET_EXT_ENTITY_NAME(entity) ("'" + (entity)->getMarkingText() + "'" + " (" + (entity)->getName() + ')')
74#define GET_EXT_VRF_OBJ_NAME(object) \
75 ("'" + (object)->markingText().stdString() + "'" + " (" + (object)->uuid().uuidString().stdString() + ')')
157 DtPhysicalWorld* physicalWorld,
const DtVector& localPosition,
const DtTaitBryan& topographicOrientation);
176 DtPhysicalWorld* physicalWorld,
const DtVector& localPosition,
const DtTaitBryan& localOrientation);
232void applyWind(DtPhysicalWorld* physicalWorld, RTD::VehicleBase* vehicle);
240void applyWind(RTD::VehicleBase* vehicle,
double vrfWindDir,
double vrfWindSpeed);
248#define RTDHeadingToVrfHeading(hdgInDeg) (-hdgInDeg)
256#define VrfHeadingToRTDHeading(hdgInDeg) (-hdgInDeg)
261#define toDtVector(v) DtVector((v)[0], (v)[1], (v)[2])
266#define toSmVec3r(v) smVec3r((v)[0], (v)[1], (v)[2])
271#define toSmVec2r(v) smVec2r((v)[0], (v)[1])
276#define toSmVec3d(v) smVec3d((v)[0], (v)[1], (v)[2])
281#define toSmVec2d(v) smVec2d((v)[0], (v)[1])
286#define toRTDLLA(geodeticCoord) \
287 smVec3r(smMath::radToDeg(geodeticCoord[0]), smMath::radToDeg(geodeticCoord[1]), geodeticCoord[2])
292#define toRTDLL(geodeticCoord) smVec2r(smMath::radToDeg(geodeticCoord[0]), smMath::radToDeg(geodeticCoord[1]))
297#define toGeodetic(lla) DtGeodeticCoord(smMath::degToRad(lla[0]), smMath::degToRad(lla[1]), lla[2])
325double getHAT(
const DtSimulationServices* simMan,
const DtGeodeticCoord& pos);
356#define RTD_CHECK_CONSWARN_RETURN(expression, complaint) \
359 objectConsoleWarn() << (complaint) << std::endl; \
369#define RTD_CHECK_DTWARN_RETURN(expression, complaint) \
372 DtWarn(complaint "\n"); \
383#define RTD_CHECK_CONSWARN_RETURN2(expression, complaint, retVal) \
386 objectConsoleWarn() << (complaint) << std::endl; \
397#define RTD_CHECK_DTWARN_RETURN2(expression, complaint, retVal) \
400 DtWarn(complaint "\n"); \
Forward declarations for the FixedWingLibCGF namespace.
Definition vreFwlActuator.h:30
RTD namespace forward declarations.
Definition vreRtdUtil.h:331
Forward declarations for the RotorLibCGF namespace.
Definition vreRlActuator.h:35
Definition vreRtdConfigFileReader.h:18
DtTaitBryan TopoToLocalWrtDatabase(DtPhysicalWorld *physicalWorld, const DtVector &localPosition, const DtTaitBryan &topographicOrientation)
Converts topographic orientation to local orientation.
bool computeTerrainHeight(const DtSimulationServices *simMan, const DtVector &localPosition, double &result)
Computes the terrain height at a specified local position.
void applyAltitudeLimit(RTD::VehicleBase *vehicle, const smReal &maxAltitude)
Applies an altitude limit to a vehicle.
smVec3r VRFWorldOriToRTDWorldHPR(const DtTaitBryan &ori)
Converts airplane world orientation from VRF to RTD HPR.
void applySpeedLimit(RTD::VehicleBase *vehicle, const smReal &maxSpeed)
Applies a speed limit to a vehicle.
DtTaitBryan LocalWrtDatabaseToTopo(DtPhysicalWorld *physicalWorld, const DtVector &localPosition, const DtTaitBryan &localOrientation)
Converts local orientation to topographic orientation.
DtTaitBryan RTDWorldHprToVRFWorldOri(const smVec3r &hpr)
Converts airplane world orientation from RTD HPR to VRF.
smVec3r getHeadingAlignedSpeedVector(const smVec3r &hpr, smReal speed, bool xyOnly=false)
Gets the heading-aligned speed vector.
smReal compute2DDist(const smVec3r &pnt1, const DtVector &pnt2)
Computes the 2D distance between two points.
smVec3r VRFOriToRTDHPR(const DtTaitBryan &ori)
Converts from a VRF/DtTaitBryan orientation to RTD/HPR.
void applyWind(DtPhysicalWorld *physicalWorld, RTD::VehicleBase *vehicle)
Applies wind to a vehicle.
double getTerrainHeight(const DtSimulationServices *simMan, const DtVector &localPosition)
Gets the terrain height at a specified local position.
DtVector getVecMatchingDirection(DtPhysicalWorld *physicalWorld, DtVrfObjectStateRepository *sr, DtReal vecMagnitude)
Gets a vector matching the direction of an entity.
DtTaitBryan HprToVRFOri(const smVec3r &hpr)
Converts from an RTD/HPR orientation to VRF/DtTaitBryan.
smVec3r VRFRotVelToRTDRotVelWCS(const DtTaitBryan &entityWorldOrientation, const DtVector &rotationalVelocity)
Converts rotational velocity from VRF to RTD world coordinate system.
void setDeadreckoningThresholds(DtLocalObject *entity, double transThreshold, double rotationThreshold)
Utility functions for VREngage Real-Time Dynamics (RTD) components.
double getHAT(const DtSimulationServices *simMan, const DtGeodeticCoord &pos)
Gets the height above terrain (HAT) for a geodetic position.
DtVector RTDRotVelWCSToVRFRotVel(const DtTaitBryan &entityWorldOrientation, const smVec3r &rotationalVelocity)
Converts rotational velocity from RTD to VRF coordinate system.
RTDVRFConfigWarnsForExternalIncludes() class DtVrfObjectStateRepository