Skip to content

Commit

Permalink
Rebuild docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gecoombs committed Feb 20, 2024
1 parent a0a1a09 commit d45a399
Show file tree
Hide file tree
Showing 23 changed files with 852 additions and 388 deletions.
14 changes: 7 additions & 7 deletions docs/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ Welcome to the PolarRoute Manual Pages
======================================

PolarRoute is a tool for the optimisation of routes for maritime vehicles travelling in polar waters.
It leverages `MeshiPhi <https://github.com/antarctica/MeshiPhi>`_; a package designed to
It depends on `MeshiPhi <https://github.com/antarctica/MeshiPhi>`_; a package designed to
discretise the world from heterogeneous data sources (follow link for more details and docs).
This software package has been developed by the **British Antarctic Survey** (BAS), primarily for the
optimisation of polar routes for the BAS research vessel RRS Sir David Attenborough, though it is applicable
This software package has been developed by the **British Antarctic Survey** (BAS). It was originally designed primarily for the
optimisation of polar routes for the BAS research vessel RRS Sir David Attenborough, however it is applicable
to any vessel (e.g. AUVs). The software is written in Python and is open source.

Plotting functionality for the outputs of PolarRoute is provided by the `GeoPlot <https://github.com/antarctica/GeoPlot>`_ package, also developed at BAS.

For more information on the project, please visit the `PolarRoute website <https://www.bas.ac.uk/project/autonomous-marine-operations-planning/>`_
and follow our `GitHub repository <https://github.com/antarctica/PolarRoute>`_.

Expand All @@ -21,14 +23,12 @@ Contents:
:maxdepth: 2
:numbered:

./sections/Code_overview
./sections/Installation
./sections/ipython_notebooks
./sections/Examples
./sections/Command_line_interface
./sections/Configuration/Configuration_overview
./sections/Outputs
./sections/Code_overview
./sections/Vehicle_specifics
./sections/Route_calculation
./sections/Route_optimisation
./sections/Examples

81 changes: 61 additions & 20 deletions docs/html/_sources/sections/Command_line_interface.rst.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,37 @@
.. _cli:

###############################
Command Line Interface
###############################

The PolarRoute package provides multiple CLI entry points, intended to be used in succession to plan a route through a digital environment.

.. figure:: ./Figures/PolarRoute_CLI.png
:align: center
:width: 700
^^^^^^^^^^^
create_mesh
^^^^^^^^^^^
The *create_mesh* entry point builds a digital environment file from a collection of source data, which can then be used
by the vessel performance modeller and route planner.

::

create_mesh <config.json>

positional arguments:

::

config : A configuration file detailing how to build the digital environment. JSON parsable

The format of the required *config.json* file can be found in the `"Configuration - Mesh Construction" <https://antarctica.github.io/MeshiPhi/html/sections/Configuration/Mesh_construction_config.html>`_ section of the `MeshiPhi documentation <https://antarctica.github.io/MeshiPhi/>`_ .
There are also example configuration files available in the directory :code:`examples/environment_config/grf_example.config.json`

optional arguments:

::

-v (verbose logging)
-o <output location> (set output location for mesh)

*Overview figure of the Command Line Interface entry points of PolarRoute*

^^^^^^^^^^^
add_vehicle
Expand All @@ -24,11 +47,11 @@ positional arguments:

::

vessel_config : A configuration file detailing the vessel to be simulated in the digital environment.
vessel_config : A configuration file giving details of the vessel to be simulated.
mesh : A digital environment file.

The format for the required *<vessel.json>* file can be found in the :ref:`configuration - vessel performance modeller` section of the documentation.
The required *<mesh.json>* file can be created using the *create_mesh* command from the `MeshiPhi <https://github.com/antarctica/MeshiPhi>`_ package.
The format for the required *vessel.json* file can be found in the :ref:`configuration - vessel performance modeller` section of the documentation.
The required *mesh.json* file can be created using the *create_mesh* command from the `MeshiPhi <https://github.com/antarctica/MeshiPhi>`_ package.

optional arguments are

Expand Down Expand Up @@ -81,11 +104,11 @@ positional parameters:
waypoints: A .csv file containing waypoints to be travelled between.


