Class TimedBodyKinematics
java.lang.Object
com.irurueta.navigation.inertial.calibration.TimedBodyKinematics
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
StandardDeviationTimedBodyKinematics
Contains a body kinematics measurement (accelerometer + gyroscope) along with the
corresponding timestamp when measure was made.
Notice that timestamp does not need to be absolute.
Usually timestamps are used in sequences of measurements of body kinematics, where
the first measurement can have any timestamp value (e.g. zero), and hence the subsequent
measurements will have timestamps relative to the first one.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BodyKinematicsCurrent body kinematics measurement.private static final longSerialization version.private doubleTimestamp value expressed in seconds. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.TimedBodyKinematics(double timestampSeconds) Constructor.TimedBodyKinematics(BodyKinematics kinematics) Constructor.TimedBodyKinematics(BodyKinematics kinematics, double timestampSeconds) Constructor.TimedBodyKinematics(BodyKinematics kinematics, com.irurueta.units.Time timestamp) Constructor.Constructor.TimedBodyKinematics(com.irurueta.units.Time timestamp) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected Objectclone()Makes a copy of this instance.private static doubleconvertTime(com.irurueta.units.Time time) Converts provided time instance to seconds.voidcopyFrom(TimedBodyKinematics input) Copies data of provided instance into this instance.voidcopyTo(TimedBodyKinematics output) Copies this instance data into provided instance.booleanequals(TimedBodyKinematics other) Checks if provided instance has exactly the same contents as this instance.booleanequals(TimedBodyKinematics other, double threshold) Checks if provided instance has contents similar to this instance up to provided threshold value.booleanChecks if provided object is a TimedBodyKinematics instance having exactly the same contents as this instance.Gets current body kinematics measurement.com.irurueta.units.TimeGets timestamp value.voidgetTimestamp(com.irurueta.units.Time result) Gets timestamp value.doubleGets timestamp value expressed in seconds.inthashCode()Computes and returns hash code for this instance.voidsetKinematics(BodyKinematics kinematics) Sets current body kinematics measurement.voidsetTimestamp(com.irurueta.units.Time timestamp) Sets timestamp.voidsetTimestampSeconds(double timestampSeconds) Sets timestamp value expressed in seconds.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version. This is used to ensure compatibility of deserialization of permanently stored serialized instances.- See Also:
-
kinematics
Current body kinematics measurement. Contains accelerometer and gyroscope measurements. -
timestampSeconds
private double timestampSecondsTimestamp value expressed in seconds.
-
-
Constructor Details
-
TimedBodyKinematics
public TimedBodyKinematics()Constructor. -
TimedBodyKinematics
public TimedBodyKinematics(double timestampSeconds) Constructor.- Parameters:
timestampSeconds- timestamp value expressed in seconds.
-
TimedBodyKinematics
public TimedBodyKinematics(com.irurueta.units.Time timestamp) Constructor.- Parameters:
timestamp- timestamp value.
-
-
Method Details
-
getKinematics
Gets current body kinematics measurement. Contains accelerometer and gyroscope measurements.- Returns:
- current body kinematics measurement.
-
getTimestampSeconds
public double getTimestampSeconds()Gets timestamp value expressed in seconds.- Returns:
- timestamp value expressed in seconds.
-
setTimestampSeconds
public void setTimestampSeconds(double timestampSeconds) Sets timestamp value expressed in seconds.- Parameters:
timestampSeconds- timestamp value expressed in seconds.
-
getTimestamp
public com.irurueta.units.Time getTimestamp()Gets timestamp value.- Returns:
- a new timestamp instance.
-
getTimestamp
public void getTimestamp(com.irurueta.units.Time result) Gets timestamp value.- Parameters:
result- instance where result data will be stored.
-
setTimestamp
public void setTimestamp(com.irurueta.units.Time timestamp) Sets timestamp.- Parameters:
timestamp- timestamp to be set.
-
hashCode
public int hashCode()Computes and returns hash code for this instance. Hash codes are almost unique values that are useful for fast classification and storage of objects in collections. -
equals
Checks if provided object is a TimedBodyKinematics instance having exactly the same contents as this instance. -
clone
Makes a copy of this instance.- Overrides:
clonein classObject- Returns:
- a copy of this instance.
- Throws:
CloneNotSupportedException- if clone fails for some reason.
-
convertTime
private static double convertTime(com.irurueta.units.Time time) Converts provided time instance to seconds.- Parameters:
time- timestamp to be converted.- Returns:
- converted value expressed in seconds.
-