NOTE: The article "Schnitzler et al., General extremal field method for time-optimal trajectory planning in flow fields, DOI 10.1109/LCSYS.2023.3284339" refers to release v1.0.0 of the source code.
This module tackles trajectory optimization problems in strong, non-uniform and unsteady flow fields, in particular wind fields.
The module performs origin-to-destination trajectory optimization (wrt. time)
by sampling extremal trajectories.
Extremal trajectories are Hamiltonian-minimizing trajectories.
The time-optimal trajectory of a problem, when it exists,
is a particular extremal trajectory.
So the set of all extremal trajectories (parametrized by a real value,
the initial angle
The module provides the following features for flow fields:
- Python code for analytic flow fields (see
dabry/flowfield.py
) - Custom numpy zip (.npz) format definition for discrete flow fields (see
docs/flow_format.md
)- Translation from GRIB2 files to the npz format
A demonstration notebook is given at examples/Gyre.ipynb
and can be
viewed using nbviewer.org.
The module supports 2D planar environment as well as spherical problems.
Clone the module using
git clone [repo-url]
After cloning the repo using the previous command, install the project as a Python module using
python3 -m pip install -e ./dabry
You can now run base examples calling dabry
as Python module:
python3 -m dabry case [case_name]
Results will be automatically saved to a new folder
with the case's name in the current working directory.
The different output files format specification can be found in docs
.
Available default problems for case_name
are listed in dabry/problems.csv
To directly run trajectory optimization on real wind fields,
you have to install the cdsapi
module.
python3 -m pip install cdsapi
Then, configure your CDS Python API key
for the cdsapi
module to be allowed to extract wind fields from the
CDS database.
After that you can run trajectory optimization on real problems using
python3 -m dabry real [lon_start] [lat_start] [lon_target] [lat_target] [date_start] [airspeed] [altitude]
Note that an automatic CLI generator for dabry
's real cases
is available on the
website.
Make sure the dependencies from requirements_display.txt
are installed.
If the previous computation put the results in the "movor (scaled)"
directory (for instance),
then the interactive display can be launched using
python -m dabry.display "movor (scaled)"
If easygui
is installed, then the command
python -m dabry.display .
launches an interactive prompt to select the example to display from current directory.