Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Attention: The newest changes should be on top -->

### Added

- ENH: `StochasticFreeFormFins`, so free-form fin sets can be used in Monte Carlo simulations. The outline is randomized as a block, since a shape is only meaningful as a complete set of points: every coordinate is perturbed by its own draw, the fin root is held on the body line, and a list of candidate outlines can have a different number of points in each. [#953](https://github.com/RocketPy-Team/RocketPy/issues/953)
- ENH: Support for Open Meteo API in the `Environment` class, adding the `open_meteo` and `open_meteo_ensemble` atmospheric models. Pressure-level forecasts, past forecasts (from 2021 onwards) and ensembles are read straight from a keyless JSON API, with no external files and no netCDF/OPeNDAP dependency. [#520](https://github.com/RocketPy-Team/RocketPy/issues/520) [#1119](https://github.com/RocketPy-Team/RocketPy/pull/1119)
- ENH: Add simplified opening shock force estimation [#1092](https://github.com/RocketPy-Team/RocketPy/pull/1092)
- ENH: Add Qodo PR-Agent workflow using Google Gemini [#1089](https://github.com/RocketPy-Team/RocketPy/pull/1089)
Expand All @@ -47,9 +48,11 @@ Attention: The newest changes should be on top -->

### Fixed

- BUG: Pick between the candidate values of a list input with the stochastic model's own seeded generator. `random.choice` was used, which draws from the interpreter-wide stream that `_set_stochastic` does not reseed, so a fixed seed did not reproduce the values chosen from a list, and Monte Carlo workers forked from one process walked a single shared stream instead of sampling independently. Fixed-seed baselines that vary a list input change. [#953](https://github.com/RocketPy-Team/RocketPy/issues/953)
- BUG: Report the atmospheric model time period and ensemble member count for lower-case model types. `set_atmospheric_model` documents `type` as case-insensitive, but `Environment.info()` and `all_info()` compared against capitalised literals, so `type="ensemble"` printed no time period and no member count, and skipped the ensemble comparison plot. [#520](https://github.com/RocketPy-Team/RocketPy/issues/520)
- BUG: Give each `CustomSampler` input its own deterministic stream, and seed samplers sharing one generator once as a group. Existing fixed-seed `CustomSampler` baselines change, and samplers built on the legacy `RandomState` must move to `default_rng` because seeds now carry the full 128 bits. [#1102](https://github.com/RocketPy-Team/RocketPy/pull/1102)
- BUG: Accept the callable parachute triggers `StochasticParachute` documents, and reject the ones it cannot mean. An invalid string, an empty list or a boolean now fails during validation instead of reaching `Parachute` or becoming a one-metre height trigger. [#1103](https://github.com/RocketPy-Team/RocketPy/pull/1103)
- BUG: Accept a deterministic aerodynamic surface in `StochasticRocket.add_nose`, `add_trapezoidal_fins`, `add_elliptical_fins` and `add_tail`. Each wrapped the surface with a `component=` keyword none of the stochastic classes accept, so passing anything other than an already-stochastic surface raised a `TypeError`. [#953](https://github.com/RocketPy-Team/RocketPy/issues/953)
- BUG: rocket with a late-starting thrust curve never leaves the rail [#1085](https://github.com/RocketPy-Team/RocketPy/pull/1085)

## [v1.13.0] - 2026-07-21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ input parameters, enabling robust Monte Carlo simulations.
stochastic_nose_cone
stochastic_trapezoidal_fins
stochastic_elliptical_fins
stochastic_free_form_fins
stochastic_tail
stochastic_rail_buttons
stochastic_rocket
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Stochastic Free Form Fins
-------------------------

.. autoclass:: rocketpy.stochastic.StochasticFreeFormFins
:members:
37 changes: 37 additions & 0 deletions docs/user/stochastic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,43 @@ passed in a few different ways:
gives you the full control of how the samples are generated. See
:ref:`custom_sampler` for more details.

.. note::
The formats above assume each argument holds a single number. The
``shape_points`` of :class:`rocketpy.stochastic.StochasticFreeFormFins` is
the exception: a fin outline is only meaningful as a complete set of points,
so the deviation given applies to the outline as a block, with every
coordinate of every point perturbed by its own draw. The fin root is held on
the body line, so a point nominally at ``y = 0`` keeps that value and no
point ends up inside the airframe.

Because the deviation has to centre on the nominal coordinate, only the
distributions that read their first argument as that centre can be used here:
*"normal"*, *"gumbel"*, *"laplace"* and *"logistic"*. The others take bounds
(*"uniform"*) or shape parameters (*"wald"*, *"gamma"*, ...), which a set of
coordinates cannot be, and are rejected when the object is created.

A list means either one fixed outline, used as given, or a list of candidate
outlines to choose between, which do not have to have the same number of
points::

# One millimetre of deviation on every coordinate
StochasticFreeFormFins(free_form_fins=fins, shape_points=0.001)

# One fixed outline, not randomized
StochasticFreeFormFins(
free_form_fins=fins,
shape_points=[(0, 0), (0.08, 0.1), (0.12, 0)],
)

# Choose between two outlines
StochasticFreeFormFins(
free_form_fins=fins,
shape_points=[[(0, 0), (0.08, 0.1), (0.12, 0)], [(0, 0), (0.06, 0.12), (0.12, 0)]],
)

A ``CustomSampler`` given for this argument has to yield a whole outline per
sample, since what it returns replaces the outline instead of perturbing it.

.. note::
In statistics, the terms "Normal" and "Gaussian" refer to the same type of \
distribution. This distribution is commonly used and is the default for the \
Expand Down
1 change: 1 addition & 0 deletions rocketpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
StochasticEllipticalFins,
StochasticEnvironment,
StochasticFlight,
StochasticFreeFormFins,
StochasticNoseCone,
StochasticParachute,
StochasticRocket,
Expand Down
1 change: 1 addition & 0 deletions rocketpy/stochastic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from .stochastic_aero_surfaces import (
StochasticAirBrakes,
StochasticEllipticalFins,
StochasticFreeFormFins,
StochasticNoseCone,
StochasticRailButtons,
StochasticTail,
Expand Down
Loading
Loading