hTC GPSDriver Anomaly

Saj

Active Member
Licensed User
I just tried out my nav program on a hTC Touch HD using GPSDriver. I get invalid data (-9999) for Lattitude and Longitude. The program has been tested on other devices with internal GPS rx and works fine. Is this a known problem? Below is the Sub for acquiring the gps data:

Sub Timer1Internal_Tick
Main.Hardware.KeepAlive 'Reset the idle timers to prevent device shutdown
Main.Timer2.Enabled = True 'After Timer2 ticks, grey out posn marker, i.e. signal lost
Main.trackTimer = Main.trackTimer+1
gpsInternal.GetDeviceData
If gpsInternal.GetGpsData (6000) Then
'Update gpsDataArr
Main.gpsDataArr.altAMSL = gpsInternal.SeaLevelAltitude 'External: Altitude
Main.gpsDataArr.CourseOverGnd = gpsInternal.Heading 'External: CourseOverGround
Main.gpsDataArr.DecimalLat = gpsInternal.Latitude 'External: DecimalLatitude
Main.gpsDataArr.DecimalLon = gpsInternal.Longitude 'External: DecimalLongitude
Main.gpsDataArr.nSats = gpsInternal.SatellitesInViewCount 'External: NumberOfSatellites
Main.gpsDataArr.SpdOverGnd = gpsInternal.Speed 'External: SpeedOverGround 'in NM?
Main.gpsDataArr.Status = gpsInternal.SatelliteUsedCount & " / " & gpsInternal.SatellitesInViewCount
Main.gpsDataArr.updatedBy = "Internal Rx"
Main.moveMap
End If
End Sub


Saj.
 

agraham

Expert
Licensed User
Longtime User
It would seem to be a device issue and not an application issue. The GpsDriver is being told by the device that the information is not valid so it is not passing it through. Are the other data items as you expect and what is the value of FixType? Has the device been flashed with a custom ROM?

You could try my http://www.b4x.com/forum/additional-libraries/3319-gpsdrivernmea-library.html and see what latitude and longitude are being reported in the GPGGA and/or GPRMC sentences.
 

Saj

Active Member
Licensed User
Hi agraham,

I have tried with professional GPS software and that works fine all the time which would suggest that it may not be entirely down to the hardware?

I have since noticed that the hTC intermittently reports valid GPS data and all is ok, i.e. for some minutes then reverts back to -9999. FixType=Unkown when there is no valid data, =3D when there is intermittent valid data. All data items such as heading and speed exhibit the same behaviour.

The device is an Orange mobile, so I guess it would have a custom ROM.

I'm gonna give your GPSDriverNMEA library a go to see if that makes a difference.

Saj.
 

agraham

Expert
Licensed User
Longtime User
I have tried with professional GPS software and that works fine all the time which would suggest that it may not be entirely down to the hardware?
That probably doesn't mean much unless you are sure that it is using the Windows Intermediate Driver API which it may well not be doing. If you need to configure it with a Com port then it is certainly not using the API.

GPSDriver is a thin wrapper over the Windows Intermediate Driver API. If it is returning invalid data it is because that is what the device is telling it via the WIM API.
 

Saj

Active Member
Licensed User
Could it be because GetDeviceData is serviced differently on this device with gps properties being populated differently, since GetGPSData returns true if at least one of the properties was filled with valid data.
Anyway I put in a If statement checking for -9999 which seesm to have fixed it.
 

agraham

Expert
Licensed User
Longtime User
Could it be because GetDeviceData is serviced differently on this device
Why GetDeviceData, this is an entirely separate function from GetGPSData? What value are you using for the Age parameter in GetGPSData? It shows 6000 in the code fragment above, have you tried increasing it?
 
Last edited:
Top