Skip to content

Commit 9198ac7

Browse files
committed
DOC: phrasing improvements of Environment docstring.
1 parent 31fb869 commit 9198ac7

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

rocketpy/environment/environment.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -276,15 +276,21 @@ def __init__(
276276
timezone="UTC",
277277
max_expected_height=80000.0,
278278
):
279-
"""Initialize Environment class, saving launch rail length,
280-
launch date, location coordinates and elevation. Note that
281-
by default the standard atmosphere is loaded until another
279+
"""Initialize Environment class, saving parameters of the launch location,
280+
such as launch date, coordinates and elevation. This class also computes
281+
relevant quantities for the Flight simulation, such as air pressure, density
282+
and gravitational acceleration.
283+
284+
Note that the default atmospheric model is the International Standard Atmosphere
285+
as defined by ISO 2533 unless specified otherwise in
286+
:meth:`Environment.set_atmospheric_model`.
282287
283288
Parameters
284289
----------
285290
gravity : int, float, callable, string, array, optional
286291
Surface gravitational acceleration. Positive values point the
287-
acceleration down. If None, the Somigliana formula is used to
292+
acceleration down. If None, the Somigliana formula is used.
293+
See :meth:`Environment.set_gravity_model` for more information.
288294
date : array, optional
289295
Array of length 4, stating (year, month, day, hour (UTC))
290296
of rocket launch. Must be given if a Forecast, Reanalysis
@@ -468,8 +474,8 @@ def set_gravity_model(self, gravity):
468474
----------
469475
gravity : None or Function source
470476
If None, the Somigliana formula is used to compute the gravity
471-
acceleration. Otherwise, the user can provide a Function object
472-
representing the gravity model.
477+
acceleration. Otherwise, the user can provide a Function source
478+
object representing the gravity model.
473479
474480
Returns
475481
-------
@@ -514,6 +520,10 @@ def somigliana_gravity(self, height):
514520
-------
515521
Function
516522
Function object representing the gravity model.
523+
524+
References
525+
----------
526+
.. [1] https://en.wikipedia.org/wiki/Theoretical_gravity#Somigliana_equation
517527
"""
518528
a = 6378137.0 # semi_major_axis
519529
f = 1 / 298.257223563 # flattening_factor

0 commit comments

Comments
 (0)