DIY Data Field

Former Member
Former Member
Application is still pending to be approved, topic is created to be used as a communication hub during and after public beta test.

Do/Design It Yourself Data Field.

Disclaimer:
Application has hundreds of use-cases due to fully user-configurable setup, therefore it is prone to bugs. This project is not sponsored and I'm the only developer working on it in my own free time. Although I'd gladly accept reasonable criticism and improvement suggestions, I do not guarantee that bugs will be fixed and new features added in a timely manner/at all. If this approach is not acceptable for you, then, please, do not leave bad reviews just because I didn't resolve your specific case. Thanks for understanding.

Preface:
There's a lot of things custom activity recorders can do, which native Garmin apps cannot, but sometimes there's no need to invent a bicycle if there's one already itching for a ride. Some capabilities like local watch personal records, structured workouts information and advanced running dynamics will most certainly never be exposed to ConnectIQ API layer, therefore it's sometimes more efficient to use native software, but no one prevents us to use it with a twist. The main idea of this data-field type application is to give user a tool to design his own data field layout in WYSIWYG manner. The web application makes that possible providing cross-platform compatibility at the same time the only requirement being the HTML5 compatible browser. This app is not considered to be an ultimate DF which "replaces them all" as there's always something new and intriguing, which developer may envision, but I hope that this data field will help new and existing users to explore the Garmin ConnectIQ capabilities providing some unique features, which I didn't encounter in existing apps.

First things first: there's a web application, which allows to design data field layout and produces configuration string as a result. This configuration string can only be delivered to data field using standard settings means i.e. you will need either Garmin Express installed on compatible PC or Garmin Connect Mobile on your mobile device. Web app uses HTML5 local storage, changes are saved after each user action, therefore it's safe to leave your work half done and proceed from the same point sometime later. I do not own hardware to test with Apple devices, therefore any problems in that department can be explored and fixed only by sending me detailed explanations and, of course, the configuration string itself. Current version with the default layout setup was tested for several weeks in simulator and for several of my personal runs proving to be rather stable to go live, but of course there's no guarantee that this app will function without hitches on your specific device. Currently, I do not have a reliable hosting for my personal web apps, therefore data field designer will reside on Google Apps Engine servers using free account bandwidth/limitations (as there are almost no server-side computations, I think this will suffice for a while) at least if/until it'll become popular enough for the users to complain about page availability. Current implementation with the default layout setup works on the edge of stability and there was also a price to pay during watch code optimization, which lead to efficient but very unreadable code. This means that for older devices there may be no improvements, only bug fixes. But for modern devices like Forerunner735XT and on we still have additional 10kb of available memory, which can be used for new logic like new data values and/or additional app parameters (e.g. waypoints). Sometimes network latency and/or Google servers accessibility seems to impact resources load time and wrong font may be displayed first time the web app is started, to fix this simply press F5 (refresh page) in browser.

Current settings are 4 lines for definition itself (these should be copy/pasted without changes directly from web app), Target Pace for pacemaker values (should be entered as string in <min>:<sec> format, e.g. "5:40" as in min/km) and Milestones, which are just fixed distances comma separated list, they are expressed in kilometers and may contain fractional values using dot delimiter (e.g. 0.5,1,1.5, etc). It'necessary to enter values in kilometers, but they will be converted before display depending on watch settings.

