Bike trainer Heart Rate Control
Its an android app. It uses ant+ (requires the ant+ stuff be installed from the play store: ANT+ plugins Service, ANT Radio service, and ANT USB service and also potentially a ant+ dongle) to control a trainer based on heart rate.
The app is used by connecting to the devices and then setting your nominal workout power and maximum heart rate. It uses feed forward/integrator control to slowly reduce your power as you fatigue and your heart rate climbs. It is supposed to keep your heart rate below what you set as your max.
I obviously ripped lots of this code from the ant+ examples at https://github.com/ant-wireless/ANT-Android-SDKs. I'll try to credit them better in the future.