protected override void run(DataRecord.DataRecord incoming) { // Sometimes the data trasmission is poor. Types.Skeleton skel = incoming.getData("Skeleton"); if (skel._empty) return; // Must add the avatar's skeleton before the player's. mov.addAvatar(skel); mov.addPlayer(skel); // Calculate the total angular displacement. mov.run(); data["ExerciseAdherence"] = mov.getFlail(); }
protected override void run(DataRecord.DataRecord incoming) { double VO2 = 14; data["MET"] = VO2 / 3.5; // in mL kg-1 min-1 data["kCal/min"] = VO2*incoming.getData("Mass")*5.05; }
/** * Code to run on the newly acquried data. Each algorithm is * run asychronously. * * This function should include pieces like the following * to add values to the DataRecord. * data["String Key"] = value; */ protected override void run(DataRecord.DataRecord incoming) { data["ExampleAlgo"] = incoming.getData("Blood Oxygenation") + 12.2; }