Exemplo n.º 1
0
        public string RatingFunction(CalibrationResult result)
        {
            if (result == null)
                return "";

            var accuracy = result.AverageErrorDegree;

            if (accuracy < 0.5)
            {
                return "Calibration Quality: PERFECT";
            }
            if (accuracy < 0.7)
            {
                return "Calibration Quality: GOOD";
            }
            if (accuracy < 1)
            {
                return "Calibration Quality: MODERATE";
            }
            if (accuracy < 1.5)
            {
                return "Calibration Quality: POOR";
            }
            return "Calibration Quality: REDO";
        }
		public CalibrationRunnerEventArgs(CalibrationRunnerResult result, string message, string rating, CalibrationResult calibrationResult)
		{
			this.result = result;
			this.message = message;
			this.rating = rating;
			this.calibrationResult = calibrationResult;
		}
 /// <summary>
 /// Simple rating of a given calibration.
 /// </summary>
 /// <param name="result">Any given CalibrationResult</param>
 /// <param name="rating">A number between 1 - 5 where 5 is the best othervise -1.</param>
 /// <param name="strRating">A string with a rating name othervise ERROR.</param>
 public void CalibrationRatingFunction(CalibrationResult result, out int rating, out string strRating)
 {
     if (result == null)
     {
         rating = -1;
         strRating = "ERROR";
         return;
     }
     if (result.AverageErrorDegree < 0.5)
     {
         rating = 5;
         strRating = "PERFECT";
         return;
     }
     if (result.AverageErrorDegree < 0.7)
     {
         rating = 4;
         strRating = "GOOD";
         return;
     }
     if (result.AverageErrorDegree < 1)
     {
         rating = 3;
         strRating = "MODERATE";
         return;
     }
     if (result.AverageErrorDegree < 1.5)
     {
         rating = 2;
         strRating = "POOR";
         return;
     }
     rating = 1;
     strRating = "REDO";
 }
    /// <summary>
    /// This method initializes the control with the given
    /// calibration result.
    /// </summary>
    /// <param name="newCalibrationResult">
    /// The calibration result with information about the calibration 
    /// </param>
    public void Initialize(CalibrationResult newCalibrationResult)
    {
      this.calibrationResult = newCalibrationResult;
      this.ExtractCalibrationPoints();

      this.Invalidate();
    }
Exemplo n.º 5
0
 private void Set(CalibrationResult other)
 {
     Result                  = other.Result;
     AverageErrorDegree      = other.AverageErrorDegree;
     AverageErrorDegreeLeft  = other.AverageErrorDegreeLeft;
     AverageErrorDegreeRight = other.AverageErrorDegreeRight;
     Calibpoints             = other.Calibpoints;
 }
Exemplo n.º 6
0
 public CalibrationResult(CalibrationResult other)
 {
     Result                  = other.Result;
     AverageErrorDegree      = other.AverageErrorDegree;
     AverageErrorDegreeLeft  = other.AverageErrorDegreeLeft;
     AverageErrorDegreeRight = other.AverageErrorDegreeRight;
     Calibpoints             = (CalibrationPoint[])other.Calibpoints.Clone();
 }
 public CalibrationResult(CalibrationResult other)
 {
     Result = other.Result;
     AverageErrorDegree = other.AverageErrorDegree;
     AverageErrorDegreeLeft = other.AverageErrorDegreeLeft;
     AverageErrorDegreeRight = other.AverageErrorDegreeRight;
     Calibpoints = (CalibrationPoint[])other.Calibpoints.Clone();
 }
        private string RatingFunction(CalibrationResult result)
        {
            if (result == null)
                return "";

            double accuracy = result.AverageErrorDegree;

            if (accuracy < 0.5)
                return "Calibration Quality: PERFECT";

            if (accuracy < 0.7)
                return "Calibration Quality: GOOD";

            if (accuracy < 1)
                return "Calibration Quality: MODERATE";

            if (accuracy < 1.5)
                return "Calibration Quality: POOR";

            return "Calibration Quality: REDO";
        }
 private void Set(CalibrationResult other)
 {
     Result = other.Result;
     AverageErrorDegree = other.AverageErrorDegree;
     AverageErrorDegreeLeft = other.AverageErrorDegreeLeft;
     AverageErrorDegreeRight = other.AverageErrorDegreeRight;
     Calibpoints = other.Calibpoints;
 }
    /// <summary>
    /// Returns a string with a description that represents the given overall accuracy.
    /// </summary>
    /// <param name="result">The calibration result to encode.</param>
    /// <returns>A string with a description that represents the given overall accuracy.</returns>
    private string RatingFunction(CalibrationResult result)
    {
      var accuracy = result.AverageErrorDegree;

      if (accuracy < 0.5)
      {
        return "Quality: Perfect";
      }

      if (accuracy < 0.7)
      {
        return "Quality: Good";
      }

      if (accuracy < 1)
      {
        return "Quality: Moderate";
      }

      if (accuracy < 1.5)
      {
        return "Quality: Poor";
      }

      return "Quality: Redo";
    }