public class NaiveAccelerationIntegrator extends java.lang.Object implements BNO055IMU.AccelerationIntegrator
NaiveAccelerationIntegrator provides a very naive implementation of
an acceleration integration algorithm. It just does the basic physics.
One you would actually want to use in a robot would, for example, likely
filter noise out the acceleration data or more sophisticated processing.| Modifier and Type | Method and Description |
|---|---|
Acceleration |
getAcceleration()
Returns the current acceleration as understood by the algorithm.
|
Position |
getPosition()
Returns the current position as calculated by the algorithm
|
Velocity |
getVelocity()
Returns the current velocity as calculated by the algorithm
|
void |
initialize(BNO055IMU.Parameters parameters,
Position initialPosition,
Velocity initialVelocity)
(Re)initializes the algorithm with a starting position and velocity.
|
void |
update(Acceleration linearAcceleration)
Step the algorithm as a result of the stimulus of new acceleration data.
|
public Position getPosition()
BNO055IMU.AccelerationIntegratorgetPosition in interface BNO055IMU.AccelerationIntegratorpublic Velocity getVelocity()
BNO055IMU.AccelerationIntegratorgetVelocity in interface BNO055IMU.AccelerationIntegratorpublic Acceleration getAcceleration()
BNO055IMU.AccelerationIntegratorBNO055IMU.AccelerationIntegrator.update(Acceleration), if any.getAcceleration in interface BNO055IMU.AccelerationIntegratorpublic void initialize(BNO055IMU.Parameters parameters, Position initialPosition, Velocity initialVelocity)
BNO055IMU.AccelerationIntegratorinitialize in interface BNO055IMU.AccelerationIntegratorparameters - configuration parameters for the IMUinitialPosition - If non-null, the current sensor position is set to this value. If
null, the current sensor position is unchanged.initialVelocity - If non-null, the current sensor velocity is set to this value. If
null, the current sensor velocity is unchanged.BNO055IMU.AccelerationIntegrator.update(Acceleration)public void update(Acceleration linearAcceleration)
BNO055IMU.AccelerationIntegratorupdate in interface BNO055IMU.AccelerationIntegratorlinearAcceleration - the acceleration as just reported by the IMU