/// set_wp_destination waypoint using location class /// returns false if conversion from location to vector from ekf origin cannot be calculated bool AC_WPNav::set_wp_destination(const Location_Class& destination) { bool terr_alt; Vector3f dest_neu; // convert destination location to vector if (!get_vector_NEU(destination, dest_neu, terr_alt)) { return false; } // set target as vector from EKF origin return set_wp_destination(dest_neu, terr_alt); }
/// set waypoint destination using NED position vector from ekf origin in meters bool AC_WPNav::set_wp_destination_NED(const Vector3f& destination_NED) { // convert NED to NEU and do not use terrain following return set_wp_destination(Vector3f(destination_NED.x * 100.0f, destination_NED.y * 100.0f, -destination_NED.z * 100.0f), false); }