Running 5 minute average calculation

Discussion and support for current Advanced Dash Loggers, Sport Dash Loggers and Club dash loggers

Running 5 minute average calculation

Postby JulianEdgar on Sun Oct 26, 2014 9:39 am

I have an ADL3 dash and M400 running a 3 cylinder Honda Insight turbo.

I'd like to be able to calculate averages for certain rolling time frames - for example, average fuel economy for last 5 minutes.

I have instantaneous fuel consumption being calculated (via adv maths functions, with calculation based on duty cycle and speed).

Can anyone tell me how to gain this 5 minute rolling average?

I am very new to the advanced maths functions, so be nice if the answer is obvious!
JulianEdgar
 
Posts: 57
Joined: Sat Aug 17, 2013 6:38 pm

Re: Running 5 minute average calculation

Postby JulianEdgar on Mon Oct 27, 2014 4:18 pm

OK easiest way proved to be in channel maths - just use a filter (with a constant of 5000) on the instantaneous fuel consumption channel. That gives a rolling average of about 5 minutes - I just trialled different constants until it seemed about right.

However, I have another issue.

I am using two expressions in the ADL3 advanced maths:

('Fuel Inj Duty'[ratio]*0.643*60)/('GPS Speed'[km/h])*100

- with the output channel of 'Ins Fuel Econ'

This gives me instantaneous fuel economy in litres/100km and works well. However, to avoid it showing silly stuff when the car is stopped (and wrecking averages like the 5 minute filter described above), I have added:

choose('Drive Speed Left'>1,'Inst Fuel Econ',0)

- which returns a value of 0 for Inst Fuel Econ when speed is les than 1 km/h. It uses channel output User Math 1.

The problem is that User Math 1 then has no decimal places - just whole units. I need at least one decimal place (and preferably two) in this output channel.

How do I get back my missing decimal places? I have tried adding the units, multiplying by 100 at an earlier stage and then subsequently dividing - nothing seems to work.
JulianEdgar
 
Posts: 57
Joined: Sat Aug 17, 2013 6:38 pm

Re: Running 5 minute average calculation

Postby JulianEdgar on Tue Oct 28, 2014 9:55 am

OK, fixed this problem.

Incredibly, it seems as soon as you select a 'user maths' channel, resolution immediately drops to whole digits.

I got around it by selecting higher resolution unused channels (eg aero pressure 1, aero pressure 2) to do the calculations and then display those under changed names.
JulianEdgar
 
Posts: 57
Joined: Sat Aug 17, 2013 6:38 pm

Re: Running 5 minute average calculation

Postby AdamW on Thu Oct 30, 2014 7:28 pm

I think your problem is that the user math channels are not for normal use in an ADL, it seems you have selected a channel that belongs to the Interpreter category:
Image

You should instead choose one of the general purpose channels from the top of the category list (not shown in this pic).

.
Motorsport Electronics Ltd.
AdamW
Pro User
 
Posts: 265
Joined: Wed Nov 16, 2011 10:08 am

Re: Running 5 minute average calculation

Postby JulianEdgar on Fri Oct 31, 2014 8:13 pm

Thank you - I hadn't realised channel selection was so important, Now I do!
JulianEdgar
 
Posts: 57
Joined: Sat Aug 17, 2013 6:38 pm


Return to ADL3, SDL3 and CDL3

Who is online

Users browsing this forum: No registered users and 6 guests