Skip to content

DigiJumpTechnologies/digijump-sessionData-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Digijump sessionData Library

v 2.4.26

  1. Data Spec

    1. Athlete
    2. segmentRecord Object
    3. parsedData Object
  2. Function Spec

    1. calculateElapsedCardioTime
    2. calculateElapsedResistanceTime
    3. identifyResultTypes
    4. calculateJumps
    5. calculateJumpsGood
    6. calculateJumpPercentage
    7. calculateSegmentTypeMaxHR
    8. calculateSegmentTypeMinHR
    9. calculateSegmentTypeAverageHR
    10. calculateTotalCaloriesBurned
    11. calculateExerciseCount
    12. caculateBandChanges
    13. parseVersionNumbers
    14. getSegmentTypeHRSamples
  3. Versioning

Data Spec

Athlete

  • id: string UUID
  • name: string
  • dob: string date of birth
  • email: string
  • height: number in inches
  • weight: number in pounds
  • user_code: string 4-digit identification code used to sign into a machine

segmentRecord object

sessionId

string UUID Initialized as null identifies the session this segment record belongs to

Identifier for the segmentRecord. This id is generated by the server.

libraryVersion

string

digijump-sessionData-library version number

segmentRecordStartTime

number Initialized as null

Timestamp when segmentRecord was begun. In milliseconds since EPOCH

msecondsCardioPaused

number Initialized as 0

Running total of milliseconds passed while paused during a cardio segment. This value is updated when a segmentRecord is unpaused or when a segment ends. Used to offset Cardio segment start times (and effectively only counting unpaused time toward total time elapsed in a given segment) by calculateElapsedCardioTime

msecondsResistancePaused

number Initialized as 0

Running total of milliseconds passed while paused during a resistance segment. This value is updated when a segmentRecord is unpaused or when a segment ends. Used to offset Resistance segment start times (and effectively only counting unpaused time toward total time elapsed in a given segment) by calculateElapsedResistanceTime

segmentRecordEndTime

number Initialized as null

Timestamp when segmentRecord was ended. In milliseconds since EPOCH

jumps

number Initialized as 0

Number of jumps completed during a segment.

jumpsGood

number Initialized as 0

Number of good jumps completed during a segment.

jpmSamples

array of numbers Initialized as []

Array of timestamps of last six jumps recorded

heartBPM

integer Initialized as 0

Most recent heartrate reading

segmentRecordSamples

array of segmentRecordSample objects Initialized as []

Timestamped array of all raw readings from the serial device

segmentRecordSample

{parsedData, timestamp:number}

heartBPMSamples

array of heartBPMSample objects Initialized as []

heartBPMSample

{heartBPM: integer, timestamp:number}

Array of all heartrate readings during the segmentRecord.

startStatus

parsedData Object Initialized as null

Initial serial readings from the device. Used as a baseline for calibration.

events

Initialized as []

Array of OnDevice app events.

event

An OnDevice app event object

BEGIN_REP event
  • timestamp of the event
  • band identifies the changing band
END_REP event
  • timestamp of the event
  • band identifies the changing band
  • callibratedBandReading
START_TIME event
  • timestamp of the event
  • segType SEGMENT_RECORD, CARDIO, or RESISTANCE
  • currentJumps [ optional ] total number of jumps a the time of the event
  • currentJumpsGood [ optional ] total number of good jumps a the time of the event
END_TIME event
  • timestamp of the event
  • segType SEGMENT_RECORD, CARDIO, or RESISTANCE
  • currentMsecondsCardioPaused [ optional ] total number of msecondsCardioPaused at the time of the event
  • currentMsecondsResistancePaused [ optional ] msecondsResistancePaused at the time of the event
  • currentJumps [ optional ] total number of jumps a the time of the event
  • currentJumpsGood [ optional ] total number of good jumps a the time of the event
PAUSE event
  • timestamp of the event
  • segType CARDIO, or RESISTANCE
  • lastUnpausedReading index of the last reading in the segmentRecordSamples which occured before the pause event occured.
UNPAUSE event
  • timestamp of the event
  • segType CARDIO, or RESISTANCE
  • lastPausedReading index of the last reading in the segmentRecordSamples which occured before the unpause event occured.

bandChanging

number Initialized as null

callibratedBandReading

number Initialized as null

maxBandReading

number Initialized as null

