Skip to content

Commit 0be12d5

Browse files
committed
Fix test
1 parent 63588e3 commit 0be12d5

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

src/kite_geometry.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,12 +304,9 @@ function calc_inertia_y_rotation(I_b_tensor)
304304
0 1 0;
305305
-sin(theta_opt) 0 cos(theta_opt)
306306
]
307-
@show theta_opt
308307
# Calculate diagonalized inertia tensor
309308
I_diag = R_b_p * I_b_tensor * R_b_p'
310-
@show I_diag
311309
@assert isapprox(I_diag[1,3], 0.0, atol=1e-5)
312-
@show R_b_p
313310
return I_diag, R_b_p
314311
end
315312

@@ -509,7 +506,7 @@ function RamAirWing(obj_path, dat_path; alpha=0.0, crease_frac=0.75, wind_vel=10
509506
mass, gamma_tip, inertia_tensor, center_of_mass, radius,
510507
le_interp, te_interp, area_interp, zeros(n_panels), zeros(n_panels))
511508

512-
catch
509+
catch e
513510
if e isa BoundsError
514511
@error "Delete $info_path and $polar_path and try again."
515512
end

test/test_kite_geometry.jl

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -130,19 +130,9 @@ using Serialization
130130
center_of_mass = center_to_com!(vertices, faces)
131131
inertia_tensor = calculate_inertia_tensor(vertices, faces, 1.0, zeros(3))
132132

133-
serialize(info_path, (
134-
inertia_tensor,
135-
center_of_mass,
136-
z_center,
137-
r,
138-
π/4,
139-
le_interp,
140-
te_interp,
141-
area_interp
142-
))
143-
144-
@show [le_interp[i](0.0) for i in 1:3]
145-
@show [te_interp[i](0.0) for i in 1:3]
133+
serialize(info_path, (inertia_tensor, center_of_mass, r, π/4,
134+
le_interp, te_interp, area_interp))
135+
146136
# Test interpolation at middle point
147137
@test isapprox([le_interp[i](0.0) for i in 1:3], [0.0, 0.0, r+z_center], atol=0.03)
148138
@test isapprox([te_interp[i](0.0) for i in 1:3], [1.0, 0.0, r+z_center], atol=0.03)

0 commit comments

Comments
 (0)