EXIF timestamp with milliseconds precision from GPS - Script Writing - CHDK Forum

EXIF timestamp with milliseconds precision from GPS

  • 6 Replies
  • 7443 Views
EXIF timestamp with milliseconds precision from GPS
« on: 03 / April / 2013, 11:48:24 »
Advertisements
Hi guys
Is it possible to get more precise timestamp in the EXIF data (provided by GPS)? I am looking for 1/100s precision.
It's not important to have that explicitly in the exif (even it's preferable), any other mechanism like additional file with this time information will be useful as well. Just the precision and accuracy is important.

I did some search and found out two topics there, one was about displaying more precise timestamp in a video file (system clock only), the second one was saying that's it's not possible to modify the JPG exif data.

I don't own the canon camera yet and so have no experiences with CHDK. If there is a way how to succeed, my plan is to buy model like SX230HS (some cheaper camera with GPS).

Thanks,
Ondrej.

Re: EXIF timestamp with milliseconds precision from GPS
« Reply #1 on: 03 / April / 2013, 14:15:05 »
You might find this post interesting :  http://chdk.setepontos.com/index.php?topic=4533.msg72106#msg72106

Using that, you could write your timestamp to the exif UserComment tag.

The CHDK tic timer runs with a 10 mSec resolution - that should get you into the precision zone you are looking for.

And the real time clock in all my cameras keeps pretty good time over a period of months so as long as you set it correctly,  you should be good there for accuracy

There is an API for GPS data but I have not used that.  Do you need it ?
Ported :   A1200    SD940   G10    Powershot N    G16

Re: EXIF timestamp with milliseconds precision from GPS
« Reply #2 on: 04 / April / 2013, 05:29:58 »
Thanks a lot for your answer.
The exif modification is feasible than, will check the GPS API now (I met those CHDK DE pages before, but didn't know that those are (in GPS relation) the official ones.

The goal is to make aerial photos from the RC plane with accurate GPS position. While the camera will be facing down, I don't expect any accurate data from internal GPS (also the altitude will be bad). So I decide to get those data from external GPS which will always face up, and use altitude from barometer. To do so, I need to have same time on all the devices.
While the plane will got speed 40km/h + 15km/h wind speed =  15m/s
Inaccuracy of 15 meters with photo timestamp granularity of 1 second is huge deviation.  So this is the reason why I am looking for milliseconds and GPS time source.

Once I will write the script I will share it here.

Any inputs are still more than welcome.
Thanks,
Ondrej.

*

Offline lapser

  • *****
  • 1093
Re: EXIF timestamp with milliseconds precision from GPS
« Reply #3 on: 04 / April / 2013, 14:55:28 »
I've been working on modifications to CHDK that may be useful in this application. You can set a very precise shot interval, so that the time between shutter open from one shot to the next is very accurate. If you set the shot interval to 1 second, for example, you can find the precise time of each shot just by knowing the precise time of any one shot. The jpg file number also tells the time in seconds.

To match up the pictures with the external gps, you could find a picture of a landmark with a known gps location, and match that to the point in the gps log that showed that location. For the next picture location, just see what the gps log shows 1 second later.

I don't think you need to find the time from the GPS chip. CHDK has a tick timer accurate to 0.01 second. CHDK also computes a microsecond difference between the camera clock and the tick timer at startup that might be useful. I believe this information is used to store precise times in DNG files. Maybe someone else could fill in the details.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos


*

Offline philmoz

  • *****
  • 3124
    • Photos
Re: EXIF timestamp with milliseconds precision from GPS
« Reply #4 on: 04 / April / 2013, 18:49:21 »
Thanks a lot for your answer.
The exif modification is feasible than, will check the GPS API now (I met those CHDK DE pages before, but didn't know that those are (in GPS relation) the official ones.

The goal is to make aerial photos from the RC plane with accurate GPS position. While the camera will be facing down, I don't expect any accurate data from internal GPS (also the altitude will be bad). So I decide to get those data from external GPS which will always face up, and use altitude from barometer. To do so, I need to have same time on all the devices.
While the plane will got speed 40km/h + 15km/h wind speed =  15m/s
Inaccuracy of 15 meters with photo timestamp granularity of 1 second is huge deviation.  So this is the reason why I am looking for milliseconds and GPS time source.

Once I will write the script I will share it here.

Any inputs are still more than welcome.
Thanks,
Ondrej.

The camera clock is only accurate to 1 second - AFAIK this applies to the GPS data as well as the time stored in the EXIF.

As lapser said, there is a hack for DNG images that adds an approximate sub-second time value to the DNG EXIF; but it is not guaranteed to be accurate.

I'm curious how you would expect to get better than 15m accuracy with a portable GPS receiver mounted to a model airplane travelling at 40km/h?

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)

*

Offline rudi

  • ***
  • 126
  • A590IS_101B, SX260HS_100B
Re: EXIF timestamp with milliseconds precision from GPS
« Reply #5 on: 05 / April / 2013, 06:52:15 »
On sx260, the GPS-modul put there NMEA strings every one second over URAT in a circular buffer (buffer size = 0x10000 Byte). See also here.
You can get GPS-time seconds in 1/1000 from PROPCASE_GPS, but only every one second. See variable _time[5] and _time[6] (always 1000 on signal) in gpsLib.lua from here.

*

Offline ahull

  • *****
  • 634
Re: EXIF timestamp with milliseconds precision from GPS
« Reply #6 on: 06 / April / 2013, 07:06:28 »
Hmm tricky problem. You might be better using spots on the ground (reflective markers or whatever) located with high precision as reference points to assist you interpolating the other positions, as Phil says you will struggle to get the kind of precision and accuracy you are looking for,  from a moving GPS receiver, especially if you don't know your altitude with any degree of accuracy either.

Time for a little experimenting and some imaginative flying I think, scan the ground in east west stripes, then north south ones keeping as level as possible, then do a bit of smart maths to minimise the errors using both data sets. Possibly a laser range finder of some sort tracking the plane may assist in lowering the error margin by fixing the aircraft distance over time from a reference spot.   

What level of accuracy are you aiming for?
« Last Edit: 06 / April / 2013, 07:16:04 by ahull »

 

Related Topics