The format for the required *<route_config.json>* file can be found in the :ref:`configuration - route planning` section of the documentation.
The required *<vessel_mesh.json>* file can be generated using the :ref:`add_vehicle` command shown above.
The format for the required *<waypoints.csv>* file is as follows:
The format for the required *route_config.json* file can be found in the :ref:`configuration - route planning` section of the documentation.
The required *vessel_mesh.json* file can be generated using the :ref:`add_vehicle` command shown above.
The format for the required *waypoints.csv* file is as follows:

As table:
As a table:

+------------------+---------------+---------------+---------+---------------+
| Name | Lat | Long | Source | Destination |
Expand All @@ -101,7 +124,7 @@ As table:
| Elephant Island | -60.54722222 | -55.18138889 | | |
+------------------+---------------+---------------+---------+---------------+

As .csv:
In .csv format:

::

Expand All @@ -112,8 +135,8 @@ As .csv:
Falklands,-55.63472222,-64.88,,
Elephant Island,-60.54722222,-55.18138889,,

Additional waypoints may be added by extending the '<waypoints.csv>' file. Which waypoints are navigated between is determined by
added a **X** in either the *Source* or *Destination* columns. When processed, the route planner will create routes from all
Additional waypoints may be added by extending the *waypoints.csv* file. Which waypoints are navigated between is determined by
adding an **X** in either the *Source* or *Destination* columns. When processed, the route planner will create routes from all
waypoints marked with an **X** in the source column to all waypoints marked with a **X** in the *destination* column.

optional arguments are
Expand All @@ -126,7 +149,7 @@ optional arguments are
-d (output Dijkstra path as well as smoothed path)


The format of the returned *<route.json>* file is explained in :ref:`the route.json file` section of the documentation.
The format of the returned *route.json* file is explained in :ref:`the route.json file` section of this documentation.

^^^^^^^^^^^^^^^
calculate_route
Expand All @@ -153,7 +176,7 @@ optional arguments:

Running this command will calculate the cost of a route between a set of waypoints provided in either csv or geojson
format. The route is assumed to travel from waypoint to waypoint in the order they are given, following a rhumb line.
The format of the output *<route.json>* file is identical to that from the :ref:`optimise_routes` command.
The format of the output *route.json* file is identical to that from the :ref:`optimise_routes` command.
This is explained in :ref:`the route.json file` section of the documentation. The time and fuel cost of the route will
also be logged out once the route file has been generated. If the user-defined route crosses a cell in the mesh that is
considered inaccessible to the vessel then a warning will be displayed and no route will be saved.
Expand Down Expand Up @@ -185,7 +208,25 @@ optional arguments:
^^^^^^^^
Plotting
^^^^^^^^
Meshes produced at any stage in the route planning process can be visualised using the GeoPlot
library found at the relevant `GitHub page <https://github.com/antarctica/GeoPlot>`_. Meshes and routes can also be
plotted in other GIS software such as QGIS by exporting the mesh to a common format such as .geojson or .tif using
the export_mesh command described in the `MeshiPhi <https://github.com/antarctica/MeshiPhi>`_ docs.
Meshes produced at any stage in the route planning process can be visualised using the :code:`plot_mesh` cli command from the `GeoPlot <https://github.com/antarctica/GeoPlot>`_
library. Meshes and routes can also be plotted in other GIS software such as QGIS by exporting the mesh to a commonly used format such
as .geojson or .tif using the export_mesh command described in the `MeshiPhi <https://github.com/antarctica/MeshiPhi>`_ docs.

::

plot_mesh <mesh.json>

optional arguments:

::

-v : verbose logging
-o : output location
-a : add directional arrows to routes
-r : plot an additional route from a file

.. figure:: ./Figures/PolarRoute_CLI.png
:align: center
:width: 700

*Overview figure of the Command Line Interface entry points of PolarRoute*
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ route-planning process as command-line arguments or through a Python script.

Example configuration files are provided in the `config` directory.

The format of the config used to generate an environmental mesh can be found in the `"Configuration - Mesh Construction" <https://antarctica.github.io/MeshiPhi/html/sections/Configuration/Mesh_construction_config.html>`_ section of the `MeshiPhi documentation <https://antarctica.github.io/MeshiPhi/>`_ .

Descriptions of the configuration options for the Vessel Performance Modelling can
be found in the :ref:`Configuration - Vessel Performance Modeller` section of the
documentation.
Expand Down
Loading

0 comments on commit d45a399

Please sign in to comment.