getAttr and setAttr work on the nodes internal data, form is a convinence function to work on movement of trasfromations, in way theres little differnce here EXCEPT that xform has more space options. Howvyer getAttr and setAttr are generic nodla info workers in the end all data is pushed thisway.
both Xform and setAttr mark the node dirty, maya never actualy refreshes anything untill its absolutely neccesery. but querrying a dirty value mostly does propagate a dirty propagation to said point.
Understanding node update scheme in maya is paramount for understanding what and how things work:
when a anodes attribute gets changed maya marks out all downstream attributes dirty (each node knows what attribute affects what output)Whenever a attribute marked dirty gets requested and its dirty it asks for its predeseccor for its input value (this cascades into a chain of events)Nothing happens etween theese 2 heppenings so if no ones requesting teh data it will stay dirty indefinitely.
anyway i dont think you need to calculate anything here, because if you set this up smartly you will alwasy know the aswer a bit depending on what you define as origial position offcourse. Thing is that in general rotation aritmetics DONT work like this:
rotation1 - rotation 2 = difference in rotation THis is in general untrue! As euler rirtation cant rely be stacked in thisway, except in localspace asuming only localspace is affected.
One interssing bit of problem here is that your working on data downstream of the keyframe node so setting something underneath it is allways pure, tough it does not stick once you chnage time. Also here its not necceserily a update problem at all but rather a problem releted to teh fact that theres NOBODY asking the fbik to update. Because scren refresh is disabled during your scripttime.