%LOC variable not updating

340 views
Skip to first unread message

Edwinek

unread,
Aug 9, 2010, 9:08:55 AM8/9/10
to Tasker
Hi,

I've made a location-logger profile. The context starts it every 15
minutes. The action then writes one line to a log file:

%DATE %TIME %LOC %LOA

The problem is: in every line the date and time are updated, but %LOC
gives exactly the same latitude/longitude. This happens even at times
that I know I have been elsewhere. %LOA also stays the same.
So it looks like these variables aren't being refreshed with new
location data. Am I doing something wrong or is this a known bug?

Example:

09-08-10 06.30 50.077099680900574,6.023702383041382 16
09-08-10 06.45 50.077099680900574,6.023702383041382 16
09-08-10 07.00 50.077099680900574,6.023702383041382 16
09-08-10 07.15 50.077099680900574,6.023702383041382 16
(lines omitted)
09-08-10 12.30 50.077099680900574,6.023702383041382 16
09-08-10 12.45 50.077099680900574,6.023702383041382 16
09-08-10 13.00 50.077099680900574,6.023702383041382 16
09-08-10 13.15 50.077099680900574,6.023702383041382 16
09-08-10 13.30 50.077099680900574,6.023702383041382 16
09-08-10 13.45 50.077099680900574,6.023702383041382 16
09-08-10 14.00 50.077099680900574,6.023702383041382 16
09-08-10 14.15 50.077099680900574,6.023702383041382 16
09-08-10 14.30 50.077099680900574,6.023702383041382 16

My location changed between 6:30 and 7:15, and again between 13:15 and
14:00, but the log doesn't show it.
Any idea whats happening?

Regards,
Edwin

BossMan

unread,
Aug 9, 2010, 9:20:39 AM8/9/10
to Tasker
Hi,
1) is GPS on?
2) do you have any location-based profile that could perform periodic
GPS check?
3) if not, did you use GPS during that time?

LOC is updated only when getting new fix from GPS. If there's no fix,
location stays the same. If you don't have anything that could trigger
GPS to start getting fix, your LOC will stay unchanged.

BR,
A.

Edwinek

unread,
Aug 9, 2010, 9:48:11 AM8/9/10
to Tasker
Hi,

That could explain things. I have GPS on permanently, but for reasons
of of energy, my location based profiles are all NET-only (waiting for
cell-based to happen). So nothing is asking for a GPS fix. Thanks for
clearing that up.

Regards,
Edwin

Oli

unread,
Aug 9, 2010, 10:42:36 AM8/9/10
to Tasker
I was just doing the exact same thing this morning, except uploading
the data to my server instead of writing to a file. I ran into the
same problem - I think there's a system wide 'current location' which
needs a trigger to update (it must be used for weather updates and
things like that). Not that I know, but that's my best guess at what's
going on.

My workaround:
In the time context (every 30 minutes) that was triggering my location
upload, I added a second context for location. I set the location to
my home, but made the radius as large as is possible (999km). Then I
added a 'wait' command for about 30 seconds at the beginning of my
task to upload the information.

What that did:
Every time the time context triggers (every 30 minutes), that causes
tasker to get a gps or net location fix (depends what you chose on the
location context options), which triggers the location update. Because
the radius is very big, it normally doesn't matter what that location
returns - it still runs the task. The wait is to give the location
enough time to update before writing to the log.

Only downside I have found:
You can't set the radius larger than 999km, so if, say, I go on
holiday, the coordinates will not be written to the log because you're
not in the location. I haven't experimented much with this but perhaps
if you set the location context with a time context to an empty or
redundant task simply to trigger the coordinate update, and then made
a separate time context with the same interval and put the log writing
task in that, it would fix that problem (remembering to keep the wait
command at the start of the log task).

Oli

unread,
Aug 9, 2010, 12:05:03 PM8/9/10
to Tasker
Update:
I've been playing some more with this, and it seems like it works when
you're using the phone (it's awake), but if it's sitting idle it seems
to spew off the old data like in your original post. Any more
information on this?

Oli

unread,
Aug 10, 2010, 3:59:41 AM8/10/10
to Tasker
Ah, should have searched the forum first. This thread has some very
relevant info:
http://groups.google.com/group/tasker/browse_thread/thread/d341d36178f3c32c/3c4a243a7ef8e31f?lnk=gst&q=gps#3c4a243a7ef8e31f

You need to set the task to keep the phone awake so the gps fix gets
executed properly.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages