This is the scripts used in the ARCH 2018 paper: "Space Debris Collision Detection using Reachability Methods" by Hobbs et al.

Prepared by Stanley Bak, June 2018

## Setup and Running ##

To run the code, first run `make` to create `aabb.so`, which is a shared library used by the Python code.

Next, you need to install `pyibex`, with is the interval arithmetic library we used. To do this, run `python -m pip install pyibex`

Finally, to run the code, do `python run_collision_detection.py`

## Explanations ## 

The main code is in `run_collision_detection.py`

The derivative functions are one dimensional (`nu` is the variable for each satellite), given in the `nu_dot` function in the code (which is parameterized).

`SatelliteData` is a container class for storing the satellite paramters. The random parameters are generated in the function `create_satellites`.

The conversion for a particular satellite with a fixed `nu` to `x`, `y`, and `z` values is done in the `get_xyz` method of the `SatelliteData` class. Given a range of `nu` values, instead of a single point in `x`, `y`, and `z`, you'll get a box. This is done with interval arithmetic (using `pyibex`) and the `get_box` method.

The main function is at the bottom of the file. To run a particular instance, you'll do something like:
`measure(1000, 'aabb', nu_uncertainty=0.0001, radius=0.1, time_bound=60, min_step=0.1, dynamic_stepping=True)`

The first parameter is the number of satellites, the next is the box checking methods, then there's the initial `nu` uncertainty, the collision radius, the time bound, the minimul allowed step size (which is also the initial step size), and whether to use the dynamic stepping strategy described in the paper or a fixed step size.


## License ##

The AABB Tree part is released under the zlib license, see https://github.com/lohedges/aabbcc

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.