private void выбратьОтображениеToolStripMenuItem_Click(object sender, EventArgs e) { var FC = new FormSelectCompare(); FC.Set1Select(); if (FC.ShowDialog() != DialogResult.OK) { return; } bool bRes; var iRez = FC.ReturnRes(out bRes); if (bRes == false) { return; } listKalman1XY = PointsCoordSet.GetListOnIndex(iRez[0]); /*for (int i = 0; i < iRez.Length; i++) * listKalmans[i] = PointsCoordSet.GetListOnIndex(iRez[i]);*/ bDrawKalmanXY = true; //pictureBoxTrack.Refresh(); }
private void сравнитьКалмановToolStripMenuItem_Click(object sender, EventArgs e) { var FC = new FormSelectCompare(); if (FC.ShowDialog() != DialogResult.OK) { return; } bool bRes; var iRez = FC.ReturnRes(out bRes); if (bRes == false) { return; } var pEtalon = PointsCoordSet.GetListOnIndex(iRez[0]); var p1 = PointsCoordSet.GetListOnIndex(iRez[1]); var p2 = PointsCoordSet.GetListOnIndex(iRez[2]); if ((pEtalon == null) || (pEtalon == null) || (pEtalon == null)) { return; } var iMax = pEtalon.Count; var sHeader = "Records " + pEtalon[0].NumFrame.ToString() + "-" + pEtalon[iMax - 1].NumFrame.ToString(); LogFile.WriteLog(sHeader); sHeader = "Et= " + pEtalon.strName + " E1=" + p1.strName + " E2= " + p2.strName + " dl=" + "E1-E2"; LogFile.WriteLog(sHeader); var sLog = "Et" + "\t" + "E1" + "\t" + "E2" + "\t" + "dl"; LogFile.WriteLog(sLog); int iE; int iE12; LogFile.WriteLog("X"); double M1X; double SD1X; double M2X; double SD2X; int MMax1; int MMax2; var iE1X = CalcCompareParams(pEtalon, p1, true, out M1X, out SD1X, out MMax1); var iE2X = CalcCompareParams(pEtalon, p2, true, out M2X, out SD2X, out MMax2); for (var jc = 0; jc < iMax; jc++) { iE = pEtalon[jc].X; iE12 = iE1X[jc] - iE2X[jc]; var sLog1 = iE.ToString() + "\t" + p1[jc].X.ToString() + "(" + iE1X[jc].ToString() + ")" + "\t" + p2[jc].X.ToString() + "(" + iE2X[jc].ToString() + ")" + "\t" + iE12.ToString(); LogFile.WriteLog(sLog1); } sLog = "M1X = " + M1X.ToString() + " SD1X = " + SD1X.ToString() + " M2X = " + M2X.ToString() + " SD2X = " + SD2X.ToString(); LogFile.WriteLog(sLog); double M1Y; double SD1Y; double M2Y; double SD2Y; var iE1Y = CalcCompareParams(pEtalon, p1, false, out M1Y, out SD1Y, out MMax1); var iE2Y = CalcCompareParams(pEtalon, p2, false, out M2Y, out SD2Y, out MMax2); LogFile.WriteLog("Y"); for (var jc = 0; jc < iMax; jc++) { iE = pEtalon[jc].Y; iE12 = iE1Y[jc] - iE2Y[jc]; var sLog1 = iE.ToString() + "\t" + p1[jc].Y.ToString() + "(" + iE1Y[jc].ToString() + ")" + "\t" + p2[jc].Y.ToString() + "(" + iE2Y[jc].ToString() + ")" + "\t" + iE12.ToString(); LogFile.WriteLog(sLog1); } sLog = "M1Y = " + M1Y.ToString() + " SD1Y = " + SD1Y.ToString() + " M2Y = " + M2Y.ToString() + " SD2Y = " + SD2Y.ToString(); LogFile.WriteLog(sLog); }