Virtual Robot Racing League

Developer Center

VRRL
IAccelerometerSensor Interface Reference

A sensor to detect acceleration and force More...

Inheritance diagram for IAccelerometerSensor:
IRobotSensor

Public Member Functions

void GetAcceleration (int numFrames, out double x, out double y, out double z)
 Gets the acceleration that has occurred over the last X frames, relative to the robot's orientation More...
 
void GetAngularVelocity (out double x, out double y, out double z)
 Gets the angular velocity of the robot in degrees per second, relative to the robot's orientation More...
 
void GetGravity (out double x, out double y, out double z)
 Gets the direction and magnitude of detected gravity, relative to the robot's orientation More...
 

Additional Inherited Members

- Properties inherited from IRobotSensor
IRobotExplorer Robot [get]
 The robot this sensor is attached to More...
 
int SensorIndex [get]
 The index of this sensor in the robot's list of sensors More...
 

Detailed Description

A sensor to detect acceleration and force

Member Function Documentation

◆ GetAcceleration()

void IAccelerometerSensor.GetAcceleration ( int  numFrames,
out double  x,
out double  y,
out double  z 
)

Gets the acceleration that has occurred over the last X frames, relative to the robot's orientation

Parameters
numFramesThe number of frames to get acceleration for (from 1 to 10)
xThe local acceleration from left (-) to right (+)
yThe local acceleration from down (-) to up (+)
zThe local acceleration from back (-) to forward (+)

◆ GetAngularVelocity()

void IAccelerometerSensor.GetAngularVelocity ( out double  x,
out double  y,
out double  z 
)

Gets the angular velocity of the robot in degrees per second, relative to the robot's orientation

Parameters
xThe pitch velocity from nose down (-) to nose up (+) in degrees per second
yThe yaw velocity from nose left (-) to nose right (+) in degrees per second
zThe roll velocity from counter-clockwise (-) to clockwise (+) in degrees per second

◆ GetGravity()

void IAccelerometerSensor.GetGravity ( out double  x,
out double  y,
out double  z 
)

Gets the direction and magnitude of detected gravity, relative to the robot's orientation

Parameters
xThe local gravity vector from left (-) to right (+)
yThe local gravity vector from down (-) to up (+)
zThe local gravity vector from back (-) to forward (+)