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: README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -123,7 +123,7 @@ To learn more about RocketPy's requirements, visit our [Requirements Docs](https
123
123
124
124
## Running Your First Simulation
125
125
126
-
In order to run your first rocket trajectory simulation using RocketPy, you can start a Jupyter Notebook and navigate to the `docs/notebooks` folder. Open `getting_started.ipynb` and you are ready to go.
126
+
In order to run your first rocket trajectory simulation using RocketPy, you can start a Jupyter Notebook and navigate to the `docs/notebooks` folder. Open `getting_started.ipynb` and you are ready to go. We recommend you reading the [First Simulation](https://docs.rocketpy.org/en/latest/user/first_simulation.html) page to get a complete description.
127
127
128
128
Otherwise, you may want to create your own script or your own notebook using RocketPy. To do this, let's see how to use RocketPy's four main classes:
Or get the array of the speed of the entire flight, in the form
339
-
of ``[[time, speed], ...]``:
358
+
Also important to check the surface wind conditions at launch site and the
359
+
conditions of the launch rail:
340
360
341
361
.. jupyter-execute::
342
362
343
-
test_flight.speed.source
363
+
test_flight.prints.surface_wind_conditions()
364
+
365
+
.. jupyter-execute::
366
+
367
+
test_flight.prints.launch_rail_conditions()
368
+
369
+
Once we have checked the initial conditions, we can check the conditions at the
370
+
out of rail state, which is the first important moment of the flight. After this
371
+
point, the rocket will start to fly freely:
372
+
373
+
.. jupyter-execute::
374
+
375
+
test_flight.prints.out_of_rail_conditions()
376
+
377
+
378
+
Next, we can check at the burn out time, which is the moment when the motor
379
+
stops burning. From this point on, the rocket will fly without any thrust:
380
+
381
+
.. jupyter-execute::
382
+
383
+
test_flight.prints.burn_out_conditions()
384
+
385
+
We can also check the apogee conditions, which is the moment when the rocket
386
+
reaches its maximum altitude. The apogee will be displayed in both
387
+
"Above Sea Level (ASL)" and "Above Ground Level (AGL)" formats.
388
+
389
+
.. jupyter-execute::
390
+
391
+
test_flight.prints.apogee_conditions()
392
+
393
+
To check for the ejection of any parachutes, we can use the following method:
394
+
395
+
.. jupyter-execute::
396
+
397
+
test_flight.prints.events_registered()
398
+
399
+
To understand the conditions at the end of the simulation, especially upon
400
+
impact, we can use:
401
+
402
+
.. jupyter-execute::
403
+
404
+
test_flight.prints.impact_conditions()
405
+
406
+
Finally, the ``prints.maximum_values()`` provides a summary of the maximum
407
+
values recorded during the flight for various parameters.
408
+
409
+
.. jupyter-execute::
410
+
411
+
test_flight.prints.maximum_values()
412
+
413
+
414
+
Plotting the Results
415
+
--------------------
416
+
417
+
.. note::
418
+
419
+
All the methods that are used in this section can be accessed at once by
420
+
running ``test_flight.all_info()``. The output will be equivalent to
421
+
running block by block the following methods.
422
+
423
+
Using the ``test_flight.plots`` module, we can access multiple results of the
424
+
simulation. For example, we can plot the rocket's trajectory. Moreover, we can
425
+
get plots of multiple data:
426
+
427
+
Full trajectory
428
+
^^^^^^^^^^^^^^^^^^^^^^^^
429
+
430
+
.. jupyter-execute::
431
+
432
+
test_flight.plots.trajectory_3d()
433
+
434
+
435
+
Velocity and acceleration
436
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
437
+
438
+
The velocity and acceleration in 3 directions can be accessed using the
439
+
following method. The reference frame used for these plots is the absolute
440
+
reference frame, which is the reference frame of the launch site.
441
+
The acceleration might have a hard drop when the motor stops burning.
442
+
443
+
.. jupyter-execute::
444
+
445
+
test_flight.plots.linear_kinematics_data()
446
+
447
+
448
+
Angular Positions
449
+
^^^^^^^^^^^^^^^^^^^^^^^^^^
450
+
451
+
Here you can plot 3 different parameters of the rocket's angular position:
452
+
453
+
1. ``Flight Path Angle``: The angle between the rocket's velocity vector and the horizontal plane. This angle is 90° when the rocket is going straight up and 0° when the rocket is turned horizontally.
454
+
2. ``Attitude Angle``: The angle between the axis of the rocket and the horizontal plane.
455
+
3. ``Lateral Attitude Angle``: The angle between the rockets axis and the vertical plane that contains the launch rail. The bigger this angle, the larger is the deviation from the original heading of the rocket.
456
+
457
+
.. jupyter-execute::
458
+
459
+
test_flight.plots.flight_path_angle_data()
460
+
461
+
.. tip::
462
+
463
+
The ``Flight Path Angle`` and the ``Attitude Angle`` should be close to each
464
+
other as long as the rocket is stable.
465
+
466
+
Rocket's Orientation or Attitude
467
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
468
+
469
+
Rocket's orientation in RocketPy is done through Euler Parameters or Quaternions.
470
+
Additionally, RocketPy uses the quaternions to calculate the Euler Angles
471
+
(Precession, nutation and spin) and their changes. All these information can be
472
+
accessed through the following method:
473
+
474
+
.. jupyter-execute::
475
+
476
+
test_flight.plots.attitude_data()
344
477
345
478
.. seealso::
479
+
Further information about Euler Parameters, or Quaternions, can be found
480
+
in `Quaternions <https://en.wikipedia.org/wiki/Quaternion>`_, while
481
+
further information about Euler Angles can be found in
Or get the array of the speed of the entire flight, in the form
585
+
of ``[[time, speed], ...]``:
586
+
587
+
.. jupyter-execute::
588
+
589
+
test_flight.speed.source
590
+
591
+
.. seealso::
592
+
593
+
The ``Flight`` object has several attributes containing every result of the
594
+
simulation. To see all the attributes of the ``Flight`` object, see
595
+
:class:`rocketpy.Flight`. These attributes are usually instances of the
596
+
:class:`rocketpy.Function` class, see the :ref:`Function Class Usage <functionusage>` for more information.
597
+
367
598
Exporting Flight Data
368
599
---------------------
369
600
370
-
In this section, we will explore how to export specific data from your RocketPy simulations to CSV files. This is particularly useful if you want to insert the data into spreadsheets or other software for further analysis.
601
+
In this section, we will explore how to export specific data from your RocketPy
602
+
simulations to CSV files. This is particularly useful if you want to insert the
603
+
data into spreadsheets or other software for further analysis.
371
604
372
605
The main method that is used to export data is the :meth:`rocketpy.Flight.export_data` method. This method exports selected flight attributes to a CSV file. In this first example, we will export the rocket angle of attack (see :meth:`rocketpy.Flight.angle_of_attack`) and the rocket mach number (see :meth:`rocketpy.Flight.mach_number`) to the file ``calisto_flight_data.csv``.
0 commit comments