When the Lat and Lon location is at 180.0000, no error message is displayed.

Explained - in detail below.

Hi, I am solving one problem regarding the GPS location error message in the weather.

I have a function that gives me the lat and lon location when I print the system:
so i get this:
Location 180.000000, 180.000000 quality : 4

The problem is that this location is not correct for fetching the weather and I am trying to tell the user that they have to start an activity on the watch in order to display the weather.

What should the function look like to flag this as an incorrect location?

I'm trying to do it like this, but it doesn't work very well for me.

if ($.LocationOWM.CurrentLocation() == null)
{
dc.setColor(Graphics.COLOR_RED, Graphics.COLOR_TRANSPARENT);
dc.drawText(120, 40, Graphics.FONT_XTINY, "GPS?", Graphics.TEXT_JUSTIFY_CENTER);
return;
}

  • It's not getting it from the phone, but is simply the "last known" for the Garmin.  The last time it used GPS.  It will go stale after a time, and that varies based on the device, where is may last a hour or a day since you last used GPS.

    This is why I never use ONE_SHOT when starting GPS, as you'll see a status of last known until it has GPS running, but it may be nowhere close to where you are.  I start it as CONTINUOUS, and then when I get a reasonable quality/accuracy, I turn off GPS.

  • I know this as fact, as I travel around the location on the watch updates and I've recorded it in log files on the watch. How often it updates from the watch I don't know. I've posted about it in this forum before. If the GPS was on all the time to get location it wouldn't take so long to get a fix when I turn it on.

  • Some of the newer devices do get a "hint" from the phone when you start GPS, but if you just use Activity.Info.currentLocation without starting GPS, it won't change, and the "hint" is really just to speed up getting a GPS lock and may not be that accurate.

  • My experience has been that while my phone is in airplane mode the watch position doesn't update. Once I land turn off airplane mode the position must update because the time zone offset updates and the time jumps to the new local time. At no time did I ever try to use the watch GPS.

    I'm not saying I know all the voodoo that is happening, but I can put the pieces together from what I've logged the code  doing and what I am and am not doing to know that the watch is getting location from something other than the GPS.

  • My response was flagged as spam. I don't know if anyone will ever see it.

    What I said was that while the phone is in airplane mode the location does not update. Once I quit airplane mode the location and time update with the new time zone. I never tried to use the GPS, so it's obviously getting location information from somewhere that's not the GPS.

  • Like I said, with some garmins, it will get a "hint" from the phone, but only if the phone is on and near by.  If the phone is off, or too far away, no hint.  With my apps, I want them to work with or without a phone, which is a reason to ignore "last known" locations.  And with some devices, there's no "hint" from the phone, even if they are inches apart.

    The time it is getting from your phone.  Next time you travel keep your phone off for a while after you land.

  • My response was flagged as spam. I don't know if anyone will ever see it.

    Saw it in the moderator's queue and approved it. Your post contained a word that is on our forbidden list. However, in this context it makes sense. Slight smileThumbsup