public void logCurrMotion(int id) { if (movingDetect.isMoving()) { Data.Motion motion = new Data.Motion(); motion.formMotion(record, movingDetect.getStartIndex(), record.getIndex()); motion.output("Track/track" + randomNumber + "_.txt", currMotion, id); } }
protected Data.Motion loadStdMotion(string fileName) { Data.Motion motion = new Data.Motion(); StreamReader sr = File.OpenText(fileName); string line; while ((line = sr.ReadLine()) != null) { string[] tags = line.Split(' '); motion.readTags(tags); } motion.preprocess(); return(motion); }
protected Data.Motion loadCaliMotion(string fileName, string motionName, int id) { Data.Motion motion = new Data.Motion(); StreamReader sr = File.OpenText(fileName); string line; while ((line = sr.ReadLine()) != null) { string[] tags = line.Split(' '); if (tags[0] == motionName && int.Parse(tags[1]) == id) { motion.readTags(tags, 2); } } motion.preprocess(); return(motion); }
public void timeOut() { recordedMotion = new Data.Motion(); recordedMotion.formMotion(record, startIndex, record.getIndex()); recordedMotion.ts(); int startIndexTmp = -1, endIndexTmp = -1; bool ok = recordedMotion.segmentCheck(out startIndexTmp, out endIndexTmp); if (ok) { errorScreen.color = Color.green; errorScreen.text = "ok"; } else { errorScreen.color = Color.red; errorScreen.text = "error"; } }
public void setMotion(Data.Motion motion) { this.motion = motion; }