Skyfield: HomeTable of ContentsChangelogAPI Reference

API Reference — Planetary reference frames

class skyfield.planetarylib.PlanetaryConstants

Planetary constants manager.

You can use this class to build working models of Solar System bodies by loading text planetary constant files and binary orientation kernels. For a full description of how to use this, see Planetary Reference Frames.


Read frame variables from a KPL/FK file.

Appropriate files will typically have the extension .tf or .tpc and will define a series of names and values that will be loaded into this object’s .variables dictionary.

>>> from skyfield.api import load
>>> pc = PlanetaryConstants()
>>> pc.read_text(load(''))
>>> pc.variables['FRAME_31006_NAME']

Read binary segments descriptions from a DAF/PCK file.

Binary segments live in .bpc files and predict how a body like a planet or moon will be oriented on a given date.


Given a frame name, return a Frame object.

build_frame(integer, _segment=None)

Given a frame integer code, return a Frame object.

build_latlon_degrees(frame, latitude_degrees, longitude_degrees, elevation_m=0.0)

Build an object representing a location on a body’s surface.

class skyfield.planetarylib.Frame(center, segment, matrix)

Planetary constants frame, for building rotation matrices.


Return the rotation matrix for this frame at time t.


Return rotation and rate matrices for this frame at time t.

The rate matrix returned is in units of angular motion per day.