13 #include <matrix/LibMatrix.h>
14 #include <vl/topoView.h>
15 #include <matrix/vlTaitBryan.h>
16 #include <matrix/3dBoundingVolume.h>
23 #include <boost/math/special_functions/fpclassify.hpp>
25 #define DtSIGN(x) (((x) > (0.0)) ? (1.0) : (-1.0))
27 #define DtALMOST(x, y, e) (((x)<=((y)+(e))) && ((x)>=((y)-(e))))
29 #define DtGRAVITY_CONSTANT (9.81)
30 #define DtPI_OVER_TWO (1.570796327)
31 #define DtTWO_PI (6.283185307)
32 #define DtMETERS_TO_FEET (3.2808)
33 #define DtMETERS_PER_SEC_TO_MPH (2.23)
34 #define DtLN2 (0.693147181)
35 #define DtNM_2_METERS (1852.0)
37 #define SIN(x) DtSin(x)
38 #define COS(x) DtCos(x)
39 #define TAN(x) DtTan(x)
41 #define ASIN(x) DtAsin(x)
42 #define ACOS(x) DtAcos(x)
43 #define ATAN(x) DtAtan(x)
44 #define ATAN2(y, x) DtAtan2((y), (x))
46 #define DtFRand() ((double) rand() / RAND_MAX)
47 #define DtIRandom(from, to) DtIntRandom(from, to)
49 class DtGeodeticCoord;
81 DtConstDcm orientation,
85 DtVectorRef newPosition,
86 DtVectorRef newVelocity,
87 DtDcm& newOrientation,
88 DtVectorRef newAngVelocity);
92 DtVectorRef newLinearAcceleration,
94 DtConstDcm vehicleInertia,
95 DtVectorRef newAngAcceleration);
98 DtVectorRef returnForce);
102 DtVectorRef resultTorqueAboutOrigin);
107 DtDcm& inertiaInNewFrame);
111 DtDcm& inertiaInNewFrame);
114 double errorIntegral,
116 double proportionalGain,
118 double derivativeGain,
119 double biasForce = 0.0,
120 double* control = 0);
135 const double deceleration,
const double dt,
const double ownSpeed,
136 const double distance,
const double targetSpeed,
const double errorDecelValue = -1e10);
151 const double deceleration,
const double dt,
const double ownSpeed,
152 const double distance,
const double targetSpeed,
const double errorDecelValue = -1e10);
162 double tolerance = 0.0);
186 const double coneAngle,
188 double* testAnglePtr = 0);
193 const double wedgeAngle,
204 return sqrt(vec[DtX]*vec[DtX] + vec[DtY]*vec[DtY] + vec[DtZ]*vec[DtZ]);
209 return vec[DtX]*vec[DtX] + vec[DtY]*vec[DtY] + vec[DtZ]*vec[DtZ];
234 void setPole(
double freq);
235 void output(DtTaitBryan* input,
237 DtTaitBryan* output);
241 double output(
double input,
261 DtExponent = nonlinearity+1.0;
271 return DtSIGN(input) * DtGain * pow(fabs(input), DtExponent);
317 bool yIsForward=
false);
326 bool upsideDown =
false);
331 const DtDcm& topoToLocal, DtDcm& orientation);
344 const DtDcm& topoToLocal, DtDcm& localOrientation);
356 bool* noIntersection = 0);
370 DtVector* result = 0,
double* t = 0);
374 double x1,
double y1,
double x2,
double y2,
375 double z11,
double z21,
double z12,
double z22,
382 double x1,
double y1,
double x2,
double y2,
383 double z11,
double z21,
double z12,
double z22,
386 double tolerance = 1e-20);
391 double heading,
const DtVector& position, DtDcm& bodyToRef);
400 DtDcm& bodyToLocalDcm);
429 double cosR =
DtCos(r);
439 return DtSin(r) / cosR;
484 double* isectParam1 = 0,
double *isectParam2 = 0,
485 bool* parallel = 0,
bool* collinear = 0);
617 const Dt3dBoundingVolume* box,
const DtTaitBryan& boxToLocalOrientation,
699 return v1[0]*v2[0] + v1[1]*v2[1];
709 return v1[0]*v2[1] - v1[1]*v2[0];
731 return DtModPerLo(atan2(v[1], v[0]), -M_PI, M_PI);
764 const DtTaitBryan& localOrientation,
766 DtTaitBryan& geocentricOrientation);
772 const DtDcm& newOrientation,
773 const DtDcm& oldOrientation,
double dT);
778 double deceleration,
double timeToArrive);
807 const DtTaitBryan& geocentricOrientation,
809 DtTaitBryan& localOrientation);
823 int& minutesOut,
double& secondsOut);
835 double& length,
double& width);
839 double& length,
double& width);
864 double nighttimeMaximum = 0.1,
double illuminationMinimum = 0.001,
bool useDayNightIlluminationModel =
true,
874 double orderedSpeed,
double currentSimTime,
double currentSpeed,
double acceleration,
875 const Coordinate_System& coordinateSystem,
double& totResult,
double& speedResult);
884 double orderedSpeed,
double currentSimTime,
double currentSpeed,
double acceleration,
885 const Coordinate_System& coordinateSystem,
double& totResult,
double& speedResult);
890 if (boost::math::isnan(vector.x()) ||
891 boost::math::isnan(vector.y()) ||
892 boost::math::isnan(vector.z()))
905 if (boost::math::isnan(tb.phi()) ||
906 boost::math::isnan(tb.psi()) ||
907 boost::math::isnan(tb.theta()))
920 if (boost::math::isnan(dcm[0].x()) ||
921 boost::math::isnan(dcm[0].y()) ||
922 boost::math::isnan(dcm[0].z()) ||
923 boost::math::isnan(dcm[1].x()) ||
924 boost::math::isnan(dcm[1].y()) ||
925 boost::math::isnan(dcm[1].z()) ||
926 boost::math::isnan(dcm[2].x()) ||
927 boost::math::isnan(dcm[2].y()) ||
928 boost::math::isnan(dcm[2].z()))
940 bool convertValueForXml =
false);
945 #include <boost/algorithm/string.hpp>
946 template<
typename SequenceSequenceT,
typename RangeT,
typename PredicateT >
948 SequenceSequenceT& Result,
951 boost::algorithm::token_compress_mode_type eCompress=boost::algorithm::token_compress_off )
955 ::boost::algorithm::iter_split(
958 ::boost::algorithm::token_finder( Pred, eCompress ) );
985 double corridorWidth,
double corridorHeight,
const Coordinate_System& coordinateSystemRef);
995 double corridorHeight,
const DtVector& localPoint,
const DtExtent & lineExtent,
1006 double corridorWidth,
double corridorHeight,
const Coordinate_System& coordinateSystemRef);
NOTE: This entire class is deprecated, in favor of Dt3dChord.
Definition: chord.h:40
double DtGetGain()
Definition: kinematicTools.h:267
DtVrfChordIntersectionRecord represents a list of DtChordIntersectRecords.
Definition: vrfChordIntersectRecordList.h:31
double DtOutput(double input)
Definition: kinematicTools.h:269
double poleFreq
Definition: kinematicTools.h:248
File: lclVecIter.h.
Definition: localVectorIterator.h:25
double DtExponent
Definition: kinematicTools.h:276
A nonlinearity of zero gives you a simple linear relation: output = gain * input. ...
Definition: kinematicTools.h:254
const DtVector & getPrevOutput()
Definition: kinematicTools.h:245
The DtExtent represents an axis-aligned 3d bounding box.
Definition: extent.h:43
double DtGain
Definition: kinematicTools.h:275
DtVector prevOutput
Definition: kinematicTools.h:249
Definition: coordSystem.h:54
void DtSetGain(double gain)
Definition: kinematicTools.h:264
DT_DLL_VRVCORE double distance(const makVrv::DtCoordinateSystem &, const DtVector &from, const DtVector &to)
Returns the distance from the two points.
bool DtIsZero< double >(double input)
Definition: mathUtilities.h:100
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
Definition: localVector.h:25
const char * source
Definition: lz4.h:442
Definition: asyncJobServer.h:39
Definition: vrfChordIntersectionRecord.h:19
double DtGetNonLinearity()
Definition: kinematicTools.h:268
#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
DtNonLinearOutputType(double nonlinearity, double gain=1.0)
Definition: kinematicTools.h:257
Definition: kinematicTools.h:230
double getPole()
Definition: kinematicTools.h:244
class DtLocalVertexList:
Definition: localVertexList.h:20
void DtSetNonLinearity(double nonlinearity)
Definition: kinematicTools.h:265