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.AccelerationIntegrator
getPosition
in interface BNO055IMU.AccelerationIntegrator
public Velocity getVelocity()
BNO055IMU.AccelerationIntegrator
getVelocity
in interface BNO055IMU.AccelerationIntegrator
public Acceleration getAcceleration()
BNO055IMU.AccelerationIntegrator
BNO055IMU.AccelerationIntegrator.update(Acceleration)
, if any.getAcceleration
in interface BNO055IMU.AccelerationIntegrator
public void initialize(BNO055IMU.Parameters parameters, Position initialPosition, Velocity initialVelocity)
BNO055IMU.AccelerationIntegrator
initialize
in interface BNO055IMU.AccelerationIntegrator
parameters
- 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.AccelerationIntegrator
update
in interface BNO055IMU.AccelerationIntegrator
linearAcceleration
- the acceleration as just reported by the IMU