Using dual power meter with Locus Map?

Started by BERNHARD.FRIESS, December 12, 2023, 08:52:27

0 Members and 1 Guest are viewing this topic.

BERNHARD.FRIESS

Hi there,

Lately I acquired two sets of Assioma Duo Shi power meter sensors, a pair for the MTB and one for the Gravelbike.

The sensors are mounted and the first ride was recorded:

You cannot view this attachment.

As the sensor is a dual model which measures power of both legs individually, it should be possible to also record both legs independantly. This allows to monitor disbalances between the two legs.
But it seems Locus Map doesn't record both value series?

Has anyone any experience with this topic?

I'm looking forward to your feedback!

Best regards

Bernhard
  •  

BERNHARD.FRIESS

So it seems that I'm the only one person here who uses dual power meter with Locus Map as the recorder and with the expectation, that the "L/R balance" which is transmitted by the sensors everytime is meassured and recorded as well.

@Menion, do you potentially see a chance to check the code of the meassurement and recording of connected powermeters, please?

  •  

Menion

Hello Bernhard,

the sensor I use most probably does not support dual-mode (only a single sensor on the bike), so I can't test it directly. Also, I'm not sure, what to do with the "balance" value.

Anyway first test: in the next app (also in the next Beta version), the value should be visible in the "Sensors manager screen" when the sensor is connected.

So if you find a moment, give it a try and let me know, thanks.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download

BERNHARD.FRIESS

Quote from: Menion on January 02, 2024, 14:29:57Hello Bernhard,

the sensor I use most probably does not support dual-mode (only a single sensor on the bike), so I can't test it directly. Also, I'm not sure, what to do with the "balance" value.

Anyway first test: in the next app (also in the next Beta version), the value should be visible in the "Sensors manager screen" when the sensor is connected.

So if you find a moment, give it a try and let me know, thanks.

Hi Menion,

Man thanks for your feedback! Where and how can I get the next Beta?
I will certainly check and provide feedback!

To your question: on dualsided power meters the balance value should update together with the power readings and I expect the value to be recorded constantly with the power readings (and other values like cadence, speed, altitude).

As a result, after a recorded ride, one can see if and where e.g. at steep hill climbs one has disbalances in power generation.

Best regards and Happy new year!

Bernhard
  •  

freischneider

You can find the link to the beta,s in the footer of Menion. There is currently no new beta available. Just check back in a few days.
Poco F5, Android 13 / Xiaomi Redmi Note 10 Pro, Android 13
Locus Map 4 Gold (always latest version or Beta)
LM4 User-ID: 11cec7cb5  (Devices-ID poco F5)

Andrew Heard

LM4.26.3.1 RC11 GOLD user ID:c7d47597a
  •  

BERNHARD.FRIESS

Quote from: Menion on January 02, 2024, 14:29:57Hello Bernhard,
...
So if you find a moment, give it a try and let me know, thanks.

Hi Menion,

Today I had the chance to ride again. The percentage values visible on the sensor Page at the powermeter Seemeilen not to make too much sense.
It seemed that one value changed to arbitrary values between 0% and 100% and the other just showed the difference to 100%. Especially when I'm not pedalling and so I do not generate power, a 100%/0% seems awkward.

I have connected my sensors via BLE to LM and via ANT+ to ipbike and at least the recording of ipbike seems meaningful, see last diagramm:

You cannot view this attachment.


Would it be helpful if you get the recorded file from ipbike, Menion?

If so, just let me know how I can get you the file.

Best regards

Bernhard

  •  

Menion

Hello Bernhard,
thanks for the tests, ipBike screen, and also PM. I'll answer here, to keep the discussion in one place.

External sport sensors are quite an optional feature in the Locus Map so they are not used too much. And in the case of a power sensor, you are the only one I'm aware of, who finds the "balance" value useful. So it has really low priority for me, sorry.

Anyway, I've found one issue - read "balance" value needs to be divided by 2. Because you wrote it already report values 0 - 100, it should be fixed by this (we get 0 - 50%). If this will work in the next version (visible values in the Sensors manager for the "left/right" pedals will make sense), I may add support for balance (probably average from last 3 seconds?) to the dashboard.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

BERNHARD.FRIESS

