Firmware
|
Public Types | |
enum | { GF_ALT_MODE_WGS84 = 0, GF_ALT_MODE_AMSL = 1 } |
enum | { GF_SOURCE_GLOBALPOS = 0, GF_SOURCE_GPS = 1 } |
Public Member Functions | |
Geofence (Navigator *navigator) | |
Geofence (const Geofence &)=delete | |
Geofence & | operator= (const Geofence &)=delete |
void | updateFence () |
update the geofence from dataman. More... | |
bool | check (const vehicle_global_position_s &global_position, const vehicle_gps_position_s &gps_position, const home_position_s home_pos, bool home_position_set) |
Return whether the system obeys the geofence. More... | |
bool | check (const struct mission_item_s &mission_item) |
Return whether a mission item obeys the geofence. More... | |
int | clearDm () |
bool | valid () |
int | loadFromFile (const char *filename) |
Load a single inclusion polygon, replacing any already existing polygons. More... | |
bool | isEmpty () |
int | getAltitudeMode () |
int | getSource () |
int | getGeofenceAction () |
bool | isHomeRequired () |
void | printStatus () |
print Geofence status to the console | |
![]() | |
ModuleParams (ModuleParams *parent) | |
void | setParent (ModuleParams *parent) |
Sets the parent module. More... | |
ModuleParams (const ModuleParams &)=delete | |
ModuleParams & | operator= (const ModuleParams &)=delete |
ModuleParams (ModuleParams &&)=delete | |
ModuleParams & | operator= (ModuleParams &&)=delete |
![]() | |
void | setSibling (ModuleParams * sibling) |
const ModuleParams * | getSibling () const |
Additional Inherited Members | |
![]() | |
virtual void | updateParams () |
Call this method whenever the module gets a parameter change notification. More... | |
virtual void | updateParamsImpl () |
The implementation for this is generated with the macro DEFINE_PARAMETERS() | |
![]() | |
ModuleParams * | _sibling |
bool Geofence::check | ( | const vehicle_global_position_s & | global_position, |
const vehicle_gps_position_s & | gps_position, | ||
const home_position_s | home_pos, | ||
bool | home_position_set | ||
) |
Return whether the system obeys the geofence.
bool Geofence::check | ( | const struct mission_item_s & | mission_item | ) |
Return whether a mission item obeys the geofence.
int Geofence::loadFromFile | ( | const char * | filename | ) |
Load a single inclusion polygon, replacing any already existing polygons.
The file has one of the following formats:
Where the first line is min, max altitude in meters AMSL.
void Geofence::updateFence | ( | ) |
update the geofence from dataman.
It's generally not necessary to call this as it will automatically update when the data is changed.