Estimate GNSS receiver position and velocity

Since R2021a

## Syntax

``recPos = receiverposition(p,satPos)``
``[recPos,recVel] = receiverposition(___,pdot,satVel)``
``[recPos,recVel,hdop,vdop] = receiverposition(___)``
``[recPos,recVel,hdop,vdop,info] = receiverposition(___)``

## Description

````recPos = receiverposition(p,satPos)` returns the receiver position estimated from the pseudoranges and satellite positions.```

example

````[recPos,recVel] = receiverposition(___,pdot,satVel)` also returns the receiver velocity estimated from the pseudorange rates `pdot` and satellite velocities `satVel`.```
````[recPos,recVel,hdop,vdop] = receiverposition(___)` also returns the horizontal dilution of precision `hdop` and vertical dilution of precision `vdop` associated with the position estimate.```
````[recPos,recVel,hdop,vdop,info] = receiverposition(___)` returns information about the clock bias, clock drift, and time dilution of precision.```

## Examples

collapse all

Use the `receiverposition` function to estimate a GNSS receiver position. Get the satellte positiions and velocities using the `gnssconstellation` function. Generate pseudoranges from these positions using the `pseudoranges` function.

Specify a receiver position in geodetic coordinates (latitude, longitude, altitude) and a receiver velocity in the local navigation frame.

```recPos = [42 -71 50]; recVel = [1 2 3];```

Get the satellite positions for the current time.

```t = datetime('now'); [gpsSatPos,gpsSatVel] = gnssconstellation(t);```

Get the pseudoranges and pseudorange rates between the GNSS receiver and the satellites.

`[p,pdot] = pseudoranges(recPos,gpsSatPos,recVel,gpsSatVel);`

Use the pseudoranges to estimate the receiver position and velocity. The values close to your original receiver position and velocity used to generate the satellite position and pseudoranges.

`[lla,gnssVel] = receiverposition(p,gpsSatPos,pdot,gpsSatVel)`
```lla = 1×3 42.0000 -71.0000 49.8819 ```
```gnssVel = 1×3 1.0051 1.9874 3.0009 ```

## Input Arguments

collapse all

Pseudoranges between the satellites and receiver, specified as an n-element vector in meters.

Data Types: `single` | `double`

Satellite positions in the Earth-centered Earth-fixed (ECEF) coordinate system in meters, specified as an N-by-3 matrix of scalars. N is the number of satellites in the constellation.

Data Types: `single` | `double`

Pseudorange rates between the satellites and receiver, specified as an n-element vector in meters per second.

Data Types: `single` | `double`

Velocity readings of the GNSS receiver in the local navigation coordinate system in meters per second, specified as an N-by-3 matrix of scalars. N is the number of satellites in the constellation.

Data Types: `single` | `double`

## Output Arguments

collapse all

Receiver position in geodetic coordinates, returned as a three-element vector of the form [latitude longitude altitude]

Data Types: `single` | `double`

Receiver velocity in the local navigation frame using north-east-down (NED) coordinates, returned as a three-element vector of the form [vx vy vz].

Data Types: `single` | `double`

Horizontal dilution of precision, returned as a scalar.

Data Types: `double`

Vertical dilution of precision, returned as a scalar.

Data Types: `double`

Information about clock bias, clock drift, and time dilution of precision (TDOP), returned as a structure containing these fields:

• `ClockBias` — Estimated bias error in receiver clock, in seconds.

• `ClockDrift` — Estimated drift error in receiver clock, in seconds per second.

• `TDOP` — Time dilution of precision.

 Groves, Paul D. Principles of GNSS, Inertial, and Multisensor Integrated Navigation Systems. 2nd ed. GNSS Technology and Application Series. Boston: Artech House, 2013.