Skip to content

Commit

Permalink
reverted usage of params, setting flight path angle as an input
Browse files Browse the repository at this point in the history
  • Loading branch information
crecine committed May 17, 2024
1 parent c95b98a commit a779afc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 4 additions & 3 deletions aviary/mission/gasp_based/ode/flight_path_ode.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ def setup(self):
Dynamic.Mission.ALTITUDE: {'units': 'ft'},
Dynamic.Mission.DISTANCE: {'units': 'ft'},
}
if kwargs['method'] == 'cruise':
SGM_required_inputs[Dynamic.Mission.FLIGHT_PATH_ANGLE] = {
'val': 0, 'units': 'deg'}
add_SGM_required_inputs(self, SGM_required_inputs)
sgm_inputs = ['SGM_required_inputs']

Expand All @@ -91,14 +94,12 @@ def setup(self):
core_subsystems = self.options['core_subsystems']

# TODO: paramport
from copy import deepcopy
flight_path_params = deepcopy(ParamPort)()
flight_path_params = ParamPort()
if analysis_scheme is AnalysisScheme.SHOOTING and kwargs['method'] == 'cruise':
flight_path_params.add_params({
Aircraft.Design.OPERATING_MASS: dict(units='lbm', val=0),
Aircraft.CrewPayload.PASSENGER_PAYLOAD_MASS: dict(units='lbm', val=0),
Mission.Design.RESERVE_FUEL: dict(units='lbm', val=0),
Dynamic.Mission.FLIGHT_PATH_ANGLE: dict(units='deg', val=0),
})
self.add_subsystem("params", flight_path_params, promotes=["*"])

Expand Down
1 change: 0 additions & 1 deletion aviary/mission/gasp_based/phases/time_integration_traj.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ def compute(self, inputs, outputs):
vals_to_set = self.options['Phases'][phase_name]['user_options']
if vals_to_set:
for name, data in vals_to_set.items():
print(data)
var, units = data
if name.startswith('attr:'):
new_val = (
Expand Down

0 comments on commit a779afc

Please sign in to comment.