|
xsens_imu
|
Class for synchronizing two clocks. More...
#include <xsens_time.h>
Public Member Functions | |
| TimeSync (double skew, int historySize) | |
| Constructor. More... | |
| ~TimeSync () | |
| Destructor. More... | |
| int | isInitialized () const |
| Returns whether the TimeSync has passed the initial stage of initialization. More... | |
| void | reset () |
| Reset the time sync algorithm. More... | |
| void | update (TimeStamp local, TimeStamp external) |
| Update the time synchronization with new information. More... | |
| void | setInitialSkew (double skew) |
| Set the initial skew value. Since using this value requires a reset, the function automatically resets the TimeSync. More... | |
| TimeStamp | localTime (TimeStamp external) |
| Returns the local time computed from the supplied reference time. More... | |
| TimeStamp | externalTime (TimeStamp local) |
| Returns the reference time computed from the supplied local time. More... | |
Class for synchronizing two clocks.
| xsens::TimeSync::TimeSync | ( | double | skew, |
| int | historySize | ||
| ) |
Constructor.
| xsens::TimeSync::~TimeSync | ( | ) |
Destructor.
Returns the reference time computed from the supplied local time.
| int xsens::TimeSync::isInitialized | ( | ) | const |
Returns whether the TimeSync has passed the initial stage of initialization.
Returns the local time computed from the supplied reference time.
| void xsens::TimeSync::reset | ( | void | ) |
Reset the time sync algorithm.
| void xsens::TimeSync::setInitialSkew | ( | double | skew | ) |
Set the initial skew value. Since using this value requires a reset, the function automatically resets the TimeSync.
Update the time synchronization with new information.
The computations can be done in double precision, since doubles have a worst-case precision in the 'normal' range of 15 decimals, which fits about 32000 years while retaining ms precision.
| local | The local time. This time value may have noise on it caused by a delay. |
| external | The external time. This time must be exactly as supplied by the time source. |
1.8.11