Problems getting a GPS signal and switching to MPH

Inquiry and support for Freematics products
FreematicsNoob
Posts: 2
Joined: Mon Aug 18, 2014 12:03 pm

Problems getting a GPS signal and switching to MPH

Post by FreematicsNoob »

Hi,

I have the Arduino Logger Kit #3 and I got it all connected and such with my car. The only problem that I had is that when checking which parts are connected (OBD, ACC, GPS) GPS stays as the dashed line, does that mean it is searching for a satellite? Once it boots up and takes me to the main interface it doesn't display any GPS data. I would also like to make it so that it reads out information in MPH since I am in America, so what are the necessary changes to make this happen?

Thanks,
FreematicsNoob
stanley
Site Admin
Posts: 1039
Joined: Sat Mar 01, 2014 3:15 am

Re: Problems getting a GPS signal and switching to MPH

Post by stanley »

The GPS module must be exposed to 90% of open sky to get good signal reception.
To convert kph to mph, simply do this:

Code: Select all

int mph = kph * 62 / 100;
FreematicsNoob
Posts: 2
Joined: Mon Aug 18, 2014 12:03 pm

Re: Problems getting a GPS signal and switching to MPH

Post by FreematicsNoob »

Awesome, thanks for the prompt response.
Wermz
Posts: 11
Joined: Thu Feb 02, 2017 8:40 am

Re: Problems getting a GPS signal and switching to MPH

Post by Wermz »

Bump.

What was the answer for the MPH question? Since it appears that the answer is now a blank post.
Wermz
Posts: 11
Joined: Thu Feb 02, 2017 8:40 am

Re: Problems getting a GPS signal and switching to MPH

Post by Wermz »

Thanks for the reply. But I should have been more clear with my question.

My question specifically: where in the code (which module, etc) do I put said math to make the display read in real time mph?

Hopefully that makes more sense.
protomor
Posts: 99
Joined: Wed Oct 14, 2015 9:17 am

Re: Problems getting a GPS signal and switching to MPH

Post by protomor »

There's a big switch statement in the OBD library that does some basic conversions. You can do it there. Or in your own sketch somewhere it would fit. It's not like there is a right answer. I think all OBD2 outputs are in kph by default but I don't remember.
Wermz
Posts: 11
Joined: Thu Feb 02, 2017 8:40 am

Re: Problems getting a GPS signal and switching to MPH

Post by Wermz »

Thank you. I'll start digging through the OBD library to see what I can find. And yeah, I am always trying to find the one right answer.
Wermz
Posts: 11
Joined: Thu Feb 02, 2017 8:40 am

Re: Problems getting a GPS signal and switching to MPH

Post by Wermz »

Evidently this is going to take me much longer to figure out than I thought.

After trying to sift through the code to figure out where the kilometer per hour data was displayed on screen to no avail, I resorted to searching for the letters "kph" expecting to see some sort of screen print statement for the static letters (not the data values). :?: So at this point I am really lost.

I'm guessing it has something to do with the 'fonts.h' file.
protomor
Posts: 99
Joined: Wed Oct 14, 2015 9:17 am

Re: Problems getting a GPS signal and switching to MPH

Post by protomor »

In the OBD.cpp file, there's a function called "int COBD::normalizeData(byte pid, char* data)". It contains all translations if they need to be something other than what comes out. The reason you don't see kph is because speed already comes out kph. So there's no translation. You need to add PID_SPEED to that case statement and put in your translation.
Post Reply