Coordinates module

digraph {
   "poliastro.coordinates" -> "body_centered_to_icrs", "icrs_to_body_centered",
   "inertial_body_centered_to_pqw", "transform" ;
}

Functions related to coordinate systems and transformations.

This module complements astropy.coordinates.

poliastro.coordinates.body_centered_to_icrs(r, v, source_body, epoch=<Time object: scale='tt' format='jyear_str' value=J2000.000>, rotate_meridian=False)

Converts position and velocity body-centered frame to ICRS.

Parameters
  • r (Quantity) – Position vector in a body-centered reference frame.

  • v (Quantity) – Velocity vector in a body-centered reference frame.

  • source_body (Body) – Source body.

  • epoch (Time, optional) – Epoch, default to J2000.

  • rotate_meridian (bool, optional) – Whether to apply the rotation of the meridian too, default to False.

Returns

r, v – Position and velocity vectors in ICRS.

Return type

tuple (Quantity)

poliastro.coordinates.icrs_to_body_centered(r, v, target_body, epoch=<Time object: scale='tt' format='jyear_str' value=J2000.000>, rotate_meridian=False)

Converts position and velocity in ICRS to body-centered frame.

Parameters
  • r (Quantity) – Position vector in ICRS.

  • v (Quantity) – Velocity vector in ICRS.

  • target_body (Body) – Target body.

  • epoch (Time, optional) – Epoch, default to J2000.

  • rotate_meridian (bool, optional) – Whether to apply the rotation of the meridian too, default to False.

Returns

r, v – Position and velocity vectors in a body-centered reference frame.

Return type

tuple (Quantity)

poliastro.coordinates.inertial_body_centered_to_pqw(r, v, source_body)

Converts position and velocity from inertial body-centered frame to perifocal frame.

Parameters
  • r (Quantity) – Position vector in a inertial body-centered reference frame.

  • v (Quantity) – Velocity vector in a inertial body-centered reference frame.

  • source_body (Body) – Source body.

Returns

r_pqw, v_pqw – Position and velocity vectors in ICRS.

Return type

tuple (Quantity)

poliastro.coordinates.transform(orbit, frame_orig, frame_dest)

Transforms Orbit from one frame to another.

Parameters
Returns

orbit – Orbit in the new frame

Return type

Orbit