Multilateration and Triangulation.

## Project description

# Localization

### Introduction
Localization package provides tools for multilateration and triangulation in `2D`,`3D` and on `earth surface`.
The current model of the earth, supported by the package, is called `Earth1`.
Earth1 models the earth as an ideal sphere having radius of 6378.1 kilometers.

### Installation
The package has been tested with python2.7 and python3.6. Use pip to install the package:
```
pip install localization
```
### Usage

Typical usage of the package is:

```python
import localization as lx
```
To initilaize new localization Project use:

```python
P=lx.Project(mode=<mode>,solver=<solver>)
```

Currently three modes are supported:
- 2D
- 3D
- Earth1

Also three solvers can be used:
- LSE for least square error
- LSE_GC for least square error with geometric constraints. Geometric constraints force the solutions to be in the intersection areas of all multilateration circles.
- CCA for centroid method, i.e., the solution will be the centroid of the intersection area. If no common intersection area exist, the area with maximum overlap is used.

To add anchors to the project use:

```python
```

where name denote user provided label of the anchor and <loc> is the location of the anchor provided in tuple, e.g., (120,60).

```python
```

t is the target object and label is the package provided label for the target.

Distance measurements must be added to target object like:

```python
```

Finally running P.solve() will locate all targets. You can access the estimated location of the target t by t.loc.
t.loc is a point object. Point object `B` has `x`,`y`,`z` coordinates available by `B.x`, `B.y`, `B.z` respectively.

Here is a sample use of the package for three anchors and one target scenario:

```python
import localization as lx

P=lx.Project(mode='2D',solver='LSE')

P.solve()

# Then the target location is:

print(t.loc)
```

---