Telemetry

Overview

The Telemetry class in the SDK provides observables to get various information such as:

  1. Battery level of the drone
  2. Flight mode
  3. GPS info
  4. Health of the drone
  5. RC Status
  6. Ground speed

Please refer the API documentation for more information about various features provided by the Telemetry class. The following code snippets demonstrate how to listen to battery, GPS, and ground speed updates respectively in the Telemetry class. 


        let battery: Observable = CoreManager.shared().telemetry.batteryObservable
        battery.subscribe(onNext: { battery in
                //on battery update
            }, onError: { error in
                //error
            })
            .disposed(by: disposeBag)


       let gps: Observable = CoreManager.shared().telemetry.GpsInfoObservable
       gps.subscribe(onNext: { gps in
                //get GPS update
            }, onError: { error in
                //error
            })
            .disposed(by: disposeBag)   


        let groundSpeed: Observable = 
        CoreManager.shared().telemetry.groundSpeedNEDObservable
        groundSpeed.subscribe(onNext: { groundSpeed in
                //on ground speed update
            }, onError: { error in
                //error
            })
            .disposed(by: disposeBag)