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;
80 DtConstDcm orientation,
84 DtVectorRef newPosition,
85 DtVectorRef newVelocity,
86 DtDcm& newOrientation,
87 DtVectorRef newAngVelocity);
91 DtVectorRef newLinearAcceleration,
93 DtConstDcm vehicleInertia,
94 DtVectorRef newAngAcceleration);
97 DtVectorRef returnForce);
101 DtVectorRef resultTorqueAboutOrigin);
106 DtDcm& inertiaInNewFrame);
110 DtDcm& inertiaInNewFrame);
113 double errorIntegral,
115 double proportionalGain,
117 double derivativeGain,
118 double biasForce = 0.0,
119 double* control = 0);
134 const double deceleration,
const double dt,
const double ownSpeed,
135 const double distance,
const double targetSpeed,
const double errorDecelValue = -1e10);
150 const double deceleration,
const double dt,
const double ownSpeed,
151 const double distance,
const double targetSpeed,
const double errorDecelValue = -1e10);
161 double tolerance = 0.0);
185 const double coneAngle,
187 double* testAnglePtr = 0);
192 const double wedgeAngle,
203 return sqrt(vec[DtX]*vec[DtX] + vec[DtY]*vec[DtY] + vec[DtZ]*vec[DtZ]);
208 return vec[DtX]*vec[DtX] + vec[DtY]*vec[DtY] + vec[DtZ]*vec[DtZ];
233 void setPole(
double freq);
234 void output(DtTaitBryan* input,
236 DtTaitBryan* output);
240 double output(
double input,
260 DtExponent = nonlinearity+1.0;
270 return DtSIGN(input) * DtGain * pow(fabs(input), DtExponent);
316 bool yIsForward=
false);
325 bool upsideDown =
false);
330 const DtDcm& topoToLocal, DtDcm& orientation);
343 const DtDcm& topoToLocal, DtDcm& localOrientation);
355 bool* noIntersection = 0);
369 DtVector* result = 0,
double* t = 0);
373 double x1,
double y1,
double x2,
double y2,
374 double z11,
double z21,
double z12,
double z22,
381 double x1,
double y1,
double x2,
double y2,
382 double z11,
double z21,
double z12,
double z22,
385 double tolerance = 1e-20);
390 double heading,
const DtVector& position, DtDcm& bodyToRef);
399 DtDcm& bodyToLocalDcm);
428 double cosR =
DtCos(r);
438 return DtSin(r) / cosR;
483 double* isectParam1 = 0,
double *isectParam2 = 0,
484 bool* parallel = 0,
bool* collinear = 0);
616 const Dt3dBoundingVolume* box,
const DtTaitBryan& boxToLocalOrientation,
698 return v1[0]*v2[0] + v1[1]*v2[1];
708 return v1[0]*v2[1] - v1[1]*v2[0];
730 return DtModPerLo(atan2(v[1], v[0]), -M_PI, M_PI);
763 const DtTaitBryan& localOrientation,
765 DtTaitBryan& geocentricOrientation);
771 const DtDcm& newOrientation,
772 const DtDcm& oldOrientation,
double dT);
777 double deceleration,
double timeToArrive);
806 const DtTaitBryan& geocentricOrientation,
808 DtTaitBryan& localOrientation);
822 int& minutesOut,
double& secondsOut);
834 double& length,
double& width);
838 double& length,
double& width);
863 double nighttimeMaximum = 0.1,
double illuminationMinimum = 0.001,
bool useDayNightIlluminationModel =
true,
873 double orderedSpeed,
double currentSimTime,
double currentSpeed,
double acceleration,
874 const Coordinate_System& coordinateSystem,
double& totResult,
double& speedResult);
883 double orderedSpeed,
double currentSimTime,
double currentSpeed,
double acceleration,
884 const Coordinate_System& coordinateSystem,
double& totResult,
double& speedResult);
889 if (boost::math::isnan(vector.x()) ||
890 boost::math::isnan(vector.y()) ||
891 boost::math::isnan(vector.z()))
904 if (boost::math::isnan(tb.phi()) ||
905 boost::math::isnan(tb.psi()) ||
906 boost::math::isnan(tb.theta()))
919 if (boost::math::isnan(dcm[0].x()) ||
920 boost::math::isnan(dcm[0].y()) ||
921 boost::math::isnan(dcm[0].z()) ||
922 boost::math::isnan(dcm[1].x()) ||
923 boost::math::isnan(dcm[1].y()) ||
924 boost::math::isnan(dcm[1].z()) ||
925 boost::math::isnan(dcm[2].x()) ||
926 boost::math::isnan(dcm[2].y()) ||
927 boost::math::isnan(dcm[2].z()))
939 bool convertValueForXml =
false);
944 #include <boost/algorithm/string.hpp>
945 template<
typename SequenceSequenceT,
typename RangeT,
typename PredicateT >
947 SequenceSequenceT& Result,
950 boost::algorithm::token_compress_mode_type eCompress=boost::algorithm::token_compress_off )
954 ::boost::algorithm::iter_split(
957 ::boost::algorithm::token_finder( Pred, eCompress ) );
NOTE: This entire class is deprecated, in favor of Dt3dChord.
Definition: chord.h:40
double DtGetGain()
Definition: kinematicTools.h:266
DtVrfChordIntersectionRecord represents a list of DtChordIntersectRecords.
Definition: vrfChordIntersectRecordList.h:31
double DtOutput(double input)
Definition: kinematicTools.h:268
double poleFreq
Definition: kinematicTools.h:247
File: lclVecIter.h.
Definition: localVectorIterator.h:25
double DtExponent
Definition: kinematicTools.h:275
A nonlinearity of zero gives you a simple linear relation: output = gain * input. ...
Definition: kinematicTools.h:253
const DtVector & getPrevOutput()
Definition: kinematicTools.h:244
double DtGain
Definition: kinematicTools.h:274
DtVector prevOutput
Definition: kinematicTools.h:248
Definition: coordSystem.h:54
void DtSetGain(double gain)
Definition: kinematicTools.h:263
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:436
Definition: asyncJobServer.h:39
Definition: vrfChordIntersectionRecord.h:19
double DtGetNonLinearity()
Definition: kinematicTools.h:267
#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:256
Definition: kinematicTools.h:229
double getPole()
Definition: kinematicTools.h:243
class DtLocalVertexList:
Definition: localVertexList.h:20
void DtSetNonLinearity(double nonlinearity)
Definition: kinematicTools.h:264