This project is read-only.



I started logging. GPSTracka recorded one point in the track successfully, then started counting down from 60. When the counter got to zero and it tried to capture a second data point, I got this exception (typed in manually as I couldn't find a way to copy the text to the clipboard):

at System.PInvoke.PAL.Decimal_Divide()
at System.Decimal.Divide()
at GPSTracka.TrackerForm.GPSPositionReceived()
at GPSTracka.Gps.GpsProvider.OnPosition()
at GPSTracka.Gps.MSGpsWrapper.gps_LocationChanged()
at Microsoft.WindowsMobile.Samples.Location.Gps.WaitForGpsEvents()

file attachments


bartduncan wrote Oct 27, 2010 at 1:22 AM

More info: to reproduce the problem you need to have GPS Time selected instead of System Time. Whenever you lose a signal, the app is unable to get a new time from GPS. It reuses the prior sample time and tries to do this calculation:
  ShowSpeed(distance.Value / 1000 / (decimal)(time - lastTimeA).TotalHours);
In this situation "time" and "lastTimeA" have the same value, which causes the divide by zero exception.

The workaround is to make sure you don't select GPS Time in settings (System Time is the default). Of course, that means that you must be extra careful to check your WinMo device's time, especially if you plan to use the track file for geotagging.

wrote Feb 14, 2013 at 12:41 AM