Default setup is considered to be a "component showcase" and consists of basic building blocks:
- Data values, which are simply text representation of corresponding activity information bits like time or speed, for data values it's possible to change screen coordinates, font, color, number of samples to smooth the value over specified amount of seconds and add optional outline for data to become more readable or dynamically colored on less contrast backgrounds; if text font is selected, then it's also possible to append data value with custom text, e.g. create label with value for another data block;
- Data graphs, these are just rolling data value charts, which represent one selected data value over a set period of time, minimum and maximum graph values are adjusted automatically, number of samples is calculated automatically based on width of graph area and graph bar, all of the other options are similar to data values;
- Graphics elements, these are basic graphical primitives, which allow to customize the layout, add visibility to some values etc; parameters for these elements are mostly self explanatory except for two specific elements of type Arc. These may not only serve as a static view elements, but also can be used to represent a dynamic data value in a manner of a progress bar. For this to happen you need to tick the "Variable" option and select base Data value (currently there's only a limited selection, but this may be a subject to change) accompanied by min and max initial values, these range values are indeed initial as when the underlying data value falls outside of this range, then range is adjusted automatically. For example in bundled layout this feature is used to display the progress to the next kilometer: Elapsed distance is selected as a base value, initial range is specified as 0 to 100 (in this case 100 means 1000m, as the distance values are displayed as 00.00), which means that this arc will grow from start angle to the maximum width angle as the elapsed distance increases during activity acting as a progress bar to the next kilometer. When elapsed distance will become greater than 1000 meters, then ranges will be readjusted using the same range difference as before, in this case minimum value will become 1000m while maximum one will increase to 2000m. Here's a little demo of what you can make using variable value arc (this config is created for semi-round devices, copy/paste this configuration string into import window of web app).
AGUAJA[HIWaVFAJNATXDEAODZQVELEUA[HIWaVFAODU]`DEAOEOQVEVE_A[HIWaVFAABG`[DEAOFDQWE`FHA[HIWaVFAABHGRDEAOF[QWFIFRA[HIWaVFAJNA\ODEAOGQQVFSF\A[HIWaVFAOE]CPCWAODZTMELF\A[HIWaVFAAAAAACWAPDWTMELF\ASADILDAPOE]CPFEABAVDVENQAPQAAAFDJCFACB

Selected element options can be adjusted using the properties panel to the right of the designer canvas. In addition to pixel-by-pixel adjustments, designer canvas allows to drag currently selected element. To drag data value it's not necessary to start drag at any specific point, but for graphs and graphical elements the drag point will be determined based on mouse pointer coordinates: e.g. to resize graph area or rectangle click and drag somewhere around the lower right corner, to adjust the radius of circles and direction arrow start drag outside of the outer radius, to change coordinates - click somewhere near the circle center. For the arcs it's currently possible to change start angle and arc width by activating drag-and-drop near the corresponding arc vertex. Touch support for mobile devices is implemented.

There are still some limitations like direction arrow points only to north or some data values available only on high-end devices like power are not yet implemented etc, but as I already mentioned above, this app is subject to improve especially for the newer devices, where there's a lot of memory available even for the data field type of app. The web app is also meant to be improved especially in a direction to provide the nearest possible WYSIWYG snapshot of what you'll actually see on device, but there are also some limitations like, for example, font, which is used as numeric font in the latest Fenix5/FR935 models is not and won't be publicly available (confirmed by Garmin officials explicitly) and I used nearest lookalike, therefore there still may be some couple of pixel differences here and there between device and web app. For these kinds of problems I can only test and fix using the user-provided layouts in specific device simulator as I'm a simple FR230 owner for real testing and I'm afraid this won't change in the nearest year unless generous users will help me to upgrade.

Web app may eventually become mobile application based on the user feedback (but not for the Apple devices, Android only).


  • I cannot think of how the average power of the first lap (which, I agree, should be equal to "native" average power of the entire activity since the timer started) should be calculated differently compared to any other lap. Did you double-check that you use the timer for the calculation rather than the "time elapsed since power-on" also for the first lap?

  • Dear Easuvorov;
    Thanks for version 0.73 which enables designs for Edge 1030.
    I allready ordered that device and migrated my design from Edge 1000 to 1030 on designer-tool.
    I will report if there are issues with font-sizes.
    Many thanks for that amazing app!!

    One question at the end:
    are you interested in "wish-lists" or are you busy enough with existing stuff...?
  • Former Member
    Former Member over 7 years ago
    are you interested in "wish-lists" or are you busy enough with existing stuff...?

    Any suggestions are welcome but you should consider that they will initially land in my own general todo list, which I reorder regularly based on my understanding of task complexity and/or similarity to existing functions so that things which fit into already implemented code come in first. Also, unless you don't know already, currently there are two different versions: one for modern watches which include all functions and one for the legacy devices with 16kb per data field. But there's already a new subset of devices: Fenix 5x, Edge 820, 1000 and 1030 which allow up to 122kb per data field and this is almost 6 times more than it's available in most current generation watches so we may get another fork with a plethora of new functions for those devices (like dedicated functionality for reading external sensors, activity wide graphs or FIT contributor fields).
  • Hi Easuvorov,

    quick feedback on new version 0.73: average power of first lap after activity start works perfect now. The number matches Garmin's average power field.

    Thanks for the update!
  • Hi Easuvorov;

    Great wishes:
    -"Average Bike Power" available as variable for graphic elements
    -"HR Zone n Time" should count only if "Timer Time" is running

    What I would like to add to my design on Edge1000/Edge1030:
    -Temperature
    -Time to Destination (based on av.Speed and DistanceToDest.)

    Future wish:
    -"Lap Number" should be resettet after ending an activity
    -"Timer Time" with "Lap option" should be resettet after ending an activity
    -Power Zones n Time" - but since this is not available in Toybox, I assume, it's much work... :-(

    What I found out - but don't need:
    -Custom Color Sets have no effect. Colors always start with darkred and continue with blue - and so on, regardless what color was chosen in the Set. (at least on Edge1000)


    Thanks anyway for that amazing app!

  • Former Member
    Former Member over 7 years ago
    -"Average Bike Power" available as variable for graphic elements

    Since average values do not show great dynamic during activity I left them for graphs but if you think that it will give any meaningful variable width arc/rectangle representation I will add that.

    -"HR Zone n Time" should count only if "Timer Time" is running

    Basically, this is just a bugfix, therefore I'll just fix it.

    -"Lap Number" should be resettet after ending an activity
    -"Timer Time" with "Lap option" should be resettet after ending an activity

    I'll do this in 122kb source fork, which will be available for Edges in future.

    -Time to Destination (based on av.Speed and DistanceToDest.)

    I already have request for ETA for destination/next course point, will do this sometimes in the future.

    -Custom Color Sets have no effect. Colors always start with darkred and continue with blue - and so on, regardless what color was chosen in the Set. (at least on Edge1000)

    This should work, I suppose that you're using wrong range values, if you send me your definition with custom color set for analysis I'll provide more insights.

    -Power Zones n Time" - but since this is not available in Toybox, I assume, it's much work... :-(

    There's no such thing as time in HR zone either but it's implemented nevertheless, it just requires a little bit of redesign because we have a fixed number of HR zones therefore I identified each of them with a separate data value ID, this is not the case with power zones though as their number may vary depending on your settings. I'll think of how this can be implemented.

    -Temperature

    Well, this is getting old already. Data fields do not have access to sensor data and temperature is not provided in an activity info therefore I may only use temperature/pressure history on devices with internal sensors which provide this history (e.g. VAHR, Fenix5 etx), Edges rely on external sensors for this. I have found supposedly working bits of code for manual connection to Tempe, but this is rather complicated code and I do not have sensor to test it live so when I'll make 122kb source fork for Edges I will try to include this but I do not know whether it will work at all.
  • Thanks a lot for your detailed answers.

    Average Power:
    see in my post before (with pictures) that I plan to insert "average power" - like "average HR", too.

    Time to Dastination:
    ETA will do!! Fine!

    Temperature:
    I thought it's easy to do, because it's a method in toybox:
    temperature Toybox::Lang::Float
    The temperature in degrees Celcius (C).

    But I have to admit - I'm just curios and I have no idea of IQ-SDK programming!
    Edge models need no external sensor for temperature. It's a standard datafield.

    Custom Color Sets:
    I played around with different small Designs and found out, the first (lowest) color is always dark-red.
    Here is a sample for Cadence (Edge 1000):
    0-40 rpm should be dark-green, but is displayed as dark-red.
    http://members.kabsi.at/Wirth/Bilder...lor-Sample.zip

    Thank you and best regards!
  • ...what I forgot to ask for:
    It's more a "cosmetic" matter concerning "Grade":

    Since Grade is displayed in percent, most people - and me - will use an integer figure for that - without fractional digits. ("%1.0f")
    If the calculation behind the figure comes to a small negativ value, the datafield shows "-0".
    Maybe it is not too much work, to eliminate the minus-sign in that case?




  • Hi. With respect to the grade calculation. If I stop the timer and put my edge to sleep at say a coffee stop. When i resume the activity afterwards the grade calculation no longer works and reads 0 for the rest of the ride