Fix kg per week/month for exercise progress graphs and remove useless formula
This commit is contained in:
4
utils.py
4
utils.py
@@ -279,11 +279,9 @@ def get_exercise_graph_model(title, estimated_1rm, repetitions, weight, start_da
|
||||
best_fit_points = list(zip(y_best_fit, relative_positions))
|
||||
|
||||
# Convert the slope from scaled units per day to kg per day
|
||||
slope_kg_per_day = m * (max_e1rm - min_e1rm) / total_span
|
||||
slope_kg_per_day = (max_e1rm - min_e1rm) / total_span
|
||||
|
||||
best_fit_formula = {
|
||||
'slope': round(m,1),
|
||||
'intercept': round(b,1),
|
||||
'kg_per_week': round(slope_kg_per_day * 7, 1), # Convert to kg/week
|
||||
'kg_per_month': round(slope_kg_per_day * 30, 1) # Convert to kg/month
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user