Skip to content

Commit

Permalink
add plot_power
Browse files Browse the repository at this point in the history
  • Loading branch information
Uwe Fechner committed Mar 26, 2024
1 parent 536a899 commit 07febee
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions examples/autopilot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,16 @@ function plot_main()
nothing
end

function plot_power()
log = load_log(PARTICLES, basename(KiteViewers.plot_file[]))
sl = log.syslog
display(plotx(log.syslog.time, sl.force, sl.v_reelout, sl.force.*sl.v_reelout;
ylabels=["force [N]", L"v_\mathrm{ro}~[m/s]", L"P_\mathrm{m}~[W]"]))
plt.pause(0.01)
plt.show(block=false)
nothing
end

on(viewer.btn_OK.clicks) do c
if viewer.menu.i_selected[] == 1
plot_main()
Expand Down

0 comments on commit 07febee

Please sign in to comment.