Skip to content
Permalink
Browse files

Add Cyclops Trainer

  • Loading branch information
davidzof committed Nov 15, 2016
1 parent d4380f7 commit df05c07e421fc829ffc966a3e105b792fd9112e6
BIN +615 Bytes icons/close.png
Binary file not shown.
BIN +563 Bytes icons/save.png
Binary file not shown.
@@ -0,0 +1,114 @@
1minftp=One minute estimated FTP
1minpow=One Minute Power
20minftp=Twenty minute estimated FTP
20minpow=Twenty Minute Power
5minpow=Five Minute Power
5secpow=Five Second Power
about=About
altitude=Altitude
analyze=Analysis
application=Application
avecad=Average Cadence
avehr=Average HeartRate
avepow=Average Power
bike_weight=Bike Weight
binSize=Bucket Size
cadence=Cadence
cadPow=Cadence Power Scatter Plot
cancel=Cancel
cDgr=Cadence Distribution Graph
cDrpm=Cadence (rpm)
cftp=Current FTP
close=Close
cpg=Cadence/Power
date=Date
delete=Delete
delMsg=Are you sure you want to delete the following files?
distance=Distance
distancekm=Distance (km)
distance_left=Distance Remaining
distribution=Distributions
error=Error
fatigue=Fatigue Profiles
forceVeloc=Force vs Velocity
fthr=Functional Threshold HeartRate
ftp=FT Power
ftpWarning=Set Threshold Power in Preferences
gpsData=GPS Data
heartrate=Heart Rate
heightMeters=Height (meters)
hrBpm=Heart Rate (bpm)
hrDgr=Heart Rate Distribution Graph
hrPow=Heart Rate / Power Scatter Plot
hrWatts=Heart Rate / Watts
imported=Imported
import=Import
load=Load
maxcad=Maximum Cadence
maxhr=Max HeartRate
maxpow=Max Power
metric=
mmp=Mean Maximal Power
noDataDisp=No data to display, select a workout first
noData=No Data
noDataSave=No data to save
noDataUpload=No data to upload
noFiles=No files to import
open=Open
pass=Password
pdGr=Power Distribution Graph
personal_data=Your Information
power=Power
poWt=Power/Heart Rate
poWtt=Power (watts)
preferences=Preferences
profile=Select your trainer
qpower=
qpow=Quadratic Power
quadAnal=Quadrant Analysis
quit=Quit
reanal=Reanalyze
reset=Factory Reset
recover=Recover
resistance=Resistance
rideSum=Ride Summary
route=Route
saveclose=Save and Close
saveGPS=Save with GPS and Altitude data?
save=Save
saveroute=Save as GPX
scatter=Scatter Plots
schr=Speed/Cadence/Heart-rate
scid=Speed and Cadence ID
selectLanguage=Select Language
selErr=Selection Error
sglWk=Only select a single workout
sharing=Sharing
slope=Slope
smooth=Smoothing
speed=Speed
start=Start
stop=Stop
stopwatch=Stopwatch
stress=Stress
summary=Summary
target_power=Target Power
time=time
trainDist=Training Level Distribution Graph
trainer_speed=Trainer Speed
trainer=Trainer
training_analysis=Training Analysis
training=Training
trainlevelhr=Training Level (HR)
trainlevel=Training Level
trial_expired=Trial Expired, please register
uploadError=Error Uploading
uploadTo=Workout Uploaded To
uploadWk=Workout Uploaded
user=Username
view=View
warning=Warning
wheel_size=Wheel Diameter
wktSave=Saved workout to
your_weight=Your Weight
zeroValue=Keep Zero Values
@@ -0,0 +1,114 @@
1minftp=One minute estimated FTP
1minpow=One Minute Power
20minftp=Twenty minute estimated FTP
20minpow=Twenty Minute Power
5minpow=Five Minute Power
5secpow=Five Second Power
about=About
altitude=Altitude
analyze=Analysis
application=Application
avecad=Average Cadence
avehr=Average HeartRate
avepow=Average Power
bike_weight=Bike Weight
binSize=Bucket Size
cadence=Cadence
cadPow=Cadence Power Scatter Plot
cancel=Cancel
cDgr=Cadence Distribution Graph
cDrpm=Cadence (rpm)
cftp=Current FTP
close=Close
cpg=Cadence/Power
date=Date
delete=Delete
delMsg=Are you sure you want to delete the following files?
distance=Distance
distancekm=Distance (km)
distance_left=Distance Remaining
distribution=Distributions
error=Error
fatigue=Fatigue Profiles
forceVeloc=Force vs Velocity
fthr=Functional Threshold HeartRate
ftp=FT Power
ftpWarning=Set Threshold Power in Preferences
gpsData=GPS Data
heartrate=Heart Rate
heightMeters=Height (meters)
hrBpm=Heart Rate (bpm)
hrDgr=Heart Rate Distribution Graph
hrPow=Heart Rate / Power Scatter Plot
hrWatts=Heart Rate / Watts
imported=Imported
import=Import
load=Load
maxcad=Maximum Cadence
maxhr=Max HeartRate
maxpow=Max Power
metric=
mmp=Mean Maximal Power
noDataDisp=No data to display, select a workout first
noData=No Data
noDataSave=No data to save
noDataUpload=No data to upload
noFiles=No files to import
open=Open
pass=Password
pdGr=Power Distribution Graph
personal_data=Your Information
power=Power
poWt=Power/Heart Rate
poWtt=Power (watts)
preferences=Preferences
profile=Select your trainer
qpower=
qpow=Quadratic Power
quadAnal=Quadrant Analysis
quit=Quit
reanal=Reanalyze
reset=Factory Reset
recover=Recover
resistance=Resistance
rideSum=Ride Summary
route=Route
saveclose=Save and Close
saveGPS=Save with GPS and Altitude data?
save=Save
saveroute=Save as GPX
scatter=Scatter Plots
schr=Speed/Cadence/Heart-rate
scid=Speed and Cadence ID
selectLanguage=Select Language
selErr=Selection Error
sglWk=Only select a single workout
sharing=Sharing
slope=Slope
smooth=Smoothing
speed=Speed
start=Start
stop=Stop
stopwatch=Stopwatch
stress=Stress
summary=Summary
target_power=Target Power
time=time
trainDist=Training Level Distribution Graph
trainer_speed=Trainer Speed
trainer=Trainer
training_analysis=Training Analysis
training=Training
trainlevelhr=Training Level (HR)
trainlevel=Training Level
trial_expired=Trial Expired, please register
uploadError=Error Uploading
uploadTo=Workout Uploaded To
uploadWk=Workout Uploaded
user=Username
view=View
warning=Warning
wheel_size=Wheel Diameter
wktSave=Saved workout to
your_weight=Your Weight
zeroValue=Keep Zero Values
@@ -0,0 +1,124 @@
/* This file is part of Wattzap Community Edition.
*
* Wattzap Community Edtion is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Wattzap Community Edition is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Wattzap. If not, see <http://www.gnu.org/licenses/>.
*/
package com.wattzap.model.power;

