A view is a structure for describing how track data (tracks, vehicles, trackers) should be displayed. You can think of a view as a filter which represents what and how to display the data without changing the underlying data itself. (Axiom, In general we don't mess with raw data and use views as a filter. The exceptions might be demo data. MC)
Views are intended to be defined once and viewed on different applications. For instance a view may be defined using Trackwork, but the same view can be used on SmartTrack (TrackManager), or on a web based track viewer. Views shall not contain any structure that renders it unusable on any of our current platforms (Android, IOS, desktop, or web). (Agreed, MC)
Track views need to have the following properties:
Each view can be characterized as:
(Some of these are optional and some are required. Perimeter is optional, the view may be based on time. I can't imaging the list of tracks, project, company, or date/time as optional. Working time (not job hours) is inherently limited by the day assuming we have our terminology straight. There's two elements, the day the tracks occurred and any (optional) job hours. And the day the tracks occurred might be inferred from the tracks? I'll leave the guts to you on what makes sense. MC)
Revision note: 2017-01-13 Previous versions of this page had specified “costCodeList” and “timezone”. These have been moved to the AgtekAccess server's definition of Project. The values are global for a project for all times.
Each view file (X.settings) exists on the “settings” subfolder of the project being used. Any view file named “default.settings” is to be considered the default settings used when no other settings are appropriate. Files named “YYYY-MM-DD.settings” are to be used for that day's tracks. Each day is calculated based on local midnight.
When a view-capable program starts it will first look for the day based settings (if it exists) to be used for the current view settings. If the day based settings are not available (no file), the “default.settings” will be used. If there is no default.settings, the program will revert to using built in default values which are roughly:
The current thinking is to represent a view as a JSON encoded object. This handles the portability and debuggability goals for the views.
{ "title": "Example view", "companyId": "EX123456", "projectId": 137, "date": "2016-06-13T10:38:00.000Z", "effectiveTime": 1478208875, "version": "1", "userId": "joe-designer@example.com", "application": "Platform SmartTrack 1.0" "planfile": "access://Projects/My-Project/Job Files/example-plans.kmz", "geofence" : "true", "perimeter": [ [37.1, -121.8, 90], [37.11, -121.81, 90.1]], "workTimes: { "clipStart": false, "morning" : { "start": 28800, "end": 41400 }, "clipMidday" : true, "afternoon" : { "start": 43080, "end": 61200 } , "clipEnd" : false }, "tracks": [ { "id": "-1", "cycle-line": [ [37.1, -121.8, 90], [37.11, -121.81, 90.1]], "notes": [ { "time" : 41000. "text": "Decided to order pizza" } ] }, { "id": "17" "segments": [ { "start": 28800, "end" : 41400, "label" : "Clay layer", "calcStats": true }, { "start": 43080, "end" : 61200, "label" : "Sand", "calcStats": false } ] }, { "id": "18", "visible": false, "segments" : [ { "start": 28800, "end" : 41400, "label" : "Clay layer" } ], "cycle-line": [ [37.1, -121.8, 90], [37.11, -121.81, 90.1]], "notes" : [ { "time": 41400, "text" : "Pizza arrived" }, { "time": 42000, "text" " "Pizza got cold" } ] }, { "id": "19", "calcStats": false, "label": "The entire track" } ], }
The following descriptions are the normative directives for a project view definition. The term “Access” will be used as short hand for the AGTEK Access File and License Server system.
Each View must have, or conform to:
Sub-objects: