[chronojump] ForceSensor. Showing force and power in measured direction not resultant force
- From: Xavier Padullés <xpadulles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] ForceSensor. Showing force and power in measured direction not resultant force
- Date: Thu, 23 Dec 2021 12:30:01 +0000 (UTC)
commit 62acd85edc4e8319f83c582b563e4564fe0d091c
Author: Xavier Padullés <testing chronojump org>
Date: Thu Dec 23 13:28:03 2021 +0100
ForceSensor. Showing force and power in measured direction not resultant force
src/forceSensorDynamics.cs | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/forceSensorDynamics.cs b/src/forceSensorDynamics.cs
index e52083b71..21caa0165 100644
--- a/src/forceSensorDynamics.cs
+++ b/src/forceSensorDynamics.cs
@@ -575,13 +575,18 @@ public class ForceSensorDynamicsElastic : ForceSensorDynamics
LogB.Information("elastic calculeForces: " + fsco.ToString());
for (int i = 0 ; i < force_l.Count; i ++)
{
- LogB.Information(string.Format("i pre: {0}, force_l[i]: {1}", i, force_l[i]));
+ LogB.Information(string.Format("i pre: {0}, force_l[i]: {1}, accel_l[i]: {2}", i,
force_l[i], accel_l[i]));
//LogB.Information(string.Format("i: {0}, force_l[i]: {1}, force_l.Count: {2}", i,
force_l[i], force_l.Count));
+ /*
double force = Math.Sqrt(
Math.Pow(Math.Cos(fse.AngleDefault * Math.PI / 180.0) *
(Math.Abs(force_l[i]) + totalMass * accel_l[i]), 2) + //Horizontal
Math.Pow(Math.Sin(fse.AngleDefault * Math.PI / 180.0) *
(Math.Abs(force_l[i]) + totalMass * accel_l[i]) + totalMass * 9.81, 2) //Vertical
);
- LogB.Information(string.Format("i post: {0}, force: {1}", i, force));
+ */
+
+ double force = Math.Abs(force_l[i]) + totalMass*(accel_l[i] + 9.81 * Math.Sin(fse.AngleDefault
* Math.PI / 180.0));
+
+ LogB.Information(string.Format("post force: {1}", i, force));
//force_l[i] = calculeForceWithCaptureOptions(force); //Elastic is always resultant.
Capture otions does not apply
force_l[i] = force;
@@ -593,8 +598,9 @@ public class ForceSensorDynamicsElastic : ForceSensorDynamics
for (int i = 0 ; i < force_l.Count; i ++)
{
power_l.Add(
- speed_l[i] * (force_l[i] + totalMass * accel_l[i]) + //Power
associated to the acceleration of the mass
- speed_l[i] * (Math.Sin(fse.AngleDefault * Math.PI / 180.0) *
totalMass * 9.81) //Power associated to the gravitatory field
+ //speed_l[i] * (force_l[i] + totalMass * accel_l[i]) + //Power
associated to the acceleration of the mass
+ //speed_l[i] * (Math.Sin(fse.AngleDefault * Math.PI / 180.0) *
totalMass * 9.81) //Power associated to the gravitatory field
+ speed_l[i]*force_l[i]
);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]