Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ufechner7 committed Mar 29, 2024
1 parent 4245970 commit f415fff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/autopilot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ include("plots.jl")
include("stats.jl")

function print_stats()
log = load_log(PARTICLES, basename(KiteViewers.plot_file[]))
log = load_log(basename(KiteViewers.plot_file[]))
sl = log.syslog
elev_ro = deepcopy(sl.elevation)
az_ro = deepcopy(sl.azimuth)
Expand Down
12 changes: 6 additions & 6 deletions examples/plots.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function plot_timing()
log = load_log(PARTICLES, basename(KiteViewers.plot_file[]))
log = load_log(basename(KiteViewers.plot_file[]))
sl = log.syslog
display(ControlPlots.plotx(sl.time, sl.t_sim, 100*sl.steering, 100*sl.depower;
ylabels=["t_sim [ms]", "steering [%]","depower [%]"],
Expand All @@ -14,7 +14,7 @@ function plot_timing()
end

function plot_main()
log = load_log(PARTICLES, basename(KiteViewers.plot_file[]))
log = load_log(basename(KiteViewers.plot_file[]))
sl = log.syslog
display(plotx(log.syslog.time, log.z, rad2deg.(sl.elevation), rad2deg.(sl.azimuth), sl.l_tether, sl.force, sl.v_reelout;
ylabels=["height [m]", "elevation [°]", "azimuth [°]", "length [m]", "force [N]", "v_ro [m/s]"],
Expand All @@ -25,7 +25,7 @@ function plot_main()
end

function plot_power()
log = load_log(PARTICLES, basename(KiteViewers.plot_file[]))
log = load_log(basename(KiteViewers.plot_file[]))
sl = log.syslog
energy = similar(sl.v_reelout)
en=0.0
Expand All @@ -46,7 +46,7 @@ function plot_control()
# elevation, azimuth
# depower, steering
# state
log = load_log(PARTICLES, basename(KiteViewers.plot_file[]))
log = load_log(basename(KiteViewers.plot_file[]))
sl = log.syslog
display(plotx(log.syslog.time, rad2deg.(sl.elevation), rad2deg.(sl.azimuth), 100*sl.depower, 100*sl.steering, sl.sys_state;
ylabels=["elevation [°]", "azimuth [°]", "depower [%]", "steering [%]", "fpp_state"],
Expand All @@ -57,7 +57,7 @@ function plot_control()
end

function plot_elev_az()
log = load_log(PARTICLES, basename(KiteViewers.plot_file[]))
log = load_log(basename(KiteViewers.plot_file[]))
sl = log.syslog
display(plotxy(rad2deg.(sl.azimuth), rad2deg.(sl.elevation);
ylabel="elevation [°]",
Expand All @@ -69,7 +69,7 @@ function plot_elev_az()
end

function plot_side_view()
log = load_log(PARTICLES, basename(KiteViewers.plot_file[]))
log = load_log(basename(KiteViewers.plot_file[]))
display(plotxy(log.x, log.z;
ylabel="pos_x [m]",
xlabel="height [m]",
Expand Down

0 comments on commit f415fff

Please sign in to comment.