Wednesday, June 04, 2008

For day three, I  had already decided to write a GPS Compass application, short and sweet. It just so happens I received a comment from Paul Diston today (see below) asking for that very thing. It's a small world.

Hi,
I may have an idea that you might be interested in. I have a GPS receiver in my device and use the GPS Sample as provided with the Windows Mobile 5 SDK. I would be interested in a 'snail trail' kind of application which would draw your current location and keep track of your movements, a simple line showing your movements would be great. Also maybe a compass type application which would calculate your bearing.
I have had some success with these ideas however I just don't get the time to explore them further.
Thanks
Paul Diston

image

GPS Compass

Again we have another 30 Days of .NET application that was at least in part due to a reader's request. So keep them coming gang.

I'm not a graphics designer, but as I've mentioned before I believe it is important for a program to have some eye candy. It needs to look good and professional. Now beauty is in the eye of the beholder and you may be thinking GPS Compass is ugly, but the point is I tried, and IMHO I think it looks decent.

Now did I draw the compass rose you see to the right? No. I went to Wikipedia and found one in the public domain here. But that's my point it is important to make best use of all the resources you have at hand. Notice I didn't spend hours trying to do it myself only to end up with a nonprofessional looking graphic.

Once I had the base I need for the aesthetic design of GPS Compass, it was time to decide how to design the GPS engine. I narrowed the possibilities down to the following: access the GPS as a serial device, use the OpenNETCF GPS Library, or use the GPS Intermediate Driver.

I decided to use the GPS Intermediate Driver since it is fairly new, and it as the documentation says, "It is useful because it provides an intermediate layer that abstracts the actual GPS device from developers and manufacturers."

One thing about hardware nobody builds anything the same way. There are always like quirks and variations. If somebody else volunteers to let that be there problem you'd be wise to take them up on the offer.

Next I needed a way to test the application. I have an AT&T Tilt, that I love, and it does have built-in GPS but it isn't going to work from almost the dead center of my house. Fortunately Microsoft loves their developers and have included a Fake GPS utility for this very purpose. "FakeGPS uses text files containing GPS data to simulate the functionality of a GPS receiver." I really like this tool it just works.

I read through the GPS Intermediate Driver reference material and found the object I was interested in: GPS_POSITION. For this simple application all I really needed was access to flHeading: Heading, in degrees. A heading of zero is true north.

At this point I discovered that the Windows Mobile 6 SDK included a GPS Application in the samples folder, C:\Program Files\Windows Mobile 6 SDK\Samples\PocketPC\CS\GPS.

I checked it out and realized it would be a snap for me to take the sample and convert it over to what I needed. Sure I could have duplicated the effort, but everything I needed was right there waiting for me to take advantage of it. Again, always remember to make the best use of all the resources you have available.

The GPS Application has a nice status screen which I moved to a menu item option. I mean the main event here is obviously the sexy screen you see above. A few nips here, and a few tucks there, and I was done.

One thing to be aware of is the sample, and the GPS Application it stands on top of are great base applications to build almost any GPS application you can think of.

There is nothing stopping any of you from taking this and creating your own .NET Application of the Day. And if you do let me know and I'll mention your application.

Download executable: gpsCompass.cab

Download Source Code: gpsCompass.zip

Feedback

We only have 27 days left for you to submit your idea, or even your .NET [Windows Mobile] Application of the day.


