How to explain the elevation of the observer when calculating sunrise / sunset?

How to explain the elevation of the observer when calculating sunrise / sunset?

Calculating the rise / setting for any lat / longitude is not a problem, but how to account for elevation instead of sea level ??? I didn't have enough combinations to try, and after spending more than three days I put my hand to help.

I'm using Paul Schlyter's excellent public domain C source, which seems to be the most common. This allows you to set the "height above which the Sun should cross" like -12 for nautical twilight or -35/60 etc., but I'm not sure how to change this to account for the observer's elevation above sea level.

For example, Quito in Ecuador is one of the highest cities at an altitude of 2850 m above sea level.
Lat + Lon: -78.46784, -0.18065
Time Zone: -5
Elev: 2850m

Using the Casio calculator ( http://keisan.casio.com/exec/system/1224686065 ), one of the few I have found that takes elevation into account, returns the following (Date = Jan 1, 2017):
Sunrise = 6:14 Sunset = 18: 22 Elevation = 0m <- I can already get this
Sunrise = 6: 05 Sunset = 18: 30 Elevation = 2850m <- but how can I get it?

I can get the first one (elev = 0) by setting Altitude = -35/60 (-0.58333) UpperLimb = 1.0 But how do I get the second one?

I am using the following function:

int sunriset( int year, int month, int day, double lon, double lat,
                  double altit, int upper_limb, double *trise, double *tset )
/*************************************************************/
/* altit = the altitude which the Sun should cross           */
/*         Set to -35/60 degrees for rise/set, -6 degrees    */
/*         for civil, -12 degrees for nautical and -18       */
/*         degrees for astronomical twilight.                */
/* upper_limb: non-zero -> upper limb, zero -> center        */
/*         Set to non-zero (e.g. 1) when computing rise/set  */
/*         times, and to zero when computing start/end of    */
/*         twilight.                                         */
/**************************************************************/

      

SUNRISE.C (I made this READY EXAMPLE): with Quito lat / long / etc hardcoded: https://pastebin.com/XSWR2Hby Compilation: gcc sunrise.c -o sunrise.exe

+3


source to share


1 answer


Assuming that the environment is not elevated, that is, on a mountain and not on a large plateau, you can first calculate the circle that is formed by all the points tangent to the Earth's surface that pass through the point of interest (Quito), and then find the earliest sunrise and the last sunset on this circle. If the sun shines on any part of this circle, it will also shine at the point of interest.



On a plateau, I don't think you need to do anything (and if Quito is on a plateau, that means Casio is wrong), since the right thing to do is to do calculations for an Earth with a large radius or diameter, but for that in the code Paul is not a variable. Presumably, the effect of the planet's size is too small to be relevant, and the sun's rays reaching Earth are considered parallel (which they are not).

0


source







All Articles