fixed typo

This commit is contained in:
scorpio1 2022-07-22 15:20:13 -04:00
parent aecfd6e0c3
commit 0a473195ff
1 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ def get_forward_acceleration(y, velocity):
#is less (or if we are close to the finish) #is less (or if we are close to the finish)
forward_velocity=np.dot(velocity,unit_vector) forward_velocity=np.dot(velocity,unit_vector)
forward_acceleration = 2*(9.5-forward_velocity) forward_acceleration = 2*(9.5-forward_velocity)
forward_acceleration_2 = -1*(b2*forward_velocity+k2*(y-300))/m forward_acceleration_2 = -1*(b2*forward_velocity+k2*(y-100))/m
return min(forward_acceleration, forward_acceleration_2)*unit_vector return min(forward_acceleration, forward_acceleration_2)*unit_vector
def guidance_law(): def guidance_law():
@ -77,7 +77,7 @@ def guidance_law():
#we add 2 to the vertical acceleration because otherwise it sometimes #we add 2 to the vertical acceleration because otherwise it sometimes
#just falls #just falls
accelerations.vector.z=accel[2]+2 accelerations.vector.z=accel[2]+2
return to_publish return accelerations
def accel_publisher(): def accel_publisher():