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).
  • Former Member
    Former Member over 8 years ago
    Gradient (%) in both data value and data graph.

    I checked existing gradient related fields on market and it seems the ones that show graphs are actually displaying altitude, you can do this in current version by choosing current altitude as base variable for a data graph element. As for the gradient value itself I'm still trying to figure out how this should be implemented as it'll require not a single array of historical values like I use for data values with samples and data graphs, but two: one for altitude and one for related distance values. This is doable, but I still think about how this can be implemented without breaking existing framework.

    Milestone ETA (Estimated Time and Estimated Clock Time).

    I presume your concern is the possibility to display Estimated Clock Time Arrival to next milestone, which is current clock time + milestone ETA? It's in plans.
    Current lap pace is already there, if you have some problems, then, please, explain how can I identify them, i.e. give more details about your usage scenario.

    The biggest problem is that the more code I write the less memory is left on watch for definition as Garmin compiler is not very good at memory optimization, sometimes even renaming long readable variable names to the short abbreviations allow to reduce resulting app size, which forces me to write unreadable code just for the sake of optimization. With v.030 I had to make a branch for the modern watches with 26kb of memory per data field. Of course it's logic can run on older ones but this will reduce number of elements or complexity of layouts. At least this will require of me to show some kind of estimated available memory in designer app which seems different for different devices and will require a lot of trial and error work. Gradient will most certainly be available only on modern watches, at least during the first release attempt.

    I am a big fan of your apps, I would be glad to donate if there is anyway to do that.

    The link is at the bottom of the description on market, thank you for considering this.
  • Former Member
    Former Member over 8 years ago
    I am on iOS. Unfortunately reboot watch didn't help :( It is quite tedious to copy and paste on mobile, I save the text strings from PC to a text file on dropbox, then open text file in iOS dropbox, copy, switch apps to GC, paste first string, rinse and repeat for other 3 strings.

    I understand your concern, but unfortunately Garmin prevents data fields from making web requests and/or receiving data from mobile companion apps other than their GCM. I could have saved multiple configuration instances watch side, but this will have dramatic memory consumption impact as even if settings are not used they still consume memory hindering app execution. The only thing I can recommend to improve copy/pasting routing is to locate related settings file at /GARMIN/APPS/SETTINGS/908E288F.SET and store it for the later use and when you want to update settings you can just replace this file. This method is rather questionable and will still require PC as it's not possible to access watch file system from mobile device.

    P.S. I'm unable to test with IOS, but can you check if your settings are preserved at least at the side of GCM after you send them from mobile: exit settings screen and then reenter it (this way GCM will once again query server for settings structure and will try to read settings data from watch). The critical thing to know if the settings were sent and not consumed by watch or there's some kind of send problem and settings are not delivered at all. It will require of you to copy paste settings string to some file from GCM after you send them to watch and reenter settings screen for comparison. Other than that there's nothing I can do but to create a bug ticket on related GarminIQ subforum, but last year it took them more than two months to fix critical companion apps communication bug, so I'd not expect this to be fixed soon or even at all.

    P.P.S. You may also try with simple definitions which will fit 1 definition string (256 symbols) to see if there's a difference to multiline definition using mobile GC.
  • GCM iOS

    I'm also using GCM on iOS and am experiencing the same issue.

    If I copy the string below into settings using Garmin Express, all works as it should:


    AMYAXASHIRPCAAQAAA[BBAMAVDSOaIAPQAAAPGMBVACBASHCOEaAAQAAAEHQBGASHCPaIAAQAAAVCSBGASHLMLXAAQAAAVCSBGASHHI`LAAQAAAWCGBGASAJTDFABOE]CPGCABASAG\WaACOE]CPGKABAVAELBLAJOE]CPGIAB%fJAVAG\[AAKOE]CPGKAB%fJAVAJNNYALOE]CPGMAB%fJASAEKaSAVOE]CPGIABASAG\YHAWOE]CPGKABASAJL


    P^AXOE]CPGMAAASAEBWJAMOE]CPGCABAVACYL_CDOE]CPACABCURAVAG\ZJCDOE]CPACABAVEAVALJPACDOE]CPACABMAXAUHIPSaAFOE]CPBDACAOAUHKVBMAFOE]CPABACAIAWAEJHUCDOE]CPACABDISTAVAJW^MCDOE]CPACABToDAWAG]E]CDOE]CPACABTIME


    If I then go into settings in GCM (iOS) and copy the string there, it looks like this:


    AJTA[ASAG\W\ACOE]CPGCABASHDLEXAAQAAA[BCBKASACYKAA[OE]CPAIABAQHNVSTCEQAABRAKAUHC^ESABABHGRG^ACB\AUHJIZLABABHGRDVACHJAWAJF\PCDOE]CPACABPaceASAHCI_AGOE]CPGEADAUHCOE]ABABHGRHEACDUAYAJPJSCDOE]CPACABA.PaceASAHCKXAHOE]CPGEABAUHDB^KABABHGRGaACFNAVDYUH^APQAAAPAaBYA


    MDASAG`T]APOE]CPGMABA^AEDPCANOE]CPACABFinish %fEkASAGSLMAFOE]CPGAABA[AEDQ]CDOE]CPACABDistanceASAGSNFAMOE]CPGAABAVDS_F\AVQAAAVAaBYALDASAGSOOAVOE]CPGIABAWHJVaTACQAAAEDJAMJ\CFAQHQFMQAHQAAAEA_ASAMa^KAEOE]CPALABAWHI]VYACABHGRDJAMENCFAWHIXASACAAAAADJAMEOCDA[K[PN


    YE_ABG`[DJAHEPSBAADB

    I suspect this is the default string, but if I change the target pace in GCM, for example, the datafield no longer works and I need to enter the first string again via Garmin Expess.

    To me it looks like the settings cannot be read from the watch using GCM, or the string entered in GCM is not correctly loaded onto the watch.

    Garmin Express on a PC is faultless.
  • Former Member
    Former Member over 8 years ago
    2 PatFelstead, peteholloway
    Thank you for your efforts in helping me to improve the app.
    Spent my lunch time playing with the settings in GCM Android and discovered two things: first, working with the designer app in browser on the mobile device is a pain so I'll have to really think about making mobile version and second - settings are sent correctly if I copy/paste them from browser (Chrome mobile). So, it seems then inability to send settings is Apple GCM only bug. Btw, seeing topics like this makes me believe that there'll be a lot of fuss in the coming weeks between Garmin and Apple but whether users will benefit from this discussion remains to be seen.
  • No problem, glad to help out. I will do some tests later today with GCM to see if settings are preserved (I already think not) and also with shorter strings and report back. Looks like iOS companion apps are not possible at present, wow what a mess!

    Also on a run last night with latest update, average pace is working ok and instant pace shows "--:--" when you stop moving. They also both agree with Garmin data - so this is all good.

    Can you please explain what you did to try and fix lap pace because it is still not correct? I am comparing it to Flexirunner and Garmin data field reports. As we discussed before, lap pace = 1 / (lap_speed) = (lap_time / lap_dist), looks like you are still calculating average of max and min lap pace.

    I have another question on graphs, but that can wait for another time - would rather solve GCM and lap pace!
  • Former Member
    Former Member over 8 years ago
    Can you please explain what you did to try and fix lap pace because it is still not correct? I am comparing it to Flexirunner and Garmin data field reports. As we discussed before, lap pace = 1 / (lap_speed) = (lap_time / lap_dist), looks like you are still calculating average of max and min lap pace.

    Since you see dashes instead of zero pace, this means you're using latest version. In this update I've changed pace calculation as we discussed before and tested this in simulator: for the lap pace I store lap start time and distance, each compute iteration calculates speed as (elapsed distance - lap start distance) / (timer time - lap start time) instead of min/ max like I did before. Sincerely I don't understand what might be the problem at the moment as the formula seems correct. The only difference to Flexirunner is that my calculation doesn't take into account distance you may have traveled while timer was paused manually. I do not agree to your statement about lap speed should always increase, because, for example, if you walk at constant pace, then lap pace will stay semi-constant with some minor deviations due to GPS values, when you stop - timer will continue to increase, therefore resulting in slower speed -> larger pace, if you start to run, then distance will increase at the higher rate therefore giving larger speed and lesser pace. You're welcome to prove me wrong.
  • Problems with Lap Pace

    Great data field, thank you!

    I am having problems with the current lap pace. It's not working as it should and during my runs so far it always shows 02:50.

    Any idea why? Memory problems? I am using a FR 935 with FW 4.10 and your latest data field version.

    Anything else works just fine.

    Would it be possible to have as well a data value showing the 'Performance condition'. This is also plotted as a graph in GC and the device displays my performance condition score also about 6-15' into the activity on the screen.

    Keep up the good work!

    Here my data field:

    AKDBEAQHJI\FAHOE]CPDVASAG]E]ABAAAAABCABAUHIPNLABJOHXVDHABCEAUHGPUWABJOHXVCFABFPAUHMB_UABJOHXVFEABFPAUHH[ATABJOHXVC]ABFPAUHK[W[ABJOHXVEPABFPAUHaAS[AFJOHXVHXABBIAUHaHWCAFJOHXVHVABB]AUHaHZNAFJOHXVHXABBGASHGPUWAAJOHXVCaAUASHGPWRAAQAAAVCaAUASIAE[^AAQAAAPCaAUAXADaV\CDAAAAAACABDist.ASAD\BLAMAAAAAFCABAXAJD_JCDAAAAAACABTimerASAJHXDADAAAAAFCABAYACBZHCDAAAAAACABLap P.ASOG[DQAGAAAAAFCACAWAG\YKCDAAAAAACABPaceASAG\ZBAGAAAAAGCABAYALYPRCDAAAAAACABAv. P.ASALYQOAHAAAAAFCABAVACJLJCDOE]CPACABCadASACHPaAPAAAAAFCABAUAG\[ECDOE]CPACABHRASAG\[^AVAAAAAFCABAYALNHaCDAAAAAACABAv. HRASALLMWAWAAAAAFCABAVAEMaBCDAAAAAACABAltASADGQKASAAAAAAEABAVAG\\VCDAAAAAACABAscASAG\]GATAAAAAACABAVAJTDSCDAAAAAACABDesASAJ]RNAUAAAAAAAABAVAG\][A[QAAA[BCAB%s%AQHEXOQCEQAABRAI
  • Since you see dashes instead of zero pace, this means you're using latest version. In this update I've changed pace calculation as we discussed before and tested this in simulator: for the lap pace I store lap start time and distance, each compute iteration calculates speed as (elapsed distance - lap start distance) / (timer time - lap start time) instead of min/ max like I did before. Sincerely I don't understand what might be the problem at the moment as the formula seems correct. The only difference to Flexirunner is that my calculation doesn't take into account distance you may have traveled while timer was paused manually.


    This calculation seems correct, I agree it shouldn't take into account distance travelled with timer paused manually, this isn't the issue as I only check when moving. Can you post a code snipped so we can review, or you can PM it to me?

    I do not agree to your statement about lap speed should always increase, because, for example, if you walk at constant pace, then lap pace will stay semi-constant with some minor deviations due to GPS values, when you stop - timer will continue to increase, therefore resulting in slower speed -> larger pace, if you start to run, then distance will increase at the higher rate therefore giving larger speed and lesser pace. You're welcome to prove me wrong.


    Yes I was thinking afterwards that my comment wasn't accurate. What I meant to say was if you stand still with timer increasing, the lap pace should not stay constant. e.g. you have run 5.5km at 6min/km pace then stop. At first lap pace should be 6:00, then as time progresses, the number should get steadily larger until you hit your minimum speed threshold of 0.28m/s (60 mins/km), then display should go to "--:--".
  • Wow @orofab, very nice looking DF!
  • Since you see dashes instead of zero pace, this means you're using latest version. In this update I've changed pace calculation as we discussed before and tested this in simulator: for the lap pace I store lap start time and distance, each compute iteration calculates speed as (elapsed distance - lap start distance) / (timer time - lap start time) instead of min/ max like I did before. Sincerely I don't understand what might be the problem at the moment as the formula seems correct. The only difference to Flexirunner is that my calculation doesn't take into account distance you may have traveled while timer was paused manually.


    This calculation seems correct, I agree it shouldn't take into account distance travelled with timer paused manually, this isn't the issue as I only check when moving. Can you post a code snippet so we can review, or you can PM it to me?

    I do not agree to your statement about lap speed should always increase, because, for example, if you walk at constant pace, then lap pace will stay semi-constant with some minor deviations due to GPS values, when you stop - timer will continue to increase, therefore resulting in slower speed -> larger pace, if you start to run, then distance will increase at the higher rate therefore giving larger speed and lesser pace. You're welcome to prove me wrong.


    Yes I was thinking afterwards that my comment wasn't accurate. What I meant to say was if you stand still with timer increasing, the lap pace should not stay constant. e.g. you have run 5.5km at 6min/km pace then stop moving but leave timer running. At first lap pace should be 6:00, then as time progresses, the number should get steadily larger until you hit your minimum speed threshold of 0.28m/s (60 mins/km), then display should go to "--:--", or else you start moving again.