IndieVelo - Zwift alternative

OK! Thx! Idid it.
But how to create from that stream new custom field with average value of Powermeter Power in intervals?

I just created a custom activity field for that. Click Custom and search for “Avg PM Power”. The script looks like this:

out: {
  let data = streams.PowermeterPower
  if (!data) break out
  let tot = 0, n = 0
  for (let w of data) {
    if (typeof w === 'number') {
      tot += w
      ++n
    }  
  }
  let avg = n > 0 ? tot/n : 0
  avg
}
1 Like

Tnx! :+1: This script calculate average of Powermeter Power of whole activity, But how to modify that for calculate avg in each intervals?

Once you have the custom stream, you can add a ‘Field’ with a script to calculate the avg power from that stream for selections and intervals. The avg will then be available on the Activity page and on the Interval Data page.

I added a custom interval field for that. Click “Fields” and then search for it “Avg PM Power”. The script is as follows:

out: {
  let data = streams.PowermeterPower
  if (!data) break out
  let tot = 0, n = 0
  for (let i = interval.start_index; i < interval.end_index; i++) {
    let w = data[i]
    if (typeof w === 'number') {
      tot += w
      ++n
    }
  }
  let avg = n > 0 ? tot/n : 0
  avg
}
1 Like

@david Замечательно! Большое спасибо! Это именно то, что было нужно!

@david Amazing! Thank you very much! This is exactly what was needed!

1 Like

I believe that bots can be identified by the IndieVelo inscription on their beebs :laughing:

Nope! Many humans have that (it depends what kit is selected) and many bots wear full team kit.

Here are two bots:


@david ! В fit-файле IndieVelo теперь есть информация о погоде в разделе ‘Weather Conditions’. Вы можете сделать Custom field с этой информацией?


@david! The IndieVelo fit file now has weather information in the ‘Weather Conditions’ section. Can you make a Custom field with this information?

I added Wind Direction and Wind Speed. If there are multiple “Weather Conditions” messages then the last one in the file is used.

2 Likes

@david Thank you very much! But the wind direction value in this field is not equal to the value in the fit file. I read the file through fitfileviewer and saw that the Weather Conditions section only has 1 line: wind direction = 14 degrees, wind speed = 1.4 m/s. In the custom fields I see a different value: WD=266 degrees and WS=1.3m/s. Why?
WC

The wind speed one I created has a convert option set to km/h to convert the m/s value from the file.

I am looking at your ride on 12th Feb and the wind direction matches the file?

@david Thank you very much for your answer!
Now I understand the reason for the discrepancies in the data!
I was reading the data from the original IndieVelo file and your script is reading it from the icu file.
Apparently, in the process of transferring the fit file from indievelo, data transformation occurs.
I additionally loaded the original fit file from indievelo into icu and then the wind direction and speed values coincided.
Here is a link to the file of my last workout on February 18th 4AE66FB8118BECC4_20240218_144825_c.fit

@david! I contacted George Gilbert and he writes: “This is normal – the two FIT files are created in different places (one on your computer, and one on the server) and due to network latency etc, will be very slightly different from each other . There should be no material difference however!”.
I believe that the correct file will be the one generated earlier, since after the end of the training the initial weather conditions probably change.

1 Like

@david! In Indievelo I use the powermeter as the primary power sensor, but Intervals doesn’t always understand this.
For example, in the last workout dated May 24, 2025, in the fit files, Power is recorded from the powermeter readings, but Intervals uses the trainer readings.
But in the previous training session on the same day, everything was correct!
Apparently the problem is in the Intervals algorithms?
Please check it!

Do you have 2 separate FIT files or do you have one FIT file with two power data streams?
In the second case, you can set in Intervals which power stream should be used by default:

2 Likes

Thank You! Solved! :+1:

The answer is one FIT file with 2 power datasets - that is how IV does it

For those that have not at least tried IndieVelo, I could not recommend it more strongly!

It is a really great platform for those that care about racing and a real outdoor feel.

Since you are on intervals, you at least care about performance, data, and accuracy- IndieVelo is well worth a try!

Also, George Gilbert and his mission are well worth supporting!

1 Like