Reflexxes Motion Libraries  Manual and Documentation (Type II, Version 1.2.6)
include/TypeIIRMLMath.h
Go to the documentation of this file.
00001 //  ---------------------- Doxygen info ----------------------
00038 //  ----------------------------------------------------------
00039 //   For a convenient reading of this file's source code,
00040 //   please use a tab width of four characters.
00041 //  ----------------------------------------------------------
00042
00043
00044 #ifndef __TypeIIRMLMath__
00045 #define __TypeIIRMLMath__
00046 
00047
00048 //*******************************************************************************************
00049 // Include files
00050
00051 #include <math.h>
00052
00053
00054 namespace TypeIIRMLMath
00055 {
00056
00057 //*******************************************************************************************
00058 // Definitions and macros
00059
00060
00061
00062
00063 //  ---------------------- Doxygen info ----------------------
00068 //  ----------------------------------------------------------
00069 #define OTG_INFINITY ((double)1.0e100)
00070 
00071
00072 //  ---------------------- Doxygen info ----------------------
00084 //  ----------------------------------------------------------
00085 #define RML_INPUT_VALUE_EPSILON ((double)1.0e-10)
00086 
00087
00088 //  ---------------------- Doxygen info ----------------------
00096 //  ----------------------------------------------------------
00097 #define RML_VALID_SOLUTION_EPSILON ((double)1.0e-10)
00098 
00099
00100 //  ---------------------- Doxygen info ----------------------
00114 //  ----------------------------------------------------------
00115 #define MAXIMAL_NO_OF_POLYNOMIALS  7
00116 
00117
00118 //  ---------------------- Doxygen info ----------------------
00129 //  ----------------------------------------------------------
00130 #define RML_MAX_EXECUTION_TIME ((double)1e10)
00131 
00132
00133 //  ---------------------- Doxygen info ----------------------
00141 //  ----------------------------------------------------------
00142 #define RML_ADDITIONAL_RELATIVE_POSITION_ERROR_IN_CASE_OF_EQUALITY ((double)1e-7)
00143 
00144
00145 //  ---------------------- Doxygen info ----------------------
00153 //  ----------------------------------------------------------
00154 #define RML_ADDITIONAL_ABSOLUTE_POSITION_ERROR_IN_CASE_OF_EQUALITY ((double)1e-7)
00155 
00156
00157 //  ---------------------- Doxygen info ----------------------
00163 //  ----------------------------------------------------------
00164 #define POSITIVE_ZERO ((double)1.0e-50)
00165 
00166
00167 //  ---------------------- Doxygen info ----------------------
00178 //  ----------------------------------------------------------
00179 #define ABSOLUTE_PHASE_SYNC_EPSILON ((double)1.0e-6)
00180 
00181
00182 //  ---------------------- Doxygen info ----------------------
00191 //  ----------------------------------------------------------
00192 #define RELATIVE_PHASE_SYNC_EPSILON ((double)1.0e-3)
00193 
00194
00195 //  ---------------------- Doxygen info ----------------------
00200 //  ----------------------------------------------------------
00201 #define RML_INFINITY ((double)1.0e100)
00202 
00203
00204 //  ---------------------- Doxygen info ----------------------
00215 //  ----------------------------------------------------------
00216 #define RML_POSITION_EXTREMS_TIME_EPSILON ((double)1.0e-4)
00217 
00218
00219 //  ---------------------- Doxygen info ----------------------
00227 //  ----------------------------------------------------------
00228 #define PHASE_SYNC_COLLINEARITY_REL_EPSILON ((double)1.0e-2)
00229 
00230
00231 //  ---------------------- Doxygen info ----------------------
00242 //  ----------------------------------------------------------
00243 #define Sign(A) ( ((double)(A) < 0.0)?(-1):(1) )
00244 
00245
00246 //  ---------------------- Doxygen info ----------------------
00257 //  ----------------------------------------------------------
00258 #define FSign(A) ( ((double)(A) < 0.0)?(-1.0):(1.0) )
00259 
00260
00261 //  ---------------------- Doxygen info ----------------------
00272 //  ----------------------------------------------------------
00273 #define pow2(A)                         ((A)*(A))
00274 
00275
00276 //  ---------------------- Doxygen info ----------------------
00290 //  ----------------------------------------------------------
00291 inline double RMLSqrt(const double &Value)
00292 {
00293     return( ( Value <= 0.0 ) ? ( POSITIVE_ZERO ) : ( sqrt( Value ) ) );
00294 }
00295
00296
00297 //  ---------------------- Doxygen info ----------------------
00303 //  ----------------------------------------------------------
00304 #define IsInputEpsilonEqual(A,B) ((bool)((fabs((double)A - (double)B) <= RML_INPUT_VALUE_EPSILON)?(true):(false)))
00305 
00306
00307 //  ---------------------- Doxygen info ----------------------
00329 //  ----------------------------------------------------------
00330 inline bool IsEpsilonEquality(      const double &Value1
00331                                 ,   const double &Value2
00332                                 ,   const double &Epsilon)
00333 {
00334     return(fabs(Value1 - Value2) <= Epsilon);
00335 }
00336
00337
00338 }   // namespace TypeIIRMLMath
00339
00340 #endif
User documentation of the Reflexxes Motion Libraries by Reflexxes GmbH (Company Information, Impressum). This document was generated with Doxygen on Mon Jul 7 2014 13:21:08. Copyright 2010–2014.