Skip to content

Commit

Permalink
correct velocity direction calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
jake-levy committed Jan 4, 2023
1 parent db3533f commit 3149406
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/utils/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function to_state_vec(feedback_state::FeedbackData)
θ_0 = atan(heading[2],heading[1])

v_0 = norm(feedback_state.linear_vel[1:2])
if abs(tan(feedback_state.linear_vel[2]/feedback_state.linear_vel[2]) -
if abs(atan(feedback_state.linear_vel[2],feedback_state.linear_vel[1]) -
θ_0) > π/2
v_0 = -v_0
end
Expand Down

0 comments on commit 3149406

Please sign in to comment.