|
|
Subject:
I need an equation or C or C++ function to know the position of the sun
Category: Science > Astronomy Asked by: juanluissoldi-ga List Price: $15.00 |
Posted:
25 Mar 2005 07:00 PST
Expires: 24 Apr 2005 08:00 PDT Question ID: 500251 |
I'm trying to make a software for which I need a function (or at least an ecuation) that receives latitude, longitude, date, hour and minute, and gives me the position of the sun. I'm not sure about how the scientists describe the position of the stars in the sky, but it could be described by giving the direction (north, south, east, west, or I guess, an angle to know exactly the cardinal point) and the angle with the horizon. So, if we say that the sun is to the west, and its angle with the horizon is 0 or 180, then we would be in the sunset and the sun would be a half visible. If the ecuation or function gives me something like that it would be perfect. I think that the atmosphere can change the apparent position of the sun when it's near the horizon. If it is, I need to know the apparent position and not the real position. |
|
Subject:
Re: I need an equation or C or C++ function to know the position of the sun
Answered By: livioflores-ga on 25 Mar 2005 15:04 PST |
Hi juanluissoldi!! I think that I found what you need, but please do not consider this answer ended until you feel satisfied with it. If you find it unclear or incomplete use the clarification feature to request for a clarification. i will gladly assist you until you get the needed answer. The position of the sun is generally given as an azimuth and altitude value. Azimuth represents the horizontal angle of the sun relative to true north. This angle is always positive in a clockwise direction from north when viewed from above. Altitude represents the vertical angle the sun makes with the horizontal ground plane. It is given as an angle in the range 0° < alt < 90°. Start from the page "Basics of Positional Astronomy and Ephemerides" to get the basic knowledge regarding to the positional concepts: "The observer is located at the centre of his "celestial sphere" with zenith Z above his head and the horizon N-E-S-W. The Sun, Moon or any other celestial body can be identified by the two coordinates altitude h and azimuth alpha (horizontal coordinates). Altitude is the angular distance above the horizon (0 < h < 90°), and azimuth the angular distance, measured along the horizon, westwards from the south point S (in astronomy) or eastwards from the north point N in nautics (0 < alpha <360°)." http://www.jgiesen.de/SME/details/basics/ "Astronomical Algorithms": This page is associated with the above one and give you formulas for calculations . http://www.jgiesen.de/SME/details/basics/meeus.htm "Basic program: position of the Sun": I am pretty sure that at this page you will find what you need, it give you the formulas, explanations, examples and a sample program. http://www.xylem.f2s.com/kepler/sun.html "Calculating the days from J2000": associated page for the above, to calculate the days before J2000.0 http://www.xylem.f2s.com/kepler/days.txt Additional help and references can be found at: "| SQUARE ONE | Solar Position": Very helpful source. http://www.squ1.com/index.php?http://www.squ1.com/solar/solar-position.html "Astronomy Answers: Position of the Sun": This is a more advanced page (in my understand). http://www.astro.uu.nl/~strous/AA/en/reken/zonpositie.html To compare your results you can use this online calculator: "Calculation of Sun Position, Sunrise and Sunset" http://www.volker-quaschning.de/datserv/sunpos/index_e.html Another example of this calculations is here: "CALCULATE ALTITUDE AND AZIMUTH OF THE SUN FOR YOURSELF" http://www.saao.ac.za/sky/sunposn.html Search strategy: "position of the sun" "position of the sun" azimuth I hope that this helps you. and remember to feel free to request for a clarification if you need it. Regards. livioflores-ga | |
| |
| |
| |
|
|
Subject:
Re: I need an equation or C or C++ function to know the position of the sun
From: asha_gator-ga on 08 Apr 2005 21:10 PDT |
Hi, Here is an IDL function that returns the position of the sun in Right Ascension (RA( and Declination(DEC) for a gived Julian Date. RA and DEC are the co-ordinates usually used by astronomers to describe the location of a celestial body. http://idlastro.gsfc.nasa.gov/ftp/pro/astro/sunpos.pro Hope this helps. I'll be happy to provide any more clarifications if necessary |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |