Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips > Official Updates
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Official Updates Updates to official libraries could be found here.
This forum is only available to licensed users.

New GPSDriver library

Reply
 
LinkBack Thread Tools Display Modes
  #111 (permalink)  
Old 09-17-2010, 09:40 PM
Junior Member
 
Join Date: Mar 2010
Posts: 28
Default Verifying GPS signal

Folks,
This is a great library, I tried to use it and it works with no issues, I just have one question:

Assuming that I have established a GPS connection and for some reason I lost that connection later (e.g. driving through a tunnel …etc.) how can I display a message to the user letting him know that the GPS signal got lost.

I have tried to use this code but it did not work, actually nothing happen, it seems even if the GPS signal get lost, then the Latitude, Longitude and other GPS information will still considered to be valid

If gps.Latitude <> gps.InvalidData Then
Else
Show the message here
End If


In the example provided (GPSDriverDemo ) I have noticed this code:
----------------------------------------------------------------------------
If If gps.Opened = True Then
Label1.Text = "gps is open."
Timer1.Interval = 1000
Timer1.Enabled = True
Else
Label1.Text = "gps failed to open."
End If= True Then
----------------------------------------------------

Dose that mean when the device loses the GPS signal then gps.Opened will return false?

Thank you all
Reply With Quote
  #112 (permalink)  
Old 09-17-2010, 11:42 PM
Basic4ppc Expert
 
Join Date: May 2008
Location: Berkshire, UK
Posts: 810
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by ashrafidkaidek View Post
[1] ... it seems even if the GPS signal get lost, then the Latitude, Longitude and other GPS information will still considered to be valid

[2] Does that mean when the device loses the GPS signal then gps.Opened will return false?
[1] I think this will depend on your GPS. Because the GPS signal is rather fragile, and tunnels etc exist, I think it has long been the habit of GPSs to assume that it is best to consider that if the signal vanishes then the output should just extrapolate the motion before it vanished. Usually in a tunnel there is no need for ongoing navigation! Hopefully this extrapolation does not continue indefinitely; how long (in duration) were your tunnels?

[2] Because of my answer to [1], I am sure that this will not be the case.

Mike.
Reply With Quote
  #113 (permalink)  
Old 09-18-2010, 08:25 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Look at the gelp for GetGPSData. Theoretically if the data is older than the time value you specify in GetGPSData then the data should be returned as InvalidData and GetGPSData should return false. In practice I am not convinced this actually happens owing to a possible bug in the Windows Intermediate Driver that GPSDriver talks to.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #114 (permalink)  
Old 11-11-2010, 06:48 AM
Newbie
 
Join Date: Oct 2010
Posts: 1
Default

Hi Erel,

The GPSdriver example is displaying an error on sub _main_mnuconnect_click Can't find Pinvoke DLL gpsapi.dll. The GPSSdriverNMEADemo.exe seems to work but is not showing anything in the textbox. It's connecting properly to com4 and the reading count is going up but when trying to save it brings only an empty file. I'm using a generic PND with CE 5.0. NETCF 2.0 SP2 is installed properly. Do you have any idea what the problem could be?
Reply With Quote
  #115 (permalink)  
Old 11-11-2010, 08:16 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

As it is a CE and not a Windows Mobile device it looks like the manufacturer has chosen not to include the GPS dlls in the device ROM. Windows Mobile devices must conform to a minimum specification to be called Windows Mobile. For CE devices the configuration is not controlled and is up to the manufacturer.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Door library (Beta) - Special library Erel Official Updates 60 01-13-2011 11:23 AM
Merging Outlook library and Phone library Erel Official Updates 11 09-15-2010 09:22 AM
PhoneticAlgorithms Library (ex-StringComparison Library) moster67 Additional Libraries 10 11-11-2008 07:46 PM


All times are GMT. The time now is 12:39 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0