Skip to content

Commit

Permalink
Merge pull request #542 from suavecode/fix-eas
Browse files Browse the repository at this point in the history
fix eas bug
  • Loading branch information
planes committed Dec 10, 2021
2 parents 669b9c7 + 539c3b9 commit 36a559b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion regression/scripts/segments/segment_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def main():
single_pt_CL_1_truth = 0.251138262389197
single_pt_CL_2_truth = 0.25113968108269286
loiter_CL_truth = 0.5114262749651366
descent_throttle_3_truth = 0.18428433607314795
descent_throttle_3_truth = 0.17797156049307095

# Store errors
error = Data()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ def initialize_conditions(segment):
# discretize on altitude
alt = t_nondim * (altf-alt0) + alt0

# Pack altitude before updating atmosphere
conditions.freestream.altitude[:,0] = alt[:,0] # positive altitude in this context

# determine airspeed from equivalent airspeed
SUAVE.Methods.Missions.Segments.Common.Aerodynamics.update_atmosphere(segment) # get density for airspeed
density = conditions.freestream.density[:,0]
Expand All @@ -73,4 +76,3 @@ def initialize_conditions(segment):
conditions.frames.inertial.velocity_vector[:,0] = v_x
conditions.frames.inertial.velocity_vector[:,2] = v_z
conditions.frames.inertial.position_vector[:,2] = -alt[:,0] # z points down
conditions.freestream.altitude[:,0] = alt[:,0] # positive altitude in this context

0 comments on commit 36a559b

Please sign in to comment.