4

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!!
  • Note that if you are working with Km, you should also conver Earth Radius, once it is given in meters. `a = sun.earth_distance * au - ephem.earth_radius *10**(-3)` – Leandro Guedes Apr 18 '17 at 19:16
  • Thanks for that catch. ephem.earth_radius is indeed in Meters. Just as well I wasn't programming for a lander or something... we would have gone BOOM! – Liam Kennedy Apr 19 '17 at 20:33
  • Liam! how do you calculate angle_a? where 2*b*c comes? – whitenoisedb Jul 15 '17 at 15:25
  • @whitenoisedb The entire code used to calculate everything is shown. The base values come from the Python Library PyEphem. The values for a,b,c and everything else used in the calculation are all right there. please look again (hint... look for a = and b = and c = . – Liam Kennedy Jul 16 '17 at 18:37

2 Answers2

0

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).

0

Since angle_b is practically zero (max 0.00016 degrees at perihelion and ISS directly overhead), you could just do angle_a = math.pi - angle_c.

This has about the same accuracy, since you already have made some minor errors with distance a.

Jeroen
  • 1
  • 2