Data structure - 1080Motion/API GitHub Wiki
The API exposes collections of data in a similar fashion to how it is stored in the databases. Below is a short description of the data structure and how they are related to each other. For a detailed description of each property in each collection please look at the proto files (gRPC) or the swagger API documentation (web api).
Instructors
The instructor collection is the top-most collection and this is also equal to an account.
ExerciseTypes
This is the exercise library containing all the types of exercises that can be done with the 1080 machines. It contains both the public exercises (provided by 1080 Motion) as well as the ones defined by the instructor that are private to this account.
Note: This is not to be confused with Exercises which are part of the session and groups sets of the same exercise type together.
Each exercise type contains the name of the exercises, along with instructions on how to perform it, if its a bilateral exercise and so on.
Every exercise type belongs to one of the five built in arch types that controls how the exercise type is treated by the software (Name / "Display Name"):
Name | Presentation Name | Description |
---|---|---|
SingleRepetitions | Single | Repetitions done using a single 1080 machine. Usually a Quantum. |
SynchroRepetitions | Synchro | Repetitions done using two connected 1080 quantum machines |
SmithRepetitions | Synchro Smith | Similar to Synchro but with a smith press |
LinearSprint | Linear | Horizontal exercises typically done using a 1080 Sprint where the client runs in a single direction |
ShuttleRun | Change of Direction | Horizontal change of direction. Similar to Linear but client changes direction one or more times during the run |
There is a property called presentation_type
that will have one of the following three values:
-
LINEAR
- Single direction running on the 1080 sprint. Applies to all exercises of arch typeLinearSprint
. -
CHANGE_OF_DIRECTION
- Shuttle run/Change of Direction on the 1080 sprint. Applies to all exercises of arch typeShuttleRun
. -
REPETITIONS
- Reps style exercise, typically on the 1080 quantum. This also includes synchro and synchro smith exercises like squats and bench press. Applies to all exercises of arch typeSingleRepetitions
,SynchroRepetitions
andSmithRepetitions
.
Clients
The client collection holds information related to clients. Clients are the actual users in the system (athletes, patients etc).
Sessions
Sessions are meant to be a collection of exercises done on the same day and occasion. A note however is that there is no technical limitations for storing exercise data from different dates in the same Session.
Note: Each session belongs to a single client. If multiple clients exercised at the same time, they will each have their own session with its own exercises and sets inside.
Exercises
Exercises are instances of ExerciseTypes meaning they store information that a Client has performed a specific ExerciseType at some date and time.
They are used to group sets of the same exercise type together inside a session.
Sets
This is the collection that stores the actual data. A set is explicitly created in the trainitest software and always belongs to an exercise. It is in the set that the training data gets recorded.
The training data is grouped into MotionGroups
which in turn consists of many Motions
which in turn holds a number of DataSamples
:
- A
MotionGroup
corresponds to a rep (for a repetition style exercise) or a single run (for a linear or change of direction type exercise). There's very little data associated with the motion group. - The
Motion
object corresponds to a single motion inside a rep (or run). It contains aggregated values for the entire motion such as average force, total time and distance etc. - The
DataSample
contains the actual sampled data from the machine(s). During workout or running, the machine continuously record these at a very high rate (around 300Hz). These samples are what is used to calculate the aggregated values mentioned above.
- A single linear run on the 1080 sprint will consist of one
MotionGroup
containing oneMotion
which has a list of several hundred, or even thousands ofDataSample
. - A biceps curl from the 1080 quantum will consist of one
MotionGroup
, containing twoMotion
(one concentric, one eccentric) where each has a list of a few hundredDataSample
. - A bilateral squat using a 1080 quantum synchro smith setup will contain one
MotionGroup
, containing (up to) fourMotion
(one concentric, one eccentric for each machine) and each Motion has its list of a few hundredDataSample
.
The samples that comprise the Motion object are defined as such:
Field | Unit | Description |
---|---|---|
Position | Meters (m) | The position of the cord relative to the calibrated zero position. Values are increasing when moving away from the machine, decreasing when moving towards the machine. Note that this is different from the accumulated distance, which is often what is used as an x-axis when plotting the data, especially for sprint runs. |
Speed | Meters/second (m/s) | The speed the cord was moving when this sample was acquired. Note: the value includes direction so it is technically a velocity. Negative value means moving towards the machine, positive means moving away from the machine. |
Acceleration | Meters/second/second (m/s2) | Acceleration at the time of this sample. |
Force | Newton (N) | The measured force for this sample |
Power | Watts (W) | The amount of power for this sample. |
Time | Seconds (s) | The amount of time that has passed since the start of Motion. |