Skip to content

Commit c46c9a0

Browse files
committed
Fix warnings
1 parent ddf8337 commit c46c9a0

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/KiteUtils.jl

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -282,15 +282,16 @@ function demo_state_4p(P, height=6.0, time=0.014; azimuth_north=-pi/2)
282282
ss.Z .= Z
283283
pos_centre = 0.5 * (pos_C + pos_D)
284284
delta = pos_B - pos_centre
285-
z = -normalize(delta)
286-
y = normalize(pos_C - pos_D)
287-
x = y × z
288-
pos_kite_ = pod_pos
289-
pos_before = pos_kite_ + z
290-
291-
rotation = rot(pos_kite_, pos_before, -x)
292-
q = QuatRotation(rotation)
293-
ss.orient .= MVector{4, Float32}(Rotations.params(q))
285+
let z = -normalize(delta),
286+
y = normalize(pos_C - pos_D)
287+
x = y × z
288+
pos_kite_ = pod_pos
289+
pos_before = pos_kite_ + z
290+
291+
rotation = rot(pos_kite_, pos_before, -x)
292+
q = QuatRotation(rotation)
293+
ss.orient .= MVector{4, Float32}(Rotations.params(q))
294+
end
294295
ss.elevation = calc_elevation([X[end], 0.0, Z[end]])
295296
ss.v_wind_gnd = [10.4855, 0, -3.08324]
296297
ss.v_wind_200m = [10.4855, 0, -3.08324]

0 commit comments

Comments
 (0)