Relative position of Kinect Joints

I am trying to calculate the relative position of Kinect Joints to the transformation of the whole Skeleton. I understand that I need to construct a new set of 0,0,0 coordinates based on the actual position of the skeleton then recalculate the position of the Joints relative to that new set, but it s exceeding my knowledge at this time.

kinecy relative (107.3 kB)

somehow I am now getting a transformation relative to the body (chest)… it looks a bit over complicated the way I ve done it and I still don t know how to get the position of an hand relative to the new center…

kinect relative (107.5 kB)