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

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

GPS.Status

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-09-2007, 11:25 AM
alfcen's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu Islands
Posts: 810
Send a message via Skype™ to alfcen
Awards Showcase
Beta Tester 
Total Awards: 1
Default GPS.Status

Hi
I process GPS data further whilst GPS.Status is "A". Upon hardware interruption or after switching off an external GPS unit, GPS.Status remains "A" (also after GPS.GPSBuffer=""). I know GPS.Status is read-only, but I need to clear that "A". Any work-around in town?
Thanks & Cheers
Robert
Reply With Quote
  #2 (permalink)  
Old 11-09-2007, 12:32 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

The GPS properties (all properties) are only updated after a GPSDecoded event.
You should only check these values inside the GPSDecoded event.
The GPS tutorial handles hardware interruptions: http://www.basic4ppc.com/forum/tutorials/1093-gps-application-part-i.html
Reply With Quote
  #3 (permalink)  
Old 11-09-2007, 01:17 PM
alfcen's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu Islands
Posts: 810
Send a message via Skype™ to alfcen
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi Erel

Thanks a lot for your warp speed response.

>The GPS properties (all properties) are only updated after a GPSDecoded event.

That is exactly my problem. The properties are updated as GPS data is streaming in while the last received data remains after interruption or GPS power-off.

It would be great to have something like a GPS.Clear command that would, amongst others, set GPS.Status to "V" or "". In the pipeline?

Cheers
Robert
Reply With Quote
  #4 (permalink)  
Old 11-09-2007, 04:44 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

I think that GPS.Clear will make the GPS library more complicated.
Instead of calling GPS.Clear you can use a global variable that holds the custom validity status.
Reply With Quote
  #5 (permalink)  
Old 11-09-2007, 05:25 PM
Junior Member
 
Join Date: Oct 2007
Posts: 18
Default

As I understand gps lib has nothig to do with gps hardware so it can't check status. But maybe there could be some flag for timeout? So I can see that decoded data is too old for processing and I shouldn't use it (or use it "at own risk").
Reply With Quote
  #6 (permalink)  
Old 11-09-2007, 06:19 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

See the GPS tutorial for a timeout implementation.
The GPS library just parses the data.
Reply With Quote
  #7 (permalink)  
Old 11-10-2007, 12:42 AM
alfcen's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu Islands
Posts: 810
Send a message via Skype™ to alfcen
Awards Showcase
Beta Tester 
Total Awards: 1
Default GPS.Status

Erel, I am a fool, GPS.New1 added to the interruption routine does the job formidably.

Sorry for bothering you. I might be a good idea to sleep a night over before crying out for help
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
Status serial2.dll + HTC + WM6? ClarkVent Questions (Windows Mobile) 25 08-11-2008 04:50 AM
Battery Status, New Version. FAFILI Share Your Creations 0 10-15-2007 09:30 AM
Smartphones - what is the status? ericliang Questions (Windows Mobile) 15 07-07-2007 07:05 PM
Reading status of CTS Paul Questions (Windows Mobile) 2 06-19-2007 08:34 AM
Charger status Alex812 Questions (Windows Mobile) 1 05-29-2007 04:39 AM


All times are GMT. The time now is 05:48 AM.


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