public SurveyPoint[] Transform(SurveyPoint[] surveyPoints) { var transformed = new SurveyPoint[surveyPoints.Length]; Parallel.For(0, surveyPoints.Length, i => { transformed[i] = Transform(surveyPoints[i]); }); return(transformed); }
public SurveyPoint Transform(SurveyPoint surveyPoint) { var pt = new[] { surveyPoint.CalibrationPoint.X, surveyPoint.CalibrationPoint.Y, surveyPoint.CalibrationPoint.Z, }.Subtract(new[] { HardIronEffect.X, HardIronEffect.Y, HardIronEffect.Z, }); pt = SoftIronEffect.Multiply(pt); return(new SurveyPoint(surveyPoint.Gx, surveyPoint.Gy, surveyPoint.Gz, pt[0], pt[1], pt[2])); }