Distance Elevation and Azimuth Calculation » History » Version 2

LANVIN, Jean-baptiste, 12/14/2015 11:51 PM

1 1 LANVIN, Jean-baptiste
h1. Distance Elevation and Azimuth Calculation
2 1 LANVIN, Jean-baptiste
3 1 LANVIN, Jean-baptiste
h3.    ECI coordinates
4 1 LANVIN, Jean-baptiste
5 1 LANVIN, Jean-baptiste
The coordinates of the satellite given by the propagator are given in the Earth-Centered Inertial (ECI) coordinate system . This system is a cartesian coordinate system whose origin is located at the center of the earth (at the center of mass to be precise). The z axis is orthogonal to the equatorial plane pointing north, the x axis is pointing towards the vernal equinox, and the y axis is such that the system remains a direct orthogonal system The x and y axis are located in the equatorial plane as shown in the following figure.
6 1 LANVIN, Jean-baptiste
7 1 LANVIN, Jean-baptiste
8 1 LANVIN, Jean-baptiste
!ECI.jpg!
9 1 LANVIN, Jean-baptiste
10 1 LANVIN, Jean-baptiste
This system is convenient to represent the positions and velocities of space objects rotating around the earth considering firstly that the origin of the system is the center of mass of the earth, and that the system does not rotate with the earth. Indeed, "inertial" means that the coordinate system is not accelerating, therefore not rotating: considering the way the three axis are defined, the system is fixed in space regarding the stars.
11 1 LANVIN, Jean-baptiste
The problem here is that our ground is station is located on the surface of the earth, so its coordinates are given in the geodetic coordinate system, which is obviously a system that is rotating with the earth.
12 1 LANVIN, Jean-baptiste
We had therefore two options: either calculate the coordinates of the ground station in the ECI coordinate system, or calculate the coordinates of the satellite in the geodetic coordinate system. We chose the first option .
13 1 LANVIN, Jean-baptiste
14 1 LANVIN, Jean-baptiste
h3. θ(τ) calculation
15 1 LANVIN, Jean-baptiste
16 1 LANVIN, Jean-baptiste
The main problem to go from the geodetic system to the ECI system is to calculate the angle between the ground station meridian (longitude) and the vernal equinox direction at the time of interest τ. This angle, also called the local sidereal time is a measure of time that depends on the stars, and not on the sun and that is why it is a bit touchy to calculate. For our implementation and tests, we relied on the algorithms and example given in the magazine _Satellite Times_ ,in the column Orbital Coordinate Systems, Part II. θ(τ) is actually defined as the sum between the ground station east longitude and the greenwich sidereal time GST, which is the angle between the greenwich meridian and the vernal equinox that we will note  θg(τ).
17 1 LANVIN, Jean-baptiste
θg(τ)can be calculated using the formula:
18 1 LANVIN, Jean-baptiste
19 1 LANVIN, Jean-baptiste
<pre>
20 1 LANVIN, Jean-baptiste
θg(τ) = θg(0h) + ωe·Δτ (1)
21 1 LANVIN, Jean-baptiste
</pre>
22 1 LANVIN, Jean-baptiste
23 1 LANVIN, Jean-baptiste
24 1 LANVIN, Jean-baptiste
where Δτ is the number of seconds elapsed since 0h at the time of the calculation τ and ωe = 7.29211510 × 10-5 radians/second is the Earth's rotation rate. θg(0h) is the GST calculated at 0h that day and it is given as:
25 1 LANVIN, Jean-baptiste
26 1 LANVIN, Jean-baptiste
<pre>
27 1 LANVIN, Jean-baptiste
θg(0h) = 24110.54841 + 864018.812866 Tu + 0.093104 Tu2 - 6.2 × 10-6 Tu3 (2)
28 1 LANVIN, Jean-baptiste
</pre>
29 1 LANVIN, Jean-baptiste
30 1 LANVIN, Jean-baptiste
where Tu = du/36525 and du is the number of days of Universal Time elapsed since the julian date 2451545.0 (2000 January 1, 12h UT1). Therefore, to calculate θg(τ), the first thing we need is the julian date of the day, which we can deduce from the julian date of the year as follow:
31 1 LANVIN, Jean-baptiste
32 1 LANVIN, Jean-baptiste
<pre>
33 1 LANVIN, Jean-baptiste
JD = Julian_Date_of_Year() + Number of day since the first of January
34 1 LANVIN, Jean-baptiste
</pre>
35 1 LANVIN, Jean-baptiste
36 1 LANVIN, Jean-baptiste
37 1 LANVIN, Jean-baptiste
This calculation is done in the VI julian date.vi where the calculation of the Julian date of the year is done using the Meeus' approach.
38 1 LANVIN, Jean-baptiste
39 1 LANVIN, Jean-baptiste
Once we had the Julian date, we could calculate du and therefore Tu, and that way we calculated θg(0h) using (2). From there, we were able to calculate θg(τ) using (1) and since we know the east longitude of the antenna, we obtained θ(τ) by a simple sum. Those calculations are done in the VI tetag.vi where θ(τ) is calculated in radians.
40 1 LANVIN, Jean-baptiste
41 1 LANVIN, Jean-baptiste
42 1 LANVIN, Jean-baptiste
43 1 LANVIN, Jean-baptiste
44 1 LANVIN, Jean-baptiste
45 1 LANVIN, Jean-baptiste
h3. Geodetic to ECI conversion
46 1 LANVIN, Jean-baptiste
47 1 LANVIN, Jean-baptiste
Once we had the local sidereal time, we were able to make the change of system using the following formulas:
48 1 LANVIN, Jean-baptiste
49 1 LANVIN, Jean-baptiste
<pre>
50 1 LANVIN, Jean-baptiste
x=Rcos θ
51 1 LANVIN, Jean-baptiste
y=Rsin θ
52 1 LANVIN, Jean-baptiste
z=Re sin φ
53 1 LANVIN, Jean-baptiste
</pre>
54 1 LANVIN, Jean-baptiste
55 1 LANVIN, Jean-baptiste
where Re = 6378.135 km, φ is the latitude of the antenna, θ is the local sidereal time and R = Re cos φ
56 1 LANVIN, Jean-baptiste
Those calculations are done in the VI _Antenna coordinates ECI.vi_ and x,y,and z are in kilometers.
57 1 LANVIN, Jean-baptiste
58 1 LANVIN, Jean-baptiste
h3. Distance
59 1 LANVIN, Jean-baptiste
60 1 LANVIN, Jean-baptiste
Now that we had the coordinates of the ground station in the ECI coordinate system, and since the propagator gives us the coordinates of the satellite, the distance was pretty trivial to calculate. Indeed, as we said before, the ECI coordinate system is a cartesian system, and therefore the distance between two points A(x,y,z) and B(x',y',z') is defined by:
61 1 LANVIN, Jean-baptiste
62 1 LANVIN, Jean-baptiste
<pre>
63 1 LANVIN, Jean-baptiste
d= sqrt((x-x')²+(y-y')²+(z-z')²)
64 1 LANVIN, Jean-baptiste
</pre>
65 1 LANVIN, Jean-baptiste
66 1 LANVIN, Jean-baptiste
We used this formula to calculate the distance satellite to ground station in the VI distance.vi, which is very important to know for the link budget (for the free space loss) as we will see after.
67 1 LANVIN, Jean-baptiste
   
68 1 LANVIN, Jean-baptiste
h3. Elevation and azimuth
69 1 LANVIN, Jean-baptiste
70 2 LANVIN, Jean-baptiste
The elevation and the azimuth are very important to know as well in order to analyse the satellite link, because if the elevation is too low (below 10 degrees) 
71 1 LANVIN, Jean-baptiste
it is not even worth calculating the link budget because the communication cannot be settled.
72 2 LANVIN, Jean-baptiste
The first step for this calculation is to calculate the range vector r, which is defined by:
73 1 LANVIN, Jean-baptiste
74 1 LANVIN, Jean-baptiste
<pre>
75 1 LANVIN, Jean-baptiste
 r = [rx, ry, rz] = [xs - xa, ys - ya, zs - za].
76 1 LANVIN, Jean-baptiste
(xa,ya,za) being the antenna ECI coordinates and (xs,ys,zs) the satellite ECI coordinates
77 1 LANVIN, Jean-baptiste
</pre>
78 1 LANVIN, Jean-baptiste
79 1 LANVIN, Jean-baptiste
But r is in the ECI coordinate system which is not adapted for the elevation and the azimuth calculation. Therefore, we had to make another change of coordinates from the ECI to the Topocentric-Horizon Coordinate System that is defined in the figure below. 
80 1 LANVIN, Jean-baptiste
81 1 LANVIN, Jean-baptiste
!Topocentric-Horizon.jpg!
82 1 LANVIN, Jean-baptiste
83 1 LANVIN, Jean-baptiste
In the figure, θ is the local sidereal time, and φ is the latitude of the antenna. The new coordinates of the range vector r(Rs,Re,Rz) are therefore defined by  
84 1 LANVIN, Jean-baptiste
85 1 LANVIN, Jean-baptiste
<pre>
86 1 LANVIN, Jean-baptiste
87 1 LANVIN, Jean-baptiste
rS = sin φ cos θ rx + sin φ sin θ ry - cos φ rz
88 1 LANVIN, Jean-baptiste
89 1 LANVIN, Jean-baptiste
rE = -sin θ rx + cos θ ry
90 1 LANVIN, Jean-baptiste
91 1 LANVIN, Jean-baptiste
rZ = cos φ cos θ rx + cos φ sin θ ry + sin φ rz
92 1 LANVIN, Jean-baptiste
93 1 LANVIN, Jean-baptiste
</pre>
94 1 LANVIN, Jean-baptiste
95 1 LANVIN, Jean-baptiste
The range to the satellite is defined by:
96 1 LANVIN, Jean-baptiste
97 1 LANVIN, Jean-baptiste
<pre>
98 1 LANVIN, Jean-baptiste
r = √ [rS2 + rE2 + rZ2]
99 1 LANVIN, Jean-baptiste
</pre>
100 1 LANVIN, Jean-baptiste
101 1 LANVIN, Jean-baptiste
The elevation and the azimuth are then given by
102 1 LANVIN, Jean-baptiste
103 1 LANVIN, Jean-baptiste
<pre>
104 1 LANVIN, Jean-baptiste
El = arcsin(rZ / r)
105 1 LANVIN, Jean-baptiste
106 1 LANVIN, Jean-baptiste
Az = arctan(-rE / rS)
107 1 LANVIN, Jean-baptiste
</pre>
108 1 LANVIN, Jean-baptiste
109 1 LANVIN, Jean-baptiste
h3. Tests
110 1 LANVIN, Jean-baptiste
111 1 LANVIN, Jean-baptiste
In order to check the validity of our program we had to test each step of our calculation.
112 1 LANVIN, Jean-baptiste
Considering that the local sidereal time is not a very familiar value, to test the calculation, we used the examples given in Satellite Times to compare our values. We first check the julian date of interest and then the value of θg(τ) and θ(τ).
113 1 LANVIN, Jean-baptiste
Once that was ok, the distance was easier to test because we knew that we were supposed to find something around 850 km.