public class GyroRate extends Sensor implements IGyroRate
Constructor and Description |
---|
GyroRate(GyroRate source)
Copy constructor
|
GyroRate(java.lang.String name,
java.lang.String perceptorName)
Instantiates a new GyroRate sensor and initializes all values to their
default
|
Modifier and Type | Method and Description |
---|---|
ISensor |
copy() |
boolean |
equals(java.lang.Object o) |
org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
getGyro()
Retrieve gyro values
where <x, y, z> is a vector containing the angle-change around the corresponding axis of the previous cycle in degrees per second |
org.apache.commons.math3.geometry.euclidean.threed.Rotation |
getOrientationChange()
Retrieve the current change in orientation
|
void |
setGyro(org.apache.commons.math3.geometry.euclidean.threed.Vector3D gyro)
Set 3-dimensional gyro values
|
void |
updateFromPerception(IPerception perception)
Updates this Gyro from perception
|
getName, getPerceptorName, hashCode, toString, updateNoPerception, updateSensors
getName, updateNoPerception, updateSensors
public GyroRate(java.lang.String name, java.lang.String perceptorName)
name
- sensor namepublic GyroRate(GyroRate source)
source
- the object to copy frompublic org.apache.commons.math3.geometry.euclidean.threed.Vector3D getGyro()
IGyroRate
public void setGyro(org.apache.commons.math3.geometry.euclidean.threed.Vector3D gyro)
gyro
- Gyro valuespublic org.apache.commons.math3.geometry.euclidean.threed.Rotation getOrientationChange()
IGyroRate
getOrientationChange
in interface IGyroRate
public void updateFromPerception(IPerception perception)
updateFromPerception
in interface ISensor
updateFromPerception
in class Sensor
perception
- the result from server message parsing