After the last GPS related application, GPS Compass, I’ve been wanting to do another GPS focused application. This time I figured we’d get in the driver’s seat with our friend: SPEED.
Gentlemen, start your engines…

Mobile Speedometer
The application is built off of Windows Mobile 6 SDK included a GPS Application in the samples folder, C:\Program Files\Windows Mobile 6 SDK\Samples\PocketPC\CS\GPS.
This uses the GPS Intermediate Driver. If you are writing a location aware application for Windows Mobile this is definitely the way to go. ;)
The main UI is located at the top of the screen. We have a simple speedometer graphic in the background to add some flair to the application. On top of this we overlay the current speed based off of information returned from the GPS device. We can also use Fake GPS to simulate a GPS device.
Below this we have a readout of various GPS statistics that are updated continuously.
One thing to note is Speed may be return in knots which you will likely want to convert to either miles or kilometers.
We just need to create a method something like UpdateData below.
1: void UpdateData(object sender, System.EventArgs args)
2: {
3: if (gps.Opened)
4: {
5: if (position != null)
6: {
7: if (position.SpeedValid)
8: {
9: labelSpeed.Text = (position.Speed/1.15077945).ToString("0.00");
10: }
11: }
12: }
13: }
Possibilities:
I think a more realistic UI would be a great improvement. And the ability to switch from miles to kilometers would be good too. If the odometer would track miles traveled that would be an awesome enhancement.
Download executable: mobileSpeedometer.cab
Download Source Code: mobileSpeedometer.zip
Feedback:
Want more? What else would you like to see?