Skip to content

Commit

Permalink
fix logging of height
Browse files Browse the repository at this point in the history
  • Loading branch information
ufechner7 committed Nov 14, 2024
1 parent 6734ac8 commit 7dda549
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/autopilot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function simulate(integrator, stopped=true)
#
t_sim = @elapsed KiteModels.next_step!(app.kps4, integrator; set_speed=v_ro, dt=app.dt)
sys_state.orient .= calc_orient_quat(app.kps4)
update_sys_state!(sys_state, app.kps4)
sys_state=SysState(app.kps4)
acc = (app.kps4.vel_kite - last_vel)/app.dt
last_vel = deepcopy(app.kps4.vel_kite)

Expand Down Expand Up @@ -283,6 +283,7 @@ function simulate(integrator, stopped=true)
end

function play(stopped=false)
global flight_log
while isopen(app.viewer.fig.scene)
if ! app.initialized
init(app)
Expand All @@ -300,6 +301,7 @@ function play(stopped=false)
if app.set.log_level > 0
println("Saving log... $(app.logger.index)")
end
flight_log = KiteUtils.sys_log(app.logger)
save_log(app.logger, basename(DEFAULT_LOG); path=dirname(DEFAULT_LOG))
end
if @isdefined __PRECOMPILE__
Expand Down

0 comments on commit 7dda549

Please sign in to comment.