From d6f4085c39e4fcc0f4bbc594ad32947aefc50a37 Mon Sep 17 00:00:00 2001 From: scorpio1 Date: Fri, 22 Jul 2022 15:41:19 -0400 Subject: [PATCH] fixed non-horizontal flight --- src/straight_line.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/straight_line.py b/src/straight_line.py index 55020ab..2b36d70 100755 --- a/src/straight_line.py +++ b/src/straight_line.py @@ -76,7 +76,7 @@ def guidance_law(): accelerations.vector.y=accel[1] #we add 2 to the vertical acceleration because otherwise it sometimes #just falls - accelerations.vector.z=accel[2]+2 + accelerations.vector.z=accel[2] return accelerations @@ -148,10 +148,10 @@ if __name__ == '__main__': velocity = None #describe constants for acceleration k = 2 - k2 = 0.5 + k2 = 2 m=1.5 - b3 = 1*np.sqrt(m*k) - b = 0.4*np.sqrt(m*k) + b3 = 2*np.sqrt(m*k) + b = 2*np.sqrt(m*k) b2 = 2*np.sqrt(m*k2) #describe the vectors that define our direction of travel #the first vector is the direction we travel, the other two are two more