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

Method do_get_distance

starrynet/cli.py:139–146  ·  view source on GitHub ↗

calculate the distance of two node at a certain time

(self, line)

Source from the content-addressed store, hash-verified

137 self.sn.run_routing_deamon()
138
139 def do_get_distance(self, line):
140 "calculate the distance of two node at a certain time"
141 arg, args, line = self.parseline(line)
142 rest = line.split(' ')
143 node_distance = self.sn.get_distance(int(rest[0]), int(rest[1]),
144 int(rest[2]))
145 output("The distance between node#%d and node#%d is %.2fkm.\n" %
146 (int(rest[0]), int(rest[1]), node_distance))
147
148 def do_get_neighbors(self, line):
149 "list the neighbor node indexes of node at a certain time"

Callers

nothing calls this directly

Calls 1

get_distanceMethod · 0.80

Tested by

no test coverage detected