Saturday, June 21, 2008

Yesterday, I had a really hard time between choosing to do a Mobile Speedometer or a Mobile Altimeter. But another day gives us another opportunity, and today we shall create the Mobile Altimeter.

image

Mobile Altimeter

This will make the third application in the 30 Days of .NET series that has had targeted GPS capabilities. We have created a compass, a speedometer, and now a altimeter. And there are still dozens of applications we could create with the GPS capabilities of Windows Mobile.

This time I decided to a little more with the UI. We have a background that symbolizes “altitude” which is appealing to end users. Plus it gives the program a lot of style and class. On the left side of the screen if you look carefully, you will notice we have an attitude ruler, which has a marker that rises one pixel for every foot higher the device travels up to 180 feet.

This simple feature really takes our application up to the next level. :D (Yeah, I know: I’m terrible.)

At the bottom of the screen we are allowing the user to read all the main stats off the GPS so the application is even more useful. We show altitude in a large bold font in the middle of the screen for impact.

The main event: UpdateData

   1: void UpdateData(object sender, System.EventArgs args)
   2: {
   3:     if (gps.Opened)
   4:     {
   5:         if (position != null)
   6:         {
   7:             if (position.SeaLevelAltitudeValid)
   8:             {
   9:                 labelAltitude.Text = position.SeaLevelAltitude.ToString("0.00ft");
  10:                 if (position.SeaLevelAltitude >= 0 && position.SeaLevelAltitude <= 180)
  11:                     pictureBoxArrow.Top = 173 - (int) position.SeaLevelAltitude;
  12:                 else
  13:                     pictureBoxArrow.Top = 173;
  14:             }
  15:         }
  16:     }
  17: }

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: mobileAltimeter.cab

Download Source Code: mobileAltimeter.zip

Feedback:

Want more? What else would you like to see? There’s been a lot of demand for GPS related applications. Does that help?


Saturday, June 21, 2008 02:07:00 (Eastern Standard Time, UTC-05:00)  #    Comments [2]  |  Trackback Tracked by:
"30 Days of .NET [Windows Mobile Applications] - Week Three" (Chris Craft's Blog... [Trackback]

Monday, July 07, 2008 05:33:41 (Eastern Standard Time, UTC-05:00)
Hi,

this is Joerg from Germany. I have downloaded some of your apps that are GPS related using an HTC P3600. The first app I tried to install is the altimeter:
Outcome: I have not seen the requirement to install .NET compact framework, but got around this. After installation the altimeter shows speedometer in the program folder, probably a copy and paste issue?

I am eager to see the results, have to go outside, will report then...

Joerg
Joerg
Tuesday, July 08, 2008 03:49:09 (Eastern Standard Time, UTC-05:00)
I installed GPSClock, GPSAltimeter, GPSSpeedometer and GPSCompass on my HTC P3600, Mobile 5.
Outcome:
GPSCompass: No menu item for the Compass found in programs.
I could only start the latest installed of the three other programs: only ONE menu entry was created: Mobile Speedometer and this is starting the program that was installed last. I uninstalled and installed several times, same outcome.
GPSClock: Displays UTC, I assume?
GPS Altimeter: starts with a display of 42ft if no GPS signal is available. After GPS signal available it looks to as it displays the altitude in meter (here in Germany) with an added offset of the above mentioned 42 meter.
GPS Speedometer: displays a speed that has a factor of approx. 0.45 related to my kilometers per hour. 1 knot would be 1.852 kilometer per hour, so I am not sure whta is displayed.

Just to let you know my findings....

Joerg
Joerg
Comments are closed.

Theme design by Jelle Druyts

Pick a theme: