Skip to content

Commit 4c34e20

Browse files
committed
Adapt data path
1 parent 84fd46d commit 4c34e20

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

examples/bridle_info.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
using KiteUtils, LinearAlgebra
22

3-
set_data_path("data")
3+
4+
if basename(pwd()) == "examples"
5+
set_data_path("../data")
6+
else
7+
set_data_path("data")
8+
end
49
set = deepcopy(se())
510

611
function create_bridle(se)

examples/calculate_rotational_inertia.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
using KiteUtils
22

3-
function calculate_inertia_for_setting(settings_file::String, include_kcu::Bool=true, around_kcu::Bool=false)
3+
if basename(pwd()) == "examples"
4+
set_data_path("../data")
5+
else
46
set_data_path("data")
7+
end
8+
9+
function calculate_inertia_for_setting(settings_file::String, include_kcu::Bool=true, around_kcu::Bool=false)
510
set = deepcopy(load_settings(settings_file))
611

712
points = KiteUtils.get_particles(set.height_k, set.h_bridle, set.width, set.m_k, [0, 0, 0], [0, 0, -1], [10, 0, 0])

examples/import_csv.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
using KiteUtils
22

3-
set_data_path("data")
3+
if basename(pwd()) == "examples"
4+
set_data_path("../data")
5+
else
6+
set_data_path("data")
7+
end
48
filename="transition"
59

610
log = import_log(filename)

0 commit comments

Comments
 (0)