dji-mobile-sdk-tutorials / ios-simulatordemo Goto Github PK
View Code? Open in Web Editor NEWThis demo shows you how to use the DJISimulator of DJI Mobile SDK.
License: MIT License
This demo shows you how to use the DJISimulator of DJI Mobile SDK.
License: MIT License
I am using DJI Phantom 3
-DJI SDK 3.5
-iPad
I am unable to start DJIGoToStep mission using Simulator mode is ON .I am using following code:-
if let flightController = DroneUtility.fetchFlightController(){
if CLLocationCoordinate2DIsValid(self.droneLocationCoordinate) {
self.min_height = proxy.sharedProxy().getAltitudeDictionary(arrTemp: zoneCreateModal.zones).object(forKey: "minimum_height") as! Float
self.takeOffCoordinates = self.droneLocationCoordinate
let max_height = proxy.sharedProxy().getAltitudeDictionary(arrTemp: self.zoneCreateModal.zones).object(forKey: "maximum_height") as! Float
let stepsToGo = DJIGoToStep.init(coordinate: self.droneLocationCoordinate, altitude: self.min_height)
let customMission = DJICustomMission.init(steps: [stepsToGo!])
DJIMissionManager.sharedInstance()!.prepare(customMission!, withProgress: { (value) in
}, withCompletion: { (error) in
if error?.localizedDescription.characters.count > 0{
proxy.sharedProxy().displayStatusCodeAlert("Error: \(error!.localizedDescription)")
}else{
DJIMissionManager.sharedInstance()!.startMissionExecution(completion: { (error) in
if error?.localizedDescription.characters.count > 0{
proxy.sharedProxy().displayStatusCodeAlert("Error: \(error!.localizedDescription)")
}else{
proxy.sharedProxy().displayStatusCodeAlert("Take off succeeded...")
flightController.setFlightOrientationMode(.courseLock, withCompletion: { (error) in
if error?.localizedDescription.characters.count > 0{
}else{
//Set maximum flight height
proxy.sharedProxy().displayStatusCodeAlert("Maximum : \(max_height)")
flightController.flightLimitation?.setMaxFlightHeight(max_height, withCompletion: nil)
}
})
}
})
}
})
}else{
proxy.sharedProxy().displayStatusCodeAlert("Error: Unable to fetch current location")
}
}else{
proxy.sharedProxy().displayStatusCodeAlert("Please connect drone")
}
I have used DemoUtility.h/DemoUtility.m file and installed DJI sdk 3.3 in my swift 3 project .I have used DemoUtility class which in objective c provided by your demo project but your iOS-Simulator project is working fine easily connected with Remote controller of drone.But when i used same sdk but intalled using cocoapods in my Swift 3 project it cannot register the app.Please provide some info as soon as possible.
When I click the "Start Simulator" button, it's starting is failed and it returns following message.
Star simulator error: Error Domain=DJISDKErrorDomainCode=-1003 "Execution of this process has timed out(code:-1003)" UserInfo={NSLocalizedDescription=Execution of this process had timed out(code:-1003)}
!] Unable to satisfy the following requirements:
DJI-SDK-iOS (~> 4.0.1)
required by Podfile
None of your spec sources contain a spec satisfying the dependency: DJI-SDK-iOS (~> 4.0.1)
.
You have either:
pod repo update
.Note: as of CocoaPods 1.0, pod repo update
does not happen on pod install
by default.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.