DJIFlightControllerDelegate Not working iOS SWIFT
667 1 2020-8-15
Uploading and Loding Picture ...(0/1)
o(^-^)o
darshan123
lvl.2

India
Offline

[size=13.3333px]Hi Team,

[size=13.3333px]           I have implemented  iOS swift SDK with below GitHub reference,


[size=13.3333px]https://github.com/dji-sdk/Mobile-SDK-iOS.


[size=13.3333px]I have successfully connected iOS device with drone but I need to track drone location and I have implemented DJIFlightControllerDelegate which is not working for me.


[size=13.3333px]Can you please provide me any solutions on it for fetch current connected aircraft and track it I have implemented below code,


[size=13.3333px]func fetchFlightController() -> DJIFlightController?{

[size=13.3333px]        if let product = DJISDKManager.product(){

[size=13.3333px]            if product.isKind(of: DJIAircraft.self){

[size=13.3333px]                return (product as! DJIAircraft).flightController

[size=13.3333px]            }

[size=13.3333px]        }

[size=13.3333px]       return nil

[size=13.3333px]}

[size=13.3333px]My drone is Phantom 4 pro and I am getting success on DJISDKManager.product().


[size=13.3333px]Can you please guide me here how to implement  DJIFlightControllerDelegate ?


[size=13.3333px]If is there any issue in my side to fetch current connected drone.


[size=13.3333px]Thanks
2020-8-15
Use props
DJI_Lisa
lvl.4
Hong Kong
Offline

We do not have sample code in Swift but you can get the concept from the Obj-C Geo sample code here: https://github.com/DJI-Mobile-SDK-Tutorials/iOS-GEODemo.  The corresponding tutorial is here: https://developer.dji.com/mobile ... rials/GEODemo.html.  You're going to need to use API aircraftLocation:https://developer.dji.com/api-re ... raftlocation_inline
2020-8-20
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules