Mission Planner geotagging tool seems needlessly complicated

[quote=“wjaxxx”]Hi coni

First, thanks for the debugging

I have found another bug related to GPS Time conversion to UTC. Leap seconds calculation was erroneous and time was being calculated locally. Not UTC
However it does not explain why you see 18 minutes difference.
Are both file creation and EXIF Time the same? Or is there any discrepancy?

As for the missed CAM message. I do not have an explanation. The only thing that could explain it is that there is a known bug in dataflash download from APM/Pixhawk. So maybe you could try to get the bin directly from the SD Card

For the location kml button it does not work in the tool I passed you. No worries[/quote]

  • although I’m programmer myself, I’m not familiar with Mission Planner source code, which language is used, I’m bit lazy too etc… So it is much easier if I can talk to you then do it hard way myself…

  • EXIF time - look at the attached image (GPS info is wrong but else is original)… it’s the first one in the row… if you look in the log again, you may calculate exact time difference… try to play with this a bit, maybe you find a bug…

  • I’ve downloaded the BIN file from the microSD card and then I used the tool in the MP to convert it to LOG file… maybe this tool makes a problem with CAM messages… I don’t know, I’m just guessing as anything here might have a bug…

  • it would be nice at the end to update the APM documentation : plane.ardupilot.com/wiki/common- … n-planner/ because right now it’s a mess when all the people are puzzled with the new georef tool without explanation…

Coni

Code is in c# language.

As for the time shift between log and camera. I am 99% confident in how the calculations are done right now.

Look at the first CAM msg in your log
CAM, 35898600, 1794, 48.2241277, 18.3050115, 195.16, 23.71, 30.13, 30.27

It says 35898600 milliseconds from the beginning of the GPS week 1794.

Converted time with last fix in the Mission Planner GeoTag Tool (not yet available to download) gives {5/25/2014 9:58:02 AM} UTC time

Code is
[i] int LEAP_SECONDS = 16;

        DateTime datum = new DateTime(1980, 1, 6, 0, 0, 0, DateTimeKind.Utc);
        DateTime week = datum.AddDays(weeknumber * 7);
        DateTime time = week.AddMilliseconds(milliseconds);

        return time.AddSeconds(-LEAP_SECONDS);[/i]

If you, for example, look at
http://www.andrews.edu/~tzs/timeconv/timeconvert.php?

Enter in GPS Time (seconds) the CAM time. This is
GPS Totalseconds = ( 1794 weeks * 7 days * 24h * 3600s ) + 35898600ms/1000 = 1085047098.6 seconds

You get the same result as the Mission Planner GeoTag Tool. See attachment.

If I have time to go out with my hexacopter I’ll try to do a bunch of tests.

By the way, I’ll try to update GeoTag wiki ASAP.

Best regards

Thanks for explanation. Then the problem has to be in my camera settings… I will also do more testing once I build new plane… The last flight destroyed my last plane so I have to build a better one now…

Anyway thanks for cooperation !

Has anything changes in recent versions of Mission planner with respect to geotagging.

I keep getting the error " File time not found in Log. Aborting… "

this is after I have adjusted the offset to account for difference between GPS time and my camera time.

by the way I didn’t use CAM_TRIGG_DIST as it doesn’t work for me with arduplane and pixhawk, so I just have the camera on intervalometer mode to take photos every other second.

Thanks

where is this feature buried ?
not even copter.ardupilot.com/wiki/common … n-planner/ reveals the well preserved secret of finding this interface :slight_smile:

What feature?
If you mean the Geotagging feature in general it is available by typing “Ctrl + F” in the MP.

plane.ardupilot.com/wiki/common- … n-planner/

@meee1 - In accordance with some of the requests in this thread, may I humbly suggest you have at look at this:
agisoft.com/index.php?id=34

Maybe you are already utterly familiar with it. If not, it does shed some light on how the popular Agisoft software expects to import flight log data, including Lat, Lon, Alt, Roll, Pitch; Yaw using a simple CSV file format.

As far as I understand it would be greatly useful to be able to easily export such a file from the relevant log file. :slight_smile:

:geek: Taking the simplicity (user) yet another step forward might be to set the Pixhawk to automatically generate such a file during/ after each flight. This file would be realatively small compared to the full log file and therefore transfer really quickly via Mavlink.

To follow up this thread topic I have another problem with Geotag tool. It cannot geotag images with AMSL value in some cases but I do not understand why because the log has this information in the CAM message.

Example:
CAM, 118799387, 213955200, 1885, 48.8207626, 17.2145165, 250.18, 69.78, -6.30, -19.86, 323.02
Photo DSC00290 processed from CAM Msg with 0 ms shutter lag. AMSL Alt NOT found

I believe the 250.18 is the AMSL value thus the photo should be geotagged. But he is only able to geotag with relative altitude value. I do not understand if this is an error in the code or I am doing something wrong.

Any help is appreciated.

Thanks

Michal

what version of MP are you running? and what firmware version?

Hi Michael,

thanks for reply !

MP: 1.3.37
ArduCopter FW: 3.3.1
3DR original Pixhawk

I don’t know what happened but suddenly the problem disappeared. I tried the same workflow today with Log and BIN too and it worked well. AMSL is geotagged well. However during the preprocessing step, I see the still the same error code: AMSL Alt NOT found

But after I do Geotagging, it’s geotagged well. However it’s pretty strange that suddenly it works, Few days ago with the same MP version I got error code violation screen etc.

Hi Michael,

Geotagging images & log information from MP tool seems to incorrectly position the images.

Uploaded on Google drive are the KML & the log file along with first 15 images. I have tried changing the time offset seconds, but in vain.

Surprisingly, these same images fall at proper location in Pix4D with the same log file without any processing - snapshot is also uploaded on Google drive

https://drive.google.com/drive/folders/0B-SFxtcsqFsCcmxxbkh3UTF5eUk?usp=sharing

May I please request for your help on this issue?

Thanks & regards,

Achyut Rao