/*
* CycleOps Super Magneto Pro Rollers
*
* (c) 2016 David George / Wattzap.com
*
* @author David George
* @date 30 October 2016
*
* Has 4 levels:
*
* Power curve is a polynomial until around 25kph, linear afterwards.
*
* From here http://blog.trainerroad.com/cycleops-supermagneto-pro-added/
*
*/
@PowerAnnotation
public class CycleOpsSuperMagnetoPro extends Power {
private final Cubic cubic = new Cubic();

public int getPower(double speed, int resistance) {
double power = 0.0;

switch (resistance) {
case 0: // EASY
power = (0.10156 * speed * speed) + (2.20833 * speed)
- (0.00033 * speed * speed * speed);
break;
case 1: // ROAD
if (speed < 25) {
power = (3.04167 * speed) + (-0.02344 * speed * speed)
+ (0.00423 * speed * speed * speed);
} else {
power = (12.5 * speed) - 185;
}
break;
case 2: // Interval
if (speed < 25) {
power = (4.91667 * speed) + (-0.25 * speed * speed)
+ (0.01107 * speed * speed * speed);
} else {
power = (speed * 17.35) - 288;
}
break;
case 3:// Mountain
if (speed < 21) {

power = (5.25 * speed) + (-0.4375 * speed * speed)
+ (0.02148 * speed * speed * speed);
} else {
power = (speed * 18.44) - 271;
}
break;
}

return (int) power;
}

// used for virtual power calculations in DummySpeedCadence Listener
public double getSpeed(int power, int resistance) {
double speed = 0;

switch (resistance) {
case 0: // EASY
// x3, x2, x1
cubic.solve(-0.00033, 0.10156, 2.20833, 0 - power);
speed = cubic.x1;

break;
case 1:
if (power < 118) {
cubic.solve(0.00423, -0.02344, 3.04167, 0 - power);
speed = cubic.x1;
} else {
speed = (185 + power)/12.5;

}
break;
case 2:
if (power < 128) {
cubic.solve(0.01107, -0.25, 4.91667, 0 - power);
speed = cubic.x1;
} else {
speed = (power + 288)/17.35;
}
break;
case 3:
if (power < 117) {
cubic.solve(0.02148, -0.4375, 5.25 , 0 - power);
speed = cubic.x1;
} else {
speed = (power + 271)/18.44;

}
break;
}
return speed;
}

public String toString() {
return "CycleOpsSuperMagnetoPro";
}

@Override
public int getResitanceLevels() {
return 4;
}
}
@@ -68,7 +68,7 @@ public AboutPanel() {
if (key == null || key.length() == 0) {
userPrefs.setRegistrationKey("Community Edition");
}
about.setText("<html>WattzAp Community Edition<br/><br/>Version 2.7.2<br/>20th February 2016");
about.setText("<html>WattzAp Community Edition<br/><br/>Version 2.7.3<br/>2nd July 2016");
add(about,"alignx right, span");

debug = new JCheckBox("Enable Debugging");

0 comments on commit df05c07

Please sign in to comment.
You can’t perform that action at this time.