Skip to content

Commit bb1d1ad

Browse files
committed
DOC: adding docstring to get_environemnt_object
1 parent ab7fa13 commit bb1d1ad

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

rocketpy/environment/environment_analysis.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2889,6 +2889,37 @@ def save(self, filename="env_analysis_dict"):
28892889
def get_environment_object(
28902890
self, gravity=None, date=None, datum="SIRGAS2000", max_expected_height=80000.0
28912891
):
2892+
"""Creates an Environment object with the data from the Environment Analysis instance.
2893+
It uses the average values from the data.
2894+
2895+
Parameters
2896+
----------
2897+
gravity : int, float, callable, string, array, optional
2898+
Surface gravitational acceleration. Positive values point the
2899+
acceleration down. If None, the Somigliana formula is used.
2900+
See :meth:`Environment.set_gravity_model` for more information.
2901+
date : list or tuple, optional
2902+
List or tuple of length 4, stating (year, month, day, hour) in the
2903+
time zone used in the Environment Analysis instance.
2904+
Alternatively, can be a ``datetime`` object specifying launch
2905+
date and time. The dates are stored as follows:
2906+
2907+
- :attr:`Environment.local_date`: Local time of launch in
2908+
the time zone specified in the Environment Analysis instance.
2909+
2910+
- :attr:`Environment.datetime_date`: UTC time of launch.
2911+
2912+
Default is None.
2913+
See :meth:`Environment.set_date` for more information.
2914+
datum : string, optional
2915+
The desired reference ellipsoidal model, the following options are
2916+
available: "SAD69", "WGS84", "NAD83", and "SIRGAS2000". The default
2917+
is "SIRGAS2000".
2918+
max_expected_height : float, optional
2919+
Maximum altitude in meters to keep weather data. The altitude must
2920+
be above sea level (ASL). Especially useful for visualization. Can
2921+
be altered as desired by running ``max_expected_height = number``.
2922+
"""
28922923
env = Environment(
28932924
gravity,
28942925
date,

0 commit comments

Comments
 (0)