So I have x, y, z coordinates in mm taken at a specific frame rate. I want the hip angle...which would be the angle between the shoulder, hip, and knee joint coordinates. But for the life of me I can't remember the function to calculate the angle! I attached an example of some data. I will have coordinates recording at 100 Hz for 2-3 seconds in the real data. Thanks in advanced.
Last edited by gannon_w; 11-20-2011 at 08:19 PM.
The dot product of the unit vectors is the cosine of the angle, so
=DEGREES(ACOS(SUMPRODUCT(B6:D6, E6:G6) / SQRT(SUMSQ(B6:D6)) / SQRT(SUMSQ(E6:G6))))
... is the angle between shoulder and hip in frame 1
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
Isn't that just the angle of the trunk vector (hip to shoulder)? That would produce the absolute trunk angle...but what about the total hip joint angle (standing it is approx 180 deg while sitting up strait is approx 90 deg) taking into account the thigh which is from the hip to the knee? Would I add (H6:J6) to the sumproduct statement and add a "/SQRT(SUMSQ(H6:J6)"?
Thanks again!
I don't understand that question.
You can't just add chained angles (think about it); but you can compute the angle between any two vectors using the formula with appropriate range references.
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
Never heard of a chained angle? Let me reword to make sure I'm explaining correctly. Does that formula produce the angle between the two vectors from the xyz coordinates of the shoulder, to the xyz coordinates of the hip (origin of the angle) (vector 1), and to the xyz coordinates of the knee (vector 2). I don't see in the formula references to the knee coordinates (H6:J6).
So vector 1 is the trunk and vector 2 is the thigh. The hip joint angle is the angle between the trunk segment and thigh segment. Is this more clear?
1. You can add signed chained angles in 2D coordinates (10° + 3° = 13°, 10° - 3° = 7°), but the arc cosine of the dot product returns the unsigned acute angle between two vectors.
2. You can't add chained angles in 3D at all. The angle between {1,0,0} and {0,1,0} is 90°, the angle between {0,1,0} and {0,0,1} is 90°, but the angle between {1,0,0} and {0,0,1} is not 180°.
So I still don't understand the end objective.
Last edited by shg; 11-20-2011 at 07:35 PM.
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
Hmmm, I'm not sure how else to explain it. Let me try again and please don't take offense if it seems simplistic.
A joint angle like any angle has 3 points. The hip joint angle is drawn from shoulder to hip to knee. Imagine videoing someone and drawing the angle on the screen. If you lift your leg this angle will decrease. Let's say to 90 deg. Each of the three points will have a xyz coordinate...but if you flex your hip to an angle of 90 degrees, then if you rotate on your standing foot while maintaining the hip at 90 deg you will change the xyz coordinates of each point BUT the hip angle is still 90 deg. They will have rotated out of the plane of the tv screen...but it is still 90 degrees.
What I have are xyz coordinates of a person's joints with respect to a world (environment like a room) origin they can move in. So if I flex to 90 deg, then take a few steps and turn a bit and flex my hip to 90 deg...the hip joint is still the same but the xyz coordinates of each point have changed.
Does this help or should I just mark the thread as solved and calculate the 2D angle (which is easy but has error).
I think I've misunderstood your data. I took them each as a vector, but now I think they are 3D positions taken from a tracker.
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
See attached.
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
That is beautiful...and exactly what I want. Sorry for my confusing explanation. Yes I run a motion lab and until I can get a specific piece of software to calculate the angles from models I develope I have to use excel...but my math in that area is rusty.
THANKS AGAIN!!!!!!
Oyeah...Go Lufkin Panthers Football!![]()
Last edited by gannon_w; 11-20-2011 at 08:31 PM.
You're welcome, good luck.
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks