public void AllErrorEquations() { //总的误差方程计算 int m_Pnumber = UnknowPoints.Count(); int numAngle = StationInfos.Count(); B = new Matrix(DistNum + numAngle, m_Pnumber * 2); L = new Matrix(DistNum + numAngle, 1); int bi, bj; for (bi = 0; bi < numAngle; bi++) { for (bj = 0; bj < m_Pnumber * 2; bj++) { B.SetNum(bi, bj, Ba.getNum(bi, bj)); } L.SetNum(bi, 0, La.getNum(bi, 0)); } for (bi = numAngle; bi < DistNum + numAngle; bi++) { for (bj = 0; bj < m_Pnumber * 2; bj++) { double tt = Bd.getNum(bi - numAngle, bj); B.SetNum(bi, bj, tt); } L.SetNum(bi, 0, Ld.getNum(bi - numAngle, 0)); } }
private void PMatrix() { int bi; int m_Pnumber = UnknowPoints.Count(); int numAngle = StationInfos.Count(); P = new Matrix(DistNum + numAngle, DistNum + numAngle); //设夹角的中误差为1“,距离的中误差为0.005m //角度权=1,距离全4*10000(秒/米)平方 for (bi = 0; bi < numAngle; bi++) { P.SetNum(bi, bi, 1); } for (bi = numAngle; bi < DistNum + numAngle; bi++) { P.SetNum(bi, bi, 40000); } L = new Matrix(DistNum + numAngle, 1); for (bi = 0; bi < numAngle; bi++) { L.SetNum(bi, 0, La.getNum(bi, 0)); } for (bi = numAngle; bi < DistNum + numAngle; bi++) { L.SetNum(bi, 0, Ld.getNum(bi - numAngle, 0)); } }
//int frameRate = 250; // Use this for initialization void Start() { // Time.captureFramerate = frameRate; Time.fixedDeltaTime = 1.0f; Pa.SetActive(false); Pb.SetActive(false); Pc.SetActive(false); Pd.SetActive(false); Pe.SetActive(false); Pwin.SetActive(false); Pnon.SetActive(true); Pwrong.SetActive(false); Pnext.SetActive(false); Pnext1.SetActive(false); NEXTL.SetActive(false); animatorhand = Hand.GetComponent <Animator>(); //print(animatorhand.GetInstanceID ()); La.SetActive(false); Ld.SetActive(false); Da.SetActive(false); Db.SetActive(false); Dc.SetActive(false); Dd.SetActive(false); De.SetActive(false); Hand.SetActive(false); whichF = 0; nowKeep = 0; showcount = 0; playercount = 0; currentlevel = 0; Last = 'F'; nowplaying = false; int temptnum; #region random System.Random randNum = new System.Random(); for (int i = 0; i < flowerlight_L0.Length;) { temptnum = randNum.Next(Min, Max); if (i == 0) { flowerlight_L0[i] = 0; i++; } else if (i == 1) { flowerlight_L0[i] = 1; i++; } else if (i == 2) { flowerlight_L0[i] = 4; i++; } } for (int i = 0; i < flowerlight_L1.Length;) { temptnum = randNum.Next(Min, Max); if (i == 0) { flowerlight_L1[i] = 0; i++; } else if (temptnum != flowerlight_L1[i - 1]) { flowerlight_L1[i] = temptnum; i++; } } for (int i = 0; i < flowerlight_L2.Length;) { temptnum = randNum.Next(Min, Max); if (i == 0) { flowerlight_L2[i] = 0; i++; } else if (temptnum != flowerlight_L2[i - 1]) { flowerlight_L2[i] = temptnum; i++; } } for (int i = 0; i < flowerlight_L3.Length;) { temptnum = randNum.Next(Min, Max); if (i == 0) { flowerlight_L3[i] = 0; i++; } else if (temptnum != flowerlight_L3[i - 1]) { flowerlight_L3[i] = temptnum; i++; } } #endregion cantouch = false; tempkeep = false; #region show WIN for (int i = 0; i < WINNUM; i++) { WIN[i].SetActive(false); } KK = false; #endregion }