• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Raw fuel data smoothing using node js

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am developing a fuel related project where one of the tasks is to show a chart representing the fuel consumption of the vehicle (based on a data that is coming from the fuel sensor device) on node js.

So, I get the raw fuel data like an integer and decimal values like 135, 134.8 ,134.7 etc

However, if the vehicle is moving, there may be inconsistent data due to the physics of the vehicle and due to bumps ,downhill,uphill and many other factors noise is being generated which i need to smoothen . For example, a data series may be:

76,76,75,74,73,73,71,70 <- this is a good pattern because it shows how the fuel is going down.

76,70,75,76,77,76,74,74,73,72,69,72,73,73,72,71 <- this is not a good pattern bacause due to jumps the fuel in the tank is not consistent and the data I receive is not appropriate to display to the user.

I want to smooth the raw fuel values, but depending on how many values I choose to average at a time, the result is different.

The key problem is that sometimes there are draining and refueling moments which I MUST show in the chart, and must not smooth.

What kind of filter and algorithm can I use in node js or javascript in order to analyse and represent my chart or graph in convincing way to the user?

Anyone who have already implemented it we can discuss

Thank you in Advance
    Bookmark Topic Watch Topic
  • New Topic