arf20 / arftracksat

Satellite tracking software for linux
19 stars 4 forks source link

Add AOS circles, properly #6

Closed arf20 closed 2 years ago

arf20 commented 2 years ago

The circle of land from where an observer sees selected sat at EL 0º (or configurable EL?).

arf20 commented 2 years ago

7b56447 Added legacy AOS circles from the old project. Differs from gpredict and stuff. Will probably be reopened in the future.

arf20 commented 2 years ago

image For my future me, use vectors instead of coordinates to compute the circle.

R is earth radius

  1. Compute theta angle radius of circle. theta = arccos(R / (R + satheight))
  2. Make a vector P from the earth center, that points to the point where the sat is exactly in cenith: Just convert the sat coordinates to ECEF, with altitude 0.
  3. Like in the elevation problem, make 3 unit vectors pointing north, east and azimuth, u_lat, u_lon and u_vert.
  4. Subtract from the magnitude of vector P, the depth of the aos circle below the point of step 2. a. Compute chord, a.k.a. the diameter of the aos circle. C = 2 R sin(theta / 2) b. Compute depth of arc. d = R - sqrt(R^2 - (C/2)^2) c. P' = (P / |P|) (|P| - d), or P' = P - d u_vert
  5. Compute circle. Revolve thing incrementing phi. C/2 is radius of the aos circle. X and Y are vectors in the vector base. a. X = u_lon C/2 cos(phi) b. Y = u_lat C/2 sin(phi) c. v = X + Y, the actual whole vector
  6. Place circle where it belongs w = P' + v
arf20 commented 2 years ago

image

Unit vectors tangent to latitude and longitude u_vert = P / |P|

arf20 commented 2 years ago

Bloody done in b8544a0