Printable Version of Topic

Click here to view this topic in its original format

Unmanned Spaceflight.com _ MSL _ MSL image metadata sources & documentation?

Posted by: yogi Oct 10 2015, 11:38 AM

Hi -

if this is not the right place to ask, sorry! Please show me the right place.

I'm looking through JPL's JSON endpoint (http://json.jpl.nasa.gov/data.json) for rover imagery metadata, especially the one for MSL.
I'd love:


Specific things I'm struggling to figure out from files such as http://msl-raws.s3.amazonaws.com/images/images_sol713.json:
  1. what's the coordinate frame for rover_xyz and the 'C' & 'A' vectors from the CAHVOR model?
    1. I believe 'C' is in meters but I'm not sure relative to what coordinate frame. Is the origin perhaps at the center of the rover? (That would make sense because C and A tend to be at about right angles, except when the camera is looking up or down)
    2. rover_xyz starts at (0,0,0) on sol 1 but in what unit? It's not meters.
  2. what's the semantics of camera_vector? It does sometimes deviate appreciably from the optical plane normal 'A'.
  3. Am I right that the given CAHVOR/CAHVORE parameters and other metadata from the JSON endpoint aren't enough to place the image in the surrounding 3D world because the pixel density of the sensor isn't specified anywhere but is needed to relate the H', V' vectors computed from A, H, V which are in sensor pixels, and the C vector which is in world coordinates (meters?)? Currently I'm hard coding the sensor pixel density for each camera. I've read the Di & Li (2004) paper on CAHVOR camera model and its photogrammetric conversion for planetary application but that paper only deals with rendering a single image in the camera plane, as opposed to several images on separate planes embedded in a 3D space.

Any insights or pointers to documentation?

The reason I'm looking into this is just out of curiosity (I'm a layperson). I discovered mhoward's wonderful Midnight Planets recently and would love to build a part of something similar as a learning experience. I've checked out http://naif.jpl.nasa.gov/naif/ which Michael mentions on his website as a source of metadata but I'm not sure where exactly to look (I've dug through their collection of command line tools written in C but it all seemed a lot more complex than should be required to just find out where, in what attitude and what camera model an image got taken).

Thanks heaps for any help/pointers!

Tobias

Posted by: JohnVV Oct 10 2015, 09:14 PM

normally this type of information is in the pds archive along with the imaging data
for example ( random picked MSL folder )
http://pds-imaging.jpl.nasa.gov/data/msl/MSLHAZ_0XXX/
the images are in "data"
http://pds-imaging.jpl.nasa.gov/data/msl/MSLHAZ_0XXX/DATA/

the documentation is in the documents folder
http://pds-imaging.jpl.nasa.gov/data/msl/MSLHAZ_0XXX/DOCUMENT/

and the README file describes what is in the archive
http://pds-imaging.jpl.nasa.gov/data/msl/MSLHAZ_0XXX/AAREADME.TXT


as to vectors
it is tangent to the barycenter ( for mars this is only 20 Centimeters different than the geographical center so that is used)
( the naif spice kernels are used for that )
the cameras then are all RELATIVE to the rover body orientation

for that information see the naif tutorials on using spice
http://naif.jpl.nasa.gov/naif/tutorials.html

for MSL that is
ftp://naif.jpl.nasa.gov/pub/naif/MSL/
ftp://naif.jpl.nasa.gov/pub/naif/MSL/kernels/


for working with this kind of data i use ISIS3
-- but MSL really is not supported well


as i recall IDL is used for the msl imaging data

you might want to read through

"MSL data in the PDS and the Analyst's Notebook, Working with the archived science & engineering data"

http://www.unmannedspaceflight.com/index.php?showtopic=7613


Posted by: yogi Oct 11 2015, 01:32 PM

*facepalm* Thanks so much, I have no idea why it didn't occur to me to cross-references the data available on json.jpl.nasa.gov against the PDS and the Analyst's Notebook which have much better documentation for that some data!

