Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
evavanweenen committed Jan 20, 2022
1 parent 74086a7 commit 2008cfe
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions calc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import numpy as np
import pandas as pd

# glucose levels in mg/dL
Expand All @@ -25,21 +24,4 @@ def elevation_gain(altitude: pd.Series):

def elevation_loss(altitude: pd.Series):
# calculate the total elevation loss during a workout
return altitude.diff()[altitude.diff() < 0].sum()

"""
def grade(altitude, distance):
# TODO
# calculate the difference between distance travelled vertically and horizontally expressed as a percentage
return
def velocity_ascended_in_mph(elevation_gain, t, grade):
# calculate velocity ascended in m/h (VAM), which measures how fast you are climbing a hill
# using elevation_gain (meters ascended/hour), t (duration in seconds) and grade (% increase)
return (elevation_gain/(t/3600))/(200+10*(grade*100))
def work(power: pd.Series):
# W = integral P dt
# TODO: make sure there are no missing values here
return power.sum()
"""
return altitude.diff()[altitude.diff() < 0].sum()

0 comments on commit 2008cfe

Please sign in to comment.