NREL / gradeit

BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

Phase shift with filtering #11

Open mgilleran opened 3 years ago

mgilleran commented 3 years ago

gradeit

GradeIT elevation - both unfiltered and filtered - is seen in plot. Unfiltered elevation closely aligns with the elevation from the CAN signal of the truck. However, filtered elevation seems to be off by some sort of phase shift

jakeholden commented 3 years ago

Looks like the issue is in the way the Savitzky-Golay filter is applied in elevation._elevation_filter() - An interpolation function is generated from distance travelled to interpolate a constant distance elevation profile before filtering. The filtered elevation is never mapped back to the original distribution of points.

Try: