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 BodyKinematics
Current body kinematics measurement.private static final long
Serialization version.private double
Timestamp 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 Object
clone()
Makes a copy of this instance.private static double
convertTime
(com.irurueta.units.Time time) Converts provided time instance to seconds.void
copyFrom
(TimedBodyKinematics input) Copies data of provided instance into this instance.void
copyTo
(TimedBodyKinematics output) Copies this instance data into provided instance.boolean
equals
(TimedBodyKinematics other) Checks if provided instance has exactly the same contents as this instance.boolean
equals
(TimedBodyKinematics other, double threshold) Checks if provided instance has contents similar to this instance up to provided threshold value.boolean
Checks if provided object is a TimedBodyKinematics instance having exactly the same contents as this instance.Gets current body kinematics measurement.com.irurueta.units.Time
Gets timestamp value.void
getTimestamp
(com.irurueta.units.Time result) Gets timestamp value.double
Gets timestamp value expressed in seconds.int
hashCode()
Computes and returns hash code for this instance.void
setKinematics
(BodyKinematics kinematics) Sets current body kinematics measurement.void
setTimestamp
(com.irurueta.units.Time timestamp) Sets timestamp.void
setTimestampSeconds
(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:
clone
in 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.
-