Skip to content

Commit 4bdf1ab

Browse files
authored
Add kite_distances (#87)
* Add kite_distances * Add set.kite_distance (setter and getter) --------- Co-authored-by: Uwe Fechner <u.fechner-1@tudelft.nl>
1 parent 0f2a79d commit 4bdf1ab

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

data/settings.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ initial:
1919
heading_rates: [0.0] # initial heading rate [deg/s]
2020
# three values are only needed for RamAirKite, for KPS3 and KPS4 use only the first value
2121
l_tethers: [50.0, 0.0, 0.0] # initial tether lengths [m]
22+
kite_distances: [51.0, 0.0, 0.0] # initial kite distances [m]
2223
v_reel_outs: [0.0, 0.0, 0.0] # initial reel out speeds [m/s]
2324
depowers: [25.0] # initial depower settings [%]
2425
steerings: [0.0] # initial steering settings [%]

src/settings.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ $(TYPEDFIELDS)
7171
heading_rates::Vector{Float64} = [0]
7272
"initial tether lengths [m]"
7373
l_tethers::Vector{Float64} = [0]
74+
"initial kite distances [m]"
75+
kite_distances::Vector{Float64} = [0]
7476
"initial reel out speeds [m/s]"
7577
v_reel_outs::Vector{Float64} = [0]
7678
"initial depower settings [%]"
@@ -302,6 +304,8 @@ end
302304
function Base.getproperty(set::Settings, sym::Symbol)
303305
if sym == :l_tether
304306
(getproperty(set, :l_tethers))[1]
307+
elseif sym == :kite_distance
308+
(getproperty(set, :kite_distances))[1]
305309
elseif sym == :v_reel_out
306310
(getproperty(set, :v_reel_outs))[1]
307311
elseif sym == :elevation
@@ -327,6 +331,8 @@ end
327331
function Base.setproperty!(set::Settings, sym::Symbol, val)
328332
if sym == :l_tether
329333
(getproperty(set, :l_tethers))[1] = val
334+
elseif sym == :kite_distance
335+
(getproperty(set, :kite_distances))[1] = val
330336
elseif sym == :v_reel_out
331337
(getproperty(set, :v_reel_outs))[1] = val
332338
elseif sym == :elevation

test/runtests.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ cd("..")
1616
@test se().azimuth_rate == 0.0
1717
set = deepcopy(se())
1818
@test set.l_tether == 50.0
19+
@test set.kite_distance == 51.0
1920
set.l_tether = 51.0
2021
@test set.l_tether == 51
22+
set.kite_distance = 52.0
23+
@test set.kite_distance == 52.0
2124
@test set.v_reel_out == 0.0
2225
set.v_reel_out = 1.0
2326
@test set.v_reel_out == 1.0

0 commit comments

Comments
 (0)