How to connect an external GPS to the ZED cameras for providing the video with GPS tags?

The ZED has no built-in GPS. However, every frame capture is tagged with its epoch timestamp, and this allows you to synchronize it with an external GPS running at the same time.

 

If you want to convert all positions to a GPS WGS84 position, then a simple solution would be to :

- Save the first position as GPS position and (0,0,0) for ZED positional tracking.
- For the next frames, get the positional tracking of the ZED (cartesian position) and convert it to GPS

To convert GPS + cartesian move --> GPS, you can use this library I have already used for other projects: https://github.com/chrberger/WGS84toCartesian

 

Then, if you also have a GPS position for each frame (from an external GPS) and want to combine it with the positional tracking, it would be more complicated but certainly feasible.

The best would be to use a Kalman filter to aggregate GPS and positions :

- Save the first position as GPS position and (0,0,0) for ZED positional tracking.
- aggregate pose from ZED tracking (using getPosition but with REFERENCE_FRAME::CAMERA). This gives the shift from last to the current position. You will need to aggregate them to reconstruct the position of the camera.
- When you have a GPS value from external, use the Kalman filter with the GPS as measure and the pose aggregated as a prediction. This will output a fused position from GPS and visual tracking.

 

Additional resources:

How to add GPS information in the spatial mapping and tracking using the ZED cameras and the SDK?