# Least Squares based Position Estimator for ToA/mRTT

This module estimates the position of the target node using time of arrival (ToA) measurements based on the least square framework. The implementation of ToA based least square estimator is inspired from [hppInF].

An example to estimate the position based on the ToA measurement is given in following code-block.

positionEstimator = LeastSquareToA()
# Position Estimation Object:
# Positioning based on: ToA
# Optimization Method: Least Square
# Shape of txPosition: (Nref,3)
# Shape of ToAe: (Nref,)

locEstimate, posError = positionEstimator(txPosition, ToAe)

The details of the input output interface to use this module is provided in following sub-section.

class toolkit5G.Positioning.LeastSquareToA[source]

This modules uses least squares optimization framework to estimate the node location using time of arrival (toa) measurements.

Parameters:

None

Input:
• refPosition (($$\text{N}_\text{ref}$$,3), np.number) – Reference locations with respect to whom toas are estimated.

• toa (($$\text{N}_\text{ref}$$,), np.number) – toa estimates with respected to $$\text{N}_\text{ref}$$ reference locations.

Output:
• (N, 3), np.number – Position estimate. If the height of all the transmitter is same, then N=2 else N=1.

• For equiheight transmitters, there exist two estimates of the height of the UE.

• One above the transmitter and other below it.

• This phenomenon results in 2 estimate of the position of the UE.

• However, both these estimates have the same (x, y) co-ordinate.

• np.number – Uncertainty in Position Estimates. The lower the value better the position estimates.

Attributes:

speed_of_light (float) – Defines the speed of light/EM waves used for positioning. Users can update this parameter immediately after creating the LeastSquareToA object.

Raises:
• ValueError – [Error-LeastSquareToA]: refPosition and measurements must be an numpy array!

• ValueError – [Error-LeastSquareToA]: refPosition must be an numpy array of size (nRefnode x 3)!

• ValueError – [Error-LeastSquareToA]: number of refPositions must match number of measurements!

References:
[hppInF]
1. Singh, A. A. Masal, J. Klutto Milleth and B. Ramamurthi, “High Precision Positioning using Multi-cell Massive MIMO system for 5G and beyond,” 2021 IEEE 32nd Annual International Symposium on Personal, Indoor and Mobile Radio Communications (PIMRC), Helsinki, Finland, 2021, pp. 1234-1240, doi: 10.1109/PIMRC50174.2021.9569480.