Part of Locations in the Python API reference.
Related guidance: concepts/locations, how-to/observe-location, how-to/pli-entities.
Runnable examples: publish_location.py, get_ecn_location.py.
from picogrid_ecn_client import Location
Represent timestamped WGS-84 Position Location Information.
altitude: float | None = None,
bearing: float | None = None,
accuracy: float | None = None,
source: str | None = None,
velocity: Velocity | None = None,
angular_velocity: AngularVelocity | None = None,
confidence: float | None = None,
Source · models/location.py
| Name | Type | Required | Default | Constraints | Description |
|---|
| latitude | float | yes | — | ge=-90, le=90, finite | Finite WGS-84 latitude in decimal degrees, from -90 through 90. |
| longitude | float | yes | — | ge=-180, le=180, finite | Finite WGS-84 longitude in decimal degrees, from -180 through 180. |
| recorded_at | datetime | yes | — | — | Timezone-aware time when the location was recorded. |
| altitude | float | None | no | None | finite | Optional finite altitude in metres. |
| bearing | float | None | no | None | ge=0, lt=360, finite | Optional finite bearing in degrees, from 0 inclusive to 360 exclusive. |
| accuracy | float | None | no | None | ge=0, finite | Optional non-negative finite horizontal accuracy in metres. |
| source | str | None | no | None | min_length=1, max_length=128 | Optional location source label, from 1 through 128 characters. |
| velocity | Velocity | None | no | None | — | Optional north/east/down velocity in metres per second. |
| angular_velocity | AngularVelocity | None | no | None | — | Optional roll/pitch/yaw rates in radians per second; axis interpretation is deployed-unverified. |
| confidence | float | None | no | None | ge=0, le=1, finite | Optional finite confidence fraction, from 0 through 1. |
Return the position of this location as a geodetic coordinate triple.
def to_geodetic(*, assume_zero_ellipsoidal_height: bool = False) -> GeodeticPosition
| Name | Type | Default | Description |
|---|
| assume_zero_ellipsoidal_height | bool | False | Treat a missing altitude as zero height above the WGS-84 ellipsoid instead of raising. |
| Type | Description |
|---|
| GeodeticPosition | This location’s position as a geodetic coordinate triple. |
| Exception | Description |
|---|
| ValidationError | If altitude is missing and the caller did not assume zero ellipsoidal height. |
Source · models/location.py
Convert the position of this location to EPSG:4978 Cartesian metres.
def to_ecef(*, assume_zero_ellipsoidal_height: bool = False) -> ECEFPosition
| Name | Type | Default | Description |
|---|
| assume_zero_ellipsoidal_height | bool | False | Treat a missing altitude as zero height above the WGS-84 ellipsoid instead of raising. |
| Type | Description |
|---|
| ECEFPosition | This location’s position as an EPSG:4978 Cartesian position. |
| Exception | Description |
|---|
| ValidationError | If altitude is missing and the caller did not assume zero ellipsoidal height. |
Source · models/location.py
Rotate the velocity of this location onto EPSG:4978 axes.
def to_ecef_velocity() -> ECEFVelocity
| Type | Description |
|---|
| ECEFVelocity | This location’s velocity expressed on EPSG:4978 axes. |
| Exception | Description |
|---|
| ValidationError | If the location carries no velocity, with code missing_velocity. |
Source · models/location.py