Writing GNSS data to SVO files

I am trying to get my head around recording GNSS data to SVO files.
My confusion is in how can we explicitly send those GPS data to a fusion object, and then write the subsequent global camera pose to the SVO file. Here is a rough outline of my thoughtprocess at this point:

        camera = Camera(self.zed_config)
        err = camera.enable_recording(file_path)
        if err != sl.ERROR_CODE.SUCCESS:
            print(f"\n Camera {camera.nickname} unable to begin recording ")
            exit(1)
        fusion = Fusion(self.zed_config)
        fusion.subscribe(camera)
        gpsserver = GPSServer()
        gpsserver.stream_gps()
        
        print("SVO is Recording, use Ctrl-C to stop.")
        frames_recorded = 0

        while True:

            coords = gpsserver.get_measurements()
            if not coords == None:
                fusion.add_gps_measurement(**coords)

            if camera.can_capture:
                _ = camera.capture()
                frames_recorded += 1
                print("Frame count: " + str(frames_recorded), end="\r")



Please let me know if you have any insights or suggestions. Thanks!

Hi,

The SVO file cannot contain GNSS data. We have a sample that records this data to JSON files : https://github.com/stereolabs/zed-sdk/tree/master/geotracking/recording/python

(There is also a sample that plays it back)