Private
Public Access
1
0

Merge branch 'feature/windedit' into develop

This commit is contained in:
Sander Roosendaal
2017-10-17 18:15:43 +02:00
2 changed files with 3 additions and 3 deletions

View File

@@ -4862,7 +4862,7 @@ def workout_downloadwind_view(request,id=0,
startdatetime = dateutil.parser.parse("{}, {}".format(row.date,
row.starttime))
starttimeunix = int(arrow.get(startdatetime).timestamp)
starttimeunix = int(arrow.get(row.startdatetime).timestamp)
#starttimeunix = int(mktime(startdatetime.utctimetuple()))
avgtime = starttimeunix+avgtime
winddata = get_wind_data(avglat,avglon,avgtime)
@@ -4932,7 +4932,7 @@ def workout_downloadmetar_view(request,id=0,
startdatetime = dateutil.parser.parse("{}, {}".format(row.date,
row.starttime))
starttimeunix = arrow.get(startdatetime).timestamp
starttimeunix = arrow.get(row.startdatetime).timestamp
#starttimeunix = int(mktime(startdatetime.utctimetuple()))
avgtime = starttimeunix+avgtime
winddata = get_metar_data(airportcode,avgtime)

View File

@@ -38,7 +38,7 @@ def get_weather_data(long,lat,unixtime):
def get_metar_data(airportcode,unixtime):
timestamp = arrow.get(unixtime).isoformat()
url = "https://www.aviationweather.gov/adds/dataserver_current/httpparam?dataSource=metars&requestType=retrieve&format=xml&startTime="
url += str(unixtime-3600)
url += "&endTime="