public FittsTrial(FittsTime _time, FittsCoordinate _coord, bool isTouchingTarget, FittsTrajectory _trajectory) { time = _time; coord = _coord; trajectory = _trajectory; isError = !isTouchingTarget; }
public bool AddTriggerEvent(Vector3 pos, FittsTime time, bool trialIsError) { // Check if first selection because it is not recorded if (!TargetsCreator.IsFirstTarget()) { AddTrial(pos, time, trialIsError); } // Start a new trajectory for the new target because each trial has his trajectory trajectory = new FittsTrajectory(); return(parameter.nbOfTarget == fittsTrials.Count); }
public SequenceStatistic(FittsSequence _sequence) { trialsStats = new List <TrialStatistic>(); sequence = _sequence; foreach (FittsTrial trial in sequence.fittsTrials) { trialsStats.Add(new TrialStatistic(trial)); } // We effectiveWidth = 4.133 * CalculateStandardDeviation(new List <double>(trialsStats.Select(x => x.dx))); // Ae (mean) effectiveAmplitudeMean = trialsStats.Sum(x => x.effectiveAmplitude) / trialsStats.Count; // IDe effectiveIndexDifficulty = Math.Log((effectiveAmplitudeMean / effectiveWidth) + 1, 2); // TP throughput = effectiveIndexDifficulty / (sequence.fittsTrials.Sum(x => x.time.movementTime) / sequence.fittsTrials.Count); // MT timeMean = new FittsTime(sequence.fittsTrials.Sum(x => x.time.pointingTime) / sequence.fittsTrials.Count, sequence.fittsTrials.Sum(x => x.time.selectionTime) / sequence.fittsTrials.Count); // ER(%) errorMean = (double)sequence.fittsTrials.Where(x => x.isError).Count() / (double)sequence.fittsTrials.Count; errorMean *= 100; // Eye Data eyeData = TargetsCreator.GetEyeData(); }
private void AddTrial(Vector3 pos, FittsTime time, bool trialIsError) { FittsCoordinate coord = new FittsCoordinate(TargetsCreator.GetLastTargetPosition(), TargetsCreator.GetCurrentTargetPosition(), new Vector2(pos.x, pos.y)); fittsTrials.Add(new FittsTrial(time, coord, trialIsError, trajectory)); }