totalvehicledistancej1939 - SPN 245
Odometer recording for the vehicle
High-Level Explanation
This signal contains the total distance the vehicle has driven in kilometers
Enables
To calculate total number of miles driven in a day, without accounting for driving that takes place on days when signal was lost, similar to enginetotalhoursofoperationj1939 - SPN 247:
gdf['odometer_diff_km'] = gdf['totalvehicledistancej1939'].ffill().bfill().diff().fillna(0)
gdf['odometer_diff_mi'] = gdf['odometer_diff_km']*0.621371
temp = gdf.dropna(subset = 'totalvehicledistancej1939').copy(deep = True)
temp = temp.loc[~temp['timestamp'].isin(temp.groupby('year_month_day').first()['timestamp'].tolist())]
day_data['miles_driven_day'] = temp.groupby('year_month_day')['odometer_diff_mi'].sum()Enabled By
Known Quirks
Visualizations with Explanations

totalvehicledistancej1939Last updated