2014-11-03 08:36:14 -04:00
|
|
|
/*
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
//
|
|
|
|
// GPS proxy driver for APM on PX4 platforms
|
|
|
|
// Code by Holger Steinhaus
|
|
|
|
//
|
2016-02-17 21:25:23 -04:00
|
|
|
#pragma once
|
2014-11-03 08:36:14 -04:00
|
|
|
|
2015-08-11 03:28:43 -03:00
|
|
|
#include <AP_HAL/AP_HAL.h>
|
2016-04-13 14:20:05 -03:00
|
|
|
|
2015-08-11 03:28:43 -03:00
|
|
|
#include "AP_GPS.h"
|
2016-04-13 14:20:05 -03:00
|
|
|
#include "GPS_Backend.h"
|
|
|
|
|
2014-11-13 23:44:15 -04:00
|
|
|
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
2014-11-03 08:36:14 -04:00
|
|
|
#include <modules/uORB/topics/vehicle_gps_position.h>
|
|
|
|
|
|
|
|
class AP_GPS_PX4 : public AP_GPS_Backend {
|
|
|
|
public:
|
|
|
|
AP_GPS_PX4(AP_GPS &_gps, AP_GPS::GPS_State &_state, AP_HAL::UARTDriver *_port);
|
2016-11-06 06:27:50 -04:00
|
|
|
~AP_GPS_PX4();
|
2014-11-03 08:36:14 -04:00
|
|
|
|
|
|
|
bool read();
|
|
|
|
|
|
|
|
private:
|
|
|
|
int _gps_sub;
|
|
|
|
struct vehicle_gps_position_s _gps_pos;
|
|
|
|
};
|
2014-11-13 23:44:15 -04:00
|
|
|
#endif // CONFIG_HAL_BOARD
|