VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
kinematicTools.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
10 
11 #include "vrfutil/vrfutilDefines.h"
12 #include <math.h>
13 #include <errno.h>
14 #include <matrix/LibMatrix.h>
15 #include <vl/topoView.h>
16 #include <matrix/vlTaitBryan.h>
17 #include <matrix/3dBoundingVolume.h>
18 
19 #include <map>
20 
22 #include <boost/math/special_functions/fpclassify.hpp>
23 
24 #define DtSIGN(x) (((x) > (0.0)) ? (1.0) : (-1.0))
25 
26 #define DtALMOST(x, y, e) (((x)<=((y)+(e))) && ((x)>=((y)-(e))))
27 
28 #define DtGRAVITY_CONSTANT (9.81)
29 #define DtPI_OVER_TWO (1.570796327)
30 #define DtTWO_PI (6.283185307)
31 #define DtMETERS_TO_FEET (3.2808)
32 #define DtMETERS_PER_SEC_TO_MPH (2.23)
33 #define DtLN2 (0.693147181)
34 #define DtNM_2_METERS (1852.0)
35 
36 #define SIN(x) DtSin(x)
37 #define COS(x) DtCos(x)
38 #define TAN(x) DtTan(x)
39 
40 #define ASIN(x) DtAsin(x)
41 #define ACOS(x) DtAcos(x)
42 #define ATAN(x) DtAtan(x)
43 #define ATAN2(y, x) DtAtan2((y), (x))
44 
45 #define DtFRand() ((double) rand() / RAND_MAX)
46 #define DtIRandom(from, to) DtIntRandom(from, to)
47 
48 class DtGeodeticCoord;
49 class Coordinate_System;
50 class DtChord;
51 class DtExtent;
52 class DtLocalVector;
53 class DtLocalVertexList;
54 class DtListItem;
56 class DtPoint;
59 class DtVertexList;
60 
64 #define EARTH_RADIUS_AVERAGE 6367500.0
65 
66 
69 DT_DLL_vrfutil double gRand();
70 
74 DT_DLL_vrfutil double centralLimitGaussian(int numDraws);
75 
81 
82 DT_DLL_vrfutil void Dt3DKinematicsTick(const DtVector& Position,
83  const DtVector& LinearVelocity,
84  const DtVector& LinearAcceleration,
85  DtConstDcm orientation,
86  const DtVector& angVelocity,
87  const DtVector& angAcceleration,
88  double DeltaTime,
89  DtVectorRef newPosition,
90  DtVectorRef newVelocity,
91  DtDcm& newOrientation,
92  DtVectorRef newAngVelocity);
93 
94 DT_DLL_vrfutil void Dt3DDynamicsTick(const DtVector& LinearForce,
95  double vehicleMass,
96  DtVectorRef newLinearAcceleration,
97  const DtVector& torque,
98  DtConstDcm vehicleInertia,
99  DtVectorRef newAngAcceleration);
100 
101 DT_DLL_vrfutil void DtGravityForce(double mass,
102  DtVectorRef returnForce);
103 
104 DT_DLL_vrfutil void DtResolve(const DtVector& forcePos,
105  const DtVector& force,
106  DtVectorRef resultTorqueAboutOrigin);
107 
108 DT_DLL_vrfutil void DtParallelAxisTheorem(DtConstDcm inertiaInOriginalFrame,
109  double mass,
110  const DtVector& newToOriginal,
111  DtDcm& inertiaInNewFrame);
112 
113 DT_DLL_vrfutil void DtRotateInertia(DtDcm inertiaInOriginalFrame,
114  DtDcm originalToNew,
115  DtDcm& inertiaInNewFrame);
116 
117 DT_DLL_vrfutil double DtPIDServo(double error,
118  double errorIntegral,
119  double velocity,
120  double proportionalGain,
121  double integralGain,
122  double derivativeGain,
123  double biasForce = 0.0,
124  double* control = 0);
125 
142  const double deceleration, const double dt, const double ownSpeed,
143  const double distance, const double targetSpeed, const double errorDecelValue = -1e10);
144 
161  const double deceleration, const double dt, const double ownSpeed,
162  const double distance, const double targetSpeed, const double errorDecelValue = -1e10);
163 
164 
165 DT_DLL_vrfutil void DtBlockInertia(const double xLen,
166  const double yLen,
167  const double zLen,
168  const double mass,
169  DtDcm& inertia);
170 
172  double tolerance = 0.0);
173 
174 DT_DLL_vrfutil void DtDcmFromColumns(DtDcm& result,
175  const DtVector& col1,
176  const DtVector& col2,
177  const DtVector& col3);
178 
179 DT_DLL_vrfutil void DtDcmFromRows(DtDcm& result,
180  const DtVector& row1,
181  const DtVector& row2,
182  const DtVector& row3);
183 
184 
185 
194 DT_DLL_vrfutil bool DtPointInCone(const DtVector& coneEndPosition,
195  const DtVector& coneAxis,
196  const double coneAngle,
197  const DtVector& testPoint,
198  double* testAnglePtr = 0);
199 
200 
201 DT_DLL_vrfutil bool DtPointInWedge(const DtVector& wedgeEndPosition,
202  const DtVector& wedgeAxis,
203  const double wedgeAngle,
204  const DtVector& testPoint);
205 
206 DT_DLL_vrfutil DtFloat64 DtFastDist(const DtVector& pt1, const DtVector& pt2);
207 
209 DT_DLL_vrfutil void DtVecLimit(DtVectorRef vec,
210  double limit);
211 
212 inline double DtVecMag(const DtVector& vec)
213 {
214  return sqrt(vec[DtX]*vec[DtX] + vec[DtY]*vec[DtY] + vec[DtZ]*vec[DtZ]);
215 };
216 
217 inline double DtVecMagSquared(const DtVector& vec)
218 {
219  return vec[DtX]*vec[DtX] + vec[DtY]*vec[DtY] + vec[DtZ]*vec[DtZ];
220 };
221 
222 DT_DLL_vrfutil void DtRotX(double angle, DtDcm& rotMat);
223 DT_DLL_vrfutil void DtRotY(double angle, DtDcm& rotMat);
224 DT_DLL_vrfutil void DtRotZ(double angle, DtDcm& rotMat);
225 DT_DLL_vrfutil void DtBodyToLocalRef_to_Euler(DtConstDcm body2ref, DtTaitBryan *e);
226 DT_DLL_vrfutil void DtEuler_to_BodyToLocalRef(const DtTaitBryan &euler, DtDcm& body2ref);
227 DT_DLL_vrfutil const DtDcm & enu2ned();
228 DT_DLL_vrfutil const DtDcm & ned2enu();
229 
230 DT_DLL_vrfutil void DtRotX2(double sinAng, double cosAng, DtDcm& rotMat);
231 DT_DLL_vrfutil void DtRotY2(double sinAng, double cosAng, DtDcm& rotMat);
232 DT_DLL_vrfutil void DtRotZ2(double sinAng, double cosAng, DtDcm& rotMat);
233 
236 DT_DLL_vrfutil void DtRotBodyX(double angle, DtDcm& rotMat);
237 DT_DLL_vrfutil void DtRotBodyY(double angle, DtDcm& rotMat);
238 DT_DLL_vrfutil void DtRotBodyZ(double angle, DtDcm& rotMat);
239 
241 {
242  public:
243  DtPoleFilterType(double freq);
244  void setPole(double freq);
245  void output(DtTaitBryan* input,
246  double dT,
247  DtTaitBryan* output);
248  void output(const DtVector& input,
249  double dT,
250  DtVectorRef output);
251  double output(double input,
252  double dT);
253 
254  double getPole() { return poleFreq; }
255  const DtVector& getPrevOutput() { return prevOutput; }
256 
257  private:
258  double poleFreq;
260 };
265 {
266  public:
267  DtNonLinearOutputType(double nonlinearity,
268  double gain = 1.0)
269  {
270  DtGain = gain;
271  DtExponent = nonlinearity+1.0;
272  }
273 
274  void DtSetGain(double gain) { DtGain = gain; }
275  void DtSetNonLinearity(double nonlinearity) { DtExponent = nonlinearity+1.0; }
276 
277  double DtGetGain() { return DtGain; }
278  double DtGetNonLinearity() { return DtExponent-1.0; }
279  double DtOutput(double input)
280  {
281  return DtSIGN(input) * DtGain * pow(fabs(input), DtExponent);
282  }
283 
284  private:
285  double DtGain;
286  double DtExponent;
287 
288 };
289 
290 DT_DLL_vrfutil void DtCircleVerts(double radius,
291  int npts,
292  double* xCoords,
293  double* yCoords);
294 
297 
298 
300 DT_DLL_vrfutil void DtSpacesToDashes(char* str);
301 
302 
307 DT_DLL_vrfutil char* DtGetFilenameExtension(char* fileName, char* extension);
308 
309 
316 // y is left
317 // z is up
320 // Y is forward
321 // z is up
322 
324  const DtVector& rightPoint,
325  const DtVector& rearPoint,
326  DtDcm& orientation,
327  bool yIsForward=false);
328 
331  const DtVector& rightPoint,
332  const DtVector& otherPoint,
333  double cosHeading,
334  double sinHeading,
335  DtDcm& orientation,
336  bool upsideDown = false);
337 
340  const DtVector& rightPoint, const DtVector& otherPoint, double heading,
341  const DtDcm& topoToLocal, DtDcm& orientation);
342 
343 
347 DT_DLL_vrfutil bool DtCalculateNormal(const DtVector& pointA,
348  const DtVector& pointB, const DtVector& pointC, DtVector& normal);
349 
350 
353 DT_DLL_vrfutil void DtCalculateOrientation(DtVector localNormal, double heading,
354  const DtDcm& topoToLocal, DtDcm& localOrientation);
355 
356 
357 DT_DLL_vrfutil double DtFindZInPlane(const double posx, const double posy,
358  const DtVector& pointInPlane, const DtVector& normal);
359 
364 DT_DLL_vrfutil DtVector DtIntersectLineWithPlane(const DtVector& point, const DtVector& direction,
365  const DtVector& pointInPlane, const DtVector& planeNormal,
366  bool* noIntersection = 0);
367 
372  const DtChord& chord, const DtVector& lower, const DtVector& upper,
373  DtVrfChordIntersectRecordList* intList = 0);
374 
378  const DtChord& chord,
379  const DtVector& p1, const DtVector& p2, const DtVector& p3,
380  DtVector* result = 0, double* t = 0);
381 
384  double x1, double y1, double x2, double y2,
385  double z11, double z21, double z12, double z22,
386  double x, double y);
387 
391  const DtChord& chord,
392  double x1, double y1, double x2, double y2,
393  double z11, double z21, double z12, double z22,
396  double tolerance = 1e-20);
397 
401  double heading, const DtVector& position, DtDcm& bodyToRef);
402 
408 DT_DLL_vrfutil void DtTopoEulerToBodyToLocal(const DtTaitBryan& topoEuler,
409  const Coordinate_System& coordSystem, const DtVector& localPosition,
410  DtDcm& bodyToLocalDcm);
411 
412 DT_DLL_vrfutil DtDcm DtRotZToBodyToLocal(const Coordinate_System& coordSystem, double angle,
413  const DtVector& position);
414 DT_DLL_vrfutil DtDcm DtRotYToBodyToLocal(const Coordinate_System& coordSystem, double angle,
415  const DtVector& position);
416 DT_DLL_vrfutil DtDcm DtRotXToBodyToLocal(const Coordinate_System& coordSystem, double angle,
417  const DtVector& position);
418 
421 DT_DLL_vrfutil double DtHeadingFromGeocAToGeocB(const DtVector& geocA, const DtVector& geocB);
422 
426 
427 
429 
430 DT_DLL_vrfutil double DtSin(double r);
431 
432 inline double DtCos(double r)
433 {
434  return DtSin(r + DtPI_OVER_TWO);
435 }
436 
437 DT_DLL_vrfutil double DtTan(double r);
438 DT_DLL_vrfutil double DtAsin(double x);
439 
440 inline double DtAcos(double x)
441 {
442  return DtPI_OVER_TWO + DtAsin(-x);
443 }
444 
445 DT_DLL_vrfutil double DtAtan(double x);
446 DT_DLL_vrfutil double DtAtan2(double y, double x);
447 
448 DT_DLL_vrfutil bool DtSameSign(double x, double y);
449 
450 DT_DLL_vrfutil bool DtPointInSegment(const DtVector& testPoint, const DtVector& segStart,
451  const DtVector& segEnd);
452 
453 /*******************************************************************************
459  *******************************************************************************/
460 
478  DtVector Q1, DtVector* I0 = 0, DtVector* I1 = 0,
479  double* isectParam1 = 0, double *isectParam2 = 0,
480  bool* parallel = 0, bool* collinear = 0);
481 
489 
493 
497  const Coordinate_System& coordinateSystem);
498 
501 
502 DT_DLL_vrfutil double altitudeOfPosition(const DtVector& localPosition,
503  const Coordinate_System& coordinateSystem);
504 DT_DLL_vrfutil double altitudeOfPosition(const DtPoint& localPosition,
505  const Coordinate_System& coordinateSystem);
507 
510 
511 DT_DLL_vrfutil void setAltitudeOfPosition(DtVector& localPosition, double newAltitude,
512  const Coordinate_System& coordinateSystem);
513 DT_DLL_vrfutil void setAltitudeOfPosition(DtPoint& localPosition, double newAltitude,
514  const Coordinate_System& coordinateSystem);
516 
517 
523 
526 DT_DLL_vrfutil double headingAngleTo(const DtVector& observerPosition,
527  const DtVector& targetPosition, const Coordinate_System& coordinateSystem);
528 
531 DT_DLL_vrfutil double elevationAngleTo(const DtVector& observerPosition,
532  const DtVector& targetPosition, const Coordinate_System& coordinateSystem);
533 
536 DT_DLL_vrfutil double bankAngleTo(const DtVector& observerPosition,
537  const DtVector& targetPosition, const Coordinate_System& coordinateSystem);
538 
541 DT_DLL_vrfutil double distSquaredTo2D(const DtVector& position1, const DtVector& position2,
542  const Coordinate_System& coordinateSystem);
543 
567 DT_DLL_vrfutil bool inside(const DtVector& localPoint,
568  const DtLocalVertexList& localVertexList,
569  const Coordinate_System& coordinateSystem);
570 
573 DT_DLL_vrfutil bool inside(const DtVector& point,
574  const std::vector<DtVector>& boundary);
575 
576 DT_DLL_vrfutil bool insideEllipsoid(const DtVector& localPoint,
577  const DtLocalVertexList& localVertexList,
578  const Coordinate_System& coordinateSystem);
579 
580 
586 DT_DLL_vrfutil bool leftOf(const DtVector& localPoint,
587  const DtLocalVertexList& localVertexList,
588  const Coordinate_System& coordinateSystem);
589 
595 DT_DLL_vrfutil double headingAngleTo(const DtVector& localPoint,
596  const DtLocalVertexList& localVertexList,
597  const Coordinate_System& coordinateSystem);
598 
603 DT_DLL_vrfutil double elevationAngleTo(const DtVector& localPoint,
604  const DtLocalVertexList& localVertexList,
605  const Coordinate_System& coordinateSystem);
606 
613 DT_DLL_vrfutil double localDistSquaredTo(const DtVector& localPoint,
614  const DtLocalVertexList& localVertexList,
615  const Coordinate_System& coordinateSystem);
616 
621 DT_DLL_vrfutil double distSquaredTo2D(const DtVector& localPoint,
622  const DtLocalVertexList& localVertexList,
623  const Coordinate_System& coordinateSystem);
624 
634 DT_DLL_vrfutil double distToBoundingVolume(const DtVector& localBaseLocation,
635  const Dt3dBoundingVolume& box, const DtTaitBryan& boxToLocalOrientation,
636  const DtVector& testPoint);
637 
643 DT_DLL_vrfutil bool intersects(const DtVector& localPoint1,
644  const DtVector& localPoint2, const DtLocalVertexList& localVertexList,
645  const Coordinate_System& coordinateSystem);
646 
649 DT_DLL_vrfutil DtListItem* getClosestVertex2D(const DtVector& localPoint,
650  const DtLocalVertexList& localVertexList,
651  const Coordinate_System& coordinateSystem);
652 
656 DT_DLL_vrfutil bool getClosestLine2D(const DtVector& localPoint,
657  DtVector& localLinePt1, DtVector& localLinePt2,
658  const DtLocalVertexList& localVertexList,
659  const Coordinate_System& coordinateSystem);
660 
665 DT_DLL_vrfutil double distanceSquaredPointToLine2D(const DtVector& localPoint,
666  const DtVector& localLinePt1, const DtVector& localLinePt2,
667  const Coordinate_System& coordinateSystem);
668 
672  const DtVector& topoLinePt1, const DtVector & topoLinePoint2);
673 
677 DT_DLL_vrfutil double distanceSquaredPointToPoint2D(const DtVector& localLinePt1,
678  const DtVector& localLinePt2, const Coordinate_System& coordinateSystem);
679 
685 DT_DLL_vrfutil double closestPointAlongChord2D( const DtPoint& chordStart,
686  const DtPoint& chordEnd,
687  const DtPoint& testPoint, DtPoint & closestPoint,
688  const Coordinate_System& coordSys);
689 
703  const DtVector& point, const Coordinate_System& coordinateSystem,
704  DtLocalVectorIterator& localVertexIterator);
705 
710  const DtVector& point, const DtLocalVertexList& vertices,
711  int startingIndex, bool reverseDirection,
712  const Coordinate_System& coordinateSystem);
713 
722 
723 inline double dotProd2D(const DtVector& v1, const DtVector& v2)
724 {
725  return v1[0]*v2[0] + v1[1]*v2[1];
726 }
727 
728 inline double magnitudeSquared2D(const DtVector &v)
729 {
730  return dotProd2D(v, v);
731 }
732 
733 inline double crossProduct2D(const DtVector& v1, const DtVector& v2)
734 {
735  return v1[0]*v2[1] - v1[1]*v2[0];
736 }
737 
739 {
740  DtVector res(v[1], -v[0], v[2]);
741  return res;
742 }
743 
744 inline void normalize2D(DtVector& v)
745 {
746  double length = sqrt(magnitudeSquared2D(v));
747  if (length > 0.0)
748  {
749  v[0] /= length;
750  v[1] /= length;
751  }
752 }
753 
755 inline double vectorAngle2D(DtVector& v)
756 {
757  return DtModPerLo(atan2(v[1], v[0]), -M_PI, M_PI);
758 }
762 
774 DT_DLL_vrfutil void localVectorToGeocentricVector(const DtVector &geocentricPosition,
775  const DtVector& localVector, const Coordinate_System& coordinateSystem,
776  DtVector& geocentricVector);
777 
790  const DtTaitBryan& localOrientation,
791  const Coordinate_System& coordinateSystem,
792  DtTaitBryan& geocentricOrientation);
793 
798  const DtDcm& newOrientation,
799  const DtDcm& oldOrientation, double dT);
800 
803 DT_DLL_vrfutil double calculateSpeedForArrival(double distance, double currentSpeed, double acceleration,
804  double deceleration, double timeToArrive);
805 
816 DT_DLL_vrfutil void geocentricVectorToLocalVector(const DtVector &geocentricPosition,
817  const DtVector& geocentricVector, const Coordinate_System& coordinateSystem,
818  DtVector& localVector);
819 
832  const DtVector& geocentricPosition,
833  const DtTaitBryan& geocentricOrientation,
834  const Coordinate_System& coordinateSystem,
835  DtTaitBryan& localOrientation);
836 
838 DT_DLL_vrfutil int DtIntRandom(int iFrom, int iTo);
839 
841 DT_DLL_vrfutil bool DtIsValidNumber(double x);
842 
845 DT_DLL_vrfutil double DtHoursMinutesSeconds2Seconds(double hours, double minutes, double seconds);
846 
848 DT_DLL_vrfutil void DtSeconds2HoursMinutesSeconds(double totalSeconds, int& hoursOut,
849  int& minutesOut, double& secondsOut);
850 
852 DT_DLL_vrfutil unsigned int DtVRFGetThreadId();
853 
855 DT_DLL_vrfutil double calculateLengthOfLine(const std::vector<DtVector>& points);
856 
859 DT_DLL_vrfutil double calculateLengthOfLine(const Coordinate_System& coordinateSystem, const std::vector<DtVector>& points);
860 
863 DT_DLL_vrfutil void calculateLengthAndWidthOfShape(const Coordinate_System& coordSytem, const std::vector<DtVector>& points,
864  double& length, double& width);
865 
867 DT_DLL_vrfutil void calculateLengthAndWidthOfShape(const std::vector<DtVector>& points,
868  double& length, double& width);
869 
872 
878  const DtVector & currentLocalPos, const DtVector & localVelocity,
879  const Coordinate_System& coordinateSystem);
880 
892 DT_DLL_vrfutil double illuminationValueAtPosition(const DtGeodeticCoord& position, time_t time,
893  double nighttimeMaximum = 0.1, double illuminationMinimum = 0.001, bool useDayNightIlluminationModel = true,
894  int* sunstate = 0);
895 
902 DT_DLL_vrfutil bool calculateEstimatedTot(const DtVector& localCurrentPos, const DtVector& localTargetPos,
903  double orderedSpeed, double currentSimTime, double currentSpeed, double acceleration,
904  const Coordinate_System& coordinateSystem, double& totResult, double& speedResult);
905 
912 DT_DLL_vrfutil bool calculateEstimatedTot(const DtVector& localCurrentPos, const DtLocalVertexList& localVertexList,
913  double orderedSpeed, double currentSimTime, double currentSpeed, double acceleration,
914  const Coordinate_System& coordinateSystem, double& totResult, double& speedResult);
915 
917 inline bool checkForNAN(const DtVector& vector)
918 {
919  if (boost::math::isnan(vector.x()) ||
920  boost::math::isnan(vector.y()) ||
921  boost::math::isnan(vector.z()))
922  {
923  return true;
924  }
925  else
926  {
927  return false;
928  }
929 }
930 
932 inline bool checkForNAN(const DtTaitBryan& tb)
933 {
934  if (boost::math::isnan(tb.phi()) ||
935  boost::math::isnan(tb.psi()) ||
936  boost::math::isnan(tb.theta()))
937  {
938  return true;
939  }
940  else
941  {
942  return false;
943  }
944 }
945 
947 inline bool checkForNAN(const DtDcm& dcm)
948 {
949  if (boost::math::isnan(dcm[0].x()) ||
950  boost::math::isnan(dcm[0].y()) ||
951  boost::math::isnan(dcm[0].z()) ||
952  boost::math::isnan(dcm[1].x()) ||
953  boost::math::isnan(dcm[1].y()) ||
954  boost::math::isnan(dcm[1].z()) ||
955  boost::math::isnan(dcm[2].x()) ||
956  boost::math::isnan(dcm[2].y()) ||
957  boost::math::isnan(dcm[2].z()))
958  {
959  return true;
960  }
961  else
962  {
963  return false;
964  }
965 }
966 
968 DT_DLL_vrfutil std::map<std::string, std::string> convertToStdStringMap(const std::map<DtString, DtString>& source,
969  bool convertValueForXml = false);
970 
973 
974 #include <boost/algorithm/string.hpp>
975 template< typename SequenceSequenceT, typename RangeT, typename PredicateT >
976 inline SequenceSequenceT& oldBoostSplit(
977  SequenceSequenceT& Result,
978  RangeT& Input,
979  PredicateT Pred,
980  boost::algorithm::token_compress_mode_type eCompress=boost::algorithm::token_compress_off )
981 {
982  if (Input.length())
983  {
984  ::boost::algorithm::iter_split(
985  Result,
986  Input,
987  ::boost::algorithm::token_finder( Pred, eCompress ) );
988  }
989 
990  return Result;
991 }
992 
1002 DT_DLL_vrfutil bool isPointWithinCorridor(double& heading, double corridorWidth,
1003  double corridorHeight, const DtVector& localPoint, const DtLocalVertexList& localVertexList,
1004  const Coordinate_System& coordinateSystemRef);
1005 
1013 DT_DLL_vrfutil bool isChordWithinCorridor(const DtChord& localChord, const DtLocalVertexList& localVertexList,
1014  double corridorWidth, double corridorHeight, const Coordinate_System& coordinateSystemRef);
1015 
1023 DT_DLL_vrfutil bool isPointRoughlyWithinCorridor(double corridorWidth,
1024  double corridorHeight, const DtVector& localPoint, const DtExtent & lineExtent,
1025  const Coordinate_System& coordinateSystemRef);
1026 
1034 DT_DLL_vrfutil bool isChordRoughlyWithinCorridor(const DtChord& localChord, const DtExtent& lineExtent,
1035  double corridorWidth, double corridorHeight, const Coordinate_System& coordinateSystemRef);
1036 
1041 DT_DLL_vrfutil double getHeadingFromGeocentric(const DtVector& firstPoint, const DtVector& secondPoint);
1042 
1045 DT_DLL_vrfutil bool calculateGeometricCenter(const DtVertexList& vertices, DtVector& geometricCenter);
DT_DLL_vrfutil void DtParallelAxisTheorem(DtConstDcm inertiaInOriginalFrame, double mass, const DtVector &newToOriginal, DtDcm &inertiaInNewFrame)
double DtVecMag(const DtVector &vec)
Definition: kinematicTools.h:212
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...
NOTE: This entire class is deprecated, in favor of Dt3dChord.
Definition: chord.h:40
double DtGetGain()
Definition: kinematicTools.h:277
#define DtSIGN(x)
Boost includes.
Definition: kinematicTools.h:24
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...
DtVrfChordIntersectionRecord represents a list of DtChordIntersectRecords. This is useful for followi...
Definition: vrfChordIntersectRecordList.h:31
double DtOutput(double input)
Definition: kinematicTools.h:279
DT_DLL_vrfutil void DtResolve(const DtVector &forcePos, const DtVector &force, DtVectorRef resultTorqueAboutOrigin)
DT_DLL_vrfutil bool DtIsValidNumber(double x)
Returns true if the number is not infinite or not nan.
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) t...
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 base...
DT_DLL_vrfutil const DtDcm & ned2enu()
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 t...
#define DtPI_OVER_TWO
Definition: kinematicTools.h:29
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 &#39;behind&#39; the given point. If there is no &#39;next&#39; 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 &gt; 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).
double DtVecMagSquared(const DtVector &vec)
Definition: kinematicTools.h:217
DT_DLL_vrfutil void DtRotateInertia(DtDcm inertiaInOriginalFrame, DtDcm originalToNew, DtDcm &inertiaInNewFrame)
I in frame B.
DT_DLL_vrfutil double DtAsin(double x)
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...
double vectorAngle2D(DtVector &v)
This is a heading if v is in topo coordinates.
Definition: kinematicTools.h:755
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 ...
DT_DLL_vrfutil void DtRotZ2(double sinAng, double cosAng, DtDcm &rotMat)
DT_DLL_vrfutil void DtRotBodyZ(double angle, DtDcm &rotMat)
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.
DT_DLL_vrfutil void DtRotX2(double sinAng, double cosAng, DtDcm &rotMat)
DT_DLL_vrfutil double altitudeOfPosition(const DtVector &localPosition, const Coordinate_System &coordinateSystem)
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 t...
DT_DLL_vrfutil void DtRotY2(double sinAng, double cosAng, DtDcm &rotMat)
double poleFreq
Definition: kinematicTools.h:258
File: lclVecIter.h.
Definition: localVectorIterator.h:25
DT_DLL_vrfutil DtPoint DtVector2DtPoint(const DtVector &p)
DtVector rotateRight2D(const DtVector &v)
Definition: kinematicTools.h:738
DT_DLL_vrfutil double DtSin(double r)
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...
DT_DLL_vrfutil double gRand()
Generates a Gaussian random number. Calls centralLimitGaussian() with the number of draws set to 6...
DT_DLL_vrfutil bool DtPointInSegment(const DtVector &testPoint, const DtVector &segStart, const DtVector &segEnd)
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 const DtDcm & enu2ned()
DT_DLL_vrfutil bool insideEllipsoid(const DtVector &localPoint, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem)
DT_DLL_vrfutil double DtFindZInPlane(const double posx, const double posy, const DtVector &pointInPlane, const DtVector &normal)
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.
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 li...
DT_DLL_vrfutil DtDcm DtRotYToBodyToLocal(const Coordinate_System &coordSystem, double angle, const DtVector &position)
DT_DLL_vrfutil double centralLimitGaussian(int numDraws)
Generates a Gaussian random number (an approximation), from a series of n uniform random number draws...
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...
double DtExponent
Definition: kinematicTools.h:286
A nonlinearity of zero gives you a simple linear relation: output = gain * input. Increasing positive...
Definition: kinematicTools.h:264
DT_DLL_vrfutil DtVector localGravityAcceleration(const DtVector &localPosition, const Coordinate_System &coordinateSystem)
Terrain related functions.
const DtVector & getPrevOutput()
Definition: kinematicTools.h:255
The DtExtent represents an axis-aligned 3d bounding box.
Definition: extent.h:43
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 onl...
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)...
DT_DLL_vrfutil void Dt3DDynamicsTick(const DtVector &LinearForce, double vehicleMass, DtVectorRef newLinearAcceleration, const DtVector &torque, DtConstDcm vehicleInertia, DtVectorRef newAngAcceleration)
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 bo...
DT_DLL_vrfutil DtVector DtPoint2DtVector(const DtPoint &p)
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 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...
double DtGain
Definition: kinematicTools.h:285
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:
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...
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 i...
DT_DLL_vrfutil void DtTrigInit()
Functions for trig table lookups.
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 t...
DT_DLL_vrfutil double DtAtan(double x)
double DtCos(double r)
Definition: kinematicTools.h:432
DT_DLL_vrfutil bool inside(const DtVector &localPoint, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem)
Determine if the given localPoint is inside the polygon defined by the given localVertexList.
DT_DLL_vrfutil void DtRotBodyY(double angle, DtDcm &rotMat)
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 ch...
DtVector prevOutput
Definition: kinematicTools.h:259
DT_DLL_vrfutil unsigned int DtVRFGetThreadId()
Gets the current thread id.
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 headin...
DT_DLL_vrfutil void DtRotY(double angle, DtDcm &rotMat)
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 use...
Definition: coordSystem.h:54
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 giv...
void DtSetGain(double gain)
Definition: kinematicTools.h:274
DT_DLL_vrfutil void DtBlockInertia(const double xLen, const double yLen, const double zLen, const double mass, DtDcm &inertia)
DT_DLL_VRVCORE double distance(const makVrv::DtCoordinateSystem &, const DtVector &from, const DtVector &to)
Returns the distance from the two points. Coordinates are in local database coordinates The coordinat...
DT_DLL_vrfutil double DtTan(double r)
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
Definition: localVector.h:25
DT_DLL_vrfutil void DtVecLimit(DtVectorRef vec, double limit)
If mag(vec)&gt;limit, shortens vector to mag = limit.
DT_DLL_vrfutil void localVectorToGeocentricVector(const DtVector &geocentricPosition, const DtVector &localVector, const Coordinate_System &coordinateSystem, DtVector &geocentricVector)
local(database)/geocentric conversion functions
class DtVertexList:
Definition: vertexList.h:22
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 ...
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) t...
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 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 pl...
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 t...
DT_DLL_vrfutil void DtSeconds2HoursMinutesSeconds(double totalSeconds, int &hoursOut, int &minutesOut, double &secondsOut)
Converts totalSeconds into hours, minutes, and seconds.
double dotProd2D(const DtVector &v1, const DtVector &v2)
---------------------------------------------------------------------------- 2D functions on 3D topo...
Definition: kinematicTools.h:723
double DtFloat64
Definition: vrvControlStructTypes.h:36
DT_DLL_vrfutil void DtEuler_to_BodyToLocalRef(const DtTaitBryan &euler, DtDcm &body2ref)
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 dire...
bool checkForNAN(const DtVector &vector)
Checks for not a number (NAN) values.
Definition: kinematicTools.h:917
double DtAcos(double x)
Definition: kinematicTools.h:440
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...
DT_DLL_vrfutil DtDcm DtRotZToBodyToLocal(const Coordinate_System &coordSystem, double angle, const DtVector &position)
void normalize2D(DtVector &v)
Definition: kinematicTools.h:744
DT_DLL_vrfutil double gaussianRandom()
Generates a Gaussian random number using the Marsaglia polar method. See e.g. Wikipedia (http://en...
const char * source
Definition: lz4.h:442
DT_DLL_vrfutil int DtIntRandom(int iFrom, int iTo)
Returns a random number from the base to the max.
double crossProduct2D(const DtVector &v1, const DtVector &v2)
Definition: kinematicTools.h:733
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)
Definition: asyncJobServer.h:39
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 DtRotZ(double angle, DtDcm &rotMat)
DT_DLL_vrfutil void DtBodyToLocalRef_to_Euler(DtConstDcm body2ref, DtTaitBryan *e)
DT_DLL_vrfutil double DtHoursMinutesSeconds2Seconds(double hours, double minutes, double seconds)
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.
DT_DLL_vrfutil bool DtSameSign(double x, double y)
DT_DLL_vrfutil void DtDcmFromRows(DtDcm &result, const DtVector &row1, const DtVector &row2, const DtVector &row3)
DT_DLL_vrfutil void DtGravityForce(double mass, DtVectorRef returnForce)
DT_DLL_vrfutil DtFloat64 DtFastDist(const DtVector &pt1, const DtVector &pt2)
DT_DLL_vrfutil void DtCalculateOrientation(DtVector localNormal, double heading, const DtDcm &topoToLocal, DtDcm &localOrientation)
Calculates the orientation from the specified local normal and heading.
Definition: vrfChordIntersectionRecord.h:19
double magnitudeSquared2D(const DtVector &v)
Definition: kinematicTools.h:728
DT_DLL_vrfutil void DtSpacesToDashes(char *str)
Inline versions of some functions in LibMatrix. NOTE: that unlike the LibMatrix counterpart.
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 coordin...
double DtGetNonLinearity()
Definition: kinematicTools.h:278
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...
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 localVertex...
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 ...
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.
DT_DLL_VRVCORE double length(const makVrv::DtCoordinateSystem &, const std::vector< DtVector > &vertices)
Returns the total distance of a segmented line defined by the provided vector of vertices. Coordinates are in local database coordinates. The coordinate system is used to convert between the local database coordinates and geocentric. All distance is in 2D – the Z value is ignored.
SequenceSequenceT & oldBoostSplit(SequenceSequenceT &Result, RangeT &Input, PredicateT Pred, boost::algorithm::token_compress_mode_type eCompress=boost::algorithm::token_compress_off)
Replace boost split with version that returns an empty set if the supplied string has no length...
Definition: kinematicTools.h:976
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. Inputs: geocentricPosi...
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.
#define DT_DLL_vrfutil
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfutilDefines.h:34
DT_DLL_vrfutil double DtAtan2(double y, double x)
DT_DLL_vrfutil void DtDcmFromColumns(DtDcm &result, const DtVector &col1, const DtVector &col2, const DtVector &col3)
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 corr...
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...
DtNonLinearOutputType(double nonlinearity, double gain=1.0)
Definition: kinematicTools.h:267
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 localVert...
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 ...
DT_DLL_vrfutil bool DtPointInWedge(const DtVector &wedgeEndPosition, const DtVector &wedgeAxis, const double wedgeAngle, const DtVector &testPoint)
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 g...
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...
Definition: kinematicTools.h:240
DT_DLL_vrfutil void DtRotX(double angle, DtDcm &rotMat)
double getPole()
Definition: kinematicTools.h:254
class DtLocalVertexList:
Definition: localVertexList.h:20
DT_DLL_vrfutil bool DtVectorIsZero(const DtVector &v, double tolerance=0.0)
void DtSetNonLinearity(double nonlinearity)
Definition: kinematicTools.h:275
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...
DT_DLL_vrfutil DtDcm DtRotXToBodyToLocal(const Coordinate_System &coordSystem, double angle, const DtVector &position)
Definition: point.h:34
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...
DT_DLL_vrfutil void DtCircleVerts(double radius, int npts, double *xCoords, double *yCoords)
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 s...

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)