IMU

AirGen contains support for Inertial Measurement Units (IMUs). Data captured from the IMU can be used to calculate the orientation of the vehicle. This is done using a combination of the accelerometer, gyroscope and magnetometer data.

The IMU data can be accessed using the getImuData method. This method returns an ImuData object which contains raw angular velocities and linear accelerations, as well as the orientation of the vehicle.

client = airgen.MultirotorClient()
imu_data = client.getImuData()

<ImuData>
{   'angular_velocity': <Vector3r> {   'x_val': 0.0007983481627888978,
    'y_val': 0.000933181494474411,
    'z_val': -0.0007887388928793371},
    'linear_acceleration': <Vector3r> {   'x_val': -0.11297493427991867,
    'y_val': 0.11055465042591095,
    'z_val': -9.841029167175293},
    'orientation': <Quaternionr> {   'w_val': -4.371138828673793e-08,
    'x_val': -0.0,
    'y_val': 0.0,
    'z_val': 1.0},
    'time_stamp': 1721340023239938816}