added lbs/N force unit to model, use that
This commit is contained in:
@@ -1172,9 +1172,6 @@ def getrowdata_db(id=0,doclean=False,convertnewtons=True):
|
||||
if doclean:
|
||||
data = clean_df_stats(data,ignorehr=True)
|
||||
|
||||
# these two lines seem redundant ??
|
||||
#data['averageforce'] = data['averageforce']
|
||||
#data['peakforce'] = data['peakforce']
|
||||
|
||||
return data,row
|
||||
|
||||
@@ -1420,16 +1417,7 @@ def datafusion(id1,id2,columns,offset):
|
||||
df2 = getsmallrowdata_db(['time']+columns,ids=[id2],doclean=False)
|
||||
|
||||
forceunit = 'N'
|
||||
# set Force to same units
|
||||
if 'averageforce' in columns or 'peakforce' in columns:
|
||||
forceunit = workout2.forceunit
|
||||
if workout1.forceunit == 'lbs' and workout2.forceunit == 'N':
|
||||
df1['averageforce'] *= lbstoN
|
||||
df1['peakforce'] *= lbstoN
|
||||
if workout1.forceunit == 'N' and workout2.forceunit == 'lbs':
|
||||
df1['averageforce'] /= lbstoN
|
||||
df1['peakforce'] /= lbstoN
|
||||
|
||||
|
||||
offsetmillisecs = offset.seconds*1000+offset.microseconds/1000.
|
||||
offsetmillisecs += offset.days*(3600*24*1000)
|
||||
df2['time'] = df2['time']+offsetmillisecs
|
||||
@@ -1460,7 +1448,7 @@ def datafusion(id1,id2,columns,offset):
|
||||
df['pace'] = df['pace']/1000.
|
||||
df['cum_dist'] = df['cumdist']
|
||||
|
||||
return df
|
||||
return df,forceunit
|
||||
|
||||
def fix_newtons(id=0,limit=3000):
|
||||
# rowdata,row = getrowdata_db(id=id,doclean=False,convertnewtons=False)
|
||||
|
||||
Reference in New Issue
Block a user