Path: blob/master/libraries/AP_GPS/AP_GPS_ExternalAHRS.h
9740 views
/*1This program is free software: you can redistribute it and/or modify2it under the terms of the GNU General Public License as published by3the Free Software Foundation, either version 3 of the License, or4(at your option) any later version.56This program is distributed in the hope that it will be useful,7but WITHOUT ANY WARRANTY; without even the implied warranty of8MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the9GNU General Public License for more details.1011You should have received a copy of the GNU General Public License12along with this program. If not, see <http://www.gnu.org/licenses/>.13*/1415//16// ExternalAHRS GPS driver which accepts gps position data from an external AHRS unit17//18#pragma once1920#include <AP_Common/AP_Common.h>21#include <AP_HAL/AP_HAL_Boards.h>2223#include "AP_GPS.h"24#include "GPS_Backend.h"2526#if AP_EXTERNAL_AHRS_ENABLED2728class AP_GPS_ExternalAHRS : public AP_GPS_Backend29{30public:3132using AP_GPS_Backend::AP_GPS_Backend;3334bool read() override;35void handle_external(const AP_ExternalAHRS::gps_data_message_t &pkt) override;3637const char *name() const override { return "ExternalAHRS"; }3839bool get_lag(float &lag_sec) const override;4041private:42bool new_data;43};4445#endif // AP_EXTERNAL_AHRS_ENABLED46474849