| 112 | delay_matrix[i, ...] = 0 |
| 113 | |
| 114 | def to_cbf(self, lat_long, |
| 115 | length): # the xyz coordinate system. length: number of nodes |
| 116 | cbf = [] |
| 117 | radius = 6371 |
| 118 | for num in range(0, length): |
| 119 | cbf_in = [] |
| 120 | R = radius |
| 121 | if len(lat_long[num]) > 2: |
| 122 | R += lat_long[num][2] |
| 123 | z = R * math.sin(math.radians(float(lat_long[num][0]))) |
| 124 | x = R * math.cos(math.radians(float( |
| 125 | lat_long[num][0]))) * math.cos( |
| 126 | math.radians(float(lat_long[num][1]))) |
| 127 | y = R * math.cos(math.radians(float( |
| 128 | lat_long[num][0]))) * math.sin( |
| 129 | math.radians(float(lat_long[num][1]))) |
| 130 | cbf_in.append(x) |
| 131 | cbf_in.append(y) |
| 132 | cbf_in.append(z) |
| 133 | cbf.append(cbf_in) |
| 134 | return cbf # xyz coordinates of all the satellites |
| 135 | |
| 136 | def calculate_bound(self, inclination_angle, height): |
| 137 | bound_distance = 6371 * math.cos( |