From 8b797708d102b0122ae6f694de59a8330323aa81 Mon Sep 17 00:00:00 2001 From: Uwe Fechner Date: Sat, 2 Nov 2024 18:04:19 +0100 Subject: [PATCH] fix display of 1p kite --- src/common.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/common.jl b/src/common.jl index 5ff9c3e..6685246 100644 --- a/src/common.jl +++ b/src/common.jl @@ -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