Skip to content

Commit 793e5f6

Browse files
FIX documentation issues (#886)
1 parent 3cf266b commit 793e5f6

File tree

6 files changed

+40
-30
lines changed

6 files changed

+40
-30
lines changed

docs/user/environment/1-atm-models/standard_atmosphere.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ Other profiles can be derived from it, however, winds are automatically set to
2222

2323
env.plots.atmospheric_model()
2424

25-
.. skip one line with |
26-
|
25+
|
2726
2827
The International Standard Atmosphere can also be reset at any time by using the
2928
:meth:`rocketpy.Environment.set_atmospheric_model` method. For example:

docs/user/first_simulation.rst

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ regarding the launch site:
9090

9191
| This roughly corresponds to the location of Spaceport America, New Mexico.
9292
93+
9394
Next, we need to specify the atmospheric model to be used. In this example,
9495
we will get GFS forecasts data from tomorrow.
9596

@@ -110,6 +111,7 @@ of tomorrow:
110111

111112
| Now we set the atmospheric model to be used:
112113
114+
113115
.. jupyter-execute::
114116

115117
env.set_atmospheric_model(type="Forecast", file="GFS")
@@ -189,6 +191,7 @@ to specify several parameters:
189191

190192
| We can see its characteristics by calling the info method:
191193
194+
192195
.. jupyter-execute::
193196

194197
Pro75M1670.info()
@@ -637,8 +640,9 @@ and the rocket Mach number (see :meth:`rocketpy.Flight.mach_number`) to the file
637640
)
638641

639642
| As you can see, the first argument is the file name to be created. The following
640-
arguments are the attributes to be exported. We can check the file by reading it
641-
with :func:`pandas.read_csv`:
643+
arguments are the attributes to be exported. We can check the file by reading it
644+
with :func:`pandas.read_csv`:
645+
642646

643647
.. jupyter-execute::
644648

@@ -647,8 +651,9 @@ with :func:`pandas.read_csv`:
647651
pd.read_csv("calisto_flight_data.csv")
648652

649653
| The file header specifies the meaning of each column. The time samples are
650-
obtained from the simulation solver steps. To export the data at a different
651-
sampling rate, use the ``time_step`` argument:
654+
obtained from the simulation solver steps. To export the data at a different
655+
sampling rate, use the ``time_step`` argument:
656+
652657

653658
.. jupyter-execute::
654659

docs/user/three_dof_simulation.rst

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ The environment setup is identical to standard simulations:
6767
elevation=1400
6868
)
6969

70-
env.set_atmospheric_model(type="StandardAtmosphere")
70+
env.set_atmospheric_model(type="standard_atmosphere")
7171

7272
Step 2: Create a PointMassMotor
7373
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -123,7 +123,7 @@ Or use a custom thrust function:
123123
.. seealso::
124124

125125
For detailed information about :class:`rocketpy.PointMassMotor` parameters,
126-
see the :ref:`API reference <api_reference>`.
126+
see the :class:`rocketpy.PointMassMotor` class documentation.
127127

128128
Step 3: Create a PointMassRocket
129129
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -279,6 +279,14 @@ Export trajectory data to CSV:
279279
"vz",
280280
)
281281

282+
283+
.. jupyter-execute::
284+
:hide-code:
285+
286+
import os
287+
os.remove("trajectory_3dof.csv")
288+
289+
282290
Complete Example
283291
----------------
284292

@@ -294,7 +302,7 @@ Here's a complete 3-DOF simulation from start to finish:
294302
longitude=-8.2889,
295303
elevation=100
296304
)
297-
env.set_atmospheric_model(type="StandardAtmosphere")
305+
env.set_atmospheric_model(type="standard_atmosphere")
298306

299307
# 2. Motor
300308
motor = PointMassMotor(
@@ -412,7 +420,6 @@ See Also
412420
- :ref:`First Simulation <firstsimulation>` - Standard 6-DOF simulation tutorial
413421
- :ref:`Rocket Class Usage <rocketusage>` - Full rocket modeling capabilities
414422
- :ref:`Flight Class Usage <flightusage>` - Complete flight simulation options
415-
- :doc:`../examples/3_dof_trial_sim` - Jupyter notebook example
416423

417424
Further Reading
418425
---------------

rocketpy/rocket/parachute.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,27 @@ class Parachute:
2525
system. It can be one of the following:
2626
2727
- A callable function that takes three arguments:
28-
1. Freestream pressure in pascals.
29-
2. Height in meters above ground level.
30-
3. The state vector of the simulation, which is defined as:
28+
1. Freestream pressure in pascals.
29+
2. Height in meters above ground level.
30+
3. The state vector of the simulation, which is defined as:
3131
32-
`[x, y, z, vx, vy, vz, e0, e1, e2, e3, wx, wy, wz]`.
32+
`[x, y, z, vx, vy, vz, e0, e1, e2, e3, wx, wy, wz]`.
3333
34-
4. A list of sensors that are attached to the rocket. The most recent
35-
measurements of the sensors are provided with the
36-
``sensor.measurement`` attribute. The sensors are listed in the same
37-
order as they are added to the rocket.
34+
4. A list of sensors that are attached to the rocket. The most recent
35+
measurements of the sensors are provided with the
36+
``sensor.measurement`` attribute. The sensors are listed in the same
37+
order as they are added to the rocket.
3838
39-
The function should return ``True`` if the parachute ejection system
40-
should be triggered and False otherwise. The function will be called
41-
according to the specified sampling rate.
39+
The function should return ``True`` if the parachute ejection system
40+
should be triggered and False otherwise. The function will be called
41+
according to the specified sampling rate.
4242
4343
- A float value, representing an absolute height in meters. In this
44-
case, the parachute will be ejected when the rocket reaches this height
45-
above ground level.
44+
case, the parachute will be ejected when the rocket reaches this height
45+
above ground level.
4646
4747
- The string "apogee" which triggers the parachute at apogee, i.e.,
48-
when the rocket reaches its highest point and starts descending.
48+
when the rocket reaches its highest point and starts descending.
4949
5050
5151
Parachute.triggerfunc : function

rocketpy/rocket/rocket.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1667,12 +1667,11 @@ def add_air_brakes(
16671667
6. `interactive_objects` (list): A list containing the objects that
16681668
the controller function can interact with. The objects are
16691669
listed in the same order as they are provided in the
1670-
`interactive_objects`
1670+
`interactive_objects` argument.
16711671
7. `sensors` (list): A list of sensors that are attached to the
1672-
rocket. The most recent measurements of the sensors are provided
1673-
with the ``sensor.measurement`` attribute. The sensors are
1674-
listed in the same order as they are added to the rocket
1675-
``interactive_objects``
1672+
rocket. The most recent measurements of the sensors are provided
1673+
with the ``sensor.measurement`` attribute. The sensors are
1674+
listed in the same order as they are added to the rocket.
16761675
16771676
This function will be called during the simulation at the specified
16781677
sampling rate. The function should evaluate and change the observed

rocketpy/tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,7 @@ def find_obj_from_hash(obj, hash_, depth_limit=None):
13121312
Returns
13131313
-------
13141314
object
1315-
The object whose '__rpy_hash' matches hash_, or None if not found.
1315+
The object whose '__rpy_hash' matches ``hash_``, or None if not found.
13161316
"""
13171317

13181318
stack = [(obj, 0)]

0 commit comments

Comments
 (0)