/// <summary> 加速度の変化量 </summary> private void GetDeltaAccList() { InitParameter(); float[] p0 = new float[] { jointsList[0][JointType], jointsList[0][JointType + 1], jointsList[0][JointType + 2] }; double v0 = 0; double a0 = 0; for (int i = 1; i < timeTable.Count; i++) { float[] joint = jointsList[i]; int t = timeTable[i] - timeTable[i - 1]; double v = Caliculater.GetVelocity(joint, JointType, p0, t); double a = (v - v0) / t; double delA = (a - a0) / t; if (i < 3) { delA = 0; } if (timeTable[i] > 19500) { delA = 0; } UpdateMaxMin(delA); v0 = v; a0 = a; datapointList[i] = new DataPoint(timeTable[i], delA); } UpdateView(); }
/// <summary> 速度 </summary> private void GetVelocityList() { InitParameter(); float[] p0 = new float[] { jointsList[0][JointType], jointsList[0][JointType + 1], jointsList[0][JointType + 2] }; datapointList[0] = new DataPoint(timeTable[0], 0); for (int i = 1; i < timeTable.Count; i++) { var joint = jointsList[i]; double velocity = Caliculater.GetVelocity(joint, JointType, p0, (timeTable[i] - timeTable[i - 1])); if (i < 10) { velocity = 0; } UpdateMaxMin(velocity); datapointList[i] = new DataPoint(timeTable[i], velocity); p0 = new float[] { joint[JointType], joint[JointType + 1], joint[JointType + 2] }; } UpdateView(); }
/// <summary> 加速度 </summary> private void GetAccelerationList() { InitParameter(); float[] p0 = new float[] { jointsList[0][JointType], jointsList[0][JointType + 1], jointsList[0][JointType + 2] }; double v0 = 0; datapointList[0] = new DataPoint(timeTable[0], 0); for (int i = 1; i < timeTable.Count; i++) { float[] joint = jointsList[i]; int t = timeTable[i] - timeTable[i - 1]; double v = Caliculater.GetVelocity(joint, JointType, p0, t); double a = (v - v0) / t; if (i < 3) { a = 0; } UpdateMaxMin(a); datapointList[i] = new DataPoint(timeTable[i], a); p0 = new float[] { joint[JointType], joint[JointType + 1], joint[JointType + 2] }; v0 = v; } UpdateView(); }