Mileage Tracking/Logging

Share and discuss your flows and ideas with other users.

Moderator: Martin

Post Reply
auto_wiz
Posts: 26
Joined: 30 Nov 2012 23:49

Mileage Tracking/Logging

Post by auto_wiz » 01 Dec 2012 00:10

This is my best work yet!

4 flows used together will track your mileage (I use fot business milage) using gps, store to csv file on your device and then archive it daily to folders organise by year/month.

Enable tracker - A flow to enable mileage logging ie. start logging when connected to in car bluetooth.
Mileage tracker - logs your position and distance travelled to a csv file. Will display a notification if enabled without power connected.
Reset total - will reset your total distance travelled on a daily basis and archive the csv file to folders organised by year and date.
Remove notification - removes the battery drain notification when power is connected.

Accuracy is good at 30s intervals. Less than 1 mile different to my odometer over 260 mile journey! A shorter interval will be more accurate for short trips where alot of turns are made but you will need to adjust the emergency stop limit.

Please note gps must be enabled or you can add enabling to the flow if you have root.
You may have to tweak file locations on some devices but should be good for most.

http://automagic4android.com/flow.php?i ... 00b1f12810

themykel
Posts: 1
Joined: 23 Jan 2014 20:09

Re: Mileage Tracking/Logging

Post by themykel » 23 Jan 2014 20:11

Would this be possible to update to include when connected to a specific Bluetooth device, activate and track? Also would it be possible to set this to track total mileage and just add that to a google calendar?

angelatwork
Posts: 186
Joined: 12 Feb 2014 01:45

Re: Mileage Tracking/Logging

Post by angelatwork » 21 Feb 2014 13:21

Hi, I would love to use your tracker, but I am having a few difficulties. Firstly I could not get the flow to finish. Then I realized that I did not have the folder you used in flow. Then there was an error with global_totalDist. Right or wrong I added, if (global_totalDist ==null) {global_totalDist=0 } to the script global_totalDist =toNumber (global_totalDist) +distance. And then the flow worked.

But if I look at the written file everything gets double logged (two rows with the same input data) for each time the flow runs. And the distance added is also doubled. This happens even if I take away my extra script, which I can do after the flow had run at least once and global_totalDist is not Null anymore.

Also is there anyone who knows how to do a script that either adds the track to a kml/kmz or uploads it to Google maps (Google maps can read a file that have the right headings). Also is there anyone who knows how script to get a hold of what Google maps calculates the trip to be in meters.

Maybe one can update this mileage tracker, now when we got new triggers and actions in automagic. I have changed the periodic time trigger to a periodic location trigger, so I don't need initiate the variable location. But maybe you could use speed and distance. What I try to accomplish but automated is like the app my drivers log, but written into files like this one. Using Most the mileage tracking apps I need to use the overlay option, which I don't like. Secondly most apps are not accurate enough since Google maps says we start on a road we can't get to without driving half a kilometer (i have tried to get Google maps to change this).

Any input from the forum would be appreciated
Best regards,
AngelAtwOrk

3309
Posts: 9
Joined: 02 Mar 2014 16:44

Re: Mileage Tracking/Logging

Post by 3309 » 02 Mar 2014 23:46

That is one great flow....learning a lot...appreciate if you give us more of scripted flow
Thanks

auto_wiz
Posts: 26
Joined: 30 Nov 2012 23:49

Re: Mileage Tracking/Logging

Post by auto_wiz » 09 May 2014 21:57

Ok, I've been away for a while so sorry for the late reply. I'll have another look at the flows and post an update since we now have the distance calculator script built in the Haversine formula is no longer required. I'm sure I could simplify it a little. I'll post an update in a few days.

angelatwork
Posts: 186
Joined: 12 Feb 2014 01:45

Re: Mileage Tracking/Logging

Post by angelatwork » 10 May 2014 20:25

Looking forward to it :-)
Best regards,
AngelAtwOrk

Post Reply