Hello Donald, Many of us share your interest in developing the logic to suit our specific purposes. Many of us have been there and done that. I even have the Sunset tee shirt that I displayed at a NASS conference way back when.
The starting point is the spherical triangle for your position. The important equations are the Navigators' Equations for the altitude and azimuth of the sun or any celestial object. You input your location and time knowing the latitude and declination of the sun. It is easy to remember sine, sine, sine, cos, cos cos. Adding the specifics, Sin Altitude = Sin x Dec x Sin Lat + Cos Dec x Cos Lat x Cos time. Azimuth is then calculated by the law of sines as applied to your spherical triangle. In this case Sin Azimuth = Cos Dec x Sin Time / Cos Alt. These are the standard equations to use in your spreadsheet. I have used them in many varied spreadsheets, projects and presentations. A good example is available on my website www.walkingshadow.info as presentation # 21. "Sunset Phenomenon" The Use of Simple Spherical Trigonometry to Determine When, Where and How the Sun Sets" Time is the local hour angle and longitude affects this for your specific location. Expect problems developing the equations in spreadsheets like Excel as it deals with radian measure for trig functions and there are ambiguities for different quadrants. But in reality, the only way to understand this stuff is to do it. My high school trig teacher over 50 years ago said "All knowledge comes up through a pencil" Your spreadsheet is the modern pencil, a very shape pencil, easily broken. From: Donald Christensen Sent: Tuesday, August 23, 2011 7:29 PM To: sundial@uni-koeln.de Subject: sun position I need to write a spreadsheet to find the sun position. I know there are already many programs that do this. However, I need to write one myself because: 1. I'll learn as I write 2. It will give the sun position in the format that I need 3. I can tweak the spreadsheet to give the same answer but in another format. My question is, where do I start? I want to input Latitude Longitude Time The sun position will then be in X Y Z coordinates. I'll back up. I'm drawing a sundial in Autodesk Inventor. I can place lights that represent the sun. I can move the lights while I film my animation and watch the shadows move. That's why I need the sun position in XYZ format. I want the shadows accurate. I don't need the sun to be 150,000,000 km away from my sundial. It only needs to be 100 meters away I want to first write it to output azmith and altitude. (or the same as other programs whatever the output is) I'll then tweak my spreadsheet to convert this to XYZ -- Cheers Donald 0423 102 090 This e-mail is privileged and confidential. If you are not the intended recipient please delete the message and notify the sender. Un-authorized use of this email is subject to penalty of law. So there! -------------------------------------------------------------------------------- --------------------------------------------------- https://lists.uni-koeln.de/mailman/listinfo/sundial
--------------------------------------------------- https://lists.uni-koeln.de/mailman/listinfo/sundial