(How) Can this be achieved (DateTime calculation)?

Started by akirot, November 22, 2018, 11:27:19 AM

Previous topic - Next topic

akirot

Background: My camera stores the GPS position with the taken photos. It's configured to acquire satellites even when in standby. Generally this works. However, there is a drawback. Shooting a photo directly after waking up the camera from standby often leads to storing a several minutes old (and therefore often false) position. (I do travel photography and often walk very fast.)

The coordinates of these pictures need some rework. The photos in question can be identified easily.
If the time difference between "GPS Date/Time" and "Create Date" is e.g. greater than 60s the photos usually need a correction of position.

Is there any chance of filtering on a given time difference of two metadata fields (I know in this case composite values are involved)?

Can this be achieved differently?

Any hint is welcome - Thank you

Mario

IMatch has no features which do date arithmetic.
It could be done easily with a custom app, though.

It could also be done if there would be a variable function which calculates the difference (in hours, minutes, seconds, days, ...) between two datetime values. But no such variable function exists yet.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

akirot

I thought so :-(
At least I haven't missed something ;-)
Thank you

Mario

Even if such a variable function would exist, you would have to use it in a data-driven category to group files by the difference etc.

Finding files where the GPS timestamp differs a certain amount of time from another time stamp is not something users often need...

At least with IMatch it can be done with an app. Or a PowerShell script, a Python script, a Java script, a .NET script etc.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Darius1968

Just a thought:
Maybe, such a task could somehow be addressed by exporting the two quantities into an MS Excel file, whereby Excel could generate a computed field, based on these values.  Don't exactly know how to go about it, but it seems like this would possibly be a path to take. 

Mario

This would surely be feasible if this is a one-time only task.
Would also be doable in OpenOffice Calc, of course.

To get the data into Excel, export them to a CSV file via the Text Exporter in IMatch.
Export the fully qualified file name, the GPS timestamp in YYYY-MM-DDTHH:MM:SS format and also the other timestamp you want to use for comparison.
Excel can then diff the two time columns and fill a 4th column with a value. You can then use that column and the file name to identify the files.

If many files are involved, maybe export the result to CSV in Excel and them import it into an Attribute Set in IMatch. You can then select the files based on the Attribute value (the time difference calculated by Excel).
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

akirot

Darius, Mario, thank you for your idea.
It's funny, I pondered over the same approach and it's definitely feasable.
However, workflowwise it's not the road I want to go down. As Mario implicetely states it's more a one-time only procedure.
For the time being I'll stick with my "old" (from the time cameras had no built in GPS) brute force process and overwrite the camera GPS position with the logged position from the track taken in parallel on a separate device.
I had hoped this could be streamlined.
Time will show how this evolves  :)

Mario

The next version of IMatch supports a new timediff math function for variables. It allows you to calculate the time difference between a variable and a fixed datetime value or another variable in seconds, minutes, hours or days.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

Quote from: Mario on November 27, 2018, 06:05:06 PM
The next version of IMatch supports a new timediff math function for variables. It allows you to calculate the time difference between a variable and a fixed datetime value or another variable in seconds, minutes, hours or days.

Ahhh! Cool! Very good!  :)
Best wishes from Switzerland! :-)
Markus

axel.hennig

Quote from: Mario on November 27, 2018, 06:05:06 PM
The next version of IMatch supports a new timediff math function for variables. It allows you to calculate the time difference between a variable and a fixed datetime value or another variable in seconds, minutes, hours or days.

That sounds very good.

The release notes say that in the IMatch help there should be more information, but when I click on the link (given in the release notes) and search for "timediff" I don't get any result.

Mario

That's because these are the release notes for the next version. The help will be updated when the new release becomes available.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook