Merge branch 'master' into develop

This commit is contained in:
jannis 2019-08-24 18:54:42 +02:00
commit 9c4d06fe53
11 changed files with 31 additions and 28 deletions

View File

@ -30,13 +30,13 @@ allprojects {
android { android {
compileSdkVersion 28 compileSdkVersion 28
buildToolsVersion "29.0.1" buildToolsVersion "29.0.2"
defaultConfig { defaultConfig {
applicationId "de.tadris.fitness" applicationId "de.tadris.fitness"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 28 targetSdkVersion 28
versionCode 1 versionCode 103
versionName "1.0" versionName "1.0.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
} }
buildTypes { buildTypes {

View File

@ -306,7 +306,7 @@ public class RecordWorkoutActivity extends FitoTrackActivity implements Location
@Override @Override
public void onGPSStateChanged(WorkoutRecorder.GpsState oldState, WorkoutRecorder.GpsState state) { public void onGPSStateChanged(WorkoutRecorder.GpsState oldState, WorkoutRecorder.GpsState state) {
gpsStatusView.setTextColor(state.color); mHandler.post(() -> gpsStatusView.setTextColor(state.color));
} }
public static class InfoViewHolder{ public static class InfoViewHolder{

View File

@ -28,7 +28,6 @@ import org.mapsforge.map.layer.download.TileDownloadLayer;
import de.tadris.fitness.map.tilesource.FitoTrackTileSource; import de.tadris.fitness.map.tilesource.FitoTrackTileSource;
import de.tadris.fitness.map.tilesource.MapnikTileSource; import de.tadris.fitness.map.tilesource.MapnikTileSource;
import de.tadris.fitness.map.tilesource.ThunderforestTileSource;
import de.tadris.fitness.map.tilesource.TileSources; import de.tadris.fitness.map.tilesource.TileSources;
public class MapManager { public class MapManager {
@ -36,8 +35,8 @@ public class MapManager {
public static TileDownloadLayer setupMap(MapView mapView, TileSources.Purpose purpose){ public static TileDownloadLayer setupMap(MapView mapView, TileSources.Purpose purpose){
FitoTrackTileSource tileSource; FitoTrackTileSource tileSource;
switch (purpose){ switch (purpose){
case OUTDOOR: tileSource= ThunderforestTileSource.OUTDOORS; break; /*case OUTDOOR: tileSource= ThunderforestTileSource.OUTDOORS; break;
case CYCLING: tileSource= ThunderforestTileSource.CYLE_MAP; break; case CYCLING: tileSource= ThunderforestTileSource.CYLE_MAP; break;*/
case DEFAULT: case DEFAULT:
default: default:

View File

@ -41,36 +41,24 @@ public class CalorieCalculator {
* *
* workoutType and avgSpeed of workout have to be set * workoutType and avgSpeed of workout have to be set
* *
* Calculation currently ignores height.
*
* @param workout * @param workout
* @return MET * @return MET
*/ */
public static double getMET(Workout workout){ public static double getMET(Workout workout){
double speedInKmh= workout.avgSpeed * 3.6;
if(workout.workoutType.equals(Workout.WORKOUT_TYPE_RUNNING)){ if(workout.workoutType.equals(Workout.WORKOUT_TYPE_RUNNING)){
if(workout.avgSpeed < 3.2){ // This is a linear graph based on the website linked above
return 1.5; return Math.max(1.5, speedInKmh*1.117 - 2.1906);
}else if(workout.avgSpeed < 4.0){
return 2.5;
}else if(workout.avgSpeed < 4.8){
return 3.25;
}else if(workout.avgSpeed < 5.9){
return 4.0;
}else if(workout.avgSpeed < 7.0){
return 5.0;
}else if(workout.avgSpeed < 8.0){
return 7.0;
}else if(workout.avgSpeed < 9.6){
return 9.0;
}else if(workout.avgSpeed < 12.8){
return 12.0;
}else{
return 16;
}
} }
if(workout.workoutType.equals(Workout.WORKOUT_TYPE_HIKING)){ if(workout.workoutType.equals(Workout.WORKOUT_TYPE_HIKING)){
return 6.3; // Use fixed MET because no more precise calculation was found
return 6.0;
} }
if(workout.workoutType.equals(Workout.WORKOUT_TYPE_CYCLING)){ if(workout.workoutType.equals(Workout.WORKOUT_TYPE_CYCLING)){
return Math.max(3, (workout.avgSpeed-10) / 1.5); // This is a linear graph based on the website linked above
return Math.max(3, (speedInKmh-10) / 1.5);
} }
return -1; return -1;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,6 @@
FitoTrack ist eine App zum aufzeichnen und auswerten deiner Workouts. Ob du läufst, Fahrrad fährst oder wanderst: FitoTrack zeigt die wichtigsten Daten mit detaillierten Diagrammen und Statistiken. Es ist Open-Source und komplett ohne Werbung!
Funktionen:
* Workouts aufzeichnen. Wähle deine Sportart und fange einfach an zu laufen/Fahrrad fahren/wandern. Du kannst währenddessen die wichtigest Informationen unter der Karte sehen.
* Workouts angucken. Schaue dir allgemeine Informationen an wie Datum, Dauer, Distanz, Geschwindigkeit, Pace, etc. Sehe die Route auf einer Karte. Untersuche deine Leistung im Geschwindigkeitsdiagramm.
* Open-Source. Es gibt keine Werbung, kein Tracking und der source code ist öffentlich zugänglich für jeden unter der GPLv3-Lizenz.

View File

@ -0,0 +1 @@
Ein Fitness Tracker, der deine Privatsphäre achtet

View File

@ -0,0 +1 @@
- Fixed Crash

View File

@ -0,0 +1 @@
- Fix calorie calculation

View File

@ -0,0 +1,6 @@
FitoTrack is a mobile app for logging and viewing your workouts. Whether youre running, cycling or hiking FitoTrack will show you give you the most important information with detailed charts and statistics. It is open-source and completely ad-free.
Features:
* Track workouts. Choose your sports type and just start running/cycling/hiking/etc. You can see general information right below the map on the track screen.
* View your workouts. View general information like date, time, duration, distance, speed, pace. See your route on a map. Investigate how you performed in the speed diagram.
* Open-Source. There is no advertisement, no tracking and the source code is open and licensed under the GPLv3.

View File

@ -0,0 +1 @@
A privacy orientated fitness tracker