For example the documentation on the coordinate frames https://an.rsl.wustl.edu/msl/mslbrowser/helpPages/MSL_Coordinate_Frames_Mar5_2013.pdf and http://pds-imaging.jpl.nasa.gov/data/msl/MSLNAV_0XXX/DOCUMENT/MSL_COORDINATE_FRAMES.PDF is super helpful. I think I even saw that document a year ago, no idea why I forgot about it. Based on that document, it seems that the rover_xyz coordinates are (probably in meters) relative to a particular site's frame; I hadn't noticed before that the rovery_xyz values reset to 0 from time to time (e.g. on sol 14 which was a new site). It looks like the position of those sites themselves may be missing from the JSON data that I've seen.

I'll have a look through Analyst's Notebook to get the locations of those sites, or if that doesn't work then I'll fall back to the NAIF data too which I'd rather avoid (last time I spent a day looking through the NAIF documentation, it seemed really complex / more powerful than what I needed).

Thanks again for those pointers! That should give me enough to read for next weekend smile.gif

QUOTE (JohnVV @ Oct 11 2015, 08:14 AM) *
normally this type of information is in the pds archive along with the imaging data
for example ( random picked MSL folder )
http://pds-imaging.jpl.nasa.gov/data/msl/MSLHAZ_0XXX/
the images are in "data"
http://pds-imaging.jpl.nasa.gov/data/msl/MSLHAZ_0XXX/DATA/

the documentation is in the documents folder
http://pds-imaging.jpl.nasa.gov/data/msl/MSLHAZ_0XXX/DOCUMENT/

and the README file describes what is in the archive
http://pds-imaging.jpl.nasa.gov/data/msl/MSLHAZ_0XXX/AAREADME.TXT


as to vectors
it is tangent to the barycenter ( for mars this is only 20 Centimeters different than the geographical center so that is used)
( the naif spice kernels are used for that )
the cameras then are all RELATIVE to the rover body orientation

for that information see the naif tutorials on using spice
http://naif.jpl.nasa.gov/naif/tutorials.html

for MSL that is
ftp://naif.jpl.nasa.gov/pub/naif/MSL/
ftp://naif.jpl.nasa.gov/pub/naif/MSL/kernels/


for working with this kind of data i use ISIS3
-- but MSL really is not supported well


as i recall IDL is used for the msl imaging data

you might want to read through

"MSL data in the PDS and the Analyst's Notebook, Working with the archived science & engineering data"

http://www.unmannedspaceflight.com/index.php?showtopic=7613

Posted by: mcaplinger Oct 11 2015, 04:12 PM

QUOTE (yogi @ Oct 11 2015, 06:32 AM) *
last time I spent a day looking through the NAIF documentation, it seemed really complex / more powerful than what I needed

I'm not sure exactly what you're trying to accomplish, but the NAIF stuff is not a lot more complex than it needs to be IMHO. "There is no royal road to geometry" as Euclid said smile.gif

Posted by: yogi Oct 13 2015, 09:38 AM

QUOTE (mcaplinger @ Oct 12 2015, 03:12 AM) *
I'm not sure exactly what you're trying to accomplish, but the NAIF stuff is not a lot more complex than it needs to be IMHO. "There is no royal road to geometry" as Euclid said smile.gif


The geometry is not what I'm afraid of; or at least I first need the data before I can start worrying about geometry (it seems like it should just be some matrix multiplications). The data I specifically want to get out of SPICE is the rover and camera reference frames for each image taken by MSL. I was hoping I'd be able to download e.g. a bunch of .csv files that listed these coordinates for each site, and for each image relative to that site.

Instead, I'm too stupid to even find this data in NAIF/SPICE. The http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/ for the toolkit is 24 documents long.

After reading through many of the http://naif.jpl.nasa.gov/naif/tutorials.html I figured out that the data should be in an "FK kernel" so I downloaded the http://naif.jpl.nasa.gov/pub/naif/MSL/kernels/fk/msl.tf. Turns out that file, which is in plain text, maps site names (e.g. MSL_SITE_144) to integer codes (e.g. -76644) but doesn't contain the corresponding coordinates (there is no FRAME_-76644 definition).

I'd be very grateful for any pointers to where I can download that data (MSL site coordinates)!

