|
From: <tf...@us...> - 2008-04-26 00:20:49
|
Revision: 181
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=181&view=rev
Author: tfoote
Date: 2008-04-25 17:20:57 -0700 (Fri, 25 Apr 2008)
Log Message:
-----------
changing to nanoseconds
Modified Paths:
--------------
pkg/trunk/libTF/include/libTF/Quaternion3D.h
pkg/trunk/libTF/src/simple/Quaternion3D.cpp
Modified: pkg/trunk/libTF/include/libTF/Quaternion3D.h
===================================================================
--- pkg/trunk/libTF/include/libTF/Quaternion3D.h 2008-04-25 20:36:20 UTC (rev 180)
+++ pkg/trunk/libTF/include/libTF/Quaternion3D.h 2008-04-26 00:20:57 UTC (rev 181)
@@ -52,7 +52,7 @@
class Quaternion3D {
public:
- static const int MIN_INTERPOLATION_DISTANCE = 5; //Number of micro seconds to not interpolate below.
+ static const int MIN_INTERPOLATION_DISTANCE = 5; //Number of nano-seconds to not interpolate below.
// Storage class
class Quaternion3DStorage
{
@@ -72,7 +72,7 @@
/* Internal Data */
double xt, yt, zt, xr, yr, zr, w;
- unsigned long long time;
+ unsigned long long time; //nanoseconds since 1970
};
/** Constructors **/
@@ -99,7 +99,7 @@
NEWMAT::Matrix getInverseMatrix(unsigned long long time);
/**** Utility Functions ****/
- // this is a function to return the current time in microseconds from the beginning of 1970
+ // this is a function to return the current time in nanooseconds from the beginning of 1970
static unsigned long long Qgettime(void);
// Convert DH Parameters to a Homogeneous Transformation Matrix
@@ -116,7 +116,7 @@
private:
/**** Linked List stuff ****/
- static const long long MAX_STORAGE_TIME = 100000000; // max of 100 seconds storage
+ static const unsigned long long MAX_STORAGE_TIME = 100ULL * 1000000000ULL; // max of 100 seconds storage
struct data_LL{
Quaternion3DStorage data;
Modified: pkg/trunk/libTF/src/simple/Quaternion3D.cpp
===================================================================
--- pkg/trunk/libTF/src/simple/Quaternion3D.cpp 2008-04-25 20:36:20 UTC (rev 180)
+++ pkg/trunk/libTF/src/simple/Quaternion3D.cpp 2008-04-26 00:20:57 UTC (rev 181)
@@ -316,7 +316,7 @@
{
timeval temp_time_struct;
gettimeofday(&temp_time_struct,NULL);
- return temp_time_struct.tv_sec * 1000000ULL + (unsigned long long)temp_time_struct.tv_usec;
+ return temp_time_struct.tv_sec * 1000000000ULL + (unsigned long long)temp_time_struct.tv_usec * 1000ULL;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|