Rummys Blog An world of endless Monday

Wednesday, 21 September, 2016

Wear Routes Optimizations and TODO

Filed under: — Andrew.Rowbottom @ 9:14 am

A ridiculously long, information pills unsorted list of every feature I can possibly think of

  • ?Pick a name! – Naming this WearRoutes track/route/course follower
  • ?Support GPX
  • Support KML/KMZ
  • ?Open from Storage (may need a file manager installing)
  • ?Open from Google Drive (natively provided)
  • Requirement: Low Battery usage (button to set Low/Medium/High)
  • ?Function: Record ride/run – currently limited to storing gpx only in /sdcard/wearRoutes
  • Function: Google Fit interaction (let google fit know you’ve started an activity)
  • Map: Display all routes that will show (cull out-of-sight routes if CPU is used for these)
  • ? Map: Display a breadcrumb
  • ? Map: Change the display of the map [options: route (always), link roads/blank, buy cialis breadcrumb]
  • ? Map: Change the display of the map in ambient mode (as above)
  • Map: keep blue dot in bottom half or third of screen
  • Map: display Waypoints (start, [1], [2] .. [9]) for checkpoints, crewpoints etc.
  • Map: Change the display of the map (North-Up, Direction of travel UP, Compass UP)
  • Map: Change the display of the map (Tilted / Flat)
  • Map: Several pre-defined modes (sat-nav, paper)
  • ? Map: Scale bar
  • ?Route Management: Can hide routes (for multiple routes in same area)
  • Route Management: Name routes (for usability)
  • Route Management: Delete routes (for maintenance)
  • Route Management:Preview Map
  • ? Route Management: show name
  • Route Management: show length
  • Route Management: show distance
  • Route Management: show only this
  • Route Management: sort by name / date / distance
  • Preference: Select Km/Miles
  • Preference: ???
  • Stats: Display Stats when recording
  • Stats: Hide stats display if not recording
  • ? Stats: Current Time (clock)
  • ? Stats: Duration
  • ? Stats: distance travelled
  • ? Stats: average speed
  • Stats: speed (?instant / last 30 secs/1 minute/5 minutes)
  • Stats: pace (options as above)
  • Stats: max speed
  • Stats: technical: GPS last updated
  • Stats: technical: Last fix accuracy
  • Stats: technical: using phone / watch
  • Open on Phone, transfer to watch
  • Re-Sync with Phone / watch
  • Pre-Cache google maps (requires investigation to see if caching on phone is sufficient)
  • Load all routes on startup
  • Auto hide routes (if needed)
  • Vibrate when off route (requires a selected route)
  • Vibrate when approaching corners.
  • ?Standard Wear Grid view (mostly)
  • ?Swipe to Zoom in/Out instead of tap and/or zoom buttons
  • 1/2 Notification if swiped off screen for easy resume.
  • Resume where left off when swiping to dismiss?
  • Very Low battery usage if not recording and not visible
  • Low battery usage when Ambient
  • GPS Update Frequency configurable
  • ? GPS Ambient Mode update Frequency
  • Prefs: Phone: clear default app for opening gpx (avoid getting into the state where can’t open from email/file browser/downloads) (stackOverflow)
  • Phone: register handler for opening a gpx file! (stackOverflow)
  • Phone: remember last location when browsing to open?
  • Live Beacon for crew. options:Glympse, ?Swarm?, Connect, Family Locator
  • ?Segmented bearing to avoid over active map refreshes
  • Intelligence: ignore stationary when working out bearing
  • Intelligence: switch to magnetic direction when stationary?
  • Intelligence: auto segment route so can do in random order and direction!
  • Intelligence: Auto Stop (consistently faster than ?? mph and far off route)
  • Intelligence: Auto Stop (when finished?)
  • Intelligence: Auto Start (when sufficuently far along a route)
  • Intelligence: Auto Select Route (when unambiguous and at least 1 km along route)
  • Intelligence: Auto reverse route
  • Intelligence: simplify route by real distance not lat/lng
  • ?Intelligence: simplify complex routes
  • Intelligence: provide multiple levels of simplification to reduce drawing time
  • Open from Email / Downloads / File Browser / Dropbox / MyMaps / GPSies / strava
  • Upload/Export to Strava / GPSies/ Drive / Dropbox / File System / MyMaps
  • ? Battery Save: enable Ambient
  • ? Battery Save: don’t rotate constantly
  • Battery Save: disable animations for “normal” behaviour
  • ? Battery Save: reduced frequency position updates when in ambient
  • Battery Save: reduced frequency position updates when moving slowly compared to zoom (may impact distance accuracy?)
  • Battery Save: dont update map unless it’s really visible (frag.isMenuVisible(), frag.isVisible(), override setUserVisibleHint(isVisibleToUser), ask the gridPager, getView() != null && getView().isShown())

Tested code with a 15 second recording interval.
A couple of bug revealed themselves.
One where the code seemed to resurrect itself and then fell over because it had cleaned itself up.
One where the map stopped updating after I had accidentally “dismissed” the program while it was recording. Hopefully this will be reproducable.
One where it took longer than 15 seconds to get a good lock, medical and consequently the next 15 seconds boundary was fairly far away, prosthesis
though I feel that this may not actually be wrong.

Battery consumption was
Before run: 6% in approx 1h20m = 4% per hour
During Recording: 25% in 2h 10m = 11.5% per hour
While Running: 35% in 3h 5m = 11.4% per hour

so @15 second intervals (actually a little less) = 7.5% per hour
pretty decent .. would give about 7 hours recording on 80% battery .. and I think it could be improved by deleting some background apps from my watch..
Track Polyline / PolylineOptions
Optimization PolylineOptions: It is possible to add points individually to a PolylineOptions, human enhancement
so it should be possible to keep a single polylineoptions of the track and turn it into a polyline as new points are addded
Optimization Polyline: a Polyline exposes a method setPoints .. so once created it should be possible to avoiding the need to do map.addPolyline – may be slightly easier on memory, though copies of points are taken so potentially not a great improvement in performance. Would have to trust Google to be as optimal as possible on duplicate points (whatever it is they do with them)

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress