Skip to content

Commit 201f52a

Browse files
committed
Merge remote-tracking branch 'origin/beta/v1.0.0' into enh/new-utility-funcs
2 parents 57f3b33 + 939f2ba commit 201f52a

28 files changed

+347
-244
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ A sample code is:
185185

186186
```python
187187
Env = Environment(
188-
railLength=5.2,
189188
latitude=32.990254,
190189
longitude=-106.974998,
191190
elevation=1400,
@@ -300,7 +299,7 @@ help(Flight)
300299
To actually create a Flight object, use:
301300

302301
```python
303-
TestFlight = Flight(rocket=Calisto, environment=Env, inclination=85, heading=0)
302+
TestFlight = Flight(rocket=Calisto, environment=Env, railLength=5.2, inclination=85, heading=0)
304303
```
305304

306305
Once the Flight object is created, your simulation is done! Use the following code to get a summary of the results:

docs/development/rocketpy_as_developer.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ It contains information about the local pressure profile, temperature, speed of
9292

9393
.. code-block:: python
9494
95-
Env = Environment(railLength=5.2, latitude=32.990254, longitude=-106.974998, elevation=1400)
95+
Env = Environment(latitude=32.990254, longitude=-106.974998, elevation=1400)
9696
9797
RocketPy can use local files via the Ensemble method or meteorological forecasts through OpenDAP protocol.
9898
To work with environment files, it will be very important ensuring tha that you have the netCDF4 library installed.
@@ -243,11 +243,11 @@ Simulating the flight
243243
---------------------
244244

245245
Finally, the flight can be simulated with the provided data.
246-
The rocket and environment classes are supplied as inputs, as well as the rail inclination and heading angle.
246+
The rocket and environment classes are supplied as inputs, as well as the rail length, inclination and heading angle.
247247

248248
.. code-block:: python
249249
250-
TestFlight = Flight(rocket=Calisto, environment=Env, inclination=85, heading=0)
250+
TestFlight = Flight(rocket=Calisto, environment=Env, railLength=5.2, inclination=85, heading=0)
251251
252252
Flight data can be retrieved through:
253253

docs/matlab/Getting_Started.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@
3737
%% Setting Up a Simulation
3838
% Creating an Environment for Spaceport America
3939

40-
% rocketpy.Environment(railLength, latitude, longitude, elevation);
40+
% rocketpy.Environment(latitude, longitude, elevation);
4141
Env = rocketpy.Environment(pyargs(...
42-
'railLength', 5.2, ...
4342
'latitude', 32.990254, ...
4443
'longitude',-106.974998, ...
4544
'elevation', 1400 ...
@@ -217,6 +216,7 @@
217216
TestFlight = rocketpy.Flight(pyargs(...
218217
'rocket', Calisto, ...
219218
'environment',Env, ...
219+
'railLength', 5.2, ...
220220
'inclination', 85, ...
221221
'heading', 0 ...
222222
));

docs/notebooks/compare_flights_usage.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"outputs": [],
7070
"source": [
7171
"after_tomorrow = datetime.now() + timedelta(days=2)\n",
72-
"env = Environment(railLength=5, latitude=-23, longitude=-49, date=after_tomorrow)\n",
72+
"env = Environment(latitude=-23, longitude=-49, date=after_tomorrow)\n",
7373
"env.setAtmosphericModel(type=\"Forecast\", file=\"GFS\")\n",
7474
"\n",
7575
"Pro75M1670 = SolidMotor(\n",
@@ -182,6 +182,7 @@
182182
" flight = Flight(\n",
183183
" environment=env,\n",
184184
" rocket=Calisto,\n",
185+
" railLength=5\n",
185186
" inclination=inclination,\n",
186187
" heading=heading,\n",
187188
" name=f\"Incl {inclination} Head {heading}\",\n",

docs/notebooks/deployable_payload_example.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
"outputs": [],
113113
"source": [
114114
"Env = Environment(\n",
115-
" railLength=5.2, latitude=32.990254, longitude=-106.974998, elevation=1400\n",
115+
" latitude=32.990254, longitude=-106.974998, elevation=1400\n",
116116
")"
117117
]
118118
},
@@ -4719,7 +4719,7 @@
47194719
"outputs": [],
47204720
"source": [
47214721
"RocketFlight1 = Flight(\n",
4722-
" rocket=Rocket1, environment=Env, inclination=85, heading=25, terminateOnApogee=True, name=\"RocketFlight1\"\n",
4722+
" rocket=Rocket1, environment=Env, railLength=5.2, inclination=85, heading=25, terminateOnApogee=True, name=\"RocketFlight1\"\n",
47234723
")"
47244724
]
47254725
},
@@ -4873,6 +4873,7 @@
48734873
"RocketFlight2 = Flight(\n",
48744874
" rocket=Rocket2,\n",
48754875
" environment=Env,\n",
4876+
" railLength=5.2,\n",
48764877
" inclination=0,\n",
48774878
" heading=0,\n",
48784879
" maxTime=600,\n",
@@ -4977,6 +4978,7 @@
49774978
"PayloadFlight = Flight(\n",
49784979
" rocket=PayloadRocket,\n",
49794980
" environment=Env,\n",
4981+
" railLength=5.2,\n",
49804982
" inclination=0,\n",
49814983
" heading=0,\n",
49824984
" maxTime=600,\n",

docs/notebooks/dispersion_analysis/dispersion_analysis.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@
414414
"\n",
415415
"# Define basic Environment object\n",
416416
"Env = Environment(\n",
417-
" railLength=5.7, date=(2019, 8, 10, 21), latitude=-23.363611, longitude=-48.011389\n",
417+
" date=(2019, 8, 10, 21), latitude=-23.363611, longitude=-48.011389\n",
418418
")\n",
419419
"Env.setElevation(668)\n",
420420
"Env.maxExpectedHeight = 1500\n",
@@ -440,7 +440,6 @@
440440
"\n",
441441
" # Update environment object\n",
442442
" Env.selectEnsembleMember(setting[\"ensembleMember\"])\n",
443-
" Env.railLength = setting[\"railLength\"]\n",
444443
"\n",
445444
" # Create motor\n",
446445
" Keron = SolidMotor(\n",
@@ -508,6 +507,7 @@
508507
" TestFlight = Flight(\n",
509508
" rocket=Valetudo,\n",
510509
" environment=Env,\n",
510+
" railLength=setting[\"railLength\"],\n",
511511
" inclination=setting[\"inclination\"],\n",
512512
" heading=setting[\"heading\"],\n",
513513
" maxTime=600,\n",

docs/notebooks/dispersion_analysis/parachute_drop_from_helicopter.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@
406406
"\n",
407407
"# Define basic Environment object\n",
408408
"Env = Environment(\n",
409-
" railLength=5.7, date=(2019, 8, 10, 21), latitude=-23.363611, longitude=-48.011389\n",
409+
" date=(2019, 8, 10, 21), latitude=-23.363611, longitude=-48.011389\n",
410410
")\n",
411411
"Env.setElevation(668)\n",
412412
"Env.maxExpectedHeight = 1500\n",
@@ -432,7 +432,6 @@
432432
"\n",
433433
" # Update environment object\n",
434434
" Env.selectEnsembleMember(setting[\"ensembleMember\"])\n",
435-
" Env.railLength = setting[\"railLength\"]\n",
436435
"\n",
437436
" # Create motor\n",
438437
" Keron = SolidMotor(\n",
@@ -501,6 +500,7 @@
501500
" TestFlight = Flight(\n",
502501
" rocket=Valetudo,\n",
503502
" environment=Env,\n",
503+
" railLength=setting[\"railLength\"],\n",
504504
" inclination=setting[\"inclination\"],\n",
505505
" heading=setting[\"heading\"],\n",
506506
" maxTime=600,\n",

docs/notebooks/environment_analysis_EuroC_example.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64512,7 +64512,7 @@
6451264512
"name": "python",
6451364513
"nbconvert_exporter": "python",
6451464514
"pygments_lexer": "ipython3",
64515-
"version": "3.10.9"
64515+
"version": "3.10.5"
6451664516
},
6451764517
"vscode": {
6451864518
"interpreter": {

docs/notebooks/environment_analysis_class_usage.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28296,7 +28296,7 @@
2829628296
"name": "python",
2829728297
"nbconvert_exporter": "python",
2829828298
"pygments_lexer": "ipython3",
28299-
"version": "3.10.9"
28299+
"version": "3.10.5"
2830028300
},
2830128301
"vscode": {
2830228302
"interpreter": {

0 commit comments

Comments
 (0)