MCPcopy Index your code
hub / github.com/SpaceNetLab/StarryNet / get_distance

Method get_distance

starrynet/sn_synchronizer.py:143–149  ·  view source on GitHub ↗
(self, sat1_index, sat2_index, time_index)

Source from the content-addressed store, hash-verified

141 print("Bird routing in all containers are running.")
142
143 def get_distance(self, sat1_index, sat2_index, time_index):
144 delaypath = self.configuration_file_path + "/" + self.file_path + '/delay/' + str(
145 time_index) + '.txt'
146 adjacency_matrix = sn_get_param(delaypath)
147 delay = float(adjacency_matrix[sat1_index - 1][sat2_index - 1])
148 dis = delay * (17.31 / 29.5 * 299792.458) / 1000 # km
149 return dis
150
151 def get_neighbors(self, sat_index, time_index):
152 neighbors = []

Callers 2

example.pyFile · 0.80
do_get_distanceMethod · 0.80

Calls 1

sn_get_paramFunction · 0.70

Tested by

no test coverage detected