Exemplo n.º 1
0
 def __init__(self, timestamp, elevation, latitude, 
               longitude, distance, speed, precipitation, 
               precipitation_type, temperature, wind_bearing,
               wind_speed, lap, run):
     # Convert to datetime
     self.timestamp = timestamp_to_datetime(timestamp)
     # Leave in metric
     self.elevation = elevation
     # Convert to degrees
     self.latitude = convert_to_degrees(latitude)
     self.longitude = convert_to_degrees(longitude)
     # Leave in metric
     self.distance = distance
     self.speed = speed
     self.precipitation = precipitation
     self.precipitation_type = precipitation_type
     self.temperature = temperature
     self.wind_bearing = wind_bearing
     self.wind_speed = wind_speed
     self.lap = lap
     self.run = run
Exemplo n.º 2
0
 def __init__(self, avg_speed, max_speed, start_position_lat, start_position_long,
               end_position_lat, end_position_long, total_ascent, total_descent,
               total_distance, start_time, total_timer_time, total_elapsed_time, 
               day, city, state, country, timezone):
     self.avg_speed = avg_speed
     self.max_speed = max_speed
     self.start_position_lat = convert_to_degrees(start_position_lat)
     self.start_position_lng = convert_to_degrees(start_position_lng)
     self.end_position_lat = convert_to_degrees(end_position_lat)
     self.end_position_lng = convert_to_degrees(end_position_lng)
     self.total_ascent = total_ascent
     self.total_descent = total_descent
     self.total_distance = total_distance
     self.start_time = timestamp_to_datetime(start_time)
     self.total_timer_time = total_timer_time
     self.total_elapsed_time = total_elapsed_time
     self.day = day
     self.city = city
     self.state = state
     self.country = country
     self.timezone = timezone