Geocentric altitude/az of the sun and moon. #299
-
Normally, alt & az are topocentric. However, how can I get geocentric alt & az. Altitude at least, if not azimuth. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 14 replies
-
This is an interesting question! I know an easy way to calculate the geocentric altitude, but it's not clear to me how to do the azimuth. My approach would be to call ObserverVector to obtain a vector from the center of the Earth to the observer. You should pass Then call GeoVector to obtain a vector from the center of the Earth to the celestial body in question. Now you have two geocentric vectors, one for the observer and one for the celestial body, both in consistent J2000 equatorial coordinates. Subtract the observer vector from the body vector to obtain a vector from the observer to the body. Now pass the geocentric observer vector and the observer-centric body vector to the AngleBetween function. This will return an angle in degrees between the two vectors, which is the body's angle with respect to the geocentric zenith. Subtract that angle from 90 degrees to obtain the geocentric altitude angle. I hope this helps! By the way, I am curious: why do you want geocentric angles rather than topocentric angles? That is not something I expected anyone would ever want. |
Beta Was this translation helpful? Give feedback.
-
I was wondering if this is similar to the work you did here #279, but instead of going higher we are going lower towards the core of the Earth. So a negative altitude of sorts, and the horizon will shrink equally as well, like a smaller sphere. |
Beta Was this translation helpful? Give feedback.
OK, I think I figured it out. I was calculating the vectors in J2000 coordinates (EQJ in Astronomy Engine nomenclature), but to get accurate horizontal coordinates, I need to convert them to of-date coordinates (EQD).