heyoka.model.sh_gravity_acc

Contents

heyoka.model.sh_gravity_acc#

heyoka.model.sh_gravity_acc(xyz: Iterable[expression], sh_coefficients: Iterable[Iterable[expression]], mu: expression, a: expression, max_degree: int | None = None, max_order: int | None = None) list[expression]#

Custom spherical harmonics gravitational acceleration.

Added in version 7.12.0.

This function will return the value of the gravitational acceleration due to a custom spherical harmonics gravitational potential at the input Cartesian position xyz. The output acceleration vector is expressed in the same body-fixed frame as xyz.

See sh_gravity_pot() for a detailed explanation of the arguments.

Parameters:
  • xyz – the position at which the acceleration will be evaluated.

  • sh_coefficients – the list of [C, S] normalised harmonic coefficient pairs.

  • mu – the gravitational parameter.

  • a – the reference radius.

  • max_degree – the maximum harmonic degree to be used in the computation.

  • max_order – the maximum harmonic order to be used in the computation.

Returns:

an expression for the Cartesian acceleration vector due to the custom gravitational potential at the position xyz.

Raises:

ValueError – if max_order > max_degree or if the requested degree exceeds the model inferred from sh_coefficients.