Skip to content

Commit

Permalink
Plane: terrain_navigation: correct tangent vector
Browse files Browse the repository at this point in the history
Signed-off-by: Rhys Mainwaring <[email protected]>
  • Loading branch information
srmainwaring committed Feb 24, 2024
1 parent 2a0a182 commit 0e46f35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ArduPlane/mode_terrain_navigation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void ModeTerrainNavigation::navigate()
// moving along arc of circle - loiter about wp located at
// centre of curvature.
auto center_wp = plane.next_WP_loc;
Vector3p tangent_ned(_unit_path_tangent.x, _unit_path_tangent.y, 1.0);
Vector3p tangent_ned(_unit_path_tangent.x, _unit_path_tangent.y, 0.0);
Vector3p dn_ned(0.0, 0.0, 1.0);
auto ofs_ned = dn_ned.cross(tangent_ned)
* _radius_m * plane.loiter.direction;
Expand Down

0 comments on commit 0e46f35

Please sign in to comment.