Skip to content

Get GPS Global origin in telemte #750

Open
@alireza787b

Description

@alireza787b

Hi,
I'm trying to retrieve the GPS coordinates of the local NED origin that PX4 uses. I'd like to access the latitude, longitude, and altitude (AMSL) of this origin point.
According to the cpp documentation, the Telemetry object should have a gps_global_origin() method to achieve this. However, when I try to use it, I encounter an AttributeError: 'Telemetry' object has no attribute 'gps_global_origin'.
Here's a snippet of the code I'm using:
from mavsdk import System

async def get_gps_global_origin(drone: System):
async for origin in drone.telemetry.gps_global_origin():
print(origin)
break
And here's the traceback I receive:
text
Traceback (most recent call last):
File "/root/mavsdk_drone_show/drone_show.py", line 801, in pre_flight_checks
async for position in drone.telemetry.gps_global_origin():
AttributeError: 'Telemetry' object has no attribute 'gps_global_origin'
I'm wondering if I'm misunderstanding how to access this information or if there might be an issue with the current MAVSDK implementation or this method is not implemnted in python. Could you please provide some guidance on the correct way to obtain the GPS Global Origin using MAVSDK Python?
Any help or insights would be greatly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions