Calculating the Phase Angle between the Sun / ISS and an observer on the earth

て烟熏妆下的殇ゞ 提交于 2019-12-30 09:52:29

问题


To help me with calculating the visual magnitude of the International Space Station I need to be able to calculate the phase angle.

Can anyone help me calculate that?

For any moment in time I have generated the Obs object and the ISS object using PyEphem. For the observer I have the Alt/Az to the ISS and Alt/Az to the Sun... And of course I have the ISS.range (in km) from the observer. So it looks to me that I should be able to calculate the phase angle with "simple" geometry. Unfortunately, this simple geometry is a little beyond what I am capable of confidently working out (been too long I guess since I last did that).

ANSWER: I figured it out (with the help of the good old Internets) This is a partial code snippet (updated with correction for ephem.earth_radius to Km by Leandro Guedes)

 # SSA Triangle.  We have side a and b and angle C.  Need to solve to find side c 
 a = sun.earth_distance * au - ephem.earth_radius/1000 #distance sun from observer (Km)
 b = iss.range / 1000 # distance to ISS from observer (Km)
 angle_c = ephem.separation( (iss.az, iss.alt), ( sun.az, sun.alt) ) 
 c = math.sqrt( math.pow(a,2) + math.pow(b,2) - 2*a*b*math.cos( angle_c) )
 # now we find the "missing" angles (of which angle A is the one we need)
 angle_a = math.acos((math.pow(b,2) + math.pow( c,2) - math.pow(a,2)) / (2 * b * c)) 
 angle_b = math.pi - angle_a - angle_c #note: this is basically ZERO - not a big surprise really - and I don't need this anyway.
 phase_angle = angle_a # This is the angle we need.  BINGO!!

回答1:


ANSWER: I figured it out (with the help of the good old Internets) This is a partial code snippet (updated with correction for ephem.earth_radius to Km by Leandro Guedes)

 # SSA Triangle.  We have side a and b and angle C.  Need to solve to find side c 
 a = sun.earth_distance * au - ephem.earth_radius/1000 #distance sun from observer (Km)
 b = iss.range / 1000 # distance to ISS from observer (Km)
 angle_c = ephem.separation( (iss.az, iss.alt), ( sun.az, sun.alt) ) 
 c = math.sqrt( math.pow(a,2) + math.pow(b,2) - 2*a*b*math.cos( angle_c) )
 # now we find the "missing" angles (of which angle A is the one we need)
 angle_a = math.acos((math.pow(b,2) + math.pow( c,2) - math.pow(a,2)) / (2 * b * c)) 
 angle_b = math.pi - angle_a - angle_c #note: this is basically ZERO - not a big surprise really - and I don't need this anyway.
 phase_angle = angle_a # This is the angle we need.  BINGO!!

(Formally posting my answer AS an ACTUAL answer - yes - it took me a while to figure out that's what I should have done all along).



来源:https://stackoverflow.com/questions/19759501/calculating-the-phase-angle-between-the-sun-iss-and-an-observer-on-the-earth

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!