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 map navigation and routing

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-15-2007, 04:48 AM
zen zen is offline
Newbie
 
Join Date: Sep 2007
Posts: 1
Default GPS map navigation and routing

Hi experts,

Need advise on how to draw map for PPC and to do routing using GPS data.

Rgds
Reply With Quote
  #2 (permalink)  
Old 09-15-2007, 08:37 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Example of reading the GPS data: http://www.basic4ppc.com/files/GPSExample.zip
Once you've got the coordinates, depending on your map you could convert them to UTM format using the GPS library.
Now you need to calculate the location on the map (the image) and draw it.
Reply With Quote
  #3 (permalink)  
Old 10-06-2007, 02:20 AM
Junior Member
 
Join Date: Sep 2007
Posts: 16
Default How to switch off the GPS inside the PPC

Erel,

I wrote an application which sends the coordinate and speed via sms when the speed reaches certain value.
However, I don't need a continuous monitoring. All I want is the GPS check the speed every 15 minutes and if the speed exceeds the limit, it will send the sms.
How to turn of the GPS during the idle time before the next 15 minute time elapses?
I find my PPC battery drains out very quickly when my application runs. I guess the cause is from the GPS being turned on and receiving satellite signals continuosly.
Please enlighten!
Reply With Quote
  #4 (permalink)  
Old 10-06-2007, 07:51 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Try to close the serial port.
Most GPS will usually turn off if there is no connection for a while.

How do you manage to keep the device on for 15 minutes?
The best solution is to connect the device to a car charger.
Reply With Quote
  #5 (permalink)  
Old 10-07-2007, 07:17 AM
Junior Member
 
Join Date: Sep 2007
Posts: 16
Default How to turn on the device after a predefined time elapses?

Erel,
Good question to me.
For this purpose, I keep the device on while turning the backlight OFF (from Settings).

I know this only saves the battery from using it power for the backlight.
Still it consumes power because the device is not OFF.

Could you suggest how to turn off the device while maintaining the application runs in the background?
The device shall also be able to be turned ON again after a predefined time.

Homework....


Reply With Quote
  #6 (permalink)  
Old 10-07-2007, 08:05 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Your application can't run when the device is turned off.
You could try to use Hardware.RunAppAtTime to wake up the device.
Note that not all devices support this function.
Reply With Quote
  #7 (permalink)  
Old 10-07-2007, 09:15 AM
Junior Member
 
Join Date: Sep 2007
Posts: 16
Default

Erel,
The application which turns on other application at specified time is also an application!
That means, when the device is turned off, this "Hardware.RunAppAtTime" is stopped as well.
So?
Reply With Quote
  #8 (permalink)  
Old 10-07-2007, 10:10 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

No. Hardware.RunAppAtTime uses the OS notification system to wake up the device.
Reply With Quote
  #9 (permalink)  
Old 10-07-2007, 10:15 AM
Junior Member
 
Join Date: Sep 2007
Posts: 16
Default

Erel,
Please have a look at my program.
I activate the "Hardware1.RunAppAtTime" based on Timer1_Tick.
Soon after I run the program, I switch off the device (Not to power off ya..)
Then I wait, but the
Hardware1.RunAppAtTime(AppPath & "\TurnOtherAppON.exe", x)
never turns on the TurnOtherAppON.exe.

What is the best sub to put the Hardware1.RunAppAtTime?
Should it be at the APP_START?

Please enlighten!



Sub Globals
End Sub
Sub App_Start
AddForm("Form1","Form1")
Form1.Show
Hardware.New1
AddTimer("Timer1")
Timer1.Enabled = True
Timer1.Interval = 60000
AddTimer("Timer2")
Timer2.Enabled = True
Timer2.Interval = 1000
End Sub
Sub Timer1_Tick
x = TimeParse("17:10")
x = DateAdd(t,0,0,0)
Hardware1.RunAppAtTime(AppPath & "\TurnOtherAppON.exe", x)
End Sub
Sub Timer2_Tick
Sound("tick.wav")
End Sub
Reply With Quote
  #10 (permalink)  
Old 10-07-2007, 10:17 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

What is the meaning of:
Code:
    x = TimeParse("17:10")
x = DateAdd(t,
0,0,0)
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
D-Pad Navigation Sample (?) Dave Mitchell Questions (Windows Mobile) 1 05-14-2008 06:29 AM
D-Pad Navigation Dave Mitchell Questions (Windows Mobile) 4 05-02-2008 11:46 PM
Forum Navigation dennishea Questions (Windows Mobile) 1 02-15-2008 07:52 PM
Desktop IDE: Sub tree navigation minimal bug Woinowski Bug Reports 0 01-16-2008 08:20 AM


All times are GMT. The time now is 03:23 AM.


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