Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
Work on report A LOT
Browse files Browse the repository at this point in the history
Signed-off-by: Timothy Langer <[email protected]>
  • Loading branch information
zeevox committed Mar 25, 2022
1 parent 2799716 commit 218624a
Show file tree
Hide file tree
Showing 42 changed files with 828 additions and 120 deletions.

This file was deleted.

1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.zeevox.nearow">

<!-- Define permissions required by the application; not all are granted automatically -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
Expand Down
1 change: 1 addition & 0 deletions app/src/main/java/net/zeevox/nearow/utils/UnitConverter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import kotlin.math.pow

class UnitConverter {
companion object {

/**
* Convert a speed, measured in metres per second, into the number of seconds that would be
* required to cover 500m at this speed.
Expand Down
7 changes: 5 additions & 2 deletions app/src/test/java/net/zeevox/nearow/UnitConversionTests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ class UnitConversionTests {
}

@Test
// checking with values from https://www.concept2.com/indoor-rowers/training/calculators/watts-calculator
// checking with values from
// https://www.concept2.com/indoor-rowers/training/calculators/watts-calculator
fun speedToWattsTest() {
assertEquals(179.2, UnitConverter.speedToWatts(4.0f), 0.1)
assertEquals(350.0, UnitConverter.speedToWatts(5.0f), 0.1)
assertEquals(1433.6, UnitConverter.speedToWatts(8.0f), 0.1)
}
}
}


186 changes: 168 additions & 18 deletions report/citations.bib
Original file line number Diff line number Diff line change
Expand Up @@ -53,33 +53,128 @@ @article{dr_valery_kleshnev_analysis_2012
pages = {2}
}


@misc{noauthor_flexible_2020,
title = {Flexible and {Interoperable} {Data} {Transfer}},
url = {https://en.everybodywiki.com/Flexible_and_Interoperable_Data_Transfer},
language = {en},
journal = {EverybodyWiki Bios \& Wiki},
month = jul,
year = {2020},
}

@article{sliding_smoother_than_jumping,
title = {Sliding is smoother than jumping},
url= {http://www.music.mcgill.ca/~ich/research/misc/papers/cr1137.pdf},
author = {{Russell Bradford}},
year = {2005},
pages = {4},
urldate = {2021-12-30},
title = {Sliding is smoother than jumping},
url = {http://www.music.mcgill.ca/~ich/research/misc/papers/cr1137.pdf},
author = {{Russell Bradford}},
year = {2005},
school = {University of Bath},
pages = {4},
urldate = {2021-12-30}
}

@misc{dsp_stack_dft,
title = {fft - {Is} there a way to do a {DFT} with low latency and fine frequency resolution at low frequencies?},
url = {https://dsp.stackexchange.com/questions/40296/is-there-a-way-to-do-a-dft-with-low-latency-and-fine-frequency-resolution-at-low},
urldate = {2022-01-08},
journal = {Signal Processing Stack Exchange},
title = {fft - {Is} there a way to do a {DFT} with low latency and fine frequency resolution at low frequencies?},
url = {https://dsp.stackexchange.com/questions/40296/is-there-a-way-to-do-a-dft-with-low-latency-and-fine-frequency-resolution-at-low},
urldate = {2022-01-08},
journal = {Signal Processing Stack Exchange}
}

@online{android_and_kotlin,
title = {Kotlin and Android | Android Developers},
url = {https://developer.android.com/kotlin},
year = {2022},
author = {{Google}}
}

@misc{garmin_fit_overview,
title = {{FIT} {SDK} {\textbar} {Garmin} {Developers}},
url = {https://developer.garmin.com/fit/overview/},
abstract = {Flexible and Interoperable Data Transfer (FIT) SDK},
urldate = {2021-10-08}
}

@online{android_anad_kotlin,
title={Kotlin and Android | Android Developers},
url = {https://developer.android.com/kotlin},
year = {2022},
author = {{Google}},
@misc{c2_p2w,
type = {Text},
title = {Watts {Calculator}},
url = {https://www.concept2.com/indoor-rowers/training/calculators/watts-calculator},
abstract = {Find out the average watts or pace of your Concept2 indoor rowing workouts with our easy to use Pace-to-Watts and Watts-to-Pace calculators.},
language = {en},
urldate = {2021-10-18},
journal = {Concept2},
month = may,
year = {2012}
}

@online{kotlin_dispatchers,
title={Coroutine context and dispatchers},
url = {https://kotlinlang.org/docs/coroutine-context-and-dispatchers.html},
author = {{Google}},
title = {Coroutine context and dispatchers},
url = {https://kotlinlang.org/docs/coroutine-context-and-dispatchers.html},
author = {{Google}}
}

@online{low-pass_2021,
title = {Low-pass filter},
copyright = {Creative Commons Attribution-ShareAlike License},
url = {https://en.wikipedia.org/w/index.php?title=Low-pass_filter&oldid=1039066300},
language = {en},
urldate = {2022-03-21},
journal = {Wikipedia},
month = aug,
year = {2021},
note = {Page Version ID: 1039066300}
}

@misc{garmin_coordinates,
title = {wgs84 - {Garmin} {FIT} {Coordinate} {System}},
url = {https://gis.stackexchange.com/questions/371656/garmin-fit-coodinate-system},
urldate = {2022-03-13},
journal = {Geographic Information Systems Stack Exchange}
}

@misc{wiki_autocorrelation_2021,
title = {Autocorrelation},
copyright = {Creative Commons Attribution-ShareAlike License},
url = {https://en.wikipedia.org/w/index.php?title=Autocorrelation&oldid=1059192357},
language = {en},
journal = {Wikipedia},
month = dec,
year = {2021},
note = {Page Version ID: 1059192357}
}

@misc{garmin_epoch,
title = {Cookbook {\textbar} {FIT} {SDK} {\textbar} {Garmin} {Developers}},
url = {https://developer.garmin.com/fit/cookbook/datetime/},
abstract = {FIT SDK Cookbook},
urldate = {2022-02-13}
}

@misc{android_room_overview,
title = {Save data in a local database using {Room}},
url = {https://developer.android.com/training/data-storage/room},
abstract = {Learn to persist data more easily using the Room Library},
language = {en},
urldate = {2022-03-08},
journal = {Android Developers}
}

@misc{android_filter_accel_noise,
title = {android - {Filtering} accelerometer data noise},
url = {https://stackoverflow.com/questions/1638864/filtering-accelerometer-data-noise},
urldate = {2022-01-27},
journal = {Stack Overflow}
}


@misc{fischer_figure_2018,
type = {Text},
title = {Figure 2.11, {Sine} signal with additive noise after processing with a low-pass filter and a high-pass filter},
url = {https://www.ncbi.nlm.nih.gov/books/NBK546153/figure/ch2.fig15/},
language = {en},
urldate = {2022-03-21},
author = {Fischer, Peter and Sembritzki, Klaus and Maier, Andreas},
month = aug,
year = {2018}
}

@phdthesis{hermsen_2013,
Expand Down Expand Up @@ -110,3 +205,58 @@ @article{cloud_2019
year = {2019},
pages = {e0225690}
}


@misc{holten_imagick-ft_2020,
title = {Imagick-{FT}},
url = {https://github.com/olavholten/imagick-FT},
author = {Holten, Olav},
month = nov,
year = {2020}
}

@misc{noauthor_android_nodate,
title = {Android {getResources}().{getDrawable}() deprecated {API} 22},
url = {https://stackoverflow.com/questions/29041027/android-getresources-getdrawable-deprecated-api-22},
journal = {Stack Overflow}
}

@misc{noauthor_android_nodate-1,
title = {android - {Does} {bindService}() with {BIND}\_AUTO\_CREATE always creates new service instance?},
url = {https://stackoverflow.com/questions/43742758/does-bindservice-with-bind-auto-create-always-creates-new-service-instance},
journal = {Stack Overflow}
}

@misc{noauthor_services_nodate,
title = {Services overview},
url = {https://developer.android.com/guide/components/services},
language = {en},
journal = {Android Developers}
}

@misc{noauthor_sharing_nodate,
title = {Sharing a file},
url = {https://developer.android.com/training/secure-file-sharing/share-file},
language = {en},
journal = {Android Developers}
}

@misc{noauthor_create_nodate,
title = {Create a fragment},
url = {https://developer.android.com/guide/fragments/create},
language = {en},
journal = {Android Developers}
}

@misc{noauthor_request_nodate,
title = {Request location updates},
url = {https://developer.android.com/training/location/request-updates},
language = {en},
journal = {Android Developers}
}

@misc{noauthor_java_nodate,
title = {java - {Running} code in main thread from another thread},
url = {https://stackoverflow.com/questions/11123621/running-code-in-main-thread-from-another-thread},
journal = {Stack Overflow}
}
Binary file added report/code/CircularDoubleBuffer.pdf
Binary file not shown.
Binary file added report/code/DataCollectionService.pdf
Binary file not shown.
Binary file added report/code/DataProcessor.pdf
Binary file not shown.
Binary file added report/code/Database.pdf
Binary file not shown.
Binary file added report/code/FitFileExporter.pdf
Binary file not shown.
Binary file added report/code/PerformanceMonitorFragment.pdf
Binary file not shown.
Binary file added report/code/SessionsActivity.pdf
Binary file not shown.
Binary file added report/code/SessionsFragment.pdf
Binary file not shown.
Binary file added report/code/SessionsListAdapter.pdf
Binary file not shown.
Binary file added report/images/appworking.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/code-MainActivity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/code-UnitConversionTests.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/code-dcs-gps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/code-dp-addAccelReading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/code-onServiceConnected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/code-onTrackExported.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/code-sessionsListAdapter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/code-splitformatting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/code-trackDao.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/code-trackDatabase.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/code-trackPoint-entity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/code-watts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/lowpass-sine-ch2f15.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/nklogbook.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/notresponding.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/roomarchitecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/sharesheet.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/snackbar.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/strava.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/stravapace.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/strokecoach.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/umldiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added report/images/viewsessions.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 changes: 81 additions & 0 deletions report/mermaid_uml.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
classDiagram
DataProcessor *-- DataCollectionService
DataUpdateListener *-- DataProcessor
DataUpdateListener <|.. PerformanceMonitorFragment
DataCollectionService o-- PerformanceMonitorFragment
PerformanceMonitorFragment *-- MainActivity
SessionsFragment *-- SessionActivity
FitFileExporter *-- SessionsFragment
Activity <|-- MainActivity
Activity <|-- SessionActivity
Fragment <|-- PerformanceMonitorFragment
Fragment <|-- SessionsFragment
class PerformanceMonitorFragment{
-Button viewSessionsButton
-Switch enableGpsSwitch
-Service mService
-Boolean mBound
-startTracking()
-stopTracking()
-startAndBindToDataCollectionService()
}
class SessionsFragment{
-TrackDatabase db
-TrackDao track
-onSessionShareButtonClicked()
-onTrackExported()
}
class FitFileExporter{
+exportTrackPoints(ListTrackPoint)
}
class DataUpdateListener{
<<interface>>
+onStrokeRateUpdate(strokeRate)
+onLocationUpdate(location, distance)
}
class DataProcessor{
-DataUpdateListener listener
-TrackDatabase db
-TrackDao track
+Boolean isRecording
+setListener()
+addAccelerometerReading()
+addGpsReading()
+startRecording()
+stopRecording()
-getCurrentStrokeRate()

}
class DataCollectionService{
<<Service>>
+DataProcessor dataProcessor
-Boolean inForeground
+enableGps()
+disableGps()
+setDataUpdateListener(listener)
-startForeground()
-stopForeground()
-registerSensorListener()
-initGpsClient()
}
class MainActivity{
+override onBackPressed()
}
class SessionActivity{
+override onSupportNavigateUp()
}
class Activity{
+supportFragmentManager
+onCreate()
+onStop()
+onStart()
+onBackPressed()
....()
}
class Fragment {
onViewCreated()
onDestroyView()
onStart()
onStop()
}

Binary file modified report/report.pdf
Binary file not shown.
Loading

0 comments on commit 218624a

Please sign in to comment.