mirror of
https://github.com/russok/FitoTrack.git
synced 2025-10-29 00:32:11 -07:00
Merge branch 'master' into develop
This commit is contained in:
commit
9c4d06fe53
@ -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 {
|
||||||
|
|||||||
@ -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{
|
||||||
|
|||||||
@ -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:
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
app/src/main/res/drawable/logo_combined.png
Normal file
BIN
app/src/main/res/drawable/logo_combined.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
6
metadata/de/full_description.txt
Normal file
6
metadata/de/full_description.txt
Normal 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.
|
||||||
1
metadata/de/short_description.txt
Normal file
1
metadata/de/short_description.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
Ein Fitness Tracker, der deine Privatsphäre achtet
|
||||||
1
metadata/en-US/changelogs/101.txt
Normal file
1
metadata/en-US/changelogs/101.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
- Fixed Crash
|
||||||
1
metadata/en-US/changelogs/103.txt
Normal file
1
metadata/en-US/changelogs/103.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
- Fix calorie calculation
|
||||||
6
metadata/en-US/full_description.txt
Normal file
6
metadata/en-US/full_description.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
FitoTrack is a mobile app for logging and viewing your workouts. Whether you’re 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.
|
||||||
1
metadata/en-US/short_description.txt
Normal file
1
metadata/en-US/short_description.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
A privacy orientated fitness tracker
|
||||||
Loading…
x
Reference in New Issue
Block a user