Wednesday, June 04, 2008 12:06:44 AM (Eastern Standard Time, UTC-05:00)  #    Comments [6]  |  Trackback Tracked by:
"30 Days of .NET [Windows Mobile Applications] - Week One" (Chris Craft's Blog) [Trackback]
"30 Days of .NET [Windows Mobile Applications] - Day 19: Mobile Speedometer" (Ch... [Trackback]
"http://www.google.com/search?q=mkazwfve" (http://www.google.com/search?q=mkazwf... [Pingback]
"30 Days of .NET [Windows Mobile Applications] - Day 03: GPS Compass(GPS指南针)" (J... [Trackback]
"http://www.decc.org/printInfo.aspx?CID=166" (http://www.decc.org/printInfo.aspx... [Pingback]
"http://www.nationalmuseum.sg/nms/nms_html/nms_content_1.asp?film_id=834" (http:... [Pingback]
"http://www.amazonia.org.br/fogo/guia/detalhes.cfm?id=1176" (http://www.amazonia... [Pingback]
"http://yedhulaprakash1.lawyersclubindia.com/community/display_com.asp?np_com_id... [Pingback]
"http://ielts.hanyang.ac.kr/information/study_view.asp?idx_code=82" (http://ielt... [Pingback]
"http://www.twg.com/news/press_release.asp?ID=218" (http://www.twg.com/news/pres... [Pingback]
"http://ielts.hanyang.ac.kr/information/study_view.asp?idx_code=86" (http://ielt... [Pingback]
"http://d1835677.pt73.pipeten.com/PropertyDetail.asp?intPropertyID=3797" (http:/... [Pingback]
"http://yedhulaprakash1.lawyersclubindia.com/community/display_com.asp?np_com_id... [Pingback]
"http://d1835677.pt73.pipeten.com/PropertyDetail.asp?intPropertyID=3787" (http:/... [Pingback]
"http://www.nationalmuseum.sg/nms/nms_html/nms_content_1.asp?film_id=851" (http:... [Pingback]
"http://www.vitamincenter.it/forum/topic.asp?TOPIC_ID=4267" (http://www.vitaminc... [Pingback]
"http://www.amicalien.com/membres/concoursvotedetail.cfm?ConcoursParticipationsI... [Pingback]
"http://pro.tourisme-aquitaine.fr/es/actus_detail.asp?actualiteId=268" (http://p... [Pingback]
"http://www.riyadh.gov.sa/Eng/EngNewsDetails.asp?GetVarID=285" (http://www.riyad... [Pingback]
"http://www.vitamincenter.it/forum/topic.asp?TOPIC_ID=4294" (http://www.vitaminc... [Pingback]
"http://www.amicalien.com/membres/concoursvotedetail.cfm?ConcoursParticipationsI... [Pingback]
"http://pro.tourisme-aquitaine.fr/es/actus_detail.asp?actualiteId=254" (http://p... [Pingback]
"http://ks2.sleh.com/Healthy_Living/healthy_living_article_dtl.cfm?ID=137" (http... [Pingback]
"http://www.avfair.com/PressRelease/ViewPressRelease.asp?PRelId=144" (http://www... [Pingback]
"http://www.telescopeplanet.co.uk/ViewProdDetails.asp?prod_code=hobwkqpy" (http:... [Pingback]
"http://www.goodmoves.org.uk/for%20recruiters/?pid=306956289" (http://www.goodmo... [Pingback]
"http://www.silicontaiga.ru/home.asp?artId=9823" (http://www.silicontaiga.ru/hom... [Pingback]
"http://www.silicontaiga.ru/home.asp?artId=9820" (http://www.silicontaiga.ru/hom... [Pingback]
"http://www.pepper.com.br/novo/detalhe.asp?cd_produto=3907" (http://www.pepper.c... [Pingback]
"http://www.pepper.com.br/novo/detalhe.asp?cd_produto=3913" (http://www.pepper.c... [Pingback]
"http://www.google.com/search?q=pqmeknsu" (http://www.google.com/search?q=pqmekn... [Pingback]
"http://www.poujoulat.fr/detail_societe_actualite.asp?A=426" (http://www.poujoul... [Pingback]
"http://www.co.douglas.or.us/planning/meetings/view_meeting.asp?meeting=628" (ht... [Pingback]
"http://www.loveliving.com.au/Product.aspx?ProductId=414" (http://www.loveliving... [Pingback]
"http://www.co.douglas.or.us/planning/meetings/view_meeting.asp?meeting=648" (ht... [Pingback]
"http://www.loveliving.com.au/Product.aspx?ProductId=407" (http://www.loveliving... [Pingback]
"http://www.metaresearch.org/msgboard/topic.asp?TOPIC_ID=1531" (http://www.metar... [Pingback]
"http://www.metaresearch.org/msgboard/topic.asp?TOPIC_ID=1605" (http://www.metar... [Pingback]
"http://www.metaresearch.org/msgboard/topic.asp?TOPIC_ID=1533" (http://www.metar... [Pingback]
"http://www.ikey.com/NewProducts/?productID=176" (http://www.ikey.com/NewProduct... [Pingback]
"http://www.4team.biz/news_details.asp?news_id=345" (http://www.4team.biz/news_d... [Pingback]
"http://www.ikey.com/NewProducts/?productID=187" (http://www.ikey.com/NewProduct... [Pingback]
"http://www.sinai.org/careers/career_detail.asp?job_id=380" (http://www.sinai.or... [Pingback]
"http://www.statefair.org/ns/pressrelease/ViewPressRelease.asp?PRelId=94" (http:... [Pingback]
"http://www.arabgreekchamber.gr/en/news.asp?NID=81" (http://www.arabgreekchamber... [Pingback]
"http://www.goodwillsew.com/text.asp?dbID=906295702" (http://www.goodwillsew.com... [Pingback]
"http://www.statefair.org/ns/pressrelease/ViewPressRelease.asp?PRelId=83" (http:... [Pingback]
"http://eng2526.intania.com/scripts/jokedetail.asp?ID=2561" (http://eng2526.inta... [Pingback]
"http://eng2526.intania.com/scripts/jokedetail.asp?ID=2565" (http://eng2526.inta... [Pingback]
"http://www.google.com/search?q=ivulzwwv" (http://www.google.com/search?q=ivulzw... [Pingback]
"http://www.google.com/search?q=lxrcgcrh" (http://www.google.com/search?q=lxrcgc... [Pingback]
"http://www.iqura.com/content/careers/hotjobspopup.asp?req_id=924116294" (http:/... [Pingback]
"http://www.addisongallery.com/showbio.asp?id=1292" (http://www.addisongallery.c... [Pingback]
"http://www.addisongallery.com/showbio.asp?id=1310" (http://www.addisongallery.c... [Pingback]
"http://www.iqura.com/content/careers/hotjobspopup.asp?req_id=974391786" (http:/... [Pingback]
"http://www.hbfc.com.pk/default.asp?pgid=323" (http://www.hbfc.com.pk/default.as... [Pingback]
"http://www.efree2net.com/getDetail.cfm?detail=60" (http://www.efree2net.com/get... [Pingback]
"http://www.efree2net.com/getDetail.cfm?detail=74" (http://www.efree2net.com/get... [Pingback]
"http://www.gewofag.de/us/print.asp?anr=425" (http://www.gewofag.de/us/print.asp... [Pingback]
"http://pdmdb.org/content.asp?contentid=1039" (http://pdmdb.org/content.asp?cont... [Pingback]

Wednesday, June 04, 2008 9:17:59 AM (Eastern Standard Time, UTC-05:00)
Hi,

Thanks for the mention, I have downloaded the application cab and will give it a go soon.
I may have another idea you might be interested. I would be interested in a today screen item that you could possibly interact with, such an application for this would be a stop watch or similar. I am not sure whether you can interact with a today screen item in that way.

Thanks

Paul Diston
Paul Diston
Wednesday, June 04, 2008 12:21:38 PM (Eastern Standard Time, UTC-05:00)
I would like to recommend a mileage tracking application using a Sql CE database (had to get sql into the app).
Wednesday, June 11, 2008 6:44:39 AM (Eastern Standard Time, UTC-05:00)
Chris,

Not a bad idea, take a look at Day 04 Mileage Traker
Wednesday, June 11, 2008 6:46:45 AM (Eastern Standard Time, UTC-05:00)
Paul,

It's a great idea, but unfortunately .NET managed code cannot directly access the today screen plug-in architecture. It can be done through some pretty serious hacks! See the following: Creating a Pocket PC Today Screen Plug-in with the .NET Compact Framework
Monday, July 07, 2008 7:31:08 AM (Eastern Standard Time, UTC-05:00)
Hi,
I installed the Compass App, but I am not able to find the menu item in programs...
Mobile 5.0, HTC P3600

Joerg
Joerg
Wednesday, July 23, 2008 5:38:39 AM (Eastern Standard Time, UTC-05:00)
Hi,

I was looking to build a GPS compass that always points to a specific location (lat/lon coordinate). I am hoping to modify this compass application. Would appreciate it if some one can give a few pointers about the math involved.


Faraz
Faraz
Comments are closed.

Theme design by Jelle Druyts

Pick a theme: