Recent Topics
Boiler/baseboard valve corrosion
by wormwood1978. 01/18/19 09:24 AM
Battery mfg date
by Donald. 01/18/19 08:14 AM
dexos1 Gen 2 License D10386HG025
by Virtus_Probi. 01/18/19 07:43 AM
KARMA
by Sayjac. 01/18/19 07:42 AM
Using a school bus as a camper?
by Kurtatron. 01/18/19 07:04 AM
Formula Shell Synthetic
by mmmmoil. 01/18/19 07:03 AM
free credit report
by bradepb. 01/18/19 06:25 AM
Elon Musk is running out of rich people...
by philipp10. 01/18/19 05:56 AM
Best/Cheapest UOA?
by Hemispheres. 01/18/19 05:02 AM
Hyundai/KIA Theta II multiple call campaigns
by wemay. 01/18/19 04:58 AM
How we do it in wichita! Go Shockers
by Marco620. 01/18/19 02:14 AM
Can 0w20 handle high RPMs
by Doublehaul. 01/18/19 01:16 AM
Dodge Grand Caravan OEM Floor Mats
by raburn2906. 01/17/19 11:52 PM
Mobil 1 0w30
by Doublehaul. 01/17/19 11:11 PM
(NEW) STP S3675 Cut Open
by rooflessVW. 01/17/19 10:00 PM
Anti-Counterfeiting packaging
by sloinker. 01/17/19 09:13 PM
Heavy Snow Predicted for Northeast Sat/Sun
by Donald. 01/17/19 08:34 PM
Newest Members
Buddyp, RyanWu, Batteryspecialis, BamaDawg, JRBilt
66969 Registered Users
Who's Online Now
75 registered members (Anduril, Al, Alfred_B, 240_Ed, badduxx, ARCOgraphite, 9 invisible), 1,882 guests, and 52 spiders.
Key: Admin, Global Mod, Mod
Forum Statistics
Forums67
Topics296,776
Posts4,958,677
Members66,969
Most Online2,577
Jan 14th, 2019
Donate to BITOG
Previous Thread
Next Thread
Print Thread
Hop To
Calculating City and highway miles #4711390
03/30/18 09:28 AM
03/30/18 09:28 AM
Joined: Mar 2012
Posts: 246
Southern NY
MoneyJohn Offline OP
MoneyJohn  Offline OP
Joined: Mar 2012
Posts: 246
Southern NY
Just curious if anybody figured out a method to figure out city and highway miles using OBD scan tool. In an ideal case, one would install OBD tool, connect it to android phone with some app and the app does the job.

Not interested in buying $100 OBD device with specialized web platform.

Any idea, pointers?


2015 Subaru Forester 2.5i Premium w/ EyeSight
2006 Nissan Sentra 1.8S Special Edition
Re: Calculating City and highway miles [Re: MoneyJohn] #4711420
03/30/18 09:59 AM
03/30/18 09:59 AM
Joined: Dec 2008
Posts: 2,407
CA
raytseng Offline
raytseng  Offline
Joined: Dec 2008
Posts: 2,407
CA
normalize using another variable, either fuel used or hours of operation

Re: Calculating City and highway miles [Re: MoneyJohn] #4711602
03/30/18 01:16 PM
03/30/18 01:16 PM
Joined: Mar 2012
Posts: 246
Southern NY
MoneyJohn Offline OP
MoneyJohn  Offline OP
Joined: Mar 2012
Posts: 246
Southern NY
I would actually know how long the vehicle drives at highway speeds (50mph+) and below. I am not too sure if I could use any other attribute to figure that out.


2015 Subaru Forester 2.5i Premium w/ EyeSight
2006 Nissan Sentra 1.8S Special Edition
Re: Calculating City and highway miles [Re: MoneyJohn] #4711728
03/30/18 04:04 PM
03/30/18 04:04 PM
Joined: Mar 2012
Posts: 246
Southern NY
MoneyJohn Offline OP
MoneyJohn  Offline OP
Joined: Mar 2012
Posts: 246
Southern NY
Typo edit, since I can not edit the post above,

Actually, I would like to know how long the vehicle drives at highway speeds (50mph+) and below. I am not too sure if I could use any other attribute to figure that out.


