Technology sharing

ArduPilot fons apertum codicem AP_VisualOdom_MAV

2024-07-08

한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina

1. Origin

Permanere studere"ArduPilot fons aperta fuga imperium AP_VisualOdom"de "AP_VisualOdom_MAVApparatu classis.

Seorsum"AP_VisualOdom_Backend of ArduPilot open source code"Praeter methodos et notitias communes abstractas, ulterius inspiciamus exsecutionem functionis per differentias technicas.

2. Classis definitio

Hoc C codice definit genus AP_VisualOdom_MAV, quod hereditat a AP_VisualOdom_Backend

class AP_VisualOdom_MAV : public AP_VisualOdom_Backend
{
public:
    // 构造函数,使用从AP_VisualOdom_Backend继承的构造函数
    using AP_VisualOdom_Backend::AP_VisualOdom_Backend;

    // 处理姿态估计数据,将其发送给EKF。距离单位为米
    // Parameters:
    // - remote_time_us: Remote timestamp in microseconds
    // - time_ms: Local timestamp in milliseconds
    // - x, y, z: Position coordinates in meters
    // - attitude: Quaternion representing attitude (orientation)
    // - posErr: Position error
    // - angErr: Angular error
    // - reset_counter: Counter for reset events
    // - quality: Quality of pose estimate (-1 for failed, 0 for unknown, 1 to 100 for varying levels of quality)
    void handle_pose_estimate(uint64_t remote_time_us, uint32_t time_ms, float x, float y, float z, const Quaternion