I am trying to quantify Spirit's final resting orientation, but I would generally like to learn how to determine the orientation of either rover for any particular sol. I'm sure this data is in the MMB files somewhere, but I haven't been able to identify it. Likewise, I am sure it is somewhere in the Analyst's Notebook database and/or the Pancam data tracking database, but again, I can't find it.
Spirit's final orientation is the main thing I am looking for, but any orientation assistance would be greatly appreciated.
Thanks.
The PDS label label for just about every image, I think, includes a lot of orientation data. It's huge - but here's a segment of it
Thanks, Doug. I wasn't aware of the label data. If I am understanding this data correctly, it appears that I will need to learn the mathematics of quaternions in order to make any sense of it. I wonder if there is any other source of data where the quaternions have been converted into something more intelligible to me.
I'm just following up on my own question. I found a http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToEuler/index.htm that supposedly could convert a quaternion into a set of angles in degrees. Using the rover quaternion from Doug's example above, it returned the following results.
Tom, I don't know if I'd discard the attitude & bank data just yet. For one thing, what is the reference for those numbers: local vertical or the martian geoid? Given that the source is probably the IMU, I'd bet on the latter. Also, recall that Spirit was already sideways (R side high) on the slope of Home Plate.
IMO, I don't find those numbers necessarily unreasonable. She was in a precarious situation.
Thanks for the support, Nick. I haven't given up on them yet, but I am still confused. The converted angles don't seem to jive with the rover model displayed by MMB for the same location. I appreciate what you are saying, and you are probably right in questioning the reference. I'm trying to check that out. It also occurred to me that the reference could be a previous position.
I have no real experience with IMUs. There wouldn't be much difference between local vertical and a normal to the geoid, would there?
Tom, my experience with inertial nav systems is almost entirely aircraft-related, so within that context the difference between local vertical & the geoid is significant enough to be considered, esp. during initial system alignment on Earth. (Choice of the reference geoid is also important; there are several in current use.) I don't know how refined such data is for Mars yet.
As you pointed out, though that might not matter for the MER INS. All that stuff matters for initial platform alignment on a planetary surface, which works basically like this for aircraft inertial systems:
1. Platform levels out orthogonal to local vertical.
2. Amount & direction of correction required to keep platform level over time (normally, a few minutes) is measured.
3. Correction rate is matched to expected drift rate to find latitude; correction direction used to find north. (Finding exact longitude is usually done by entering an appoximate longitude during the alignment process, which is subsequently refined by the system; there's no real easy way for the system to sense that independently.)
I suspect that the MERs haven't been going through full daily alignments for all this time; after morning wake-up, they might well just spin up to the last stored coordinates. Over time, this will drift (normally at a fixed rate) due to inherent & unavoidable minor mechanical imperfections in the system. Therefore, I wonder if this raw data you're working with might have substantial cumulative errors included that are subtracted during groundside processing @ JPL.
Anyhow. Sorry for the long stream-of-consciousness post; was trying to think this through. Good luck!
Tom, I played around with rover quaternions years ago, I was never totally convinced I had got it working exactly right but comparing my code with the maths on calculator you posted I think you need to swap the last two elements over. Then you get numbers close to what I get from code I've used in the past to automatically generate panoramas with flat horizons.
heading -50.58337307972186 degrees
attitude 8.761900410435159 degrees
bank -17.565753444479686 degrees
I'm not sure what the -50 for heading refers to as Spirt was facing very close to north, I have only every been interested in the pitch (attitude) and roll (bank) numbers which are about right I think.
James, all I can think is that the heading figure may be expressed in relative terms; maybe -50 deg off of the rover's longitudinal axis at platform alignment? Again, it's extremely important to understand the reference axes & error correction set to interpret this data.
I could believe a heading of 310 deg. They do fine calibration of the IMU on a regular basis - (normally cited as a 'QFE' I believe) - and I'm sure one would have occurred very close to the final location.
IIRC the rover's attitude is recalculated whenever a new "site" is declared. The "sun-finding" sequences are used for that purpose.
Eduardo, do you mean for heading? I don't think that solar location would help very much for attitude. However, the Sun's position is an excellent reference for both heading & longitude computation.
EDIT: Apologies; upon further reflection, yes, you could indeed derive attitude data via solar observation, although it seems that considerable interpolation of not only the Sun's angle with the horizon but also its orientation within the frame would be required. But the IMU itself would almost certainly have to be the primary data source, so the question again becomes what sorts of references & error corrections are involved for IMU data interpretation.
This is turning into quite an interesting topic. I didn't expect to find so many people contributing. That's what I love about this forum. Thanks to all for your contributions.
James: I think you may be on to something. Flipping the last two elements in that calculator seems to result in much more reasonable numbers...and, numbers that are agreeing qualitatively with the orientation of the rover model in MMB for the few locations I have tested. I want to do a little more testing, but this could be a breakthrough.
Aside from simply wanting to know what Spirit's final orientation is, I started working on this project because I wanted to be able to insert a rover model into the virtual 3D space of Google Mars. Ultimately, I wanted to be able to generate Google Mars anaglyphs similar to http://www.unmannedspaceflight.com/index.php?s=&showtopic=6438&view=findpost&p=160034 almost a year ago. Because Google has a high resolution DEM of Spirit's Inner Valley location, I thought it would be interesting to try some close up views of the terrain with a model of Spirit in context. Ultimately, I would like to create an image in tribute to Spirit's historic mission. But, I need to work the bugs out of the process, first.
To give you an idea of what I am talking about, here are a couple of preliminary images. The model in these images is using the orientation angles that James posted above, so you can see how they look next to Home Plate.
First, here is a screenshot of a scene from Google Mars.
Looking at these angles makes me wonder what the real pointing accuracy of a MER is. Or "was", for Spirit.
I mean, a figure down in the 10-15 of a degree range equates to an angle of around six inches at one light year. Almost-sort-of handy when doing the maths on multiple quaternion rotations (and then rounding down) but essentially meaningless in any real sense.
Andy
Of course, most of those digits are meaningless. I simply copied the output directly from the online calculator. For my purposes, I'll be happy with angles that are accurate to within a few degrees.
A few thoughts on the IMU/QFA issue ...
- The IMU is used whenever there is mobility. It tracks changes in attitude, by which I mean the vector or quaternion describing the rover's orientation (not just one element of said vector). The QFA or GFA (get fine attitude, which takes longer and is not quick) is run when the inertial measurement needs updating. The Sun measurements are critical to this.
- The Sun imaging in the QFA/GFA is not just a single image. It is a set. Position of the Sun in one image gives you two pieces of information (direction of the Sun, for instance in rover frame azimuth and elevation). Imaging over time gives you two more (d_az/d_t, d_el_dt). They are not fully orthognal, but are enough to populate roll,pitch,yaw or a quaternion (the quaternion is 4 numbers, but they quadratically add to 1, so only 3 degrees of freedom). A long IMU integration ensures that the attitude is over-determined. The orientation of the Sun in the frame is not determinable, except from infeerence based on motion.
- The frames of reference are the rover body frame and local level (i.e., areoid). I doubt the difference between "orthoganal to gravity" and "orthoganal to the radius vector" add up to much at either MER site.
- Time is actually part of the error budget, and affects the derivation from Solar images but not IMU. You couldn't refine longitude with solar imaging, since time knowledge can drift by up to 30 sec between corrections, and there are PMA-related uncertainties on top of that.
- The attitude is updated every time the IMU is used. A QFA/GFA updates the site. A drive does not end with the same attitude as it starts with. Those changes are tracked with the IMU, reported in the images, and used to point the HGA at Earth. This happens many times per QFA.
- The last quaternion I see, sol 2209, is [0.885949, -0.169903, 0.0031267, -0.431529] (Doug's). For that I get a tilt of 19.6 deg WSW, yaw=309 (51 W of N) pitch=-8.1 (nose down), roll=17.7 (+Y/right-hand panel up). So that's pretty close to what James got, no surprise there.
Mark: Thanks for taking the time to post those informative comments. You answered many of the questions that have come up in this discussion. I am especially pleased to get your verification on the orientation angles.
Now that we know that we are converting the quaternion data correctly, the only question remaining in my mind is how accurate is the final orientation. I did a little more digging around in the Analyst's Notebook and discovered that a "Get Quick Fine Attitude" was performed on sol 2164 and that there were only two subsequent drive attempts (one on sol 2165 and the last on sol 2169). These drives were attempts to improve the rover's northerly tilt for the coming winter. The mission Manager's reports indicate little improvement was achieved.
I am going to conclude that the final orientation is accurate, since there were only two attempts to move the rover after the final QFA.
I also found this nifty little map attached to the documentation from those sols showing Spirit pointing to the heading we expected.
Yes, thank you, Deimos, for taking the time for that informative reply! I've always been interested in how the MER INS works at this level of detail; again, I'm used to aircraft & therefore high speeds-over-ground with alignment referenced to a geophysical frame.
Now that we have Spirit's final orientation defined I can post the model for others to use in Google Mars. The model has been saved in the correct orientation, so all you'll need to do is drag it to Eduardo's final location in Google Mars. As long as you don't grab the "rotation" handle while you are adjusting it's position, it should appear in exactly the correct orientation.
I got this model originally as a http://sketchup.google.com/3dwarehouse/details?mid=9f1021ec701fd96dc82b8fee1057b30. However, the original model was not correctly scaled. I scaled it to the correct size in Sketchup, oriented it to the angles provided by Deimos, adjusted it's vertical position so that the left side wheels would appear partially buried, and then finally exported it as a Collada model that can be easily imported into Google Earth/Mars.
I suspect there may be a general interest in the model, but I thought I would post it here first to see if it worked properly for people and didn't have any bugs I haven't spotted. If no one identifies any problems, I'll post it in the main Spirit thread.
Final_Spirit_scaled_oriented3v7.zip ( 296.46K )
: 539
Once you have the model, it is easy to create your own custom views of Spirit in her surroundings.
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)