Hi Menion,
would be great if Locus could record Power left/right. It would allow me to skip ipbike in the future.

Any plans?

Best regards and enjoy your weekend!

Bernhard
  •  

Menion

Hello Bernhard,

if I'm correct, the power meter reports only a single "power" value + "balance" value, right? So what do you mean by "record Power left/right"? Also, what do you expect that app to do with these values? Currently, power meter values are visible in the chart, and dashboard, recorded to the track, and exported to GPX and FIT. How to deal with left/right? I have no idea.

I do not know ipbike app, but seems it is more focused on sports activities. Locus Map is more focused on the hike/bike so the more precise work with the power values seems to be out of the app's scope.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download

BERNHARD.FRIESS

Hi Menion,

Pls excuse my delayed response,I didn't notice your feedback.

I assume that Ipbike logs the l/r value together with each power value in the track.

I don't know if it is feasible to log the l/r value to a GPX-file but I know for sure that the values could be logged in fit-files.

Just in case it would be helpful for you if you get a fit-file including l/r values in the track I attach a fit-file exported from Ipbike. As I log in parallel anyway with Locus I attach the fit-file from locus from the exact same tour.

Ipbike.fit

Locus.fit

Many thanks in advance for your consideration!
Best regards

Bernhard
  •  
    The following users thanked this post: Menion

WRPSoft

#11
Quote from: Menion on July 22, 2024, 09:25:07Hello Bernhard,

if I'm correct, the power meter reports only a single "power" value + "balance" value, right? So what do you mean by "record Power left/right"? Also, what do you expect that app to do with these values? Currently, power meter values are visible in the chart, and dashboard, recorded to the track, and exported to GPX and FIT. How to deal with left/right? I have no idea.

I do not know ipbike app, but seems it is more focused on sports activities. Locus Map is more focused on the hike/bike so the more precise work with the power values seems to be out of the app's scope.
Dear Menion,

If you are using the official Fit File SDK and (Android) Java, that would be one way to extract and write the balance data. See embedded code fragments.

But I also think that these specific things are not necessarily within the scope of data/functionality supported by Locus.

      /////////////////////////////////
      // balance from fit session message
      /////////////////////////////////
     
      public void onMesg(com.garmin.fit.SessionMesg mesg) {
          if (mesg.getLeftRightBalance() != null)
          {
              int ibal = mesg.getLeftRightBalance();

              //#define FIT_LEFT_RIGHT_BALANCE_100_RIGHT ((FIT_LEFT_RIGHT_BALANCE_100)0x8000) // data corresponds to right if set, otherwise unknown
              // boolean bright = Bitfield.testBit(15, ibal);
              boolean bright = (ibal & (1 << 15)) == (1 << 15);

              //#define FIT_LEFT_RIGHT_BALANCE_100_MASK ((FIT_LEFT_RIGHT_BALANCE_100)0x3FFF) // % contribution scaled by 100
              int ival = ibal & 0x3FFF;

              int ileft = 0;
              int iright = 0;

              // if stored balance value is right based?   
              if (bright) {
                  iright = ival;
                  ileft = (100 * 100) - iright;
              }
              // Note: there are some discussion as to whether unknown should be treated as left based or not (= not defined therefore invalid)
              // else {
              //    ileft = ival;
              //    iright = (short) (100 - ileft);
              // }

              //////////////////////////////////////////////////////////
              // Cross checking for writing back to fit file
              // this should be used for writing balance(*100) to SESSION message  (fit activity file)
              // be aware of the right based flag!!!
              // modulate balance value for writing (back) to fit file
              //////////////////////////////////////////////////////////

              // valid balance? -> right based
              // ((FIT_LEFT_RIGHT_BALANCE_100)0x8000) // data corresponds to right if set, otherwise unknown
              int ibalnew = (1 << 15);
              // add right pedal balance value
              ibalnew = ibalnew | iright;
              // does it work?
              assert ibalnew == ibal;

              // code for writting fit file session message
              // must be placed in fit export method of course
              // SessionMesg sessionMesg = new SessionMesg();
              // sessionMesg.setLeftRightBalance(ibalnew);

          }
      }

    /////////////////////////////////
    // balance from fit record message
    /////////////////////////////////
    @Override
        public void onMesg(com.garmin.fit.RecordMesg mesg) {

            if (mesg.getLeftRightBalance() != null)
            {
                short ibal = mesg.getLeftRightBalance();

                // #define FIT_LEFT_RIGHT_BALANCE_RIGHT ((FIT_LEFT_RIGHT_BALANCE)0x80) // data corresponds to right if set, otherwise unknown
                // boolean bright = Bitfield.testBit(7, ibal);
                boolean bright = (ibal & (1 << 7)) == (1 << 7);

                // #define FIT_LEFT_RIGHT_BALANCE_MASK ((FIT_LEFT_RIGHT_BALANCE)0x7F) // % contribution
                short ival = (short) (ibal & 0x7F);

                short ileft = 0;
                short iright = 0;

                  // if stored balance value is right based?   
                if (bright) {
                    iright = ival;
                    ileft = (short) (100 - iright);
                }
                // Note: there are some discussion as to whether unknown should be treated as left based or not (= not defined therefore invalid)
                // else {
                //    ileft = ival;
                //    iright = (short) (100 - ileft);
                // }

              //////////////////////////////////////////////////////////
              // Cross checking for writing back to fit file
              // this should be used for writing balance to RECORD message (fit activity file)
              // be aware of the right based flag!!!
              // modulate balance value for writing (back) to fit file
              //////////////////////////////////////////////////////////
              // valid balance? -> right based
              // ((FIT_LEFT_RIGHT_BALANCE)0x80) // data corresponds to right if set, otherwise unknown
              short ibalnew = (1 << 7);
                // add right pedal balance value
              ibalnew = (short) (ibalnew | iright);
              // does it work?
              assert ibalnew == ibal;

              // code for writting fit file record message
              // must be placed in fit export method of course
              // RecordMesg recordMesg = new RecordMesg();
              // recordMesg.setLeftRightBalanceibalnew(ibalnew);

            }
        }

     