Posted by: Herobrine Oct 13 2015, 01:12 PM

I could be wrong since I've only ever touched SPICE kernels for spacecraft, not rovers, and I'm definitely the wrong person to be answering this, but until someone who knows what they're talking about comes along, I'll say that I think the data you want might be in the SPK kernels. They're .BSP files and are not plain text. I'm pretty sure there are existing open source libraries you can use. I decided to parse them myself, as I always seem to be trying to reinvent the wheel, and eventually got them figured out, but I remember feeling that the documentation was confusing and seemed to assume I would just know what would be where.

Edit: I just re-read your post and now I think I may have misunderstood what you were looking for and that my answer won't help you.
Edit 2: Actually, if I now understand what you're looking for, the SPK kernels might be where you want to look after all. In http://naif.jpl.nasa.gov/pub/naif/MSL/kernels/spk/aareadme.txt it describes http://naif.jpl.nasa.gov/pub/naif/MSL/kernels/spk/msl_surf_rover_tlm.bsp as

QUOTE
an ever-growing SPK file containing the position of the rover relative to the sites along the path and position of the sites relative to the landing site, created using telemetry view data from OPGS PLACES server, covering from SOL 0000 through the current SOL, updated twice each SOL at 06:30 and 18:30 LMST.

Additionally:
http://naif.jpl.nasa.gov/pub/naif/MSL/kernels/spk/msl_ls_ops120808_iau2000_v1.bsp is an "SPK file containing the position of the actual landing site".
http://naif.jpl.nasa.gov/pub/naif/MSL/kernels/spk/msl_struct_v02.bsp is an "SPK [file] containing fixed offsets between various rover structures and instruments". See http://naif.jpl.nasa.gov/pub/naif/MSL/kernels/spk/msl_struct_v02.cmt.

Posted by: yogi Oct 13 2015, 03:32 PM

Oh, awesome! Thanks so much, Herobrine! It sounds indeed like the SPK kernel is what I need. In my mind I had classed this data as falling into the category "Definitions of and specification of relationships between reference frames (coordinate systems)" (FK kernel) when apparently the correct SPICE category is "Space vehicle or target body trajectory (ephemeris)" (SPK kernel).

Sweet! Now I can focus on the next step, namely looking through the C or MATLAB based programming examples to figure out how to extract the coordinates from that kernel file into an "easy" format (eg. csv). I'll try that as soon as I can (probably on the weekend because this is just my hobby). Thanks again for your help!

Update: running
utilities/toxfr.exe MSL/kernels/spk/msl_surf_rover_tlm.bsp
gave me a sort-of-text format that contains lines like
[...]
'LS-to-4 -43.856 67.197 1.735 '
[...]
'LS-to-18 -1364.773 -1202.160 -10.022 '

I bet those are the coordinates of the site 4 / site 18 frames relative to landing (the x/y coordinates keep growing for higher numbers, and the third coordinate is probably elevation so it's smaller). Awesome! Thanks again!

Posted by: mcaplinger Oct 13 2015, 05:04 PM

SPICELIB is set up so that the SPK and CK files can be defined in any frame, or potentially different frames between files. If you load all of the kernels (including static kernels like FK), and you ask for the position of the rover in, say, Mars-center-relative coordinates, by using the frames kernel the software will automatically do all of the needed transforms to get you to the desired coordinate frame.

Posted by: yogi Dec 28 2015, 11:43 AM

Thanks for everyone's help! That was very helpful for the sort of Midnight Planets clone for Android that I've been working on over Christmas as my holiday project (see screenshot). It's far behind Midnight Planets' feature set, e.g. there is no stereo view yet. Not good enough to publish yet.

I'm relying on json.jpl.nasa.gov for most metadata (everything other than the relative location of the sites, which I got out of SPICE), but there are many gaps in the data; is the data in SPICE more complete?

json.jpl.nasa.gov has also started returning a lot of HTTP 403 Access Denied, e.g. the fact that the screenshot doesn't have any color images is because they 403; I'm also getting 403 here:

http://msl-raws.s3.amazonaws.com/images/images_sol1000.json

 

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)