I'd like to get the coordinates of one bone from the perspective of an other bone, i.e. figure out the x,y,z coordinates of bone A where the axis of the space is aligned with the rotation and location of bone B. The purpose of this is to drive different shape keys for when a bone is moved forwards or side wards relative to some other bone. It sounds like something like this ought to be possible in blender but so far i can not come up with a way of doing it.
If there happens to be some other elegant solution to the intended end-goal i'd be happy to take that one too.