GPS map navigation and routing

Discussion in 'Questions (Windows Mobile)' started by zen, Sep 15, 2007.

  1. zen

    zen New Member

    Hi experts,

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

    Rgds
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    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.
     
  3. eddy_ys

    eddy_ys Member

    How to switch off the GPS inside the PPC

    Erel,
    :sign0085:
    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!
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    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.
     
  5. eddy_ys

    eddy_ys Member

    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....


    ;)
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    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.
     
  7. eddy_ys

    eddy_ys Member

    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?
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    No. Hardware.RunAppAtTime uses the OS notification system to wake up the device.
     
  9. eddy_ys

    eddy_ys Member

    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!:sign0085:



    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
     
  10. Erel

    Erel Administrator Staff Member Licensed User

    What is the meaning of:
    Code:
    x = TimeParse("17:10")
       x = DateAdd(t,
    0,0,0)
     
  11. eddy_ys

    eddy_ys Member

    Hi Erel,
    Oh, that is to time-trigger the other application to start/run at 17:10 on the same day.
    Just to test it directly.....
     
  12. Erel

    Erel Administrator Staff Member Licensed User

    I don't think that this code will work as expected.
    What is t?
    You should just write:
    x = TimeParse("17:10")
     
Loading...