2015 Subaru Forester 2.5i Premium w/ EyeSight
2006 Nissan Sentra 1.8S Special Edition
Re: Calculating City and highway miles [Re: MoneyJohn] #4711777
03/30/18 05:21 PM
03/30/18 05:21 PM
Joined: Oct 2004
Posts: 8,467
Cincinnati, OH, USA
bullwinkle Offline
bullwinkle  Offline
Joined: Oct 2004
Posts: 8,467
Cincinnati, OH, USA
I almost wonder if a GPS could calculate speed vs. time somehow, they seem to be able to do similar stuff.


06 Ram 3500 CTD 4X4(FG Venturi), 93 GMC C3500 6.2, 89 F-450 7.3, 98 XJ 4.0(XG8A), 05 xB(XG3600), 18 Transit 3.7, 03 Merc Grand Marquis 4.6 2V(XG2)
Re: Calculating City and highway miles [Re: MoneyJohn] #4711838
03/30/18 07:18 PM
03/30/18 07:18 PM
Joined: Sep 2015
Posts: 996
PENNSYLVANIA
JeepWJ19 Offline
JeepWJ19  Offline
Joined: Sep 2015
Posts: 996
PENNSYLVANIA
Hi, Software Engineer here :]

It's funny you mention this because one of the projects that I'm working on involves smartphone app talking to a vehicle through bluetooth interface (except mine deals with asking for J1939 codes and I have direct access -> no OBD interface smile ). Funny how things like these pop up :]

So, first off, have you looked at the Torque pro app? I am not familiar with it but it may already be able to do logging. Also, you would need a bluetooth OBD device, as I'm not currently aware of any Bt->wired->phone capabilities.

So that bluetooth OBD module is usually just a messenger. Usually it just wants to pair with something, and it just spits out data per request. So to put it as simply as possible, you would need an app that could pair the phone with the Bluetooth OBD device. The devices you can get sold usually are for mass market people like us and usually they are made to connect with apps like Torque Pro etc. so there shouldn't be any pairing issues like needing to decrypt a uuid with a secret key or any of that. The biggest problem you will face is how to talk to the reader and of course, developing the app.

Overall, my suggestion would be:
You generally have a speed cut off on highways, it's usually greater than or equal to 65mph. Unfortunately there are sections where it can be reduced to 55 mph and you can always have stand still traffic.

So first off, you should talk to the OBD device for speed, fuel, rpms etc. Log it all.

Now the tough part for you to figure out if it's highway driving.....
So I stated above you have a general cut-off of 65mph but there are some other factors that it isn't always the case. Guess what most phones come with now? GPS! :]

So if you wanted, you could compare data and look at GPS locations and type them into google and it will show you where it located. If this is for daily commuting, you could set ranges of GPS locations as 'highway miles' and the other data will be treated as city.

It is good to have redundant data from two sources, as it will allow you to check integrity of the data!

Heck if you really wanted to get fancy, you could probably check tire wear as well. OBD should be able to tell you the revolutions of the tires. If your car has a TPMS you could even find out the pressure. -> Compare the revolutions on your tires from the OBD and compare that to the GPS speed that you calculate and you can see (1): is your car reporting the right speed (2): monitor it over time and as your tires wear, the smaller the diameter, the more revolutions you make.

Heck you could figure out which sections have hills based on how fuel using traveling at the same speed.

You could also record which sections of roads are loudest by recording on your phone and normalizing that data with road speed.

You might even find out the drag from rough road surfaces: higher gps speed on a time scale too low for wear. The scaling is important because on longer scales tire wear can create a similar difference in data. -> Long term changes are wear and short term changes are not.

With all the data, you'd be able to determine if it rained, snowed, or a dry day.

With all the data, you could use it to find out just about anything smile


2002 Jeep WJ 4.0 | Mobil 1 HM 5w30 |
TG8A | 2.5" lift | 148k miles

Software Engineer :]
Re: Calculating City and highway miles [Re: bullwinkle] #4711853
03/30/18 07:32 PM
03/30/18 07:32 PM
Joined: Jun 2003
Posts: 33,776
ME
eljefino Offline
eljefino  Offline
Joined: Jun 2003
Posts: 33,776
ME
Originally Posted By: bullwinkle
I almost wonder if a GPS could calculate speed vs. time somehow, they seem to be able to do similar stuff.


Do this and you won't have to re-engineer the system for the next vehicle you use.

Set up a cron job to log speed every second and then graph the incoming data in a spreadsheet.


BOB IS THE OIL GUY® Powered by UBB.threads™