Go Back   EcoModder Forum > EcoModding > Instrumentation > OpenGauge / MPGuino FE computer
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 01-11-2009, 08:29 PM   #1 (permalink)
EcoModding Lurker
 
Join Date: Dec 2008
Location: Ohio
Posts: 13

DarkFit - '08 Honda Fit Sport
90 day: 32.78 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
Suggested MPGuino change: average speed

I've been playing with my newly built MPGuino and thought I could improve on some of the features. I noticed that the mph of the current and tank trips would just trickle down after the car was stopped and even off. I want it to only calculate the average speed while moving. I've attached my suggested code changes.

I removed the "tankHold" variable and replaced it with "sleeping"

The code near "//currentTripResetTimeoutUS" has been changed and is a little cleaner. I also removed what I think are redundant calls to update().

Also changed:
"loopCount++;" -> "if(t.vssPulses) loopCount++;"

These code changes cause the mph average for the current and tank to not include when the vehicle is stopped and the timer on the last screen will only count up when the car is moving.

Attached Files
File Type: zip mpguino_suggest.zip (10.4 KB, 47 views)
__________________
  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 01-11-2009, 09:03 PM   #2 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 Posts
Interesting, you do not think sitting at a stoplight is part of the average mph?
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 01-11-2009, 09:16 PM   #3 (permalink)
EcoModding Lurker
 
Join Date: Dec 2008
Location: Ohio
Posts: 13

DarkFit - '08 Honda Fit Sport
90 day: 32.78 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by dcb View Post
Interesting, you do not think sitting at a stoplight is part of the average mph?
Before the modification it was counting time non-stop even after the backlight turned off causing the speed to asymptotically approach zero (with the car sitting for a long time). It appears the code intended to stop counting time after the backlight turned off, but that wasn't the case on my car. If it counts time for weeks on end while I'm not using the car, then the average speed it reports to me has no useful information.

I think both options would be good: stop counting at stops and stop counting after display timeout.

Most bicycle computers have the option to not count stops in the average, and that is what I prefer.
__________________
  Reply With Quote
Old 01-11-2009, 09:50 PM   #4 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 Posts
I have not experienced the behavior mentioned in your first paragraph. I just performed a test:
1. install latest code
2. go to CPU monitor screen
3. played with brightness button till T=000.20, left on brightness 2
4. confirm LED goes out at about 007.20,
5. pressed brightness button at T007.36
6. T reset to 000.20, the time of the last activity.

Are you able to reproduce this behavior with a fresh copy of the code installed? I'm not sure how you could be seeing this behavior if the engine is off and the car is not moving for more than 7 minutes. The data model tracks fuel used, distance and time, and only time needs to be preserved if the other variables won't be changing, and it is being preserved. How do you reproduce it?
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 01-11-2009, 10:24 PM   #5 (permalink)
EcoModding Lurker
 
Join Date: Dec 2008
Location: Ohio
Posts: 13

DarkFit - '08 Honda Fit Sport
90 day: 32.78 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
I just installed http://opengauge.googlecode.com/svn/...no/mpguino.pde and drove around the block (my neighbors must think I'm really weird because I keep doing this).

I confirm that the timer on the CPU screen does stop.

The problem I am seeing is on the "Tank" screen. The MPH drops as expected when I stop the car, but even after the backlight goes out, the tank MPH continues to decline. I probably wasn't as clear as I should have been earlier.
__________________
  Reply With Quote
Old 01-11-2009, 10:41 PM   #6 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 Posts
I reread it, It is a little clearer to me now.

The timer on the cpu screen does keep counting, even after timeout. It was kind of a troubleshooting aid so no "stop counting" logic was put in place. The tank mph is based on that, so you should see it start decreasing speed as you slow down and come to a stop. But if you stop more than 7 minutes (or whatever you set it to) then it will reset to the time of last activity at the next sign of activity, no matter how many weeks have gone by (though don't be surprised if you need a jumpstart)

The timeout business is a little tricky, but it is somewhat important so that we do keep track of the time spent at stoplights even (hopefully) with the engine off. Otherwise the time used for the distance traveled for any given trip would be too optimistic. If it takes 10 hours to get from point a to point b, it takes 10 hours.

I don't know exactly why bikes would not track it, but it could be more motivating to see higher mph figures after pedaling your but off, and if that gets you back on your bike then cool
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 01-11-2009, 10:45 PM   #7 (permalink)
EcoModding Lurker
 
Join Date: Dec 2008
Location: Ohio
Posts: 13

DarkFit - '08 Honda Fit Sport
90 day: 32.78 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
Just after I posted my last message I realized what was going on. I now expect to see the trip MPH reset to where it was. I tried to go out and verify this but my display is acting a little funny in the cold weather and is fine when I bring it in. Maybe I need to re-hit the solder on the display.

__________________
  Reply With Quote
Reply  Post New Thread




Similar Threads
Thread Thread Starter Forum Replies Last Post
MPGuino release one workspace dcb OpenGauge / MPGuino FE computer 1061 01-17-2020 01:37 AM
How to get instant fuel consumption from Megasquirt TELVM Instrumentation 11 08-29-2011 02:47 PM
Change Speed Limit? Supa The Lounge 121 10-10-2008 08:54 PM
will bicycle speedo work as speed sensor for MPGuino? modmonster OpenGauge / MPGuino FE computer 2 08-28-2008 05:55 PM
speed on mpguino fluctuates briansavka OpenGauge / MPGuino FE computer 1 08-01-2008 11:06 AM



Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com