Hello, this is my first post and first project with the Teensy 3.x
My programming is rusty since I haven't done anything in a year. I decided to work on a project using GPS.
I have a PMB-648 GPS module, small LCD, and a few buttons wired up to my Teensy 3.0.
Depending on the button pressed, latitude or longitude coordinates will be displayed.
I'm excited that it actually works! haha
I am wanting to add more features to it and the first thing I need to do is convert the coordinates that are being displayed to proper decimals numbers.
I have been searching Google all night with no luck.
For example, take the number 64424751.
If there were a proper gps coordinate, it should actually look like 64.424751
Is there an insert() function or something I can use in C to just insert a "." after the first two characters?
I can also get the correct number by dividing the non decimal number by 1000000
For example, 64424751 / 1000000 = 64.424751
But when I output this to my LCD, it will only display 4 characters like 64.42
Is there a way I can tell it to output all of the characters after the decimal?
Below is an example of my code and a picture of my project.
http://pastebin.com/r88gq8xM
My programming is rusty since I haven't done anything in a year. I decided to work on a project using GPS.
I have a PMB-648 GPS module, small LCD, and a few buttons wired up to my Teensy 3.0.
Depending on the button pressed, latitude or longitude coordinates will be displayed.
I'm excited that it actually works! haha
I am wanting to add more features to it and the first thing I need to do is convert the coordinates that are being displayed to proper decimals numbers.
I have been searching Google all night with no luck.
For example, take the number 64424751.
If there were a proper gps coordinate, it should actually look like 64.424751
Is there an insert() function or something I can use in C to just insert a "." after the first two characters?
I can also get the correct number by dividing the non decimal number by 1000000
For example, 64424751 / 1000000 = 64.424751
But when I output this to my LCD, it will only display 4 characters like 64.42
Is there a way I can tell it to output all of the characters after the decimal?
Below is an example of my code and a picture of my project.
http://pastebin.com/r88gq8xM