Skip to content

Commit

Permalink
landing_target: ident correct
Browse files Browse the repository at this point in the history
  • Loading branch information
TSC21 committed Jun 6, 2019
1 parent 1544289 commit feb0dda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mavros_extras/src/plugins/landing_target.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class LandingTargetPlugin : public MavRosPlugin,

float distance = sqrt(pos.x() * pos.x() + pos.y() * pos.y() + pos.z() * pos.z());
float phi = atan(sqrt(pos.x() * pos.x() + pos.y() * pos.y()) / pos.z()); // = angle_x
float theta = atan(pos.y() / pos.x()); // = angle_y
float theta = atan(pos.y() / pos.x()); // = angle_y

float size_x_rad = target_size_x * phi; // assuming this is the arc length of the circle in XY-axis
float size_y_rad = target_size_y * theta; // assuming this is the arc length of the circle in Z-axis
Expand Down

0 comments on commit feb0dda

Please sign in to comment.