Speedometer

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Locked
User avatar
Scotty
Posts: 78
Joined: 26 Aug 2016 20:29
Location: Southern California

Speedometer

Post by Scotty » 18 Apr 2017 11:25

I'd like to make a speedometer widget. There's already a trigger that can be activated by GPS-based speed, so it looks like Automagic can detect how fast the phone is moving. Would it be possible to provide a similar action / condition, so that every so often (using a loop) I could query GPS to determine the car's speed, and write that value to a variable? Battery consumption isn't an issue because, when I'm driving, my phone is always in the charger.

bogdyro
Posts: 241
Joined: 04 Apr 2015 15:14

Re: Speedometer

Post by bogdyro » 19 Apr 2017 05:25

Hi.
Trigger speed (rises above 5,threshold 1) works well.
Action script -update widget property (set the text property of a text element in a widget that you create to <location_speed >)
Last time I tried this it worked well for a widget overlay on top of all other apps that shows the current speed.
Note that once the flow is enabled Automagic will keep GPS on.

There are also apps in the playstore that do exactly that and have lots of useful features.

User avatar
Scotty
Posts: 78
Joined: 26 Aug 2016 20:29
Location: Southern California

Re: Speedometer

Post by Scotty » 19 Apr 2017 11:22

Thanks for the reply. That's the trigger that I was referring to. However, in its help file it says:

The trigger Speed is executed when the measured speed of the GPS receiver rises above or declines below a certain level

And...

Example:
Type: Declines below, Speed 40km/h, Threshold: 10km/h
The trigger is executed when the speed declines under 40km/h. The speed has to rise to at least 50km/h again before the trigger is executed again


So I saw two things that, I thought, prevented the trigger from being useful as a speedometer. First, it's unidirectional; it is triggered by either rising or falling speeds, but not both. I know that two flows could be made (one for rising, the other for declining), but the bigger problem is the second one: the flow would be triggered ONLY when the speed crossed a single threshold value, and won't be triggered again until that single value is crossed again (actually, crossed again twice - one in the "reverse" direction, then one in the "forward").

So, basically, from its description, the Speed trigger would be good to use as an alarm to alert you if you begin driving too fast (say, rises above 70, threshold 1); but not much as use as a speedometer.

Maybe I've misunderstood, and if your suggested settings work to deliver current speed, that'll be good ; I'll give it a try.

I know about the other apps, and have a couple. But I'm setting up my own drive mode page on my phone and I'd like a current speed indicator that I can design to my own specification.

EDIT: @bogdyro - I tried your settings, no joy. The trigger worked pretty much as described in the Help file. When I exceeded 5mph, my widget showed a speed value - but that didn't change at all, even as I accelerated to 20, 30, 40 etc. I came to a halt. No change. I sped up again - this time it changed, to a slightly different (but still low) value, where it remained as I accelerated up to normal driving speed. Since, according to the help file, the flow wouldn't be triggered again until I dropped speed below 5mph, then accelerated again, this time I manually executed the flow while I was travelling at around 30mph (traffic was light ;) ); widget displayed null. Stopped at light, still showed null. Drove away again - I exceeded 5mph, the widget showed a speed value, but it remained unchanged as I sped up further....

bogdyro
Posts: 241
Joined: 04 Apr 2015 15:14

Re: Speedometer

Post by bogdyro » 19 Apr 2017 14:44

Got it. I know I had it working somehow. I'll give it a try myself and get back to you

bogdyro
Posts: 241
Joined: 04 Apr 2015 15:14

Re: Speedometer

Post by bogdyro » 19 Apr 2017 17:15

Actually it was another trigger: periodic location update,every 1 second. Variable location _speed is in m/s so you have to multiply by 3.6 for km/h

User avatar
Scotty
Posts: 78
Joined: 26 Aug 2016 20:29
Location: Southern California

Re: Speedometer

Post by Scotty » 19 Apr 2017 20:51

AHA! I use that trigger all the time (to establish my location, which determines several aspects of my phone's behavior) but I was not aware that location_speed was one of the automatically-generated variables.

I'll try it on my way home tonight, but I can't see any reason why it won't work; so, many thanks!

Locked