merge vehicle_angular_acceleration into vehicle_angular_velocity (#20531)

- vehicle_angular_velocity and vehicle_angular_acceleration are produced together from the same input data, consumed together, and share the the same metadata (timestamps)
 - individually these topics each have 16 bytes of metadata (2 timestamps) for 12 bytes of data (x,y,z float32)
This commit is contained in:
Daniel Agar
2022-11-14 11:03:59 -05:00
committed by GitHub
parent 7d1f1d0f84
commit 9e7db0ed54
13 changed files with 13 additions and 50 deletions
@@ -136,6 +136,7 @@ AngularVelocityController::Run()
_last_run = now;
const Vector3f angular_velocity{vehicle_angular_velocity.xyz};
_angular_acceleration = Vector3f(vehicle_angular_velocity.xyz_derivative);
/* check for updates in other topics */
_vehicle_status_sub.update(&_vehicle_status);
@@ -164,13 +165,6 @@ AngularVelocityController::Run()
}
}
// check angular acceleration topic
vehicle_angular_acceleration_s vehicle_angular_acceleration;
if (_vehicle_angular_acceleration_sub.update(&vehicle_angular_acceleration)) {
_angular_acceleration = Vector3f(vehicle_angular_acceleration.xyz);
}
// check rates setpoint topic
vehicle_rates_setpoint_s vehicle_rates_setpoint;