introduction to spice

38
Introduction to SPICE Jose Luis Vázquez European Space Astronomy Centre European Space Agency

Upload: urbana

Post on 21-Mar-2016

49 views

Category:

Documents


0 download

DESCRIPTION

Jose Luis Vázquez European Space Astronomy Centre European Space Agency. Introduction to SPICE. Jose Luis Vázquez (ESAC/ESA). Introduction to SPICE. A general problem:. An image from Mars is sent to the Earth, but... whereabouts in Mars?. Jose Luis Vázquez (ESAC/ESA). - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Introduction to SPICE

Introduction to SPICE

Jose Luis VázquezEuropean Space Astronomy Centre

European Space Agency

Page 2: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

A general problem:

An image from Mars is sent tothe Earth, but... whereabouts inMars?

Page 3: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

A general problem (step 1):

Calculate the position andorientation of the S/C withrespect to some frame.

Page 4: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

A general problem (step 2):

Calculate the intersectionof the camera field of viewwith the Mars surface.

Page 5: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

A general (big) problem: I only have the S/C clock information about the time the image was taken.

How do I know the UTC time? How do I calculate the position and orientation of the S/C for that UTC

time? How do I know the field of view of the camera and its intersection with

the Mars surface? Even if I knew that, Mars rotates with time. How do I know the position

of Mars for the time the image was taken?

The solution is...

Page 6: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE!

Page 7: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

A few generalities SPICE is a library (the toolkit) and a data format that will help you when

it comes to geometry and time calculations. Developed by NAIF, at the Jet Propulsion Laboratory, under a contract

with NASA. In can be used for data analysis, but also for planning. The toolkit is available in Fortran, C and IDL. There also is a beta Matlab

version. It is freely downloadable from the official SPICE web site at

http://naif.nasa.jpl.gov.

Page 8: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

Components of SPICE The SPICE toolkit: available in several programming languages. It

contains a comprehensible html documentation. Data files, aka kernels. They contain all the data SPICE needs in order to

do its calculations. They are usually provided by NAIF, ESA or other institutions.

Utility programs to handle and create kernels. Documentation: Tutorials and Required Readings, also downloadable

from the NAIF web page. You are encouraged to read them!

Page 9: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

NAIF organizes regular workshops on SPICE, open to the communty. They usually are held in USA.

Next SPICE workshop: ESAC (Madrid), Obtober 2007Contact: Jose Luis Vázquez

Still a few places left...

Training in SPICE

Page 10: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE kernels

The SPICE kernels are data files that contain the information the toolkit needs for the calculations.

They are several kernel types. Each type contains a different kind of information (ephemeris, attitude, time, etc.).

A kernel can be a binary or text file.

Page 11: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

Types of SPICE kernels (I)

A kernel can be of the following types: SPK: Spacecraft and planetary kernel with

ephemeris data. IK: Instrument kernel characteristics like

field of view, or number of pixels in a CCD.

CK: C-matrix kernel with attitude of spacecrafts and subsructures.

EK: Events kernel.

Page 12: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

Types of SPICE kernels (II)

FK: Frames kernel with information about different reference frames.

PCK: Planetary constants kernel, with information like mass, radius, etc. for

Solar System bodies. LSK: Leapseconds kernel. SCLK: S/C clock coefficients kernel.

Page 13: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE kernels. Why do they exsist?

Accuracy: Motion of bodies are far from ideal. The ephemeris and attitude kernels contain actual data from measurements or predictions.

Economy: Not all the information is needed at the same time. You can use the kernels you need for your application.

Flexibility: Information can be updated/improved. You don't need to update the toolkit or recompile the application; just get the new kernels.

Page 14: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Time (I)

Time is important, since SPICE does almost all the computations as a function of time.

Two different ways of keeping track of time: Based on the Earth rotation: 1 day is the time between two consecutive

passes of the Sun above Greenwich: UT1. Based on atomic clocks: based on the frequency of atomic oscilations:

TAI (International Atomic Time). TAI is the count of atomic seconds since a particular epoch.

Page 15: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Time (II)UTC: gives a calendar name to every TAI second.

Problem: the Earth does not always rotate at the same speed. A complete rotation does not always take 86400 atomic seconds: UT1 and UTC drift apart.

Solution: leapseconds.

3600 shour

×24 hoursday

=86400 sday

Page 16: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Time (III)

Leapseconds (i): UTC ahead UT1 more than 0.7 seconds: a positive leapsecond is added to

UTC:

... DECEMBER 31 23:59:58

... DECEMBER 31 23:59:59

... DECEMBER 31 23:59:60

... JANUARY 1 00:00:00

UT1 ahead UTC more than 0.7 seconds: a negative leapsecond is extrated to UTC:

... DECEMBER 31 23:59:58

... JANUARY 1 00:00:00

Page 17: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Time (IV)

Leapseconds (ii): The LSK kernel is a text kernel that keeps track of the leapseconds that

have occurred so far:

