Proposal for new Recorder features

Posted on
  • Hi.

    I'm currently using a modified version of the Run app, and starting the development of an app specially for running training (including track repetitions and interval training) and hiking. There are some features in Recorder that would be very handy for my use case. In order of importance for me:

    1. Possibility of passing "new" or "append" when starting the recording from another app, so Recorder doesn't show the corresponding menu to the user in that case. The menu takes a lot of time and it's difficult to touch the correct button with the touch screen when starting a sprint.

    2. Possibility of asking Recorder to take a data point and marking it as "manual" or "marked point". The reason is to take lap times while running or for marking passing goals (like mountain peaks) while hiking. It could be another field with a letter that marks why the point was recorded: "p" for periodic, "m" for manual (pressing the button of the watch), "g" for goal (when another app detects arriving at a position) etc.

    3. Reduce the amount of data saved to the CSV. A lot of the space is information repeated again and again, like the date, hour and minutes. It could use a sign meaning "the same as the previous one", saving around 25% while recording every 5 seconds, for example:
      2023-05-17T18:00:50.000Z,40.591010,-3.70­2998,753,112,68,,19
      *:55.000Z,40.591000,-3.703194,750,112,39­,,14
      2023-05-17T18:01:00.000Z,40.590978,-3.70­3351,749,107,75,,14
      *:05.000Z,40.590925,-3.703475,751,103,21­,,15
      *:10.000Z,40.590826,-3.703635,753,108,54­,,13

    4. Allow saving both the internal HR sensor data and BT HR sensor data.

    5. This is just a bit annoying, but the download page for csv, gpx etc. reloads the track list when a track is deleted (it takes a lot of time to delete several tracks). It could just delete the file and the track in the modal and not calling getTrackList().

    I can try to implement any of this, but I wanted to discuss it first in case there is a reason not to do it or doing it in another way. Specially I'd like the opinion of the original author and contributors.

  • Possibility of passing "new" or "append" when starting the recording from another app

    Yes, that sounds like a great idea.

    Possibility of asking Recorder to take a data point and marking it

    So you mean basically just a column that is empty normally, and then could contain a value at some point? If so that would be easy to add as an extension. You can create a file x.recorder.js as part of your app which provides the extra column:

    https://github.com/espruino/BangleApps/b­lob/master/apps/recorder/widget.js#L146-­L159

    If you're thinking about automatic lap times, I wonder if that is actually functionality that should be in exstats, which is what actually provides all the stuff you see in the run app: https://github.com/espruino/BangleApps/b­lob/master/modules/exstats.js

    Reduce the amount of data saved to the CSV

    What you're seeing in the file you download from the recorder in app loader isn't quite what's saved to the device. Time is saved at https://github.com/espruino/BangleApps/b­lob/master/apps/recorder/widget.js#L166 which is seconds since 1970. It's about 10 characters, so you could save some space by saving differences but it's probably not as worth it as you thought.

    Allow saving both the internal HR sensor data and BT HR sensor data.

    That happens automatically I think if you enable it in Recorder settings - BTHRM already has one of those recorder.js files: https://github.com/espruino/BangleApps/b­lob/master/apps/bthrm/recorder.js

    This is just a bit annoying, but the download page for csv, gpx etc. reloads the track list when a track is deleted

    Yes, it was just done because it was easy/reliable that way, but if you were willing to make it not reload then it'd be great.

    Personally, there are some other features I think would be really good:

    • Someone asked if a run could be optionally paused/resumed, rather than just starting a new one each time. That should be pretty easy to implement in exstats (edit - I've just added this, it's in the dev app loader)
    • exstats saves the current run to a file so you can swap apps, but it'd be nice if it saved all the stats for each run after you'd finished - probably just by appending to a StorageFile

  • Thank you Gordon for your reply.

    So you mean basically just a column that is empty normally, and then could contain a value at some point?

    What I'd like is a new row the instant an apps ask Recorder to do it. In my case when the user presses the button in the "stopwatch" app to get a lap time. The mentioned extra row is just for knowing if the row was taking automatically or my stopwatch app asked to take it.

    If you're thinking about automatic lap times, I wonder if that is actually functionality that should be in exstats

    My idea about the stopwatch app was to be just a frontend of Recorder, so you could just exit the app and launch it again later (or another frontend app) with the recording being made by Recorder. If I understand correctly Run is using exstats and Recorder is getting it's own data without it. Using or not exstats is something that I was thinking about, because it seems it has same features Recording doesn't (like average pace). But anyway exstats doesn't have features that I would like (like statistics per lap), and I'd like all that information to be analyzed in the smartphone or computer after downloading the activity. I was initially thinking about rewriting a widget from scratch, but Recorder does many of the things I need and I don't know much about Espruino and Bangle.js.

    What you're seeing in the file you download from the recorder in app loader isn't quite what's saved to the device.

    I wrongly assumed that the CVS was the raw data from Recorder. Good to know it's storing it more compact.

    Allow saving both the internal HR sensor data and BT HR sensor data.

    That happens automatically I think if you enable it in Recorder settings - BTHRM already has one of those recorder.js files

    I thought that "Log HR" option was for saving HR data, and "Log BT HR" and "Log HR int" for choosing between them, my fault. Does exstats have the option to get the HR data from BT?

    Someone asked if a run could be optionally paused/resumed, rather than just starting a new one each time. That should be pretty easy to implement in exstats

    That was one of the things I wanted, but asking Recorder to create a new recording or appending to a previous one. I wasn't thinking about adding that functionality to exstats. I asked here about all of this to have some feedback from you guys that know much better about the current implementation.

  • I just added the option to force the recorder in the dev app loader:

    WIDGETS["recorder"].setRecording(true, {force:"new"/"append"/"overwrite")

    What I'd like is a new row

    Yes, that'd work - you could just expose writeLog - potentially even just with the option to append extra text to the end of the log line?

    Run is using exstats and Recorder is getting it's own data without it

    Exactly, yes. But if you add extra options (like Laps) to exstats then every app that uses exstats gets to use them, which is quite nice. And also anything anyone else adds later magically appears in your app too.

    I was initially thinking about rewriting a widget from scratch

    Please don't! The idea behind recorder was to stop everyone writing their own data logger, so hopefully it won't take much to make it flexible enough for you

    Does exstats have the option to get the HR data from BT?

    No, but it could... Although the original idea was the BTHRM overrode the built-in HRM (@halemmerich I think it still does by default?) so when it's active what you're seeing in exstats is the BT HRM, but then when you go to recorder, you then have extra options to record BT HR (which is loads of extra data) and HR int which is the internal HRM (in addition to normal HRM which is the BT one!).

    asking Recorder to create a new recording or appending to a previous one

    Ok, great. Well, I think that should be easier now - and by default the Run app will now ask if you want to resume the run - and if you do, it'll automatically append.

  • Yes, default mode of BTHRM replaces internal HRM sensor and the events are usable in all apps without modifications.

  • @adjtm A little off topic, but maybe you'd be interested in the run+ app as well - if you hadn't seen it yet.

    It was developed in this conversation.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Proposal for new Recorder features

Posted by Avatar for adjtm @adjtm

Actions