NASA, via Lightstreamer SRL, provides four "quaternion components" for the International Space Station's current attitude. These are labelled USLAB000018–21 and described as "US Current Local Vertical Local Horizontal (LVLH) Attitude Quaternion Component [0-3]" respectively. For example, at roughly 15:01:30 2017-07-26 UTC we saw:

TIME_000001:   17938885000
USLAB000018:   0.999387085437775    "[...] Component 0"
USLAB000019:   0.00414502713829279  "[...] Component 1"
USLAB000020:  -0.00237915641628206  "[...] Component 2"
USLAB000021:  -0.0346784666180611   "[...] Component 3"

Lightstreamer has a demo website that displays the raw values as received here: http://demos.lightstreamer.com/ISSLive/ - to get to those attitude values, click ADCO on the left, then click on the four USLAB000018–21 subheadings.

When we built http://telemetry.space, I converted those to roll, pitch, and yaw using the threejs library by guessing components 0, 1, 2, and 3 correspond to x, y, z, w, like so:

const quaternion = new THREE.Quaternion();
quaternion.x = USLAB000018;
quaternion.y = USLAB000019;
quaternion.z = USLAB000020;
quaternion.w = USLAB000021;
const euler = new THREE.Euler();

const roll = THREE.Math.radToDeg(this.euler.x);
const pitch = THREE.Math.radToDeg(this.euler.y);
const yaw = THREE.Math.radToDeg(this.euler.z);

Producing this output via JSFiddle:

Roll   -176.0264711321606
Pitch    -0.28893712359948726
Yaw      -0.46525059186533985

Short of getting a HAM license, how can I verify this is right or wrong, and if wrong—as was reasonably suspected by others and myself in another query—how should I convert those USLAB values to roll, pitch, yaw for telemetry.space?

I've used Javascript and threejs in the examples above only as it's what I originally used and any help in any programming language, plain old English, or just the maths will be very much appreciated.


It's not clear from the documentation what the four parameters of quaternion represent explicitly -- specifically, whether w is the real part. From my experience, NASA likes to specify quaternions with the real part first, so you may move quaternion.w to USLAB000018 and shift the remaining three accordingly. ISS also reports its Tait-Bryan angles in Yaw-Pitch-Roll order, so you would need to set the euler.order option to 'ZYX'.

Under nominal operation, all three angles (YPR) should be within a few degrees of zero. 180 degrees roll is definitely not correct.

See my modifications in action here.

  • $\begingroup$ Thanks Tristan, this was very useful and very informative. I've made those changes to telemetry.space as, at the least they produce much saner looking results than what I had! Still need to find a way to test the approach, e.g., a set of validated quaternion components with corresponding YPRs. $\endgroup$ – Yuri Gadow Jul 27 '17 at 0:37
  • $\begingroup$ The results I'm seeing on there look more or less correct. I would suggest recording those values tomorrow during the Soyuz docking (though they might not maneuver much for where they're going to dock). $\endgroup$ – Tristan Jul 27 '17 at 15:55
  • $\begingroup$ Thanks Tristan, great idea. We store all the raw telemetry in a relational database, so we'll have the USLAB000018-21 and all the rest too. $\endgroup$ – Yuri Gadow Jul 27 '17 at 16:05
  • $\begingroup$ Looking at this older question: space.stackexchange.com/questions/20358/… -- it looks like your values match up nicely now. $\endgroup$ – Tristan Jul 27 '17 at 21:48
  • $\begingroup$ Oh, great, they got ISSLive! working again. I've checking that for a long while hoping to at least have that to compare to someday and its always been broken--but good in a way as I finally gave up and asked here! $\endgroup$ – Yuri Gadow Jul 27 '17 at 22:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.