Skip to content

Commit

Permalink
use ControlPlots
Browse files Browse the repository at this point in the history
  • Loading branch information
ufechner7 committed Mar 29, 2024
1 parent e71d2c4 commit d5c4b00
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/test_flightpathcontroller1.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# activate the test environment if needed
using Pkg
if ! ("Plots" keys(Pkg.project().dependencies))
if ! ("ControlPlots" keys(Pkg.project().dependencies))
using TestEnv; TestEnv.activate()
end
using KiteControllers, Timers; tic()
using KiteControllers, Timers, ControlPlots; tic()

fcs = FPCSettings()
fcs.dt = 0.02
Expand All @@ -13,7 +13,6 @@ TIME = range(0.0, DURATION, SAMPLES)

# Test the flight path controller against the simplified kite model as shown
# in diagram docs/flight_path_controller_test1.png .
using KiteControllers, PyPlot, BenchmarkTools
fpc = FlightPathController(fcs)
kite = KiteModel(fcs)
kite.omega = 0.08
Expand All @@ -40,10 +39,11 @@ for i in 1:SAMPLES
on_timer(kite)
end

include("plot.jl")

plotx(TIME, PSI, BETA, PSI_DOT;
labels=["heading angle psi [°]","elevation β [°]", "psi_dot [rad/s]"],
p=plotx(TIME, PSI, BETA, PSI_DOT;
ylabels=["heading angle psi [°]","elevation β [°]", "psi_dot [rad/s]"],
fig = "test_fpc1")
display(p)
plt.pause(0.01)
plt.show(block=false)

# return TIME, PSI, BETA, PHI, PSI_DOT

0 comments on commit d5c4b00

Please sign in to comment.