[Solved] How to fix Bosch eBike App incorrect Cadence.

A place for the community to help each other out with getting the most out of the Combine FIT, GPX or TCX files for Strava Upload Tool.
Post Reply
bepo70
Posts: 4
Joined: Sat Apr 22, 2023 5:38 pm

[Solved] How to fix Bosch eBike App incorrect Cadence.

Post by bepo70 »

This query has been resolved by this solution.


Original Thread:
Hi all

I think i found an Issue with Cadence Data. I use Gotoes to combine Fit-Files coming from my E-Bike (Bosch FlowApp) and Fit-Files from Apple Watch because Bosch doesn't add any HRM Data to their Export. So i use all Data coming from Bosch (Power, Speed, Cadence and whatever) and only the Heart Rate from Apple Watch and combine it to one new Fit-File.

Before the combine the Candence Data looks good, on downhills with no pedaling the cadence is 0 and stays 0:

Strava Cadence from Bosch Flow App.png

After combine the Cadence never get's zero, looks like if it stays at the last Value:

Strava Cadence after Gotoes combine.png
Strava Cadence after Gotoes combine.png (11.63 KiB) Viewed 27806 times

This are both Fitfiles:

Fitfiles.zip
(257.79 KiB) Downloaded 721 times

Any Idea what's going on here?

Best Thanks
Bernhard
User avatar
fulmar2
Site Admin
Posts: 229
Joined: Wed Nov 25, 2020 4:21 am
Contact:

Re: Cadence Data seems to get Changed when 2 Fit-Files are combined

Post by fulmar2 »

Can you please take a screenshot of the entire settings page (2nd page on GOtOES) so I can see all of your selections? Should be a simple settings issue. Post the screenshot here and I can tell you which settings to change.
bepo70
Posts: 4
Joined: Sat Apr 22, 2023 5:38 pm

Re: Cadence Data seems to get Changed when 2 Fit-Files are combined

Post by bepo70 »

Hi

Thanks for answering.

Here are two Screenshots of all Settings:

Settings 1.png
Settings 2.png

Is it possible that i have to enter 0 in the "Insert average Cadence" Setting? I assumed, that "optional" leaves the incoming Data unchanged?

Thanks
Bernhard
User avatar
fulmar2
Site Admin
Posts: 229
Joined: Wed Nov 25, 2020 4:21 am
Contact:

Re: Cadence Data seems to get Changed when 2 Fit-Files are combined

Post by fulmar2 »

Update July 15, 2023:
This issue has been resolved. I'm leaving the thread here for archival purposes.



To fix the problems with staccato cadence from the Bosch eBike App, simply upload your file(s) to: the GOTOES tool and when you export them, the problems with the cadence will be gone.



Original Message:

Bernard -

Thanks for the files. I have had time to investigate the issue and "pull my hair out" trying to solve the problem. So far, no luck.

There are a number of issues with the FIT file from the Bosch Flow app. First of all, the FIT file is not formatted correctly. It has a separate record for each entry. This has caused some file "bloat". Second of all, there are two entries for every timestamp (please see my screen shot). Finally (and this is the important one)... Bosch has decided to leave the cadence empty for values that are not empty.. I think their idea is that if the cadence was a certain value at one time point, and it did not change, instead of inserting the same cadence, they just leave it blank. This combined with the fact that there are two timestamps for every second does not play nice with my tool.

I spent several hours trying to differentiate between "0" and "" - and trying to smooth the ""s but not the "0"s... but this continually led to problems that would cause negative results for other users.

I created the screenshot that you see below by using this tool: https://gotoes.org/strava/convert_fit_files_to_csv.php You can upload your Bosch file to that tool and see the corruption for yourself.

Issues with Bosch Flow App FIT Files
Issues with Bosch Flow App FIT Files

I have already spent several hours on this project, and been unable to come up with a solution that will fix the Bosch files without messing up the results for correctly formatted (which is 99.9% of FIT files)... therefore, I've decided to leave the app as-is.

To solve your individual issue for the time-being, you could do the following (perhaps tedious work):

1. Begin by using the FIT->CSV tool to convert your Bosch File to CSV.
2. Once you have the CSV file, open it in a program like Microsoft Excel or LibreOffice.
3. Make a new column (in this case, column H). Call the column "newCadence". On the 3rd line, enter this equation

Code: Select all

=IF(ISBLANK(G3),H2,G3)
Correcting Cadence with a Fill Down....
Correcting Cadence with a Fill Down....
4. Once you enter the equation in cell H2, fill down by dragging the little blue dot at the bottom right corner downwards to the bottom of the spreadsheet.
5. Highlight the entire column H (the new column you just made). Copy it to your clipboard; then select "Paste Special -> Values Only". This will remove the equation and just substitute in the corrected values.
6. Delete the old Column (column G in my example).
7. Save the file.
8. Zip Compress this CSV file, and upload it to the GOTOES tool - along with any files that you want to merge with the file. Cadence should work now.

This is a method to work around an improperly formatted file from the Bosch Flow App. To possibly save yourself from having to do this work in the future, please use the Bosch Contact Form to let them know how they could improve the format of their FIT files for compatibility with other apps.

Hope that helps.
bepo70
Posts: 4
Joined: Sat Apr 22, 2023 5:38 pm

Re: Cadence Data seems to get Changed when 2 Fit-Files are combined

Post by bepo70 »

Hi

Great, with your last Update (21.3) it looks like the Issue is gone since Bosch made no Update the last few weeks. Anyway i didn't expect that Bosch will solve that since i already have reported them quite a large amount of Bugs the last few years which where all answered with a copy/paste Standard Text and and never! got fixed.

Best Thanks for your great tools and your continous support!
Bernhard
User avatar
fulmar2
Site Admin
Posts: 229
Joined: Wed Nov 25, 2020 4:21 am
Contact:

Re: Cadence Data seems to get Changed when 2 Fit-Files are combined

Post by fulmar2 »

You noticed quickly! Yes, other users have been contacting me about Bosch specifically, finally pressuring me into writing special code for Bosch. I spent half of yesterday writing a work-around just for these improperly formatted files! Anyway, if the tool detects a Bosch FIT file (must be FIT), then the tool runs a special routine that “smooths” the cadence over a 3 point interval. Next, when the tool is assembling the files, it will also double check with the corresponding power data. If the power is less than 5 watts for a given point, the tool will insert a zero cadence instead of whatever the smoother cadence might be. It’s not precisely the original data, but on my test files, it produced an average and max that were +/- 1rpm of the original file… good enough for corrupted files!
bepo70
Posts: 4
Joined: Sat Apr 22, 2023 5:38 pm

Re: Cadence Data seems to get Changed when 2 Fit-Files are combined

Post by bepo70 »

Great Solution, congrats for the nice Piece of Work!
Post Reply