From d1939b5e6907f078f4f46bdd45024dcf8ae12c01 Mon Sep 17 00:00:00 2001 From: Chris Pham Date: Thu, 18 Jan 2018 10:47:56 -0800 Subject: [PATCH] Add Constants --- ground_station/resources/core/mapping.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ground_station/resources/core/mapping.py b/ground_station/resources/core/mapping.py index d35bfbf..cae06d2 100644 --- a/ground_station/resources/core/mapping.py +++ b/ground_station/resources/core/mapping.py @@ -7,4 +7,20 @@ import urllib import PIL.Image from io import StringIO, BytesIO import os -import time \ No newline at end of file +import time + +##################################### +# Constants +##################################### +_KEY = + +# Number of pixels in half the earth's circumference at zoom = 21 +_EARTHPIX = 268435456 +# Number of decimal places for rounding coordinates +_DEGREE_PRECISION = 4 +# Larget tile we can grab without paying +_TILESIZE = 640 +# Fastest rate at which we can download tiles without paying +_GRABRATE = 4 +# Pixel Radius of Earth for calculations +_pixrad = _EARTHPIX / math.pi \ No newline at end of file