I can read in Telemetry list url (Telemetry list - 7.2)
Each section contains a circular buffer of timestamped samples provided by a producer.
How to get timestamp of last drone_controller telemetry for example ?
I saw in guidance/python/hello.py that we can get
self.tlm_dctl["position_local.x"] to get position_local, but how to know the associated timestamp of this info ?
Using self.tlm_dctl.get_timestamp() you get a telemetry.telemetry_binding.types.timespec object, with tv_sec for seconds and tv_nsec for nanoseconds.
Don’t know where is the doc of this …
Two methods are available:
get_ts whiche return a millisecond timestamp.
get_timstamp which returns a timespec structure.
It should be available at GitHub - Parrot-Developers/telemetry: Drone telemetry library and tools based on shared memory (libshdata) but has not been yet published with the python wrappers.
For your information, it is also possible to specify a timestamp and a method for a fetch:
def fetch_sample(self, timestamp=None, method=Method.Latest):
"""Get a new sample.
timestamp (timespec): timestamp of query (can be None for LATEST
method (int): method of query.
bool: True if at least one sample has been read in one of the shared
memory where variables are.
With the Method enumeration:
Thank you @Ronan !
Can’t wait to see the doc published online !
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.