summaryrefslogtreecommitdiff
path: root/Satellite_Communications/Chapter_5.ipynb
blob: aeb7af0d1599d6bb22e211f1b5efc3fe23de811d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{
 "metadata": {
  "name": "",
  "signature": "sha256:7a8d496ef0b6af4e2ff18bbc317ae6cd0dcf6c23c6e6b55a17cef7eadf262706"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 5: Polarization"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.1, Page 112"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable Declararion\n",
      "\n",
      "L=18    #Latitude of earth station(degrees)\n",
      "PE=-73  #Longitude of earth station(degrees)\n",
      "Pss=-105 #Satellite location(degrees)\n",
      "aGSO=42164 #Circumference of earth (km)\n",
      "R=6371 #Radius of earth(km)\n",
      "\n",
      "import math\n",
      "#Calculation\n",
      "\n",
      "B=PE-Pss  #Angle between the planes containing a and c (degrees)\n",
      "Rx=R*math.cos(L*3.142/180)*math.cos(B*3.142/180) #Geocentric-equitorial coordinate(km)\n",
      "Ry=R*math.cos(L*3.142/180)*math.sin(B*3.142/180) #Geocentric-equitorial coordinate(km)\n",
      "Rz=R*math.sin(L*3.142/180) #Geocentric-equitorial coordinate(km)\n",
      "import numpy as np\n",
      "r=np.array([Rx,Ry,Rz]) #Coordinates for local gravity direction\n",
      "k=np.array([Rx-aGSO,Ry,Rz])#geocentric-equitorial coordinates for propagation direction\n",
      "e=np.array([0,0,1]) # #geocentric-equitorial coordinates for polarization vector\n",
      "\n",
      "f=np.cross(k,r) #Direction of normal to reference plane\n",
      "modf=(f[0]**2+f[1]**2+f[2]**2)**0.5\n",
      "g=np.cross(k,e)# Direction of normal to plane contaning e and k\n",
      "h=np.cross(g,k) #Direction of polarization of the plane \n",
      "modh=(h[0]**2+h[1]**2+h[2]**2)**0.5\n",
      "p=(h/modh)\n",
      "p[0]=round(p[0],3)\n",
      "p[1]=round(p[1],3)\n",
      "p[2]=round(p[2],3)\n",
      "E=round(math.asin(np.dot(p,f)/modf)*180/3.142,2)\n",
      "\n",
      "print \"The Angle of polarization at given location is\",E,\"degrees\"\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Angle of polarization at given location is -58.67 degrees\n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}