Skip to content

Commit

Permalink
fix display of 1p kite
Browse files Browse the repository at this point in the history
  • Loading branch information
ufechner7 committed Nov 2, 2024
1 parent c0abac8 commit 8b79770
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,13 @@ function update_system(kv::AKV, state::SysState; scale=1.0, kite_scale=1.0, ned=
quat[] = Quaternionf(q0[2], q0[3], q0[4], q0[1]) # the constructor expects the order x,y,z,w
kite_pos[] = 0.8 * 0.5 * (kv.points[s*3+4] + kv.points[s*3+5]) + 0.2 * kv.points[s*3+3]
else
if ned
q0 = quat2viewer(state.orient) # SVector in the order w,x,y,z
else
q0 = state.orient # SVector in the order w,x,y,z
end
# move and turn the kite to the new position
q0 = state.orient # SVector in the order w,x,y,z
# SVector in the order w,x,y,z
quat[] = Quaternionf(q0[2], q0[3], q0[4], q0[1]) # the constructor expects the order x,y,z,w
kite_pos[] = Point3f(state.X[kv.set.segments+1], state.Y[kv.set.segments+1], state.Z[kv.set.segments+1]) * scale
end
Expand Down

0 comments on commit 8b79770

Please sign in to comment.