|
5 | 5 |
|
6 | 6 | This can be done in near real-time if images are automatically downloaded to a computer from the UAV's paired device |
7 | 7 |
|
8 | | -Currently only photos from DJI-make drones are supported |
9 | | -, and the only tested model(s) are below |
10 | | -Support for more drone models can be added later with help from the OpenAthena |
11 | | -user community |
| 8 | +Currently only photos from the following makes have been tested |
12 | 9 |
|
13 | | -If your UAV make or model is not listed here, feel free to make a pull request: |
| 10 | +Support for more drone makes can be added later with help from the OpenAthena |
| 11 | +user community. |
| 12 | +
|
| 13 | +Please email photo examples, with intact metadata and a locate-able subject in the direct center of image to matthew (at) krupczak (dot) org |
| 14 | +
|
| 15 | +If your UAV make or model is not listed here, feel free to help out and make a pull request: |
14 | 16 | Makes: |
15 | 17 | DJI |
16 | | - Models: |
17 | | - DJI Mavic 2 Zoom |
| 18 | + Skydio |
18 | 19 |
|
19 | 20 | XMP: |
20 | 21 | en.wikipedia.org/wiki/Extensible_Metadata_Platform |
@@ -290,18 +291,32 @@ def handleSKYDIO( xmp_str ): |
290 | 291 | # (i.e. "Yaw", "Pitch", etc.) |
291 | 292 | # will need to parse differently :( |
292 | 293 |
|
| 294 | + # print(xmp_str) |
293 | 295 |
|
294 | 296 | element = "drone-skydio:CameraOrientationNED" |
295 | | - values = xmp_str[xmp_str.find(element) + len(element) : xmp_str.find(element) + len(element) + 100] |
296 | | - theta = float(values.split('\"')[3]) |
297 | | - azimuth = float(values.split('\"')[5]) |
| 297 | + startIndex = xmp_str.find(element) |
| 298 | + if startIndex == -1: |
| 299 | + element = "drone-skydio:CameraOrientationFLU" |
| 300 | + startIndex = xmp_str.find(element) |
| 301 | + if startIndex == -1: |
| 302 | + return None |
| 303 | + |
| 304 | + values = xmp_str[startIndex + len(element) : startIndex + len(element) + 100] |
| 305 | + theta = values.split('\"')[3] |
| 306 | + azimuth = values.split('\"')[5] |
| 307 | + |
| 308 | + try: |
| 309 | + theta = float(theta) |
| 310 | + azimuth = float(azimuth) |
| 311 | + except ValueError: |
| 312 | + return None |
298 | 313 |
|
299 | 314 | theta = abs(theta) |
300 | 315 |
|
301 | 316 | elements = ["drone-skydio:Latitude=", |
302 | 317 | "drone-skydio:Longitude=", |
303 | 318 | "drone-skydio:AbsoluteAltitude="] |
304 | | - gpsDict = xmp_parse( xmp_str, elements) |
| 319 | + gpsDict = xmp_parse(xmp_str, elements) |
305 | 320 |
|
306 | 321 | y = gpsDict["drone-skydio:Latitude="] |
307 | 322 | x = gpsDict["drone-skydio:Longitude="] |
|
0 commit comments