Skip to content

Latest commit

 

History

History
104 lines (83 loc) · 4.35 KB

README.md

File metadata and controls

104 lines (83 loc) · 4.35 KB

ortools

Tools and scripts for OpenRocket using Python and orhelper.

As an example result, see the image from a landing scatter visualization produced by the 6DOF dispersion analysis tool diana Sample image for landing scatter visualization by diana

Installation

Using docker

Install docker. Build a docker container using the provided dockerfile

docker build . -t ortools -f Dockerfile

Run a shipped example with Install docker. Build a docker container using the provided dockerfile

docker run -it ortools

and examine the console output.

To run a command with your data from the current folder, mount PWD into the docker container, and pass it as working and output directory to diana

docker run -v $PWD:/ortools/data -it ortools diana -d data -o data/dockertest

Locally

You should use Java 8 (a really, really old version) for this to work, see orhelper. However, it may run with a newer java version even if the GUI of OpenRocket does not start. Additionally, install Microsoft C++ Build Tools for compiling jpype1.

Tested with the following version combinations:

  • miniconda3-py39 with python3.9, openjdk 1.8.0_312-1, orhelper 0.1.2, Windows 10
  • miniconda3-py39 with python3.9, oracle jdk1.8.0_202, orhelper 0.1.2, Windows 10
  • Python 3.8.5, openjdk 11.0.11, Ubuntu 20.04

An installation on Mac OS was not successful so far. If you have figured that out, please let us know!

  1. Download or clone the project.

  2. Create and activate some conda or pip environment with Python 3. E.g.:

    conda create -n ortools python=3
    conda activate ortools
  3. Install the package with pip. If you are a developer, install the package in editable mode. If not, leave out the -e flag for a normal installation. In editable mode, all changes to the source files are immediately reflected in your environment, so you don't have to reinstall/update the package after changes.

    cd ortools
    pip install -e .

    All required packages will be automatically installed with pip too. If you don't like that, you can check setup.cfg for the dependencies and install them beforehand with conda (except for orhelper which is only available via pip).

    conda install numpy matplotlib click configparser simplekml scipy pyproj
    pip install orhelper

    If jpype install fails, check if Microsoft C++ Build Tools are installed, and JAVA_HOME is set properly. If used with python 3.10, build jpype manually with this source, see the following github-PR.

  4. diana needs to find OpenRocket-15.03.jar. Put it in the same folder where you run diana, or add the file (not the folder) to an environment variable called CLASSPATH, see the oracle documentation. Check with (example for Windows)

    echo %CLASSPATH%

    $ PATHTTO\projects\OpenRocket-15.03.jar

    java -jar "%CLASSPATH%"

    and OR should be launched.

Usage

So far only one command line tool is in development. It is called diana and does dispersion analyses. Just execute

diana

in the examples-directory of ortools to run with the provided examples. Run

diana -h

to get help and usage information. For further information, check the Wiki.

Contribution

Credits