New GPSDriver library

Discussion in 'Official Updates' started by Erel, Nov 4, 2008.

  1. agraham

    agraham Expert Licensed User

    Like Erel said, you need to connect the driver to it.

    Start->Settings->System->External GPS->Hardware->GPS hardware port

    The COM port you need is the outbound COM port of the virtual Serial Port on your Bluetooth Serial Port service. How you find this depends upon the software the device manufacturer provided to access Bluetooth on your device.
  2. Saj

    Saj Active Member Licensed User

    No matter what COM port I put GPS Hardware port to it always resets itself to none, is there a fix for that.

    I also tried running the GPSDriver demo on an old hp iPAQ h2200 (Windows CE 4.20) without an internal GPS receiver. It complained about not finding 'gpsapi.dll'. Am i correct in stating that devices without internal GPS must use the previous gps.dll?:confused:
  3. Erel

    Erel Administrator Staff Member Licensed User

    The GPSDriver is only supported by Windows Mobile 5.0 and newer devices.
  4. 2220

    2220 Member Licensed User

    I'm using GPS Driver with a Touch Diamond without problems. I changed the ROM of my P3300 and works ok, but I'm trying to run my app. with a HTC Touch Cruise and I have an error:

    Error getting device state.
    Error number: 4319

    It has the newest ROM installed and so on. I don't know what's happening.

    Thanks in advance.
  5. 2220

    2220 Member Licensed User

    I think I've discovered why it fails.

    I have updated the 'Quick GPS' app. for first time. Once connected, GPS Driver error has dissapeared and application works fine.
  6. agraham

    agraham Expert Licensed User

    That's interesting! By "updated" I assume you mean you allowed Quick GPS to connect and download new data, not that you "updated" to a different version of the app.
  7. 2220

    2220 Member Licensed User

    Yes, Update positioning with Quick GPS.

    I'm trying again with another new PPC, but I'm afraid this is the answer to all my headaches.
  8. mjcoon

    mjcoon Well-Known Member Licensed User

    Since I am working on a version of GPS4PPC for marine navigation I thought I should look at the MagneticVariation property of Gpsdriver.

    My ancient Garmin GPS-II+ returns 4.2 whereas my slightly younger yellow Etrex gives 2.8. (The built-in Sirf chip in my PPC PDA does not offer MagneticVariation.)

    But I believe that MagneticVariation for the UK should be westerly which by the usual convention (and that stated for Gpsdriver) should be negative for westerly.

    Does anyone see a negative value for MagneticVariation from their GPS in the UK?

  9. mjcoon

    mjcoon Well-Known Member Licensed User

    Yes, I just have! It would be nice if there were a note about that in the Help (instead of the implication that only a few restricted Format() layouts will work).

    If the complete repertoire is extensive I would be happy with a link to the .NET full definition (if that is where it emanates from).

  10. agraham

    agraham Expert Licensed User

    For standard and custom numeric formatting with Format()

    Numeric Format Strings

    Note that "x" does not work because numbers are Doubles in Basic4ppc and "x" takes integers. Also note that Basic4ppc converts the format string to lower case.

    For standard and custom numeric date and time formatting with DateFormat() and TimeFormat()

    Date and Time Format Strings

    Note that DateFormat replaces "m" with "M". TimeFormat replaces "M" with "m", "S" with "s" and "T" with "t". Date and Time are identical functions but just use the different format strings so they are actually both DateTime format functions but using the slightly differently modified format strings.
  11. ashrafidkaidek

    ashrafidkaidek Member Licensed User

    Verifying GPS signal

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

    mjcoon Well-Known Member Licensed User

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

  13. agraham

    agraham Expert Licensed User

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

    ealvarez New Member Licensed User

    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?
  15. agraham

    agraham Expert Licensed User

    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.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice