Beispiel #1
0
 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);
     }
 }
Beispiel #2
0
    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);
    }
Beispiel #3
0
    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);
    }
Beispiel #4
0
    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";
        }
    }
Beispiel #5
0
 public void setMotion(Data.Motion motion)
 {
     this.motion = motion;
 }