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
P.add_anchor(<name>,<loc>)
```
where name denote user provided label of the anchor and <loc> is the location of the anchor provided in tuple, e.g., (120,60).
To add target use:
```python
t,label=P.add_target()
```
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
t.add_measure(<anchore_lable>,<measured_distance>)
```
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.add_anchor('anchore_A',(0,100))
P.add_anchor('anchore_B',(100,100))
P.add_anchor('anchore_C',(100,0))
t,label=P.add_target()
t.add_measure('anchore_A',50)
t.add_measure('anchore_B',50)
t.add_measure('anchore_C',50)
P.solve()
# Then the target location is:
print(t.loc)
```
---
contact: __kamal.shadi85@gmail.com__
### 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
P.add_anchor(<name>,<loc>)
```
where name denote user provided label of the anchor and <loc> is the location of the anchor provided in tuple, e.g., (120,60).
To add target use:
```python
t,label=P.add_target()
```
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
t.add_measure(<anchore_lable>,<measured_distance>)
```
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.add_anchor('anchore_A',(0,100))
P.add_anchor('anchore_B',(100,100))
P.add_anchor('anchore_C',(100,0))
t,label=P.add_target()
t.add_measure('anchore_A',50)
t.add_measure('anchore_B',50)
t.add_measure('anchore_C',50)
P.solve()
# Then the target location is:
print(t.loc)
```
---
contact: __kamal.shadi85@gmail.com__
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Localization-0.1.7.tar.gz
(12.4 kB
view details)
Built Distribution
File details
Details for the file Localization-0.1.7.tar.gz
.
File metadata
- Download URL: Localization-0.1.7.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/38.4.0 requests-toolbelt/0.8.0 tqdm/4.22.0 CPython/2.7.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddf8db1c1235ceea8e9515facea66a056454f707fdd4ff054a3ce4596d44aa8c |
|
MD5 | 5e8e9f8d1d2d76e07952bba675799c79 |
|
BLAKE2b-256 | 8273a8153fe113dd7523a22f67f6a9def0de56a1a95593606585d71b9e017698 |
File details
Details for the file Localization-0.1.7-py3-none-any.whl
.
File metadata
- Download URL: Localization-0.1.7-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/38.4.0 requests-toolbelt/0.8.0 tqdm/4.22.0 CPython/2.7.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc72e24bd18cfe4b4afea348fb08056732e096886c043e4b6353fecebfd7e34c |
|
MD5 | 7a148e3fc7546b6637a0a4e29497ecb5 |
|
BLAKE2b-256 | 8d7eb1323bfade87d5ca5e61f083e44124f0b24cf7a557b23a4496c0811387f2 |