Inertial Sensor
Add-On Required: This feature requires the Simulink Coder Support Package for VEX EDR V5 Robot Brain add-on.
Libraries:
Simulink Coder Support Package for VEX EDR V5 Robot Brain /
Sensors
Description
The Inertial Sensor block reads data from the Inertial sensor that is connected to the VEX® V5 Brain.
By default, the block outputs yaw, pitch, and roll (as Euler angles following the
3-2-1 convention). The block also outputs the quaternion, angular rate, and
acceleration. The block returns the angular rate and acceleration as 3-by-1 double
vector in x-y-z
order and quaternion is returned as 4-by-1
double.
The VEX V5 inertial sensor auto-detects and adjusts for the mounting position. This allows the sensor to output the same orientation (Euler angles) even when the sensor is mounted upside down. For more information, see Using the V5 Inertial Sensor.
The sensor takes about 2 seconds for calibration when you start a program. Ensure that the inertial sensor is kept steady on a level surface while starting the program.
Note
When the sensor is placed on a level surface and if the pitch or roll angles show errors (of more than 1 degree), then you might need to calibrate the accelerometer.
Ports
Output
Parameters
Extended Capabilities
Version History
Introduced in R2021a