Coding an app for running and cycling ?

Posted on
Page
of 2
/ 2
Next
  • Hello everyone, I don’t code and therefore, I speak out about what I miss, in case some of you would consider coding it. I’ll speak about running and cycling, ‘cause with a HRM and a gps, that looks like a logical usecase.
    I usually run with an old Garmin watch that does the trick pretty well, but rather than copying this design, why not make something better ?
    Ideally, it’s an app that would record in the background a .gpx or .fit or else with the gps, HR, speed and all relevant infos that can be used in another app (like GoldenCheetah, Zombietracker gps on Linux, or Forrunner or Opentrack on Android). While exercising, it’s great to have some live infos displayed : HR, speed, distance, elapsed time. 4 different infos, one in each corner, in a colored square. I attached a drawing I made, just to have a rough idea about it. In an ideal world, taping the HR corner would alternate between BPM and « zones »*. taping on the speed would alternate between km/h and pace (time per kilometer). Taping on distance would bring average pace so far.

    *Heart rate zones are calculated depending on a percentage of your maximum heart rate. It’s a useful tool, very appreciated amongst runners to simply check if you’re pushing too much.
    Zone 1: Easy – 68% to 73% of max HR.
    Zone 2: Steady – 73% to 80% of max HR.
    Zone 3: Moderately Hard – 80% to 87% of max HR.
    Zone 4: Hard – 87% to 93% of max HR.
    Zone 5: Very Hard – 93-100% of max HR.

    To finish the activity, a click on the side button could bring a menu with the option to 1) pause/resume the recording, 2) discard or record the data 3) Have an overview of the race (average speed, average HR, distance, time elapsed.

    In the settings, it’s important to offer kms and miles.
    I finished my wishlist for Christmas next year !


    1 Attachment

    • running app.png
  • Hi @Fteacher,

    I have been working a little on an app for running that will do some of the things you ask for. The design is different visually, but my aim is similar in terms of functionality. HR Zones is on my list of wishes with a question mark after it, if it is something other people are interested in to I will remove the question mark.

    What you haven't mentioned, but is important to me, is being able to choose the target for a run. I have planned 4 options: Free run, Time run (aiming for, e.g. 30 minutes regardless of distance), Distance run (aiming for, e.g., 5k regardless of time), and intervals (e.g. 3 sets of 5 min sprint, 2 min jog). The design I am working on uses a ring filled depending on progress towards the time/distance goal.

  • +1 for the zones, but I still haven't got back to my running since pandemic, :(

  • what you're describing @Fteacher and what you're developing @myownself, are exactly what I'm looking forward to using on the Bangle2
    The HR-zone isn't particularly an option I'd thought of, but would gladly use it.
    My use would be mainly during urban rollerskating/rollerblading, and cycling
    But also during hikes of one or more days in the mountains if the battery allows it
    I will closely follow the evolution of this project and am ready to give feedback when I test it
    Thank you !!

  • I guess that settles that.

    Just a quick note, I've started doing this using the emulator because I missed the Kickstarter, so a "finished" version won't be for a while.

  • @myownself

    The interval is great, I normally do (did?) those training cycles and even though I had it speaking to me via headphone, I would constantly miss it because of the music, so having it on the clock is awesome and much more practical.

  • @myownself do you include the recording to a file in the background?

  • that d be indeed a great ad to be able to keep a track

  • @diego I know the problem you mean! I'd also like the Bangle to buzz between intervals (and at target reached) so I'm not clock watching too much.

    @Poolitzer originally I hadn't thought about it because I care more about the stats than the actual coordinates, but from @Fteacher's description it seems like people would use it so I'll put it in. But I won't be thinking much about that until I am using a real device.

  • @myownself that sounds wonderful. I'm also badly interested in being able to set these 4 kinds of different runs !
    About the different HR zones, once you start to use it, it makes more sense than BPM. Also, plenty of videos about running refer to these HR zones. Probably all running watches nowadays include it, so it's definitively something people may look for.

    I'm not against having different designs of running apps, but I think it makes sense to have 1 single app making all the job, not to start a gps recorder app, then an interval app, then another app that shows BPM etc... I think 1 good running app would make the bangle.js definitvely appealing, and that's why I think I'm gonna make a couple more suggestions ! I'll be trying and testing this app, if you have alpha versions, I run 3 to 5 times a week...

    Adding personnalised settings (weight) would allow the app could render a number of burnt calories at the end of the run.
    Adding maximum HR in personnalisation allows for automatic calculation of HR zones, if unknown, it can be guess-timated from the age and gender.
    A last thing, which is completely accessory, but that I like from my Garmin watch, is that it has a record section where it gives me my best 1kms, best 5 kms, best 10 kms. When I finish a race, it shows a medal with the record if I beat a previous record. That's great for the ego.
    And in the list of things that could be useful, I use an external HR, the polar OH1+ (second hand 50 euros, as precise as a chest strap HRM) which pairs flawlessly with the bangle.js. Still, when I finished to run, I have to take it off and delete the app. Adding a setting section for HRM with ON/OFF/EXTERNAL would be perfect. When "external" is toggled, a short message with a buzz confirming the pairing with it would also finish to polish the whole thing.

  • About the different HR zones, once you start to use it, it makes more sense than BPM. Also, plenty of videos about running refer to these HR zones. Probably all running watches nowadays include it, so it's definitively something people may look for.

    Thanks, I haven't used any running watch in the past so I didn't realise this. I've had conversations about HR Zones in the past and it meant different things to different people I spoke to, is the meaning standardised across the watches you've used?

    And in the list of things that could be useful, I use an external HR, the polar OH1+ (second hand 50 euros, as precise as a chest strap HRM) which pairs flawlessly with the bangle.js. Still, when I finished to run, I have to take it off and delete the app. Adding a setting section for HRM with ON/OFF/EXTERNAL would be perfect. When "external" is toggled, a short message with a buzz confirming the pairing with it would also finish to polish the whole thing.

    I think this one should be handled elsewhere rather than in a single app. Deleting the app for external HRM obviously isn't ideal for anyone when they take it off.

  • @myownself About HR zones, definitions may differ slightly in terms of percentage, but not that much, I can make a bit of research to check what's the most commonly accepted as a standard. Maybe the incertainties you spoke about are related to the definition of the max HR which can be calculated (pretty imprecisely, whatever the method) or can be "obtained" from hard exercice (but here too it's difficult to get it right and reach 100%). I suppose it's still possible to offer the possibility for people to tweak their own zones the way they want.
    About the ON/OFF/external HRM, sorry I wasn't clear about it. I do agree that it should be in the global settings of the bangle.js, not in the app. Actually, Gordon said that it's a good idea, and encouraged me to code this, but as mentionned before, I don't code.
    All the great stuff about the different types of run could appear either in the bottom left corner with taps or have their own screen after a swipe up or down (to know how many intervals/time/kms are left, what's the resting time, duration left for the training and so on).
    Are you doing a git or something where people can contribute to the code (for the runner app) ?
    I think that if an app can cover all what we spoke about here, it would cover the needs for at least 90% of runners. The remaining 10% that need VO2Max and this kind of things, well they should go for an expensive watch.
    The last thing I can think of (for now) is a "marathon option". It would be the same as in "distance run" (give HR, distance, elapsed time, speed), but also gives a little extra with an estimation of the remaining running time if the pace is constant.
    Actually, since the beginning I'm wondering if all these calculations at the same time are too much to handle for the bangle.js if it lasts for more than an hour.

  • I DO understand that's a whole lot of work, and even though I'd be delighted to see that happening, I'm just laying down all the things I can think of to make this watch the most awesome possible for the biggest number. I'm kind and I'm not expecting/pushing/obliging anyone to anything here ! Cheers !

  • I will share the githib link when it is up there. I am not sure what time I will have this weekend yet but work on this so far has been just I'm the IDE. It isn't my highest priority outside of work but I am pretty excited about it.

  • This looks great! There is an app for Bangle.js 1 called 'BangleRun' which provided some useful functionality like this, but ended up being a bit bloated for what it was (duplicating all the GPS recorder/interface functionality). Making a version for Bangle.js 2 (and backwards compatible with 1) is high up my priority list and I have a bit of a prototype here.

    ... but it didn't provide exactly the functionality that's being suggested here, so the more the merrier really.

    For GPS recording, please just use the Recorder app though - once it's installed, your app can just do:

    if (WIDGETS["recorder"])
      WIDGETS["recorder"].setRecording(v).then­(function() {
         print("Recording!");
      });
    

    For heart rate zones, it might be worth adding those calculations based on the recorded track, as a separate app or as an additional way of viewing data from recorder. That way it'll work with any tracks that get recorded.

  • @Fteacher some of your suggestions are already provided/calculated by GadgetBridge (on android). It might be a good solution to make them work together and keep the app lightweight on the Bangle (and probably use less of its battery) ?

  • that would throw out non android users though...

  • Thanks @Gordon - I didn't know I could use the Recorder app like that.
    I looked at BangleRun before deciding to write something myself. It didn't cover my main needs. It think it serves as a nice reference though.

  • that s right you made a point…. if only there were a version on the other os.. sigh…

  • Just a note that - like Recorder - if there's common code that gets used over and over we should try and find a way to re-use it.

    That way everyone can focus on making the best UI - with ones for running, cycling, etc - but there should be less code and they'll be easier to maintain.

  • I didn't understand the beauty of different apps managing different aspects. Thanks for clarifying @Gordon . And one banglerun app to rule them all ! Haha. I think it's possible to organise the app so that during the installation process it calls for installation of "dependant apps".

    @nicoboss about gadgetbridge, I know that Gordon plans to make his own phone app (stretch goal) which I'm happy about 'cause my gadgetbridge app displays pretty funky data in some fields and none in others. Step numbers is never the same between the app and banglejs, so I'm really not confident in gadgetbridge handling my workout data. About how heavy and energy hungry the app would be, with all the stuff on -gps, HR, speed, recording, various calculations- maybe Gordon can estimate the capacity of the Bangle to cope with it.

    The other OS nicoboss ? You're thinking about Ubuntu Touch, right :) ?
    Just for the record, I'll check if there's any functionnality in the very high end watches that could be of some interest for anyone.

  • I know that Gordon plans to make his own phone app (stretch goal)

    My understanding is the app will still be based on GadgedBridge (forked from it). I would imagine any improvements to the App other than what is required for internet access will get ported over to GadgetBridge sooner or later?

    The other OS nicoboss ? You're thinking about Ubuntu Touch, right :) ?

    Oh, I assumed he was talking about Mobian or PostmarketOS :/

    Just for the record, I'll check if there's any functionnality in the very high end watches that could be of some interest for anyone.

    Please do! One of the other things on my neverending list of projects is digging into the HRM on the Bangle to see what advanced stats we might be able to get. Especially combined with the inbuilt ML capabilities I think quite a lot is possible even beyond what the component itself advertises.

  • The ML capabilities ?? What's that ?

  • The Bangle has Tensorflow Lite for Machine Learning. I haven't really kept up with Machine Learning since a couple of modules at university a decade ago, but I think this opens quite a lot of possibilities up.

  • I went through quite a few high end watches and tried to find a bit of relevant information:

    • Actually, my old watch can also calculate monthly and weekly mileage, diplay infos about previous tracks (date, racing time, distance, avg and max speed and HR).
    • I'm checking high end watches. The VO2Max is out of the scope of what we need, IMHO (it's accurate only with a lab, a threadmill and gas monitoring).
    • Can prepare a route using openstreetmaps, save it in the watch and have indications given on the watch, with map, or just turn-by-turn directions with a compass and distances (routing).
      -Round trip running. Using the same stuff as described previously, when you're done running, you can ask the app to direct you towards your starting point.
      -There's a lot of running metrics with cadence, stride, length, ground contact time. I'm not running with this kind of watch, so I'm not familiar with what to do with it. Ground contact time especially seems too geeky to be exploitable.
      -Something that can be interesting, especially for cycling, is the elevation profile of the track, angles (see attached pictures)
    • We spoke earlier about zones. One other metric being used is Rating of Perceived Exertion (RPE). I've duckduckgoed it and stumbled upon this article about smartwatches Machine learning and runners " This data is being used to make individualized training prescriptions". High end sport watches are using this to suggest people to rest, or have a High Intensity interval training or rather a recovery run, or a long run, depending on this and data from previous runs. Plenty of other suggestions and calculations about load intensity, energy levels, and so forth...If I understand this correctly, maybe there's something seriously interesting here, but someone needs to poach engineers in this specific fields (smartwatches an running) for help ! To put it in simple terms, for the end user, it provides a full training plan for the week/month/year, with diversified training to maximize performance without overdoing it. Gordon needs one that tells him when to slow down with work !
      Some of the things proposed here could actually be separate apps, as Gordon suggested.

    2 Attachments

    • routing.png
    • polar altitude.png
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Coding an app for running and cycling ?

Posted by Avatar for Fteacher @Fteacher

Actions