コード例 #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";
        }
コード例 #2
0
		public CalibrationRunnerEventArgs(CalibrationRunnerResult result, string message, string rating, CalibrationResult calibrationResult)
		{
			this.result = result;
			this.message = message;
			this.rating = rating;
			this.calibrationResult = calibrationResult;
		}
コード例 #3
0
 /// <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";
 }
コード例 #4
0
    /// <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();
    }
コード例 #5
0
 private void Set(CalibrationResult other)
 {
     Result                  = other.Result;
     AverageErrorDegree      = other.AverageErrorDegree;
     AverageErrorDegreeLeft  = other.AverageErrorDegreeLeft;
     AverageErrorDegreeRight = other.AverageErrorDegreeRight;
     Calibpoints             = other.Calibpoints;
 }
コード例 #6
0
 public CalibrationResult(CalibrationResult other)
 {
     Result                  = other.Result;
     AverageErrorDegree      = other.AverageErrorDegree;
     AverageErrorDegreeLeft  = other.AverageErrorDegreeLeft;
     AverageErrorDegreeRight = other.AverageErrorDegreeRight;
     Calibpoints             = (CalibrationPoint[])other.Calibpoints.Clone();
 }
コード例 #7
0
 public CalibrationResult(CalibrationResult other)
 {
     Result = other.Result;
     AverageErrorDegree = other.AverageErrorDegree;
     AverageErrorDegreeLeft = other.AverageErrorDegreeLeft;
     AverageErrorDegreeRight = other.AverageErrorDegreeRight;
     Calibpoints = (CalibrationPoint[])other.Calibpoints.Clone();
 }
コード例 #8
0
        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";
        }
コード例 #9
0
 private void Set(CalibrationResult other)
 {
     Result = other.Result;
     AverageErrorDegree = other.AverageErrorDegree;
     AverageErrorDegreeLeft = other.AverageErrorDegreeLeft;
     AverageErrorDegreeRight = other.AverageErrorDegreeRight;
     Calibpoints = other.Calibpoints;
 }
コード例 #10
0
    /// <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";
    }