Question

I have satellite imagery with the latitude, longitude, and position of the sun (azimuth, zenith, and elevation), but no time-stamp.

Short of using an astronomy almanac, is there a way to calculate the time from the sun's position and image location?

I've seen Matlab scripts and ArcGIS tools that do the reverse of this, i.e. they calculate the sun's position based on the lat, lon, and time of the observer, but I'm missing the "time" variable in this case and would like to find it for all of the images.

Was it helpful?

Solution

Here's one (slightly rough) method, as the position calculators I've seen don't seem particularly easy to reverse-engineer for "time given a known date".

I took an existing sun position calculator, Sun Position from the file exchange. I then wrote two wrapper functions to this function to output info in a slightly more useful format for searching:

sun_hour → calculates hourly (zero minute) positions across a given date.

sun_min → given a date and hour, calculates minutely positions one hour either side of thate date/hour.

Since the original function is quick, both of these take fractions of a second even on my not particularly good computer.

Then, I wrote a quick time location function along the following lines, using measured azimuth alone (along with time/location inputs giving the date and position in the formats required by sun_position).

time.min = 0;

% find list of azimuths, find closest match
[azlist, zlist, hours] = sun_hour(time, location);
n = find(abs(azlist-azimuth)==min(abs(azlist-azimuth)));
time.hour = hours(n);

% ditto, but around the time found at previous step
[azlist, zlist, hours, minutes] = sun_min(time, location);
n = find(abs(azlist-azimuth)==min(abs(azlist-azimuth)));

% output time
time.hour = hours(n);
time.min = minutes(n);

I haven't thoroughly tested it but it seems to work fine for a rough estimate (of course, assuming the accuracy of the original position calculator is good). I'm assuming that you don't need any more accuracy than minutely (unless you're managing to measure the position very accurately). You will need to be careful about how whichever calculator you end up using handles time-zones, whether the output is local time or not, etc.

OTHER TIPS

Since you know the day, in a loop you could make a guess at the time, get the sun position, use the result to automatically make a better guess until you get close enough. You could do this as a binary search.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top