Menion

Hello,
thanks a lot for such a detailed description. Yes, I use FIT SDK and this should work.

Anyway, there remains my main question "Also, what do you expect that app to do with these values?". It is a little problem from my point of view. The app does not support some deeper analysis. What may be useful, is to just record these values and over FIT allowing exporting to tools, that such robust analysis support, like a TrainingLab app  ;)

Hmm ...

Btw, out of topic, it should be possible to integrate the WRPElevationChart app into the "Share" sub-menu of the Locus Map. It is already implemented in the "Locus API - Sample" app, but because I'm lazy with docs, it is not described in detail. So if there will be interest.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download

BERNHARD.FRIESS

Quote from: Menion on August 23, 2024, 11:09:22...
Anyway, there remains my main question "Also, what do you expect that app to do with these values?".
...

For the use case is exactly the following:

I'm using Locus Silver subscription to
  • flexibly plan trips, especially when I'm doing multi day bike trips,
  • navigate me on trips and
  • record (=track) above activities.

I do not want to do anything with the power values or the l/r values within Locus but I upload the fit files to https://velohero.com and to https://intervals.icu.

The only potential use case I could see would be to display l/r values on a customized dashboard, nothing more!

Currently I use ipbike as a second app for tracking to get a fit file with the l/r values to be uploaded to https://intervals.icu. For me it would be perfect to get fit files including l/r values from Locus. And I'm also completely happy if it is a "Silver" feature.
Most probably I would potentially even upgrade to Gold if this is what is required...

Does this help, @Menion?
  •  

WRPSoft

Quote from: Menion on August 23, 2024, 11:09:22Hello,
thanks a lot for such a detailed description. Yes, I use FIT SDK and this should work.
...
Btw, out of topic, it should be possible to integrate the WRPElevationChart app into the "Share" sub-menu of the Locus Map. It is already implemented in the "Locus API - Sample" app, but because I'm lazy with docs, it is not described in detail. So if there will be interest.

Dear Menion,

Thank you for your reply. I have sent an email to your official email account.
I would be happy to hear from you again.

Bernhard has already commented on the rest. I am happy to help with questions about the fit file, but I don't currently know how to read this data from the power meter. I haven't dealt with the hardware (ANT power profile?) for too long.

Regards Ralph