Sun position
Sun position algorithm
|
main.c - Simple demo program for Sun position using rectangular coordinates More...
Go to the source code of this file.
Macros | |
#define | SITE_LATITUDE_deg -37.8236 |
North lats +ve, south -ve (deg) | |
#define | SITE_LONGITUDE_deg 144.9913 |
East lons +ve, west -ve (degrees) | |
#define | SITE_HEIGHT_m 30.0 |
Height above sea level (metres) | |
#define | SITE_PRESSURE_hPa 1013.0 |
Atmospheric pressure (hPa = mbar) | |
#define | SITE_TEMPERATURE_degC 15.0 |
Temperature (degrees Celsius) | |
#define | SITE_TIMEZONE_h 10.0 |
East zones +ve, west -ve (hours) | |
Functions | |
void | demo1 (void) |
Sample code demonstrating the calculation of the position of the Sun using rectangular coordinates. More... | |
void | demo2 (void) |
Sample code using the greatly simplified calculation of the position of the Sun using interpolated coordinates. More... | |
void | demo4 (void) |
void | sunTopocentricFast (double j2kUtc_d, const Sky_DeltaTs *dTs, const Sky_SiteProp *site, Sky_SiteHorizon *topo) |
Uses previously calculated values of the Sun's apparent coordinates and interpolation to quickly calculate the Sun's topocentric position. More... | |
int | main (void) |
main.c - Simple demo program for Sun position using rectangular coordinates
See the main page (or the end of this source file) for a description of this file.
Copyright (c) 2020, David Hoadley vcrum All rights reserved. ble@ westn et.c om.au
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file main.c.
void demo1 | ( | void | ) |
Sample code demonstrating the calculation of the position of the Sun using rectangular coordinates.
void demo2 | ( | void | ) |
Sample code using the greatly simplified calculation of the position of the Sun using interpolated coordinates.
void sunTopocentricFast | ( | double | j2kUtc_d, |
const Sky_DeltaTs * | dTs, | ||
const Sky_SiteProp * | site, | ||
Sky_SiteHorizon * | topo | ||
) |
Uses previously calculated values of the Sun's apparent coordinates and interpolation to quickly calculate the Sun's topocentric position.
[in] | j2kUtc_d | Days since Greenwich noon, 1-Jan-2000, UTC timescale |
[in] | deltas | Delta T values, as set by the sky_initTime() (or sky_initTimeSimple() or sky_initTimeDetailed()) routines |
[in] | site | Properties of the observing site, particularly its geometric location on the surface of the Earth, as set by the sky_setSiteLocation() function (or sky_setSiteLoc2()) |
[out] | topo | Topocentric position, in both rectangular (unit vector) form, and as Azimuth and Elevation (altitude) angles |