mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 07:31:36 +08:00
combine sensor_gps + vehicle_gps_position msgs (keeping separate topics)
This commit is contained in:
@@ -213,7 +213,7 @@ bool Geofence::checkAll(double lat, double lon, float altitude)
|
||||
}
|
||||
}
|
||||
|
||||
bool Geofence::check(const vehicle_global_position_s &global_position, const vehicle_gps_position_s &gps_position)
|
||||
bool Geofence::check(const vehicle_global_position_s &global_position, const sensor_gps_s &gps_position)
|
||||
{
|
||||
if (_param_gf_altmode.get() == Geofence::GF_ALT_MODE_WGS84) {
|
||||
if (getSource() == Geofence::GF_SOURCE_GLOBALPOS) {
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
#include <uORB/Subscription.hpp>
|
||||
#include <uORB/topics/home_position.h>
|
||||
#include <uORB/topics/vehicle_global_position.h>
|
||||
#include <uORB/topics/vehicle_gps_position.h>
|
||||
#include <uORB/topics/sensor_gps.h>
|
||||
#include <uORB/topics/vehicle_air_data.h>
|
||||
|
||||
#define GEOFENCE_FILENAME PX4_STORAGEDIR"/etc/geofence.txt"
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
*
|
||||
* @return true: system is obeying fence, false: system is violating fence
|
||||
*/
|
||||
bool check(const vehicle_global_position_s &global_position, const vehicle_gps_position_s &gps_position);
|
||||
bool check(const vehicle_global_position_s &global_position, const sensor_gps_s &gps_position);
|
||||
|
||||
/**
|
||||
* Return whether a mission item obeys the geofence.
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
#include <uORB/topics/vehicle_command.h>
|
||||
#include <uORB/topics/vehicle_command_ack.h>
|
||||
#include <uORB/topics/vehicle_global_position.h>
|
||||
#include <uORB/topics/vehicle_gps_position.h>
|
||||
#include <uORB/topics/sensor_gps.h>
|
||||
#include <uORB/topics/vehicle_land_detected.h>
|
||||
#include <uORB/topics/vehicle_local_position.h>
|
||||
#include <uORB/topics/vehicle_status.h>
|
||||
@@ -356,7 +356,7 @@ private:
|
||||
home_position_s _home_pos{}; /**< home position for RTL */
|
||||
mission_result_s _mission_result{};
|
||||
vehicle_global_position_s _global_pos{}; /**< global vehicle position */
|
||||
vehicle_gps_position_s _gps_pos{}; /**< gps position */
|
||||
sensor_gps_s _gps_pos{}; /**< gps position */
|
||||
vehicle_land_detected_s _land_detected{}; /**< vehicle land_detected */
|
||||
vehicle_local_position_s _local_pos{}; /**< local vehicle position */
|
||||
vehicle_status_s _vstatus{}; /**< vehicle status */
|
||||
|
||||
Reference in New Issue
Block a user