DELTET/DELTA_AT = ( 10, @1972-JAN-1 11, @1972-JUL-1 12, @1973-JAN-1

Only one leapseconds kernel exists (naif0008.tls). It is updated any time a new leapsecond is announced.

Leapseconds are announced by IERS. They are typically added at December 31 or June 30.

Page 18: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Time (V)

ET (Ephemeris Time).

ET is the independent variable in the differential equations that describe the motions of the bodies of the Solar System.

As far as the measurements can detect, ET and TAI advance at the same rate.

ET is measured in seconds past the J2000 epoch (roughly noon, January 1st, 2000).

If you want to translate from ET to UTC or the other way around, you need information about the leapseconds.

Page 19: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Time (VI)

S/C time (i).

Spacecrafts do not have a watch. They have an on-board counter, which counts ticks instead of seconds.

The duration of a tick depends on the particular spacecraft. Moreover, it can change during the mission due to different facts. It can even jump back and forward, or suffer a reset.

Information about the spacecraft clock rate is gathered on ground, and stored in the SCLK kernel.

Page 20: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Time (VII)

S/C time (ii).

Page 21: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Time (VII)Spacecraft clock kernel (SCLK).

Stores information about: Nominal rate of the clock (e.g., ticks per second). How the nominal rate varies during the mission. How many resets or jumps happened in the past.

The information on the two last points can not be predicted. It is reconstructed on ground.

The spacecraft clock is the only time information available in the telemetry. The SPICE toolkit needs the SCLK kernel to translate the S/C ticks to ET.

There is one SCLK kernel per mission.

Page 22: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Time (VIII)

Cookbook (i):

Convert from ET to UTC and the other way around: Load the leapseconds kernel:

furnsh_c( “naif0008.tls” ); Call the appropiate function:

ET -> UTC:

et2utc_c( ... ); UTC -> ET:

utc2et_c( ... );

Page 23: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Time (VIII)

Cookbook (ii):

Convert from S/C ticks to ET and the other way around: Load the SCLK kernel:

furnsh_c( “VEX_070719_STEP.TSC” ); Call the appropiate function:

ET -> S/C ticks:

et2utc_c( ... ); S/C ticks -> ET:

utc2et_c( ... );

Page 24: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Time (IX)

Cookbook (iii):

Convert from S/C ticks to UTC and the other way around: there is no direct conversion:

S/C ticks -> UTC: S/C ticks -> ET -> UTC

UTC to S/C ticks: UTC -> ET -> S/C ticks

You'll need both the SCLK and the LSK kernels. Do not forget to load them!

Page 25: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Frames (I)

A reference frame in SPICE is a particular realization of a Cartesian coordinate system. A frame is usually attached to a body, spacecraft, barycenter, etc.

Page 26: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Frames (II)

Two kinds of frames: Inertial Frame: the Newton Laws can be applied. Non Inertial Frame: the Newton Laws don't apply. Any frame that

rotates with respect to the starts background is non inertial.

The most important frame in SPICE is J2000. It is an inertial frame.

Page 27: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Frames (III)

Page 28: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Frames (IV)

Frames in SPICE can be built in (J2000), or provided to the SPICE toolkit via an FK or PCK kernel. They can be:

Inertial (J2000). Body-fixed frames (IAU_MARS). They need a PCK kernel to work. Fixed offset frames. Defined in text FK kernels. CK-based frames. Defined in text FK kernels, with orientation provided

in a CK kernel. Dynamic frames. Orientation based on dynamic directions computed by

SPICE based on kernel data or mathematical models.

Page 29: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Frames (V)

Frames for spacecrafts are usually CK based frames.

Frames for spacecraft substructures are usually fixed offset frames, defined with respect to the spacecraft frame.

Page 30: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Frames (VI)

Page 31: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Frames (VII)

Page 32: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Frames (VIII)

Rotations (i)

Vectors in SPICE are given in a specific frame. Very often their components in other frame have to be calculated.

How? Rotations.

Page 33: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Frames (IX)

Rotations (ii)

Rotating a frame A turns it into a different one B.

By specifying how to rotate A to get to B, SPICE can figure out how to transform vectors from the frame A to the frame B. You do that via a frames kernel (FK).

Three different ways of specifying rotations in SPICE: Rotation matrix. Euler angles. Quaternions.

Page 34: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Frames (X)

Rotations (iii)Euler Angles:

Page 35: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Frames (XI)

Rotations (iv)Rotation matrix: way to transform vectors in SPICE.

v A : Coordinates of v reference frame AvB: Coordinates of v reference frame B

[T ] : Rotation Matrix .

vB=[T ]×v A

Page 36: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Frames (XII)Cookbook (i)

Transform vectors from frame A to Frame B: Calculate a rotation matrix:

pxform_c( “J2000”, “IAU_MARS”, et, matrix);

Get the new coordinates via matrix-vector multiplication:

mxv_c( matrix, v, w );

v -> vector in J2000 framew -> vector in IAU MARS frame

Page 37: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

SPICE concepts: Frames (XII)Cookbook (ii)

Get the position of a body:

spkpos_c( “MARS”, et, “J2000”, “LT+S”, “EARTH”, &position, &light_time );

Get the state of a body:

spkezr_c( “MARS”, et, “J2000”, “LT+S”, “EARTH”, &state, &light_time );

position -> 3-dimensions vector with the position of the body

state -> 6-dimensions vector with the position and velocity of the body

Page 38: Introduction to SPICE

Introduction to SPICEIntroduction to SPICE

Jose Luis Vázquez (ESAC/ESA)Jose Luis Vázquez (ESAC/ESA)

This afternoon:

How to find the needed kernels. How to get information about the kernels. A few exercices.