Code covered by the BSD License

### Highlights from Convert UTC to Solar Apparent Time

Be the first to rate this file! 9 Downloads (last 30 days) File Size: 3.45 KB File ID: #32804 Version: 1.0

# Convert UTC to Solar Apparent Time

### Darin Koblick (view profile)

Convert a time given in UTC to Solar Apparent or Solar Mean Time

File Information
Description

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);

Input Description:
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]

Output Description:
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

Acknowledgements

Equation Of Time inspired this file.

MATLAB release MATLAB 7.11 (R2010b)
20 Oct 2012 Darin Koblick

### Darin Koblick (view profile)

Brandon,

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

Comment only
20 Oct 2012 Darin Koblick

### Darin Koblick (view profile)

Brandon,

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.

http://www.ips.gov.au/Educational/2/1/14

Comment only
18 Oct 2012 Brandon

### Brandon (view profile)

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.

Comment only