11using SimpleKiteControllers
22using Test
33
4- @testset " SimpleKiteControllers.jl" begin
4+ @testset verbose = true " SimpleKiteControllers.jl" begin
55 @testset " test_linearize" begin
66 # set the parameters of the parking controller
77 pcs = ParkingControllerSettings (dt= 0.05 )
@@ -25,52 +25,37 @@ using Test
2525 @test ndi_gain ≈ 4.166666666666667
2626 end
2727
28+ @testset " test_calc_steering" begin
29+ # set the parameters of the parking controller
30+ pcs = ParkingControllerSettings (dt= 0.05 )
31+ pcs. kp_tr= 1.05
32+ pcs. ki_tr= 0.012
33+ # create the parking controller
34+ pc = ParkingController (pcs)
35+ # set the heading
36+ heading = deg2rad (1.0 )
37+ elevation = deg2rad (70.0 )
38+ chi_set = deg2rad (34.0 )
39+ u_s, ndi_gain, psi_dot, psi_dot_set = calc_steering (pc, heading, chi_set; elevation)
40+ @test u_s ≈ 18.135061759003584
41+ @test ndi_gain ≈ 2.0833333333333335
42+ @test psi_dot ≈ 0.3490658503988659
43+ @test psi_dot_set ≈ 8.639379797371932
44+ end
2845
29- # function test_calc_steering()
30- # @testset "test_calc_steering" begin
31- # # set the parameters of the parking controller
32- # pcs = ParkingControllerSettings(dt=0.05)
33- # pcs.kp_tr=1.05
34- # pcs.ki_tr=0.012
35- # # create the parking controller
36- # pc = ParkingController(pcs)
37- # # set the heading
38- # heading = deg2rad(1.0)
39- # elevation = deg2rad(70.0)
40- # chi_set = deg2rad(34.0)
41- # u_s, ndi_gain, psi_dot, psi_dot_set = calc_steering(pc, heading, chi_set; elevation)
42- # @test u_s ≈ 18.135061759003584
43- # @test ndi_gain ≈ 2.0833333333333335
44- # @test psi_dot ≈ 0.3490658503988659
45- # @test psi_dot_set ≈ 8.639379797371932
46- # end
47- # nothing
48- # end
49-
50- # function test_navigate()
51- # @testset "test_navigate" begin
52- # # set the parameters of the parking controller
53- # pcs = ParkingControllerSettings(dt=0.05)
54- # pcs.kp=1.05
55- # pcs.ki=0.012
56- # # create the parking controller
57- # pc = ParkingController(pcs)
58- # # set the azimuth
59- # azimuth = deg2rad(90.0)
60- # # set the elevation
61- # elevation = deg2rad(70.0)
62- # chi_set = navigate(pc, azimuth, elevation)
63- # @test chi_set ≈ -deg2rad(34.019878734151234)
64- # end
65- # nothing
66- # end
46+ @testset " test_navigate" begin
47+ # set the parameters of the parking controller
48+ pcs = ParkingControllerSettings (dt= 0.05 )
49+ pcs. kp= 1.05
50+ pcs. ki= 0.012
51+ # create the parking controller
52+ pc = ParkingController (pcs)
53+ # set the azimuth
54+ azimuth = deg2rad (90.0 )
55+ # set the elevation
56+ elevation = deg2rad (70.0 )
57+ chi_set = navigate (pc, azimuth, elevation)
58+ @test chi_set ≈ - deg2rad (34.019878734151234 )
59+ end
6760
68- # function test_parking_controller()
69- # @testset verbose=true "test_parking_controller" begin
70- # test_calc_steering()
71- # test_linearize()
72- # test_navigate()
73- # end
74- # nothing
75- # end
7661end
0 commit comments