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;
64 #define EARTH_RADIUS_AVERAGE 6367500.0
85 DtConstDcm orientation,
89 DtVectorRef newPosition,
90 DtVectorRef newVelocity,
91 DtDcm& newOrientation,
92 DtVectorRef newAngVelocity);
96 DtVectorRef newLinearAcceleration,
98 DtConstDcm vehicleInertia,
99 DtVectorRef newAngAcceleration);
102 DtVectorRef returnForce);
106 DtVectorRef resultTorqueAboutOrigin);
111 DtDcm& inertiaInNewFrame);
115 DtDcm& inertiaInNewFrame);
118 double errorIntegral,
120 double proportionalGain,
122 double derivativeGain,
123 double biasForce = 0.0,
124 double* control = 0);
142 const double deceleration,
const double dt,
const double ownSpeed,
143 const double distance,
const double targetSpeed,
const double errorDecelValue = -1e10);
161 const double deceleration,
const double dt,
const double ownSpeed,
162 const double distance,
const double targetSpeed,
const double errorDecelValue = -1e10);
172 double tolerance = 0.0);
196 const double coneAngle,
198 double* testAnglePtr = 0);
203 const double wedgeAngle,
214 return sqrt(vec[DtX]*vec[DtX] + vec[DtY]*vec[DtY] + vec[DtZ]*vec[DtZ]);
219 return vec[DtX]*vec[DtX] + vec[DtY]*vec[DtY] + vec[DtZ]*vec[DtZ];
244 void setPole(
double freq);
245 void output(DtTaitBryan* input,
247 DtTaitBryan* output);
251 double output(
double input,
271 DtExponent = nonlinearity+1.0;
281 return DtSIGN(input) * DtGain * pow(fabs(input), DtExponent);
327 bool yIsForward=
false);
336 bool upsideDown =
false);
341 const DtDcm& topoToLocal, DtDcm& orientation);
354 const DtDcm& topoToLocal, DtDcm& localOrientation);
366 bool* noIntersection = 0);
380 DtVector* result = 0,
double* t = 0);
384 double x1,
double y1,
double x2,
double y2,
385 double z11,
double z21,
double z12,
double z22,
392 double x1,
double y1,
double x2,
double y2,
393 double z11,
double z21,
double z12,
double z22,
396 double tolerance = 1e-20);
401 double heading,
const DtVector& position, DtDcm& bodyToRef);
410 DtDcm& bodyToLocalDcm);
479 double* isectParam1 = 0,
double *isectParam2 = 0,
480 bool* parallel = 0,
bool* collinear = 0);
574 const std::vector<DtVector>& boundary);
635 const Dt3dBoundingVolume& box,
const DtTaitBryan& boxToLocalOrientation,
711 int startingIndex,
bool reverseDirection,
725 return v1[0]*v2[0] + v1[1]*v2[1];
735 return v1[0]*v2[1] - v1[1]*v2[0];
757 return DtModPerLo(atan2(v[1], v[0]), -M_PI, M_PI);
790 const DtTaitBryan& localOrientation,
792 DtTaitBryan& geocentricOrientation);
798 const DtDcm& newOrientation,
799 const DtDcm& oldOrientation,
double dT);
804 double deceleration,
double timeToArrive);
833 const DtTaitBryan& geocentricOrientation,
835 DtTaitBryan& localOrientation);
849 int& minutesOut,
double& secondsOut);
864 double&
length,
double& width);
868 double&
length,
double& width);
893 double nighttimeMaximum = 0.1,
double illuminationMinimum = 0.001,
bool useDayNightIlluminationModel =
true,
903 double orderedSpeed,
double currentSimTime,
double currentSpeed,
double acceleration,
904 const Coordinate_System& coordinateSystem,
double& totResult,
double& speedResult);
913 double orderedSpeed,
double currentSimTime,
double currentSpeed,
double acceleration,
914 const Coordinate_System& coordinateSystem,
double& totResult,
double& speedResult);
919 if (boost::math::isnan(vector.x()) ||
920 boost::math::isnan(vector.y()) ||
921 boost::math::isnan(vector.z()))
934 if (boost::math::isnan(tb.phi()) ||
935 boost::math::isnan(tb.psi()) ||
936 boost::math::isnan(tb.theta()))
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()))
969 bool convertValueForXml =
false);
974 #include <boost/algorithm/string.hpp>
975 template<
typename SequenceSequenceT,
typename RangeT,
typename PredicateT >
977 SequenceSequenceT& Result,
980 boost::algorithm::token_compress_mode_type eCompress=boost::algorithm::token_compress_off )
984 ::boost::algorithm::iter_split(
987 ::boost::algorithm::token_finder( Pred, eCompress ) );
1014 double corridorWidth,
double corridorHeight,
const Coordinate_System& coordinateSystemRef);
1024 double corridorHeight,
const DtVector& localPoint,
const DtExtent & lineExtent,
1035 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:277
DtVrfChordIntersectionRecord represents a list of DtChordIntersectRecords. This is useful for followi...
Definition: vrfChordIntersectRecordList.h:31
double DtOutput(double input)
Definition: kinematicTools.h:279
double poleFreq
Definition: kinematicTools.h:258
File: lclVecIter.h.
Definition: localVectorIterator.h:25
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
const DtVector & getPrevOutput()
Definition: kinematicTools.h:255
The DtExtent represents an axis-aligned 3d bounding box.
Definition: extent.h:43
double DtGain
Definition: kinematicTools.h:285
DtVector prevOutput
Definition: kinematicTools.h:259
Definition: coordSystem.h:54
void DtSetGain(double gain)
Definition: kinematicTools.h:274
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:278
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.
#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:267
Definition: kinematicTools.h:240
double getPole()
Definition: kinematicTools.h:254
class DtLocalVertexList:
Definition: localVertexList.h:20
void DtSetNonLinearity(double nonlinearity)
Definition: kinematicTools.h:275