You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of now, users only get points for the distance they accompany me for. Since I go much slower uphill, it would be nice to also introduce a metric that has to do with elevation: elevation points.
Possible course of action:
Write a function to retrieve the elevation at a given point.
below is a quick example. This uses the geocoder package. I did not do research into other packages and it might thus not be the optimal one.
**look into the order of lat,lon in geocoder (some packages to lat,lon others lon,lat)
Wherever we append to locations_during_song (def location(self, update, context) and def handle_location_tracking(self, chat_id)), also include the elevation at the current location like so:
when the total distance is calculated (currently def calculate_distance(locations_during_song)), also calculate the total elevation that the song has accompanied me for. That function name should then probably be changed to: calculate_distance_and_elevation. Save the total elevation into the locations.json too as elevation_difference.
Note that the elevation points can also be negative if the user has accompanied me on mostly downhills :D.
The text was updated successfully, but these errors were encountered:
As of now, users only get points for the distance they accompany me for. Since I go much slower uphill, it would be nice to also introduce a metric that has to do with elevation: elevation points.
Possible course of action:
below is a quick example. This uses the geocoder package. I did not do research into other packages and it might thus not be the optimal one.
**look into the order of lat,lon in geocoder (some packages to lat,lon others lon,lat)
def location(self, update, context)
anddef handle_location_tracking(self, chat_id)
), also include the elevation at the current location like so:when the total distance is calculated (currently
def calculate_distance(locations_during_song)
), also calculate the total elevation that the song has accompanied me for. That function name should then probably be changed to:calculate_distance_and_elevation
. Save the total elevation into thelocations.json
too as elevation_difference.Note that the elevation points can also be negative if the user has accompanied me on mostly downhills :D.
The text was updated successfully, but these errors were encountered: