You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/development/rocketpy_as_developer.rst
+12-12
Original file line number
Diff line number
Diff line change
@@ -16,13 +16,13 @@ Go into the cloned repository folder by typing on a terminal
16
16
Open your preference editor by typing on a terminal
17
17
18
18
.. code-block:: console
19
-
19
+
20
20
<editor name> .
21
21
22
22
For example, to open VS Code type on terminal
23
23
24
24
.. code-block:: console
25
-
25
+
26
26
code .
27
27
28
28
Alternatively, you can open the folder directly through your editor's interface.
@@ -45,7 +45,7 @@ To create the folder, type on the terminal:
45
45
And, to add it on .gitignore, type:
46
46
47
47
.. code-block:: console
48
-
48
+
49
49
echo <folder name>/ >> .gitignore
50
50
51
51
It is important to remember that all the files inside this folder will not be included in any commit so, if it is important to the solution, do not add them inside it.
@@ -57,7 +57,7 @@ Importing the RocketPy files
57
57
----------------------------
58
58
59
59
First, create a python (or .ipynb) file to make the simulation.
60
-
To ensure you are using the local files and not the files as a python package (if you installed the library via pip for example), add
60
+
To ensure you are using the local files and not the files as a python package (if you installed the library via pip for example), add
61
61
62
62
.. code-block:: python
63
63
@@ -66,15 +66,15 @@ To ensure you are using the local files and not the files as a python package (i
66
66
Alternatively you can use the following command to pip install the local library:
67
67
68
68
.. code-block:: console
69
-
69
+
70
70
import sys
71
71
sys.path.append('../') # if you are using a notebook
72
72
sys.path.append('../rocketpy') # if you are using a script
73
73
74
74
Import the classes that will be used, in case:
75
75
76
76
.. code-block:: python
77
-
77
+
78
78
from rocketpy import Environment, SolidMotor, Rocket, Flight, Function
79
79
80
80
If it is the first time you are using rocketpy and you do not have all required libraries installed, you could use the command:
@@ -99,7 +99,7 @@ It contains information about the local pressure profile, temperature, speed of
RocketPy can use local files via the Ensemble method or meteorological forecasts through OpenDAP protocol.
102
+
RocketPy can use local files via the Ensemble method or meteorological forecasts through OpenDAP protocol.
103
103
To work with environment files, it will be very important ensuring tha that you have the netCDF4 library installed.
104
104
Assuming we are using forecast, first we set the simulated data with:
105
105
@@ -122,14 +122,14 @@ Weather forecast data can be visualized through two info methods.
122
122
Creating the motor that boosts the rocket
123
123
-----------------------------------------
124
124
125
-
Now we need to create the motor.
125
+
Now we need to create the motor.
126
126
For example, we will use a solid motor called Pro75M1670, but other configurations are also possible.
127
127
The motor class contains information about the thrust curve and uses some geometric parameters to calculate the mass variation over time, as well as the total thrust and other important outputs.
128
128
129
129
.. code-block:: python
130
130
131
131
Pro75M1670 = SolidMotor(
132
-
thrust_source="../data/motors/Cesaroni_M1670.eng", #copy here the path to the thrust source file
132
+
thrust_source="../data/motors/cesaroni/Cesaroni_M1670.eng", #copy here the path to the thrust source file
133
133
burn_time=3.9,
134
134
grain_number=5,
135
135
grain_separation=5/1000,
@@ -160,8 +160,8 @@ The first step is to initialize the class with the vital data:
0 commit comments