I am attempting to upload a flight plan file to the FlightPlanItf on iOS in a nearly identical way as I am able to do successfully on Android, but it’s not working. Here’s an example of the flight plan:
QGC WPL 120
0 1 3 22 0.00000 0.00000 0.00000 0.00000 42.54480 -83.11800 0.00000 1
1 0 3 16 0.00000 0.00000 0.00000 0.00000 42.54480 -83.11800 0.00000 1
2 0 3 16 0.00000 0.00000 0.00000 42.54535 -83.11851 0.00000 0.00000 1
3 0 2 2000 1.00000 1.00000 12.00000 0.00000 0.00000 0.00000 0.00000 1
4 0 2 93 10.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 1
5 0 2 2001 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 1
6 0 3 16 0.00000 0.00000 0.00000 42.54507 -83.11823 0.00000 0.00000 1
7 0 2 2000 1.00000 1.00000 12.00000 0.00000 0.00000 0.00000 0.00000 1
8 0 2 93 10.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 1
9 0 2 2001 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 1
10 0 3 16 0.00000 0.00000 0.00000 42.54535 -83.11823 0.00000 0.00000 1
11 0 2 2000 1.00000 1.00000 12.00000 0.00000 0.00000 0.00000 0.00000 1
12 0 2 93 10.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 1
13 0 2 2001 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 1
14 0 3 16 0.00000 0.00000 0.00000 42.54535 -83.11796 0.00000 0.00000 1
15 0 2 2000 1.00000 1.00000 12.00000 0.00000 0.00000 0.00000 0.00000 1
16 0 2 93 10.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 1
17 0 2 2001 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 1
18 0 3 16 0.00000 0.00000 0.00000 42.54507 -83.11796 0.00000 0.00000 1
19 0 2 2000 1.00000 1.00000 12.00000 0.00000 0.00000 0.00000 0.00000 1
20 0 2 93 10.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 1
21 0 2 2001 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 1
22 0 3 16 0.00000 0.00000 0.00000 0.00000 42.54480 -83.11800 0.00000 1
23 0 3 21 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 1
I am writing the file with:
if let dir = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first {
let path = dir.appendingPathComponent("mission.mavlink")
do {
try missionString.write(to: path, atomically: true, encoding: .utf8)
return path.absoluteString
} catch {
// Handle error
}
}
I have observed that writing this file is successful; however when passing path.absoluteString to the Itf’s uploadFlightPlan() the state changes to uploading and never reached uploaded, so the interface never goes into the idle state.
I’ve tried passing the path both with and without the file:// prefix. Is there anything I am clearly doing wrong? Any help would be greatly appreciated!
-Nick