Copyright©
Kambiz R. Khojasteh. All rights reserved.
Get future component updates from http://www.delphiarea.com.
DESCRIPTION
TSunTime is a non-visual component to calculate sunrise, sunset, and solar noon for a specific geographical location on the Earth on a specific date.
The algorithm is derived from code appearing at:
http://www.srrb.noaa.gov/highlights/sunrise/sunrise.html
The directory of longitudes and latitudes of major world's cities and towns can be found at:
http://www.infoplease.com/atlas/latitude-longitude.html
PROPERTIES
- Date: TDate
Determines the date of observation.
- Latitude: TLatitude
Determines the latitude of the location for the observer.
Latitude has the following sub properties:
- Degrees: 0..90
Specifies the whole degrees of the angle.
- Minutes: 0..59
Specifies the whole minutes of the the angle.
- Seconds: 0..59
Specifies the whole seconds of the angle.
- Dir: TLatitudeDir
TLatitudeDir = (dNorth, dSouth)
Specifies the direction of the angle related to the Equator.
- Value: Extended
Determines the angle in degrees.
- Radians: Extended
Determines the angle in radians.
- Longitude: TLongitude
Determines the longitude of the location for the observer.
Longitude has the following sub properties:
- Degrees: 0..180
Specifies the whole degrees of the angle.
- Minutes: 0..59
Specifies the whole minutes of the the angle.
- Seconds: 0..59
Specifies the whole seconds of the angle.
- Dir: TLongitudeDir
TLongitudeDir = (dWest, dEast)
Specifies the direction of the angle related to Greenwich.
- Value: Extended
Determines the angle in degrees.
- Radians: Extended
Determines the angle in radians.
- ZenithDistance: TZenith
Determines the zenith distance of the Sun for the sloar time calculations.
90°50' |
|
Sunrise & Sunset (default) |
96° |
|
Beginning Morning & End Evening Civil Twilight |
102° |
|
Beginning Morning & End Evening Nautical Twilight |
108° |
|
Beginning Morning & End Evening Astronomical Twilight |
ZenithDistance has the following sub properties:
- Degrees: 0..180
Specifies the whole degrees of the angle.
- Minutes: 0..59
Specifies the whole minutes of the the angle.
- Seconds: 0..59
Specifies the whole seconds of the angle.
- Value: Extended
Determines the angle in degrees.
- Radians: Extended
Determines the angle in radians.
- TimeZone: Extended
Specifies the time difference in hours from UTC to localize solar times.
- UseSysTimeZone: Boolean
Indicates where the component looks for the time zone information on the specified date.
- Noon: TDateTime (Read-only)
Determines the time of solar noon on the specified location on the specified date. If this property is zero, it means the specified location has no solar noon on the specified date.
- Sunrise: TDateTime (Read-only)
Determines the time of sunrise (or beginning morning) on the specified location on the specified date. If this property is zero, it means the sun never rises on the specified location on the specified date.
- Sunset: TDateTime (Read-only)
Determines the time of sunset (or end evening twilight) on the specified location on the specified date. If this property is zero, it means the sun never sets on the specified location on the specified date.
METHODS
No method.
EVENTS
No event.
HISTORY
- 1.13 (July 1, 2012)
- Redundant uses clauses are removed (Thanks to L.A. van der Hoogt).
- Now changing UseSysTimeZone to false, resets TimeZone property (Thanks to L.A. van der Hoogt).
- 1.12 (June 18, 2012)
- Fixed a possible math exception (Thanks to L.A. van der Hoogt).
- 1.11 (October 28, 2008)
- Fixed the bug in calculating the local solar time when DST starts/ends other than midnight.
- 1.10 (September 12, 2008)
- The ZenithDistance property added, so that beginning morning and end evening twilight times can be calculated.
- 1.05 (August 23, 2005)
- The bug in calculating the time zone as Day-in-month format is fixed (Thanks to Marco Gosselink).
- 1.04 (May 20, 2004)
- Finally, the bug in claculation of daylight time offset is fixed.
- 1.03 (April 10, 2004)
- Hopefully, the bug in claculation of daylight time offset is fixed.
- 1.02 (April 9, 2004)
- The bug in claculation of daylight time offset is fixed.
- 1.01 (December 6, 2003)
- The behavior of UseSysTimeZone property extended. Now, in the evaluation of the time zone, the daylight saving bias will be considered at the specified date (Thanks to Laurent Pierre).
- For your convenience, a database containing the list of latitudes and longitudes of the major cities included in the component's files.
- 1.00 (September 28, 2003)
- Initial release.
ACKNOWLEDGEMENT
Thanks to:
LICENSE
TSunSet component is freeware. You may copy component's files AS LONG AS YOU COPY ALL OF THEM. If you want to change the source code in order to improve the component's features, performance, etc. please send me the new source code so that I can have a look at it. The changed source code should contain descriptions what you have changed, and of course your name. The only thing you MAY NOT CHANGE is the ORIGINAL COPYRIGHT INFORMATION.
DISCLAIMER
TSunSet is provided "AS IS" without any warranty of any kind, either express or implied. The entire risk as to the quality and performance of the software is with you. The author is NOT liable for any DAMAGES resulting from the use and misuse of the component, especially he is NOT liable for DAMAGES that were caused BY ANY VERSION WHICH HAS NOT BEEN PROGRAMMED BY THE AUTHOR HIMSELF.