14 #include <matrix/LibMatrix.h>
15 #include <vl/topoView.h>
16 #include <matrix/vlTaitBryan.h>
17 #include <matrix/3dBoundingVolume.h>
22 #include <boost/math/special_functions/fpclassify.hpp>
24 #define DtSIGN(x) (((x) > (0.0)) ? (1.0) : (-1.0))
26 #define DtALMOST(x, y, e) (((x)<=((y)+(e))) && ((x)>=((y)-(e))))
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)
36 #define SIN(x) DtSin(x)
37 #define COS(x) DtCos(x)
38 #define TAN(x) DtTan(x)
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))
45 #define DtFRand() ((double) rand() / RAND_MAX)
46 #define DtIRandom(from, to) DtIntRandom(from, to)
48 class DtGeodeticCoord;
79 DtConstDcm orientation,
83 DtVectorRef newPosition,
84 DtVectorRef newVelocity,
85 DtDcm& newOrientation,
86 DtVectorRef newAngVelocity);
90 DtVectorRef newLinearAcceleration,
92 DtConstDcm vehicleInertia,
93 DtVectorRef newAngAcceleration);
96 DtVectorRef returnForce);
100 DtVectorRef resultTorqueAboutOrigin);
105 DtDcm& inertiaInNewFrame);
109 DtDcm& inertiaInNewFrame);
112 double errorIntegral,
114 double proportionalGain,
116 double derivativeGain,
117 double biasForce = 0.0,
118 double* control = 0);
133 const double deceleration,
const double dt,
const double ownSpeed,
134 const double distance,
const double targetSpeed,
const double errorDecelValue = -1e10);
149 const double deceleration,
const double dt,
const double ownSpeed,
150 const double distance,
const double targetSpeed,
const double errorDecelValue = -1e10);
160 double tolerance = 0.0);
184 const double coneAngle,
186 double* testAnglePtr = 0);
191 const double wedgeAngle,
202 return sqrt(vec[DtX]*vec[DtX] + vec[DtY]*vec[DtY] + vec[DtZ]*vec[DtZ]);
207 return vec[DtX]*vec[DtX] + vec[DtY]*vec[DtY] + vec[DtZ]*vec[DtZ];
232 void setPole(
double freq);
233 void output(DtTaitBryan* input,
235 DtTaitBryan* output);
239 double output(
double input,
259 DtExponent = nonlinearity+1.0;
269 return DtSIGN(input) * DtGain * pow(fabs(input), DtExponent);
315 bool yIsForward=
false);
324 bool upsideDown =
false);
329 const DtDcm& topoToLocal, DtDcm& orientation);
342 const DtDcm& topoToLocal, DtDcm& localOrientation);
354 bool* noIntersection = 0);
368 DtVector* result = 0,
double* t = 0);
372 double x1,
double y1,
double x2,
double y2,
373 double z11,
double z21,
double z12,
double z22,
380 double x1,
double y1,
double x2,
double y2,
381 double z11,
double z21,
double z12,
double z22,
384 double tolerance = 1e-20);
389 double heading,
const DtVector& position, DtDcm& bodyToRef);
398 DtDcm& bodyToLocalDcm);
467 double* isectParam1 = 0,
double *isectParam2 = 0,
468 bool* parallel = 0,
bool* collinear = 0);
600 const Dt3dBoundingVolume& box,
const DtTaitBryan& boxToLocalOrientation,
676 int startingIndex,
bool reverseDirection,
690 return v1[0]*v2[0] + v1[1]*v2[1];
700 return v1[0]*v2[1] - v1[1]*v2[0];
722 return DtModPerLo(atan2(v[1], v[0]), -M_PI, M_PI);
755 const DtTaitBryan& localOrientation,
757 DtTaitBryan& geocentricOrientation);
763 const DtDcm& newOrientation,
764 const DtDcm& oldOrientation,
double dT);
769 double deceleration,
double timeToArrive);
798 const DtTaitBryan& geocentricOrientation,
800 DtTaitBryan& localOrientation);
814 int& minutesOut,
double& secondsOut);
829 double& length,
double& width);
833 double& length,
double& width);
858 double nighttimeMaximum = 0.1,
double illuminationMinimum = 0.001,
bool useDayNightIlluminationModel =
true,
868 double orderedSpeed,
double currentSimTime,
double currentSpeed,
double acceleration,
869 const Coordinate_System& coordinateSystem,
double& totResult,
double& speedResult);
878 double orderedSpeed,
double currentSimTime,
double currentSpeed,
double acceleration,
879 const Coordinate_System& coordinateSystem,
double& totResult,
double& speedResult);
884 if (boost::math::isnan(vector.x()) ||
885 boost::math::isnan(vector.y()) ||
886 boost::math::isnan(vector.z()))
899 if (boost::math::isnan(tb.phi()) ||
900 boost::math::isnan(tb.psi()) ||
901 boost::math::isnan(tb.theta()))
914 if (boost::math::isnan(dcm[0].x()) ||
915 boost::math::isnan(dcm[0].y()) ||
916 boost::math::isnan(dcm[0].z()) ||
917 boost::math::isnan(dcm[1].x()) ||
918 boost::math::isnan(dcm[1].y()) ||
919 boost::math::isnan(dcm[1].z()) ||
920 boost::math::isnan(dcm[2].x()) ||
921 boost::math::isnan(dcm[2].y()) ||
922 boost::math::isnan(dcm[2].z()))
934 bool convertValueForXml =
false);
939 #include <boost/algorithm/string.hpp>
940 template<
typename SequenceSequenceT,
typename RangeT,
typename PredicateT >
942 SequenceSequenceT& Result,
945 boost::algorithm::token_compress_mode_type eCompress=boost::algorithm::token_compress_off )
949 ::boost::algorithm::iter_split(
952 ::boost::algorithm::token_finder( Pred, eCompress ) );
979 double corridorWidth,
double corridorHeight,
const Coordinate_System& coordinateSystemRef);
989 double corridorHeight,
const DtVector& localPoint,
const DtExtent & lineExtent,
1000 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:265
DtVrfChordIntersectionRecord represents a list of DtChordIntersectRecords. This is useful for followi...
Definition: vrfChordIntersectRecordList.h:31
double DtOutput(double input)
Definition: kinematicTools.h:267
double poleFreq
Definition: kinematicTools.h:246
File: lclVecIter.h.
Definition: localVectorIterator.h:25
double DtExponent
Definition: kinematicTools.h:274
A nonlinearity of zero gives you a simple linear relation: output = gain * input. Increasing positive...
Definition: kinematicTools.h:252
const DtVector & getPrevOutput()
Definition: kinematicTools.h:243
The DtExtent represents an axis-aligned 3d bounding box.
Definition: extent.h:43
double DtGain
Definition: kinematicTools.h:273
DtVector prevOutput
Definition: kinematicTools.h:247
Definition: coordSystem.h:54
void DtSetGain(double gain)
Definition: kinematicTools.h:262
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 angle(double vec1[3], double vec2[3])
Definition: localVector.h:25
class DtVertexList:
Definition: vertexList.h:22
const char * source
Definition: lz4.h:442
Definition: asyncJobServer.h:39
Definition: vrfChordIntersectionRecord.h:19
double DtGetNonLinearity()
Definition: kinematicTools.h:266
#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:255
Definition: kinematicTools.h:228
double getPole()
Definition: kinematicTools.h:242
class DtLocalVertexList:
Definition: localVertexList.h:20
void DtSetNonLinearity(double nonlinearity)
Definition: kinematicTools.h:263