![]() |
VR-Forces 5.0.2 Developer's Guide
|
Go to the source code of this file.
Classes | |
| class | DtPoleFilterType |
| class | DtNonLinearOutputType |
Macros | |
| #define | DtSIGN(x) (((x) > (0.0)) ? (1.0) : (-1.0)) |
| #define | DtALMOST(x, y, e) (((x)<=((y)+(e))) && ((x)>=((y)-(e)))) |
| #define | DtGRAVITY_CONSTANT (9.81) |
| #define | DtPI_OVER_TWO (1.570796327) |
| #define | DtTWO_PI (6.283185307) |
| #define | DtMETERS_TO_FEET (3.2808) |
| #define | DtMETERS_PER_SEC_TO_MPH (2.23) |
| #define | DtLN2 (0.693147181) |
| #define | DtNM_2_METERS (1852.0) |
| #define | SIN(x) DtSin(x) |
| #define | COS(x) DtCos(x) |
| #define | TAN(x) DtTan(x) |
| #define | ASIN(x) DtAsin(x) |
| #define | ACOS(x) DtAcos(x) |
| #define | ATAN(x) DtAtan(x) |
| #define | ATAN2(y, x) DtAtan2((y), (x)) |
| #define | DtFRand() ((double) rand() / RAND_MAX) |
| #define | DtIRandom(from, to) DtIntRandom(from, to) |
Functions | |
| DT_DLL_vrfutil double | gRand () |
| DT_DLL_vrfutil double | centralLimitGaussian (int numDraws) |
| DT_DLL_vrfutil double | gaussianRandom () |
| DT_DLL_vrfutil void | Dt3DKinematicsTick (const DtVector &Position, const DtVector &LinearVelocity, const DtVector &LinearAcceleration, DtConstDcm orientation, const DtVector &angVelocity, const DtVector &angAcceleration, double DeltaTime, DtVectorRef newPosition, DtVectorRef newVelocity, DtDcm &newOrientation, DtVectorRef newAngVelocity) |
| DT_DLL_vrfutil void | Dt3DDynamicsTick (const DtVector &LinearForce, double vehicleMass, DtVectorRef newLinearAcceleration, const DtVector &torque, DtConstDcm vehicleInertia, DtVectorRef newAngAcceleration) |
| DT_DLL_vrfutil void | DtGravityForce (double mass, DtVectorRef returnForce) |
| DT_DLL_vrfutil void | DtResolve (const DtVector &forcePos, const DtVector &force, DtVectorRef resultTorqueAboutOrigin) |
| DT_DLL_vrfutil void | DtParallelAxisTheorem (DtConstDcm inertiaInOriginalFrame, double mass, const DtVector &newToOriginal, DtDcm &inertiaInNewFrame) |
| DT_DLL_vrfutil void | DtRotateInertia (DtDcm inertiaInOriginalFrame, DtDcm originalToNew, DtDcm &inertiaInNewFrame) |
| DT_DLL_vrfutil double | DtPIDServo (double error, double errorIntegral, double velocity, double proportionalGain, double integralGain, double derivativeGain, double biasForce=0.0, double *control=0) |
| DT_DLL_vrfutil double | maxAccelerationFromConstraint (const double deceleration, const double dt, const double ownSpeed, const double distance, const double targetSpeed, const double errorDecelValue=-1e10) |
| DT_DLL_vrfutil double | maxAccelerationFromInterceptConstraint (const double deceleration, const double dt, const double ownSpeed, const double distance, const double targetSpeed, const double errorDecelValue=-1e10) |
| DT_DLL_vrfutil void | DtBlockInertia (const double xLen, const double yLen, const double zLen, const double mass, DtDcm &inertia) |
| DT_DLL_vrfutil bool | DtVectorIsZero (const DtVector &v, double tolerance=0.0) |
| DT_DLL_vrfutil void | DtDcmFromColumns (DtDcm &result, const DtVector &col1, const DtVector &col2, const DtVector &col3) |
| DT_DLL_vrfutil void | DtDcmFromRows (DtDcm &result, const DtVector &row1, const DtVector &row2, const DtVector &row3) |
| DT_DLL_vrfutil bool | DtPointInCone (const DtVector &coneEndPosition, const DtVector &coneAxis, const double coneAngle, const DtVector &testPoint, double *testAnglePtr=0) |
| DT_DLL_vrfutil bool | DtPointInWedge (const DtVector &wedgeEndPosition, const DtVector &wedgeAxis, const double wedgeAngle, const DtVector &testPoint) |
| DT_DLL_vrfutil DtFloat64 | DtFastDist (const DtVector &pt1, const DtVector &pt2) |
| DT_DLL_vrfutil void | DtVecLimit (DtVectorRef vec, double limit) |
| double | DtVecMag (const DtVector &vec) |
| double | DtVecMagSquared (const DtVector &vec) |
| DT_DLL_vrfutil void | DtRotX (double angle, DtDcm &rotMat) |
| DT_DLL_vrfutil void | DtRotY (double angle, DtDcm &rotMat) |
| DT_DLL_vrfutil void | DtRotZ (double angle, DtDcm &rotMat) |
| DT_DLL_vrfutil void | DtBodyToLocalRef_to_Euler (DtConstDcm body2ref, DtTaitBryan *e) |
| DT_DLL_vrfutil void | DtEuler_to_BodyToLocalRef (const DtTaitBryan &euler, DtDcm &body2ref) |
| DT_DLL_vrfutil const DtDcm & | enu2ned () |
| DT_DLL_vrfutil const DtDcm & | ned2enu () |
| DT_DLL_vrfutil void | DtRotX2 (double sinAng, double cosAng, DtDcm &rotMat) |
| DT_DLL_vrfutil void | DtRotY2 (double sinAng, double cosAng, DtDcm &rotMat) |
| DT_DLL_vrfutil void | DtRotZ2 (double sinAng, double cosAng, DtDcm &rotMat) |
| DT_DLL_vrfutil void | DtRotBodyX (double angle, DtDcm &rotMat) |
| DT_DLL_vrfutil void | DtRotBodyY (double angle, DtDcm &rotMat) |
| DT_DLL_vrfutil void | DtRotBodyZ (double angle, DtDcm &rotMat) |
| DT_DLL_vrfutil void | DtCircleVerts (double radius, int npts, double *xCoords, double *yCoords) |
| DT_DLL_vrfutil void | DtSpacesToDashes (char *str) |
| DT_DLL_vrfutil char * | DtGetFilenameExtension (char *fileName, char *extension) |
| DT_DLL_vrfutil void | DtOrientationFromThreePoints (const DtVector &leftPoint, const DtVector &rightPoint, const DtVector &rearPoint, DtDcm &orientation, bool yIsForward=false) |
| DT_DLL_vrfutil void | DtOrientationFromThreePointsAndHeading (const DtVector &leftPoint, const DtVector &rightPoint, const DtVector &otherPoint, double cosHeading, double sinHeading, DtDcm &orientation, bool upsideDown=false) |
| DT_DLL_vrfutil void | DtOrientationFromThreePointsAndHeading (const DtVector &leftPoint, const DtVector &rightPoint, const DtVector &otherPoint, double heading, const DtDcm &topoToLocal, DtDcm &orientation) |
| DT_DLL_vrfutil bool | DtCalculateNormal (const DtVector &pointA, const DtVector &pointB, const DtVector &pointC, DtVector &normal) |
| DT_DLL_vrfutil void | DtCalculateOrientation (DtVector localNormal, double heading, const DtDcm &topoToLocal, DtDcm &localOrientation) |
| DT_DLL_vrfutil double | DtFindZInPlane (const double posx, const double posy, const DtVector &pointInPlane, const DtVector &normal) |
| DT_DLL_vrfutil DtVector | DtIntersectLineWithPlane (const DtVector &point, const DtVector &direction, const DtVector &pointInPlane, const DtVector &planeNormal, bool *noIntersection=0) |
| DT_DLL_vrfutil bool | DtChordIntersectsExtentArea (const DtChord &chord, const DtVector &lower, const DtVector &upper, DtVrfChordIntersectRecordList *intList=0) |
| DT_DLL_vrfutil bool | DtIntersectChordWithTriangle (const DtChord &chord, const DtVector &p1, const DtVector &p2, const DtVector &p3, DtVector *result=0, double *t=0) |
| DT_DLL_vrfutil double | DtBilinearInterpolate (double x1, double y1, double x2, double y2, double z11, double z21, double z12, double z22, double x, double y) |
| DT_DLL_vrfutil unsigned int | DtIntersectChordWithBilinearSurface (const DtChord &chord, double x1, double y1, double x2, double y2, double z11, double z21, double z12, double z22, DtVrfChordIntersectionRecord &isect1, DtVrfChordIntersectionRecord &isect2, double tolerance=1e-20) |
| DT_DLL_vrfutil void | DtBodyToRefFromHeadingAndPosition (const Coordinate_System &coordSystem, double heading, const DtVector &position, DtDcm &bodyToRef) |
| DT_DLL_vrfutil void | DtTopoEulerToBodyToLocal (const DtTaitBryan &topoEuler, const Coordinate_System &coordSystem, const DtVector &localPosition, DtDcm &bodyToLocalDcm) |
| DT_DLL_vrfutil DtDcm | DtRotZToBodyToLocal (const Coordinate_System &coordSystem, double angle, const DtVector &position) |
| DT_DLL_vrfutil DtDcm | DtRotYToBodyToLocal (const Coordinate_System &coordSystem, double angle, const DtVector &position) |
| DT_DLL_vrfutil DtDcm | DtRotXToBodyToLocal (const Coordinate_System &coordSystem, double angle, const DtVector &position) |
| DT_DLL_vrfutil double | DtHeadingFromGeocAToGeocB (const DtVector &geocA, const DtVector &geocB) |
| DT_DLL_vrfutil void | DtTrigInit () |
| DT_DLL_vrfutil double | DtSin (double r) |
| double | DtCos (double r) |
| DT_DLL_vrfutil double | DtTan (double r) |
| DT_DLL_vrfutil double | DtAsin (double x) |
| double | DtAcos (double x) |
| DT_DLL_vrfutil double | DtAtan (double x) |
| DT_DLL_vrfutil double | DtAtan2 (double y, double x) |
| DT_DLL_vrfutil bool | DtSameSign (double x, double y) |
| DT_DLL_vrfutil bool | DtPointInSegment (const DtVector &testPoint, const DtVector &segStart, const DtVector &segEnd) |
| DT_DLL_vrfutil int | DtIntersect2D_Segments (DtVector P0, DtVector P1, DtVector Q0, DtVector Q1, DtVector *I0=0, DtVector *I1=0, double *isectParam1=0, double *isectParam2=0, bool *parallel=0, bool *collinear=0) |
| DT_DLL_vrfutil bool | DtInSegment (DtVector P, DtVector P0, DtVector P1) |
| DT_DLL_vrfutil DtVector | localGravityAcceleration (const DtVector &localPosition, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil double | headingAngleTo (const DtVector &observerPosition, const DtVector &targetPosition, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil double | elevationAngleTo (const DtVector &observerPosition, const DtVector &targetPosition, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil double | bankAngleTo (const DtVector &observerPosition, const DtVector &targetPosition, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil double | distSquaredTo2D (const DtVector &position1, const DtVector &position2, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil bool | inside (const DtVector &localPoint, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil bool | insideEllipsoid (const DtVector &localPoint, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil bool | leftOf (const DtVector &localPoint, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil double | headingAngleTo (const DtVector &localPoint, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil double | elevationAngleTo (const DtVector &localPoint, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil double | localDistSquaredTo (const DtVector &localPoint, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil double | distSquaredTo2D (const DtVector &localPoint, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil double | distToBoundingVolume (const DtVector &localBaseLocation, const Dt3dBoundingVolume &box, const DtTaitBryan &boxToLocalOrientation, const DtVector &testPoint) |
| DT_DLL_vrfutil bool | intersects (const DtVector &localPoint1, const DtVector &localPoint2, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil DtListItem * | getClosestVertex2D (const DtVector &localPoint, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil bool | getClosestLine2D (const DtVector &localPoint, DtVector &localLinePt1, DtVector &localLinePt2, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil double | distanceSquaredPointToLine2D (const DtVector &localPoint, const DtVector &localLinePt1, const DtVector &localLinePt2, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil double | distanceSquaredPointToLineTopographic (const DtVector &topoPoint, const DtVector &topoLinePt1, const DtVector &topoLinePoint2) |
| DT_DLL_vrfutil double | distanceSquaredPointToPoint2D (const DtVector &localLinePt1, const DtVector &localLinePt2, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil double | closestPointAlongChord2D (const DtPoint &chordStart, const DtPoint &chordEnd, const DtPoint &testPoint, DtPoint &closestPoint, const Coordinate_System &coordSys) |
| DT_DLL_vrfutil bool | setCurrentVertexToClosestInDirectionOfTraversal (const DtVector &point, const Coordinate_System &coordinateSystem, DtLocalVectorIterator &localVertexIterator) |
| DT_DLL_vrfutil int | closestVertexInDirectionOfTraversal (const DtVector &point, const DtLocalVertexList &vertices, int startingIndex, bool reverseDirection, const Coordinate_System &coordinateSystem) |
| double | dotProd2D (const DtVector &v1, const DtVector &v2) |
| double | magnitudeSquared2D (const DtVector &v) |
| double | crossProduct2D (const DtVector &v1, const DtVector &v2) |
| DtVector | rotateRight2D (const DtVector &v) |
| void | normalize2D (DtVector &v) |
| double | vectorAngle2D (DtVector &v) |
| DT_DLL_vrfutil void | localVectorToGeocentricVector (const DtVector &geocentricPosition, const DtVector &localVector, const Coordinate_System &coordinateSystem, DtVector &geocentricVector) |
| DT_DLL_vrfutil void | localOrientationToGeocentricOrientation (const DtVector geocentricPosition, const DtTaitBryan &localOrientation, const Coordinate_System &coordinateSystem, DtTaitBryan &geocentricOrientation) |
| DT_DLL_vrfutil DtVector | DtCalculateRotationalVelocity (const DtDcm &newOrientation, const DtDcm &oldOrientation, double dT) |
| DT_DLL_vrfutil double | calculateSpeedForArrival (double distance, double currentSpeed, double acceleration, double deceleration, double timeToArrive) |
| DT_DLL_vrfutil void | geocentricVectorToLocalVector (const DtVector &geocentricPosition, const DtVector &geocentricVector, const Coordinate_System &coordinateSystem, DtVector &localVector) |
| DT_DLL_vrfutil void | geocentricOrientationToLocalOrientation (const DtVector &geocentricPosition, const DtTaitBryan &geocentricOrientation, const Coordinate_System &coordinateSystem, DtTaitBryan &localOrientation) |
| DT_DLL_vrfutil int | DtIntRandom (int iFrom, int iTo) |
| DT_DLL_vrfutil bool | DtIsValidNumber (double x) |
| DT_DLL_vrfutil double | DtHoursMinutesSeconds2Seconds (double hours, double minutes, double seconds) |
| DT_DLL_vrfutil void | DtSeconds2HoursMinutesSeconds (double totalSeconds, int &hoursOut, int &minutesOut, double &secondsOut) |
| DT_DLL_vrfutil unsigned int | DtVRFGetThreadId () |
| DT_DLL_vrfutil double | calculateLengthOfLine (const std::vector< DtVector > &points) |
| DT_DLL_vrfutil double | calculateLengthOfLine (const Coordinate_System &coordinateSystem, const std::vector< DtVector > &points) |
| DT_DLL_vrfutil void | calculateLengthAndWidthOfShape (const Coordinate_System &coordSytem, const std::vector< DtVector > &points, double &length, double &width) |
| DT_DLL_vrfutil void | calculateLengthAndWidthOfShape (const std::vector< DtVector > &points, double &length, double &width) |
| DT_DLL_vrfutil DtVector | DtPoint2DtVector (const DtPoint &p) |
| DT_DLL_vrfutil DtPoint | DtVector2DtPoint (const DtVector &p) |
| DT_DLL_vrfutil DtVector | calculateWorldVelocityFromPosition (const DtVector ¤tWorldPos, const DtVector ¤tLocalPos, const DtVector &localVelocity, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil double | illuminationValueAtPosition (const DtGeodeticCoord &position, time_t time, double nighttimeMaximum=0.1, double illuminationMinimum=0.001, bool useDayNightIlluminationModel=true, int *sunstate=0) |
| DT_DLL_vrfutil bool | calculateEstimatedTot (const DtVector &localCurrentPos, const DtVector &localTargetPos, double orderedSpeed, double currentSimTime, double currentSpeed, double acceleration, const Coordinate_System &coordinateSystem, double &totResult, double &speedResult) |
| DT_DLL_vrfutil bool | calculateEstimatedTot (const DtVector &localCurrentPos, const DtLocalVertexList &localVertexList, double orderedSpeed, double currentSimTime, double currentSpeed, double acceleration, const Coordinate_System &coordinateSystem, double &totResult, double &speedResult) |
| bool | checkForNAN (const DtVector &vector) |
| bool | checkForNAN (const DtTaitBryan &tb) |
| bool | checkForNAN (const DtDcm &dcm) |
| DT_DLL_vrfutil std::map < std::string, std::string > | convertToStdStringMap (const std::map< DtString, DtString > &source, bool convertValueForXml=false) |
| template<typename SequenceSequenceT , typename RangeT , typename PredicateT > | |
| SequenceSequenceT & | oldBoostSplit (SequenceSequenceT &Result, RangeT &Input, PredicateT Pred, boost::algorithm::token_compress_mode_type eCompress=boost::algorithm::token_compress_off) |
| DT_DLL_vrfutil bool | isPointWithinCorridor (double &heading, double corridorWidth, double corridorHeight, const DtVector &localPoint, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystemRef) |
| DT_DLL_vrfutil bool | isChordWithinCorridor (const DtChord &localChord, const DtLocalVertexList &localVertexList, double corridorWidth, double corridorHeight, const Coordinate_System &coordinateSystemRef) |
| DT_DLL_vrfutil bool | isPointRoughlyWithinCorridor (double corridorWidth, double corridorHeight, const DtVector &localPoint, const DtExtent &lineExtent, const Coordinate_System &coordinateSystemRef) |
| DT_DLL_vrfutil bool | isChordRoughlyWithinCorridor (const DtChord &localChord, const DtExtent &lineExtent, double corridorWidth, double corridorHeight, const Coordinate_System &coordinateSystemRef) |
| DT_DLL_vrfutil double | getHeadingFromGeocentric (const DtVector &firstPoint, const DtVector &secondPoint) |
| DT_DLL_vrfutil bool | calculateGeometricCenter (const DtVertexList &vertices, DtVector &geometricCenter) |
| DT_DLL_vrfutil double | altitudeOfPosition (const DtVector &localPosition, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil double | altitudeOfPosition (const DtPoint &localPosition, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil void | setAltitudeOfPosition (DtVector &localPosition, double newAltitude, const Coordinate_System &coordinateSystem) |
| DT_DLL_vrfutil void | setAltitudeOfPosition (DtPoint &localPosition, double newAltitude, const Coordinate_System &coordinateSystem) |
| #define DtSIGN | ( | x | ) | (((x) > (0.0)) ? (1.0) : (-1.0)) |
Boost includes.
Referenced by DtNonLinearOutputType::DtOutput().
| #define DtALMOST | ( | x, | |
| y, | |||
| e | |||
| ) | (((x)<=((y)+(e))) && ((x)>=((y)-(e)))) |
| #define DtGRAVITY_CONSTANT (9.81) |
| #define DtTWO_PI (6.283185307) |
| #define DtMETERS_TO_FEET (3.2808) |
| #define DtMETERS_PER_SEC_TO_MPH (2.23) |
| #define DtLN2 (0.693147181) |
| #define DtNM_2_METERS (1852.0) |
| #define SIN | ( | x | ) | DtSin(x) |
| #define COS | ( | x | ) | DtCos(x) |
| #define TAN | ( | x | ) | DtTan(x) |
| #define ASIN | ( | x | ) | DtAsin(x) |
| #define ACOS | ( | x | ) | DtAcos(x) |
| #define ATAN | ( | x | ) | DtAtan(x) |
| #define ATAN2 | ( | y, | |
| x | |||
| ) | DtAtan2((y), (x)) |
| #define DtFRand | ( | ) | ((double) rand() / RAND_MAX) |
| #define DtIRandom | ( | from, | |
| to | |||
| ) | DtIntRandom(from, to) |
| DT_DLL_vrfutil double gRand | ( | ) |
Generates a Gaussian random number. Calls centralLimitGaussian() with the number of draws set to 6.
| DT_DLL_vrfutil double centralLimitGaussian | ( | int | numDraws | ) |
Generates a Gaussian random number (an approximation), from a series of n uniform random number draws. Number returned lies between -1 and 1. Pass in the number of uniform random number draws. Called by gRand().
| DT_DLL_vrfutil double gaussianRandom | ( | ) |
Generates a Gaussian random number using the Marsaglia polar method. See e.g. Wikipedia (http://en.wikipedia.org/wiki/Normal_distribution#Generating_values_from_normal_distribution) The computation requires two calls to rand(), one to log(), and one to sqrt() for every two numbers generated.
| DT_DLL_vrfutil void Dt3DKinematicsTick | ( | const DtVector & | Position, |
| const DtVector & | LinearVelocity, | ||
| const DtVector & | LinearAcceleration, | ||
| DtConstDcm | orientation, | ||
| const DtVector & | angVelocity, | ||
| const DtVector & | angAcceleration, | ||
| double | DeltaTime, | ||
| DtVectorRef | newPosition, | ||
| DtVectorRef | newVelocity, | ||
| DtDcm & | newOrientation, | ||
| DtVectorRef | newAngVelocity | ||
| ) |
| DT_DLL_vrfutil void Dt3DDynamicsTick | ( | const DtVector & | LinearForce, |
| double | vehicleMass, | ||
| DtVectorRef | newLinearAcceleration, | ||
| const DtVector & | torque, | ||
| DtConstDcm | vehicleInertia, | ||
| DtVectorRef | newAngAcceleration | ||
| ) |
| DT_DLL_vrfutil void DtGravityForce | ( | double | mass, |
| DtVectorRef | returnForce | ||
| ) |
| DT_DLL_vrfutil void DtResolve | ( | const DtVector & | forcePos, |
| const DtVector & | force, | ||
| DtVectorRef | resultTorqueAboutOrigin | ||
| ) |
| force | expressed in "Origin" frame |
| DT_DLL_vrfutil void DtParallelAxisTheorem | ( | DtConstDcm | inertiaInOriginalFrame, |
| double | mass, | ||
| const DtVector & | newToOriginal, | ||
| DtDcm & | inertiaInNewFrame | ||
| ) |
| mass | I in frame A |
| inertiaInNewFrame | vector from B to A |
| DT_DLL_vrfutil void DtRotateInertia | ( | DtDcm | inertiaInOriginalFrame, |
| DtDcm | originalToNew, | ||
| DtDcm & | inertiaInNewFrame | ||
| ) |
I in frame B.
| originalToNew | I in frame A |
| inertiaInNewFrame | A2B rotation matrix |
| DT_DLL_vrfutil double DtPIDServo | ( | double | error, |
| double | errorIntegral, | ||
| double | velocity, | ||
| double | proportionalGain, | ||
| double | integralGain, | ||
| double | derivativeGain, | ||
| double | biasForce = 0.0, |
||
| double * | control = 0 |
||
| ) |
I in frame B.
| DT_DLL_vrfutil double maxAccelerationFromConstraint | ( | const double | deceleration, |
| const double | dt, | ||
| const double | ownSpeed, | ||
| const double | distance, | ||
| const double | targetSpeed, | ||
| const double | errorDecelValue = -1e10 |
||
| ) |
This function computes the maximum acceleration that an entity can use during the next tick and still be able to decelerate to the target speed afterward in the given distance.
| deceleration | is the rate at which the entity will decelerate after the next tick. A NEGATIVE value. |
| dt | is the length of the tick; the entity can't begin decelerating until this time has passed. |
| ownSpeed | is the start speed of the entity. |
| distance | is the distance to the point at which the target speed must be reached. |
| targetSpeed | is the target speed at the given distance. |
| DT_DLL_vrfutil double maxAccelerationFromInterceptConstraint | ( | const double | deceleration, |
| const double | dt, | ||
| const double | ownSpeed, | ||
| const double | distance, | ||
| const double | targetSpeed, | ||
| const double | errorDecelValue = -1e10 |
||
| ) |
This function is like maxAccelerationFromConstraint, but it assumes that the goal is to intercept a target that starts at distance away traveling at target speed.
| deceleration | is the rate at which the entity will decelerate after the next tick. A NEGATIVE value. |
| dt | is the length of the tick; the entity can't begin decelerating until this time has passed. |
| ownSpeed | is the start speed of the entity. |
| distance | is the initial distance to the target point, which is traveling at targetSpeed. |
| targetSpeed | is the speed of the target point. |
| DT_DLL_vrfutil void DtBlockInertia | ( | const double | xLen, |
| const double | yLen, | ||
| const double | zLen, | ||
| const double | mass, | ||
| DtDcm & | inertia | ||
| ) |
| DT_DLL_vrfutil bool DtVectorIsZero | ( | const DtVector & | v, |
| double | tolerance = 0.0 |
||
| ) |
| DT_DLL_vrfutil void DtDcmFromColumns | ( | DtDcm & | result, |
| const DtVector & | col1, | ||
| const DtVector & | col2, | ||
| const DtVector & | col3 | ||
| ) |
| DT_DLL_vrfutil void DtDcmFromRows | ( | DtDcm & | result, |
| const DtVector & | row1, | ||
| const DtVector & | row2, | ||
| const DtVector & | row3 | ||
| ) |
| DT_DLL_vrfutil bool DtPointInCone | ( | const DtVector & | coneEndPosition, |
| const DtVector & | coneAxis, | ||
| const double | coneAngle, | ||
| const DtVector & | testPoint, | ||
| double * | testAnglePtr = 0 |
||
| ) |
Test if a point is in a cone. All quantities are assumed to be in the same coordinate system. The cone is specified by the position of its tip, the direction of its central axis and an angle. If we define P as the vector from coneEndPosition to testPoint and C as the coneAxis, then testAngle is the angle between P and C. If testAngle is less than coneAngle/2, then testPoint is in the cone and true is returned. Otherwise false is returned. In either case, testAngle is put into *testAnglePtr if a non-0 ptr was passed.
| DT_DLL_vrfutil bool DtPointInWedge | ( | const DtVector & | wedgeEndPosition, |
| const DtVector & | wedgeAxis, | ||
| const double | wedgeAngle, | ||
| const DtVector & | testPoint | ||
| ) |
| DT_DLL_vrfutil DtFloat64 DtFastDist | ( | const DtVector & | pt1, |
| const DtVector & | pt2 | ||
| ) |
| DT_DLL_vrfutil void DtVecLimit | ( | DtVectorRef | vec, |
| double | limit | ||
| ) |
If mag(vec)>limit, shortens vector to mag = limit.
| DT_DLL_vrfutil void DtRotX | ( | double | angle, |
| DtDcm & | rotMat | ||
| ) |
| DT_DLL_vrfutil void DtRotY | ( | double | angle, |
| DtDcm & | rotMat | ||
| ) |
| DT_DLL_vrfutil void DtRotZ | ( | double | angle, |
| DtDcm & | rotMat | ||
| ) |
| DT_DLL_vrfutil void DtBodyToLocalRef_to_Euler | ( | DtConstDcm | body2ref, |
| DtTaitBryan * | e | ||
| ) |
| DT_DLL_vrfutil void DtEuler_to_BodyToLocalRef | ( | const DtTaitBryan & | euler, |
| DtDcm & | body2ref | ||
| ) |
| DT_DLL_vrfutil const DtDcm& enu2ned | ( | ) |
| DT_DLL_vrfutil const DtDcm& ned2enu | ( | ) |
| DT_DLL_vrfutil void DtRotX2 | ( | double | sinAng, |
| double | cosAng, | ||
| DtDcm & | rotMat | ||
| ) |
| DT_DLL_vrfutil void DtRotY2 | ( | double | sinAng, |
| double | cosAng, | ||
| DtDcm & | rotMat | ||
| ) |
| DT_DLL_vrfutil void DtRotZ2 | ( | double | sinAng, |
| double | cosAng, | ||
| DtDcm & | rotMat | ||
| ) |
| DT_DLL_vrfutil void DtRotBodyX | ( | double | angle, |
| DtDcm & | rotMat | ||
| ) |
Returns a matrix for converting from the new system to the old system where both systems are using body coordinates.
| DT_DLL_vrfutil void DtRotBodyY | ( | double | angle, |
| DtDcm & | rotMat | ||
| ) |
| DT_DLL_vrfutil void DtRotBodyZ | ( | double | angle, |
| DtDcm & | rotMat | ||
| ) |
| DT_DLL_vrfutil void DtCircleVerts | ( | double | radius, |
| int | npts, | ||
| double * | xCoords, | ||
| double * | yCoords | ||
| ) |
| DT_DLL_vrfutil void DtSpacesToDashes | ( | char * | str | ) |
Inline versions of some functions in LibMatrix. NOTE: that unlike the LibMatrix counterpart.
Changes all spaces in str to dashes -
| DT_DLL_vrfutil char* DtGetFilenameExtension | ( | char * | fileName, |
| char * | extension | ||
| ) |
Extract the extension from the fileName, excluding the period(.). Returns 0 if no period is found. Otherwise, returns a pointer to the period in fileName, then copies everything after the period into extension.
| DT_DLL_vrfutil void DtOrientationFromThreePoints | ( | const DtVector & | leftPoint, |
| const DtVector & | rightPoint, | ||
| const DtVector & | rearPoint, | ||
| DtDcm & | orientation, | ||
| bool | yIsForward = false |
||
| ) |
Given the world position of the three big-wheel points, this returns the resulting orientation of big-wheel, assuming the following body axes:
If yIsForward is false (default) then routine assumes: X is forward otherwise it assumes: x is to the right
| DT_DLL_vrfutil void DtOrientationFromThreePointsAndHeading | ( | const DtVector & | leftPoint, |
| const DtVector & | rightPoint, | ||
| const DtVector & | otherPoint, | ||
| double | cosHeading, | ||
| double | sinHeading, | ||
| DtDcm & | orientation, | ||
| bool | upsideDown = false |
||
| ) |
This form preserves heading; the previous one does not!
| DT_DLL_vrfutil void DtOrientationFromThreePointsAndHeading | ( | const DtVector & | leftPoint, |
| const DtVector & | rightPoint, | ||
| const DtVector & | otherPoint, | ||
| double | heading, | ||
| const DtDcm & | topoToLocal, | ||
| DtDcm & | orientation | ||
| ) |
This form preserves heading; the previous one does not!
| DT_DLL_vrfutil bool DtCalculateNormal | ( | const DtVector & | pointA, |
| const DtVector & | pointB, | ||
| const DtVector & | pointC, | ||
| DtVector & | normal | ||
| ) |
Calculates the normal formed by the plane containing points A, B, and C.
| DT_DLL_vrfutil void DtCalculateOrientation | ( | DtVector | localNormal, |
| double | heading, | ||
| const DtDcm & | topoToLocal, | ||
| DtDcm & | localOrientation | ||
| ) |
Calculates the orientation from the specified local normal and heading.
| DT_DLL_vrfutil double DtFindZInPlane | ( | const double | posx, |
| const double | posy, | ||
| const DtVector & | pointInPlane, | ||
| const DtVector & | normal | ||
| ) |
| DT_DLL_vrfutil DtVector DtIntersectLineWithPlane | ( | const DtVector & | point, |
| const DtVector & | direction, | ||
| const DtVector & | pointInPlane, | ||
| const DtVector & | planeNormal, | ||
| bool * | noIntersection = 0 |
||
| ) |
Returns the point of intersection between a line (defined by a point and a direction vector) and a plane (defined by a point in the plane and the plane normal). If noIntersection is supplied it will be set to true if the line and plane don't intersect.
| DT_DLL_vrfutil bool DtChordIntersectsExtentArea | ( | const DtChord & | chord, |
| const DtVector & | lower, | ||
| const DtVector & | upper, | ||
| DtVrfChordIntersectRecordList * | intList = 0 |
||
| ) |
Returns true if the chord intersects the extent area (i.e. including the interior points). If intList is supplied then it is populated with the intersection points.
| DT_DLL_vrfutil bool DtIntersectChordWithTriangle | ( | const DtChord & | chord, |
| const DtVector & | p1, | ||
| const DtVector & | p2, | ||
| const DtVector & | p3, | ||
| DtVector * | result = 0, |
||
| double * | t = 0 |
||
| ) |
Returns the point of intersection between a chord and a triangle. Takes into account end points of chord and boundary of triangle.
| DT_DLL_vrfutil double DtBilinearInterpolate | ( | double | x1, |
| double | y1, | ||
| double | x2, | ||
| double | y2, | ||
| double | z11, | ||
| double | z21, | ||
| double | z12, | ||
| double | z22, | ||
| double | x, | ||
| double | y | ||
| ) |
Returns result of bilinear interpolation on grid defined by (x1,y1) to (x1,y2) at point (x,y).
| DT_DLL_vrfutil unsigned int DtIntersectChordWithBilinearSurface | ( | const DtChord & | chord, |
| double | x1, | ||
| double | y1, | ||
| double | x2, | ||
| double | y2, | ||
| double | z11, | ||
| double | z21, | ||
| double | z12, | ||
| double | z22, | ||
| DtVrfChordIntersectionRecord & | isect1, | ||
| DtVrfChordIntersectionRecord & | isect2, | ||
| double | tolerance = 1e-20 |
||
| ) |
Find intersection between bilinear interpolated surface and line.
| Number | of intersections added (will be 0, 1, or 2). |
| DT_DLL_vrfutil void DtBodyToRefFromHeadingAndPosition | ( | const Coordinate_System & | coordSystem, |
| double | heading, | ||
| const DtVector & | position, | ||
| DtDcm & | bodyToRef | ||
| ) |
Calculates a Dcm for rotating from a body coordinate system, defined by a given heading (no pitch or roll) and position, to a given reference frame.
| DT_DLL_vrfutil void DtTopoEulerToBodyToLocal | ( | const DtTaitBryan & | topoEuler, |
| const Coordinate_System & | coordSystem, | ||
| const DtVector & | localPosition, | ||
| DtDcm & | bodyToLocalDcm | ||
| ) |
Calculates the rotation matrix for going from a body to local (database) reference frame, given a set of topocentric Euler angles. topoEuler: topocentric Euler angles (heading, pitch, roll) localPosition: position of topocentric reference frame, in local coordinates bodyToLocalDcm: rotation matrix for rotating from body to local coordinates.
| DT_DLL_vrfutil DtDcm DtRotZToBodyToLocal | ( | const Coordinate_System & | coordSystem, |
| double | angle, | ||
| const DtVector & | position | ||
| ) |
| DT_DLL_vrfutil DtDcm DtRotYToBodyToLocal | ( | const Coordinate_System & | coordSystem, |
| double | angle, | ||
| const DtVector & | position | ||
| ) |
| DT_DLL_vrfutil DtDcm DtRotXToBodyToLocal | ( | const Coordinate_System & | coordSystem, |
| double | angle, | ||
| const DtVector & | position | ||
| ) |
| DT_DLL_vrfutil double DtHeadingFromGeocAToGeocB | ( | const DtVector & | geocA, |
| const DtVector & | geocB | ||
| ) |
Expects geocentric coordinates. Standing at point A, returns the heading along which you would need to be looking to be facing point B.
| DT_DLL_vrfutil void DtTrigInit | ( | ) |
Functions for trig table lookups.
| DT_DLL_vrfutil double DtSin | ( | double | r | ) |
Referenced by DtCos().
References DtPI_OVER_TWO, and DtSin().
| DT_DLL_vrfutil double DtTan | ( | double | r | ) |
| DT_DLL_vrfutil double DtAsin | ( | double | x | ) |
Referenced by DtAcos().
References DtAsin(), and DtPI_OVER_TWO.
| DT_DLL_vrfutil double DtAtan | ( | double | x | ) |
| DT_DLL_vrfutil double DtAtan2 | ( | double | y, |
| double | x | ||
| ) |
| DT_DLL_vrfutil bool DtSameSign | ( | double | x, |
| double | y | ||
| ) |
| DT_DLL_vrfutil bool DtPointInSegment | ( | const DtVector & | testPoint, |
| const DtVector & | segStart, | ||
| const DtVector & | segEnd | ||
| ) |
| DT_DLL_vrfutil int DtIntersect2D_Segments | ( | DtVector | P0, |
| DtVector | P1, | ||
| DtVector | Q0, | ||
| DtVector | Q1, | ||
| DtVector * | I0 = 0, |
||
| DtVector * | I1 = 0, |
||
| double * | isectParam1 = 0, |
||
| double * | isectParam2 = 0, |
||
| bool * | parallel = 0, |
||
| bool * | collinear = 0 |
||
| ) |
Description:
DtIntersect2D_Segments(): the intersection of 2 finite 2D segments; P0 to P1 and Q0 to Q1
returns: 0= disjoint (no intersect) 1= intersect in unique point I0 with parameter value (t) with respect to P0->P1 in isectParam1. If not collinear, isectParam2 will contain the parameter value for I0 with respect to line segment Q0->Q1 2= overlap in segment from I0 to I1 (collinear) with parameter value (t) (for I0, wrt P0->P1) in isectParam1
| DT_DLL_vrfutil bool DtInSegment | ( | DtVector | P, |
| DtVector | P0, | ||
| DtVector | P1 | ||
| ) |
DtInSegment(): determine if a collinear Point P is inside a Segment P0 to P1.
returns: true or false
Note that this is just a simpler version of DtPointInSegment, which can be used if you already know that the point is collinear
| DT_DLL_vrfutil DtVector localGravityAcceleration | ( | const DtVector & | localPosition, |
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns the local acceleration due to gravity (in meters/second/second) at a given local position.
| DT_DLL_vrfutil double altitudeOfPosition | ( | const DtVector & | localPosition, |
| const Coordinate_System & | coordinateSystem | ||
| ) |
| DT_DLL_vrfutil double altitudeOfPosition | ( | const DtPoint & | localPosition, |
| const Coordinate_System & | coordinateSystem | ||
| ) |
| DT_DLL_vrfutil void setAltitudeOfPosition | ( | DtVector & | localPosition, |
| double | newAltitude, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Alters localPosition to have the specified altitude (above 0 altitude). localPosition must be in the coordinate system specified.
| DT_DLL_vrfutil void setAltitudeOfPosition | ( | DtPoint & | localPosition, |
| double | newAltitude, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Alters localPosition to have the specified altitude (above 0 altitude). localPosition must be in the coordinate system specified.
| DT_DLL_vrfutil double headingAngleTo | ( | const DtVector & | observerPosition, |
| const DtVector & | targetPosition, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Local(database) functions for performing topocentric 2-D geometry operations on points and vertex lists (such as heading, elevation, and 2-D
Returns the heading angle in radians from observer position to target position. Positions must be in the given coordinate system.
| DT_DLL_vrfutil double elevationAngleTo | ( | const DtVector & | observerPosition, |
| const DtVector & | targetPosition, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns the elevation angle in radians from observer position to target position. Positions must be in the given coordinate system.
| DT_DLL_vrfutil double bankAngleTo | ( | const DtVector & | observerPosition, |
| const DtVector & | targetPosition, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns the bank angle in radians from observer position to target position. Positions must be in the given coordinate system.
| DT_DLL_vrfutil double distSquaredTo2D | ( | const DtVector & | position1, |
| const DtVector & | position2, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns the (2D) squared distance between given position. Positions must be in the given coordinate system.
| DT_DLL_vrfutil bool inside | ( | const DtVector & | localPoint, |
| const DtLocalVertexList & | localVertexList, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns true if localPoint is inside localVertexList in 2D. Always returns false if localVertexList is not a closed figure. Only supports convex polygons. Position and vertex list must be in the given coordinate system. If the local vertex list is an ellipsoid then insideEllipsoid is called.
| DT_DLL_vrfutil bool insideEllipsoid | ( | const DtVector & | localPoint, |
| const DtLocalVertexList & | localVertexList, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
| DT_DLL_vrfutil bool leftOf | ( | const DtVector & | localPoint, |
| const DtLocalVertexList & | localVertexList, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns true if localPoint is left of the localVertexList in 2D. Always returns false if this has only one vertex. If localVertexList has more than two vertices (ie. more than one line segment), acts on the closest (infinite) line. Position and vertex list must be in the given coordinate system.
| DT_DLL_vrfutil double headingAngleTo | ( | const DtVector & | localPoint, |
| const DtLocalVertexList & | localVertexList, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns the angle at which localPoint would proceed to arrive most quickly at localVertexList. If the localVertexList has more than one vertex, then headingAngleTo() acts on the closest vertex (which is not always the closest point on this). All points are considered in 2D. Position and vertex list must be in the given coordinate system.
| DT_DLL_vrfutil double elevationAngleTo | ( | const DtVector & | localPoint, |
| const DtLocalVertexList & | localVertexList, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns the elevation angle in 3D at which point would proceed to arrive most quickly at this. If the localVertexList has more than one vertex, then elevationAngleTo() acts on the closest vertex (which is not always the closest point on this). Position and vertex list must be in the given coordinate system.
| DT_DLL_vrfutil double localDistSquaredTo | ( | const DtVector & | localPoint, |
| const DtLocalVertexList & | localVertexList, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns the distance from localPoint to the closest vertex in localVertexList. If localVertexList is projected, calls distSquaredTo2D to find the the nearest vertex on localVertexList. Otherwise, calls localVertexList.closestLocalPosition() to determine the nearest vertex on this (in 3-D). Position and vertex list must be in the given coordinate system.
| DT_DLL_vrfutil double distSquaredTo2D | ( | const DtVector & | localPoint, |
| const DtLocalVertexList & | localVertexList, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns the squared distance to localVertexList, projected in topocentric coordinates. If localVertexList has more than two vertices (ie. more than one line segment), acts on the closest line segment. Position and vertex list must be in the given coordinate system.
| DT_DLL_vrfutil double distToBoundingVolume | ( | const DtVector & | localBaseLocation, |
| const Dt3dBoundingVolume & | box, | ||
| const DtTaitBryan & | boxToLocalOrientation, | ||
| const DtVector & | testPoint | ||
| ) |
Returns the distance of the testPoint to the bounding volume. This is the perpendicular distance to the closes face, if the point is "within" that face, or the distance to the nearest box edge or vertex otherwise. The volume may have an offset from its base position; e.g. the baseLocation may be an entity location, and the lattice offset in the bounding volume class provides the offset. The base location and testPoint are in "local" coordinates, and the orientation vector gives the rotation from box to local; e.g. this could be an object's localOrientationWrtDatabase().
| DT_DLL_vrfutil bool intersects | ( | const DtVector & | localPoint1, |
| const DtVector & | localPoint2, | ||
| const DtLocalVertexList & | localVertexList, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns true if the line segment localPoint1-localPoint2 intersects
any line segment in localVertexList, all in 2D. note: for purposes of this function, line segments don't intersect if they are collinear, even if they are partially coincident. Positions and vertex list must be in the given coordinate system.
| DT_DLL_vrfutil DtListItem* getClosestVertex2D | ( | const DtVector & | localPoint, |
| const DtLocalVertexList & | localVertexList, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Sets vertex to be the vertex closest in 2D to point in localVertexList. Position and vertex list must be in the given coordinate system.
| DT_DLL_vrfutil bool getClosestLine2D | ( | const DtVector & | localPoint, |
| DtVector & | localLinePt1, | ||
| DtVector & | localLinePt2, | ||
| const DtLocalVertexList & | localVertexList, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Sets linePt1 and linePt2 to be the vertices of the line segment closest in 2D to point in localVertexList. Positions and vertex list must be in the given coordinate system.
| DT_DLL_vrfutil double distanceSquaredPointToLine2D | ( | const DtVector & | localPoint, |
| const DtVector & | localLinePt1, | ||
| const DtVector & | localLinePt2, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns the distance^2 from point to linePt1-linePt2 in topographic 2D. All points must be in the given local coordinate system; they are converted to topographic at the localPoint, and then distanceSquaredPointToLineTopographic is called.
| DT_DLL_vrfutil double distanceSquaredPointToLineTopographic | ( | const DtVector & | topoPoint, |
| const DtVector & | topoLinePt1, | ||
| const DtVector & | topoLinePoint2 | ||
| ) |
Same as distanceSquaredPointToLine2D, except that the points are assumed to be in topographic coordinates already.
| DT_DLL_vrfutil double distanceSquaredPointToPoint2D | ( | const DtVector & | localLinePt1, |
| const DtVector & | localLinePt2, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns the distance^2 from point1 to point2 in 2D. All points must be in the coordinate system given by coordinateSystem. All points must be in the given coordinate system.
| DT_DLL_vrfutil double closestPointAlongChord2D | ( | const DtPoint & | chordStart, |
| const DtPoint & | chordEnd, | ||
| const DtPoint & | testPoint, | ||
| DtPoint & | closestPoint, | ||
| const Coordinate_System & | coordSys | ||
| ) |
Finds the closest point along the chord defined by chordStart and chordEnd to testPoint. This point is returned as closestPoint, and the distance between testPoint and closestPoint is returned. All calculations are done in 2D, and all points must be in the coordinate system provided.
| DT_DLL_vrfutil bool setCurrentVertexToClosestInDirectionOfTraversal | ( | const DtVector & | point, |
| const Coordinate_System & | coordinateSystem, | ||
| DtLocalVectorIterator & | localVertexIterator | ||
| ) |
Sets current vertex in localVertexIterator to that vertex closest to the given point, in the direction of travel. This may or may not be the overall closest vertex, depending on whether or not the closest vertex is 'behind' the given point. If there is no 'next' vertex along the direction of traversal, then sets that to be the current vertex. If there is a next vertex along the direction of traversal, then tests the heading angle formed between a vector from the point to the current vertex and the vector going from the current vertex to the next. If this angle is > 0 (opposite the direction of traversal), then sets the current vertex to be the next vertex (because moving to current vertex would require turning opposite to the sense of the traversal). Otherwise, sets the current vertex to be the overall closest vertex (closest vertex is already in the direction of the traversal).
| DT_DLL_vrfutil int closestVertexInDirectionOfTraversal | ( | const DtVector & | point, |
| const DtLocalVertexList & | vertices, | ||
| int | startingIndex, | ||
| bool | reverseDirection, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
Returns the index of the vertex in the list that is closest to the given point, in the specified direction of travel. Calls setCurrentVertexToClosestInDirectionOfTraversal to perform the calculation.
----------------------------------------------------------------------------
These functions are useful when the 3D vectors are in topographic coordinates; e.g. when a series of computations (like the above) must be done, and the conversion to/from topographic is done once at the beginning and once at the end.
Referenced by magnitudeSquared2D().
References dotProd2D().
Referenced by normalize2D().
|
inline |
References magnitudeSquared2D().
| DT_DLL_vrfutil void localVectorToGeocentricVector | ( | const DtVector & | geocentricPosition, |
| const DtVector & | localVector, | ||
| const Coordinate_System & | coordinateSystem, | ||
| DtVector & | geocentricVector | ||
| ) |
Transforms a vector in local coordinates (database coordinates) to geocentric coordinates.
geocentricPosition: geocentric origin of topocentric coordinate system used in transformation localVector: local (database) vector coordinateSystem: local (database) coordinate system
geocentricVector: transformed vector in geocentric coordinates
| DT_DLL_vrfutil void localOrientationToGeocentricOrientation | ( | const DtVector | geocentricPosition, |
| const DtTaitBryan & | localOrientation, | ||
| const Coordinate_System & | coordinateSystem, | ||
| DtTaitBryan & | geocentricOrientation | ||
| ) |
Transforms an orientation matrix in for going from body to local coordinates (database coordinates) to geocentric coordinates.
| DT_DLL_vrfutil DtVector DtCalculateRotationalVelocity | ( | const DtDcm & | newOrientation, |
| const DtDcm & | oldOrientation, | ||
| double | dT | ||
| ) |
Calculates rotational velocity from new and old orientation body DCMs. Which coordinate system is used shouldn't make a difference so long as the coordinate system is orthographic and consistent.
| DT_DLL_vrfutil double calculateSpeedForArrival | ( | double | distance, |
| double | currentSpeed, | ||
| double | acceleration, | ||
| double | deceleration, | ||
| double | timeToArrive | ||
| ) |
Given a distance, current speed, max acceleration, max deceleration, and desired arrival time, calculates the desired maximum speed to arrive on time.
| DT_DLL_vrfutil void geocentricVectorToLocalVector | ( | const DtVector & | geocentricPosition, |
| const DtVector & | geocentricVector, | ||
| const Coordinate_System & | coordinateSystem, | ||
| DtVector & | localVector | ||
| ) |
Transforms a vector in geocentric coordinates to local (database) coordinates.
| DT_DLL_vrfutil void geocentricOrientationToLocalOrientation | ( | const DtVector & | geocentricPosition, |
| const DtTaitBryan & | geocentricOrientation, | ||
| const Coordinate_System & | coordinateSystem, | ||
| DtTaitBryan & | localOrientation | ||
| ) |
Transforms an orientation matrix in for going from body to local coordinates (database coordinates) to geocentric coordinates.
| DT_DLL_vrfutil int DtIntRandom | ( | int | iFrom, |
| int | iTo | ||
| ) |
Returns a random number from the base to the max.
| DT_DLL_vrfutil bool DtIsValidNumber | ( | double | x | ) |
Returns true if the number is not infinite or not nan.
| DT_DLL_vrfutil double DtHoursMinutesSeconds2Seconds | ( | double | hours, |
| double | minutes, | ||
| double | seconds | ||
| ) |
| DT_DLL_vrfutil void DtSeconds2HoursMinutesSeconds | ( | double | totalSeconds, |
| int & | hoursOut, | ||
| int & | minutesOut, | ||
| double & | secondsOut | ||
| ) |
Converts totalSeconds into hours, minutes, and seconds.
| DT_DLL_vrfutil unsigned int DtVRFGetThreadId | ( | ) |
Gets the current thread id.
Referenced by DtOctreeMember< const DtSimObject >::testKey().
| DT_DLL_vrfutil double calculateLengthOfLine | ( | const std::vector< DtVector > & | points | ) |
Given the points return the length of the line. Assumes points are geocentric.
| DT_DLL_vrfutil double calculateLengthOfLine | ( | const Coordinate_System & | coordinateSystem, |
| const std::vector< DtVector > & | points | ||
| ) |
Given the points return the length of the line. Converts points to topographic before calculating. The length of the line does not include the Z coordinate. Only x and y.
| DT_DLL_vrfutil void calculateLengthAndWidthOfShape | ( | const Coordinate_System & | coordSytem, |
| const std::vector< DtVector > & | points, | ||
| double & | length, | ||
| double & | width | ||
| ) |
Given points and the coordinate system those points are in find the length/width of the given polygon. Note that the polygon does not need to be closed.
| DT_DLL_vrfutil void calculateLengthAndWidthOfShape | ( | const std::vector< DtVector > & | points, |
| double & | length, | ||
| double & | width | ||
| ) |
Assumes geocentric coordinates.
| DT_DLL_vrfutil DtVector DtPoint2DtVector | ( | const DtPoint & | p | ) |
| DT_DLL_vrfutil DtPoint DtVector2DtPoint | ( | const DtVector & | p | ) |
| DT_DLL_vrfutil DtVector calculateWorldVelocityFromPosition | ( | const DtVector & | currentWorldPos, |
| const DtVector & | currentLocalPos, | ||
| const DtVector & | localVelocity, | ||
| const Coordinate_System & | coordinateSystem | ||
| ) |
If the database is in a projected system, error is introduced in the velocity when converting it to geocentric. To avoid this problem, use the current geocentric position and then using local velocity create a projected point 1 sec in the future. Convert it to geocentric and subtract the 2 to get the geocentric velocity.
| DT_DLL_vrfutil double illuminationValueAtPosition | ( | const DtGeodeticCoord & | position, |
| time_t | time, | ||
| double | nighttimeMaximum = 0.1, |
||
| double | illuminationMinimum = 0.001, |
||
| bool | useDayNightIlluminationModel = true, |
||
| int * | sunstate = 0 |
||
| ) |
Give a geodetic coordinate and a UTC time, return an illumination value (0 - 1) at that position based on sun/moon position. The nighttimeMaximum is the maximum illumination to the full moon. The minimum illumination is that of sunset and no moon (accounting for possible illumination due to stars).
If use useDayNightIlluminationModel boolean is false then the illumination value returned will always be 1.0
If sunstate is defined, returns the following value: 0 - Sun is not visible 1 - Sun is fully visible 2 - Dawn 3 - Dusk
| DT_DLL_vrfutil bool calculateEstimatedTot | ( | const DtVector & | localCurrentPos, |
| const DtVector & | localTargetPos, | ||
| double | orderedSpeed, | ||
| double | currentSimTime, | ||
| double | currentSpeed, | ||
| double | acceleration, | ||
| const Coordinate_System & | coordinateSystem, | ||
| double & | totResult, | ||
| double & | speedResult | ||
| ) |
Returns the estimated time-on-target to a local target position, given local current position, ordered speed, current sim time, current speed, and maximum acceleration. Returns true if the calculation was successful. The totResult and speedResult output parameters will have the calculated time-on-target and final speed on successful completion. Positions must be in the given coordinate system.
| DT_DLL_vrfutil bool calculateEstimatedTot | ( | const DtVector & | localCurrentPos, |
| const DtLocalVertexList & | localVertexList, | ||
| double | orderedSpeed, | ||
| double | currentSimTime, | ||
| double | currentSpeed, | ||
| double | acceleration, | ||
| const Coordinate_System & | coordinateSystem, | ||
| double & | totResult, | ||
| double & | speedResult | ||
| ) |
Returns the estimated time-on-target after traveling a series of local vertices, given local current position, ordered speed, current sim time, current speed, and maximum acceleration. Returns true if the calculation was successful. The totResult and speedResult output parameters will have the calculated time-on-target and final speed on successful completion. Positions must be in the given coordinate system.
|
inline |
Checks for not a number (NAN) values.
|
inline |
Checks for not a number (NAN) values.
| DT_DLL_vrfutil std::map<std::string, std::string> convertToStdStringMap | ( | const std::map< DtString, DtString > & | source, |
| bool | convertValueForXml = false |
||
| ) |
Converts DtString to std::string map.
|
inline |
Replace boost split with version that returns an empty set if the supplied string has no length. Workaround for change from boost 1.45 to 1.46.
Referenced by DtRwTranslatableStringObject::translate().
| DT_DLL_vrfutil bool isPointWithinCorridor | ( | double & | heading, |
| double | corridorWidth, | ||
| double | corridorHeight, | ||
| const DtVector & | localPoint, | ||
| const DtLocalVertexList & | localVertexList, | ||
| const Coordinate_System & | coordinateSystemRef | ||
| ) |
This function determines whether a given point is within a corridor and if so it populates the heading along the closest segment of the corridor.
| heading | the heading along the closest segment found along the corridor in radians |
| corridorWidth | the width of the corridor in meters |
| corridorHeight | the height of the corridor in meters |
| localPoint | the point to test if its within the corridor extents |
| localVertexList | the list of local vertices that define the centerline of the corridor |
| coordinateSystemRef | the coordinate system |
| DT_DLL_vrfutil bool isChordWithinCorridor | ( | const DtChord & | localChord, |
| const DtLocalVertexList & | localVertexList, | ||
| double | corridorWidth, | ||
| double | corridorHeight, | ||
| const Coordinate_System & | coordinateSystemRef | ||
| ) |
This function determines whether a given chord intersects with the volume defined by the corridor.
| localChord | the chord |
| localVertexList | the list of local vertices that define the centerline of the corridor |
| corridorWidth | the width of the corridor in meters |
| corridorHeight | the height of the corridor in meters |
| coordinateSystemRef | the coordinate system |
| return | true if the chord crosses through the volume defined by the corridor |
| DT_DLL_vrfutil bool isPointRoughlyWithinCorridor | ( | double | corridorWidth, |
| double | corridorHeight, | ||
| const DtVector & | localPoint, | ||
| const DtExtent & | lineExtent, | ||
| const Coordinate_System & | coordinateSystemRef | ||
| ) |
This function roughly determines whether a point may be within a corridor.
| corridorWidth | the width of the corridor in meters |
| corridorHeight | the height of the corridor in meters |
| localPoint | the point to test if its within the corridor extents |
| lineExtent | the extent of the line that makes up the corridor |
| coordinateSystemRef | the coordinate system |
| DT_DLL_vrfutil bool isChordRoughlyWithinCorridor | ( | const DtChord & | localChord, |
| const DtExtent & | lineExtent, | ||
| double | corridorWidth, | ||
| double | corridorHeight, | ||
| const Coordinate_System & | coordinateSystemRef | ||
| ) |
This function determines whether a given chord roughly intersects with the volume defined by the corridor.
| localChord | the chord |
| lineExtent | the extent of the line that makes up the corridor |
| corridorWidth | the width of the corridor in meters |
| corridorHeight | the height of the corridor in meters |
| coordinateSystemRef | the coordinate system |
| return | true if the chord crosses through the volume defined by the corridor |
| DT_DLL_vrfutil double getHeadingFromGeocentric | ( | const DtVector & | firstPoint, |
| const DtVector & | secondPoint | ||
| ) |
This function returns the heading of an object with two points in geocentric Basically this is used to determine the runways heading values (forward and reverse)
| firstPoint | (geocentric) the first point of the runway |
| secondPoint | (geocentric) the second point of the runway (or last point of the line) |
| DT_DLL_vrfutil bool calculateGeometricCenter | ( | const DtVertexList & | vertices, |
| DtVector & | geometricCenter | ||
| ) |
Calculates the geometric center of the given vertex list. Returns true. Will use strictly geocentric coordinates in the assumption.