1
0
Fork 0

Create a settings option for upcming passes window

merge-requests/321/head
Nikos Roussos 2017-03-19 01:32:32 +02:00
parent dbbdffa1b4
commit fa70f0e8f0
No known key found for this signature in database
GPG Key ID: BADFF1767BA7C8E1
2 changed files with 11 additions and 5 deletions

View File

@ -576,7 +576,8 @@ def station_view(request, id):
# show only if >= configured horizon and in next 6 hours,
# and not directly overhead (tr < ts see issue 199)
if tr < ephem.date(datetime.today() + timedelta(hours=6)):
if tr < ephem.date(datetime.today() +
timedelta(hours=settings.STATION_UPCOMING_END)):
if (float(elevation) >= station.horizon and tr < ts):
valid = True
if tr < ephem.Date(datetime.now() +

View File

@ -230,16 +230,21 @@ MAPBOX_GEOCODE_URL = 'https://api.tiles.mapbox.com/v4/geocode/mapbox.places/'
MAPBOX_MAP_ID = getenv('MAPBOX_MAP_ID', '')
MAPBOX_TOKEN = getenv('MAPBOX_TOKEN', '')
# Observations datetimes in minutes
# Observations settings
# Datetimes in minutes for scheduling OPTIONS
# Deletion range in minutes
DATE_MIN_START = '15'
DATE_MIN_END = '75'
DATE_MAX_RANGE = '480'
# Station heartbeat in minutes
STATION_HEARTBEAT_TIME = getenv('STATION_HEARTBEAT_TIME', 60)
OBSERVATION_MAX_DELETION_RANGE = getenv('OBSERVATION_MAX_DELETION_RANGE', 10)
OBSERVATION_MIN_DELETION_RANGE = getenv('OBSERVATION_MIN_DELETION_RANGE', 60)
# Station settings
# Heartbeat for keeping a station online in minutes
# Maximum window for upcoming passes in hours
STATION_HEARTBEAT_TIME = getenv('STATION_HEARTBEAT_TIME', 60)
STATION_UPCOMING_END = getenv('STATION_UPCOMING_END', 12)
# DB API
DB_API_ENDPOINT = getenv('DB_API_ENDPOINT', 'https://db.satnogs.org/api/')