From d5c4b00c76fa6ea652fa9705718fdb578e521f72 Mon Sep 17 00:00:00 2001 From: Uwe Fechner Date: Fri, 29 Mar 2024 13:21:07 +0100 Subject: [PATCH] use ControlPlots --- test/test_flightpathcontroller1.jl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/test_flightpathcontroller1.jl b/test/test_flightpathcontroller1.jl index 87962fc..128e47b 100644 --- a/test/test_flightpathcontroller1.jl +++ b/test/test_flightpathcontroller1.jl @@ -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 @@ -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 @@ -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 \ No newline at end of file