Convert a time given in UTC to Solar Apparent or Solar Mean Time.
External Function Call Sequence:
>> [SAT,SMT] = UTC2SolarApparentTime('2000/03/20 15:00:00',-1.416667);
>> [SAT,SMT] = UTC2SolarApparentTime('2000/09/23 15:00:00',-1.416667);
UTC (Coordinated Universal Time YYYY/MM/DD hh:mm:ss) [N x 19] char
Lon (Site Longitude in degrees -180:180 W(-) E(+)) [N x 1]
SAT (Solar Apparent Time YYYY/MM/DD hh:mm:ss) [N x 19] char
SMT (Solar Mean Time YYYY/MM/DD hh:mm:ss) [N x 19] char
Just ignore my previous comment! I realised soon after posting that it is an issue that needs dealt with prior to calling this function.
This is much appreciated! However, I am assuming this doesn't take into account daylight savings? For example in the UK the equation to convert to solar time would require an hour taken off the watch-time.
Any ideas for this?
Also, if you are trying to compare the Solar Apparent Time, (SAT) be sure to input the longitude in degrees (W < 0, E > 0).
You can see that this function will match the solutions (almost exactly ... depending on the year) to those solutions in Example 4 of the ASTRONOMICAL INFORMATION SHEET No. 58 http://astro.ukho.gov.uk/nao/services/ais58.pdf
Latitude and Longitude are needed to determine the input time value to the equation of time (UT). They aren't needed to determine the equation of time ... it has nothing to do with latitude and longitude. Perhaps you should compare to a location with a 0hr local time offset.
See this document for a description of what the equation of time is, you can also compare results to this as an "example". I don't guarantee any specific accuracy with EoT as it depends on the mean anomaly of the sun which is obviously a first/second order approximation.
The code does not appear to be working properly for me. I am trying to calculate the solar time of the ISS, and the solar day takes about 2.75 hours instead of 1.5 as expected. I further checked my results by plugging time and longitude into a converter on the NOAA website. It returned an Equation of Time that differed by 4%. Any ideas? Do you have some examples of where it works.