Erkam
February 28, 2023, 5:13am
1
@JulianOes Could you help me about this topic? Does Telemetry::Imu of MAVSDK take accelerometer values from vehicle_acceleration() or If not which UORB function does it use?
This comes from the MAVLink message HIGHRES_IMU :
void TelemetryImpl::process_imu_reading_ned(const mavlink_message_t& message)
{
mavlink_highres_imu_t highres_imu;
mavlink_msg_highres_imu_decode(&message, &highres_imu);
Telemetry::Imu new_imu;
new_imu.acceleration_frd.forward_m_s2 = highres_imu.xacc;
new_imu.acceleration_frd.right_m_s2 = highres_imu.yacc;
new_imu.acceleration_frd.down_m_s2 = highres_imu.zacc;
new_imu.angular_velocity_frd.forward_rad_s = highres_imu.xgyro;
new_imu.angular_velocity_frd.right_rad_s = highres_imu.ygyro;
new_imu.angular_velocity_frd.down_rad_s = highres_imu.zgyro;
new_imu.magnetic_field_frd.forward_gauss = highres_imu.xmag;
new_imu.magnetic_field_frd.right_gauss = highres_imu.ymag;
new_imu.magnetic_field_frd.down_gauss = highres_imu.zmag;
new_imu.temperature_degc = highres_imu.temperature;
new_imu.timestamp_us = highres_imu.time_usec;
set_imu_reading_ned(new_imu);
std::lock_guard<std::mutex> lock(_subscription_mutex);
This file has been truncated. show original
And that’s sent here:
/****************************************************************************
*
* Copyright (c) 2021 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
This file has been truncated. show original
And it’s using the data from the primary/used IMU, see:
Erkam
March 7, 2023, 10:08am
3
Thanks for replying to the message.