FIT file power data repair tool which Invalid power data fix to zero.
When ROTOR Power meter use, there is an invalid power value is recorded on a cycle computer at the start pedaling.
This tool fix the power that has spiked to zero.
Main source code of repair tool.
-
FitRepair
- Main class
-
Checker
- Pick up the record that power has spiked at the start pedaling.
-
Repair
- Fix spiking power to zero.
- Update accumulated power.
- Update max power.
- Update average power.
The reinvention of FIT SDK for activity fit file.
Ant+ FIT SDK - http://www.thisisant.com/resources/fit
Simple use cases
final Reader reader = new Reader();
reader.getDispatcher().setHeaderLintener(
(header) -> {
// do something.
});
reader.getDispatcher().setDefinitionMsgListener(
(defMsg) -> {
// do something.
});
reader.getDispatcher().setDataMsgListener(
(defMsg, msg) -> {
// do something.
});
final boolean result;
try (final InputStream in = new FileInputStream(fitFile)) {
result = reader.read(in);
} catch (final IOException e) {
logger.error("Error while reading fit file.", e);
return;
} finally {
reader.getDispatcher().removeListeners();
}
You will need to install JDK 8.
> git clone https://github.com/harry0000/FitRepair.git
> cd FitRepair
> gradlew jar
> java -jar FitRepair.jar C:\path\to\fitfile.fit
- Write javadoc
- Implement other messages & listeners
- Add timestamp offset tests
- Move to 'fit-utils' repository
- Porting to C#
#LICENSE
MIT