totalMaxBandReadings

number Initialized as []

countingRep

number Initialized as false

bandStatus

number Initialized as 'neutral'

reps

number Initialized as 0

repSecondCount

number Initialized as 0

totalReps

number Initialized as 0

statusRequestsPerSecond

number Pulled from config defaults to 12

This is the rate at which stat requests are sent to the digijump device

parsedData Object

  • lowerBand: number
  • lowerBandForce: number
  • centerBand: number
  • centerBandForce: number
  • highBand: number
  • highBandForce: number
  • topBand: number
  • topBandForce: number
  • lexanLoad: number
  • jumps: number
  • jumpsGood: number
  • airtTimeMs: number
  • heartBPM: number
  • motorCurrent: number
  • systemStatus: number
  • cycleTime: number

Function Spec

calculateElapsedCardioTime

calculateElapsedCardioTime(segmentRecord) takes the segmentRecord object and returns the sum of seconds elapsed within each Cardio Segment in the SegmentRecord. Time elapsed while paused or outside of a Cardio Segment is not counted.

calculateElapsedResistanceTime

calculateElapsedResistanceTime(segmentRecord) takes the segmentRecord object and returns the sum of seconds elapsed within each Resistance Segment in the SegmentRecord. Time elapsed while paused or outside of a Resistance Segment is not counted.

identifyResultTypes

identifyResultTypes(segmentRecord) takes the segmentRecord object and returns an object with two boolean properties: cardio and resistance signifying the prescence of each type of Segment in the results

calculateJumps

calculateJumps(segmentRecord) takes the segmentRecord object and returns the sum of jumps completed within each Cardio Segment in the SegmentRecord. Jumps while paused or outside of a Cardio Segment are not counted.

calculateJumpsGood

calculateJumpsGood(segmentRecord) takes the segmentRecord object and returns the sum of good jumps completed within each Cardio Segment in the SegmentRecord. Good jumps while paused or outside of a Cardio Segment are not counted.

calculateJumpPercentage

calculateJumpPercentage(segmentRecord) takes the segmentRecord object and returns percentage of jumps which were good jumps

calculateSegmentTypeMaxHR

calculateSegmentTypeMaxHR(segmentRecord, segmentType) takes the segmentRecord object and returns the maximum heartrate BPM sample from the heartBPMSamples array after filtering for samples which are timestamped within a START_EVENT and END_EVENT of the specified segmentType

calculateSegmentTypeMinHR

calculateSegmentTypeMinHR(segmentRecord, segmentType) takes the segmentRecord object and returns the minimum heartrate BPM sample from the heartBPMSamples array after filtering for samples which are timestamped within a START_EVENT and END_EVENT of the specified segmentType

calculateSegmentTypeAverageHR

calculateSegmentTypeAverageHR(segmentRecord, segmentType) takes the segmentRecord object and returns the average of the heartrate BPM samples in the heartBPMSamples array after filtering for samples which are timestamped within a START_EVENT and END_EVENT of the specified segmentType

calculateTotalCaloriesBurned

calculateTotalCaloriesBurned(segmentRecord, athlete) takes the segmentRecord object and the athlete object and returns the total calories burned by the athlete during the segmentRecord

calculateExerciseCount

calculateExerciseCount(segmentRecord, segType) takes the segmentRecord object and segmentType returns the number of segments completed of the specified type

calculateCurrentJpm

calculateCurrentJpm(segmentRecord) takes the segmentRecord object and returns the average jumps per minute of the last six jumps

calculateBandChanges

calculateBandChanges(parsedData, segmentRecord) returns an object {bandChanging, callibratedBandReading, maxDiff} which are the name of the band which has the max difference from its startStatus compared to all other bands, the force reading of that band, and the max difference amount itself--respectively

parseVersionNumbers

parseVersionNumbers(segmentRecord) returns an object {majorVer, minorVer, patchVer} containing the major, minor and patch version of the segmentRecord provided.

getSegmentTypeHRSamples

getSegmentTypeHRSamples(segmentRecord, segmentType) returns all of the samples in heartBPMSamples array after filtering for samples which are timestamped within a START_EVENT and END_EVENT of the specified segmentType

Versioning

Released with a [ major ].[ minor ].[ patch ] versioning scheme. Minor changes include any breaking changes with functions Patch changes are backwards compatible

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published