MCPcopy Create free account
hub / github.com/amov-lab/Prometheus / check_failsafe

Function check_failsafe

Modules/control/src/px4_pos_controller.cpp:443–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

441}
442
443int check_failsafe()
444{
445 if (_DroneState.position[0] < geo_fence_x[0] || _DroneState.position[0] > geo_fence_x[1] ||
446 _DroneState.position[1] < geo_fence_y[0] || _DroneState.position[1] > geo_fence_y[1] ||
447 _DroneState.position[2] < geo_fence_z[0] || _DroneState.position[2] > geo_fence_z[1])
448 {
449 pub_message(message_pub, prometheus_msgs::Message::ERROR, NODE_NAME, "Out of the geo fence, the drone is landing...");
450 return 1;
451 }
452 else{
453 return 0;
454 }
455}
456
457
458//【Body_to_ENU】 机体系移动。

Callers 1

mainFunction · 0.70

Calls 1

pub_messageFunction · 0.85

Tested by

no test coverage detected