Files
ShowMeYourBigSatellite/utils.py
Julien Lengrand-Lambert 71f3fe5153 Creates very first demo.
The coordinates are randomly generated every time a GET request to get_coordinates is made.
The client requests for a new position every second once the Google Map stuff is initialized.

Communication is done using JSON objects.
2014-07-30 19:00:25 +02:00

13 lines
297 B
Python

import random
def random_coordinates():
lat_range = [59, 61]
long_range = [9, 17]
return (
random.randint(long_range[0], long_range[1]),
random.randint(lat_range[0], lat_range[1]))
if __name__ == "__main__":
for i in range(10):
print random_coordinates()