Skip to content

Commit

Permalink
Merge pull request #30 from hossain-khan/feat/update-models
Browse files Browse the repository at this point in the history
Feat/update models
  • Loading branch information
hossain-khan authored Mar 15, 2024
2 parents 7eb17e7 + 1fcd55a commit 8918fed
Show file tree
Hide file tree
Showing 8 changed files with 410 additions and 95 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ bin/
### Mac OS ###
.DS_Store
timeline/.idea/copilot/

### Project Specific Files ###
**/resources/*.schema.json
50 changes: 49 additions & 1 deletion parser/src/main/kotlin/model/Records.kt
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,59 @@ data class Activity(
/**
* Type of activity detected.
*/
val type: String?,
val type: ActivityType = ActivityType.UNKNOWN_ACTIVITY_TYPE,
/**
* Value from 0 to 100 indicating the likelihood that the user is performing this activity.
* The larger the value, the more consistent the data used to perform the classification is with the detected activity.
* Multiple activities may have high confidence values. For example, the `ON_FOOT` may have a confidence of 100 while the `RUNNING` activity may have a confidence of 95. The sum of the confidences of all detected activities for a classification does not have to be <= 100 since some activities are not mutually exclusive (for example, you can be walking while in a bus) and some activities are hierarchical (`ON_FOOT` is a generalization of `WALKING` and `RUNNING`).
*/
val confidence: Int?,
)

/**
* Enum class for different types of activities detected by the device, used in [Activity.type].
*/
enum class ActivityType(val title: String, val extraColor: String) {
BOATING("Boating", "#01579b"),
CATCHING_POKEMON("Catching Pokémon", "#db4437"),
CYCLING("Cycling", "#4db6ac"),
FLYING("Flying", "#3f51b5"),
HIKING("Hiking", "#c2185b"),
HORSEBACK_RIDING("Horseback riding", "#4db6ac"),
IN_BUS("On a bus", "#01579b"),
IN_CABLECAR("In a cable car", "#01579b"),
IN_FERRY("On a ferry", "#01579b"),
IN_FUNICULAR("On a funicular", "#01579b"),
IN_GONDOLA_LIFT("In a gondola lift", "#01579b"),
IN_PASSENGER_VEHICLE("Driving", "#01579b"),
IN_SUBWAY("On the subway", "#01579b"),
IN_TAXI("In a taxi", "#01579b"),
IN_TRAIN("On a train", "#01579b"),
IN_TRAM("On a tram", "#01579b"),
IN_VEHICLE("In a vehicle", "#03a9f4"),
IN_WHEELCHAIR("By wheelchair", "#03a9f4"),
KAYAKING("Kayaking", "#4db6ac"),
KITESURFING("Kitesurfing", "#4db6ac"),
MOTORCYCLING("Motorcycling", "#01579b"),
ON_FOOT("On foot", "#c2185b"),
ON_BICYCLE("On a bicycle", "#4db6ac"),
PARAGLIDING("Paragliding", "#4db6ac"),
ROWING("Rowing", "#c2185b"),
RUNNING("Running", "#c2185b"),
SAILING("Sailing", "#4db6ac"),
SKATEBOARDING("Skateboarding", "#4db6ac"),
SKATING("Skating", "#4db6ac"),
SKIING("Skiing", "#4db6ac"),
SLEDDING("Sledding", "#4db6ac"),
SNOWBOARDING("Snowboarding", "#4db6ac"),
SNOWMOBILE("Snowmobiling", "#01579b"),
SNOWSHOEING("Snowshoeing", "#c2185b"),
STILL("Still", "#01579b"),
SURFING("Surfing", "#4db6ac"),
SWIMMING("Swimming", "#c2185b"),
TILTING("Tilting", "#01579b"),
UNKNOWN("Unknown", "#03a9f4"),
UNKNOWN_ACTIVITY_TYPE("Unknown Activity", "#03a9f4"),
WALKING("Walking", "#03a9f4"),
WALKING_NORDIC("Nordic walking", "#c2185b"),
}
Loading

0 comments on commit 8918fed

Please sign in to comment.