ceres.gravity package

Submodules

ceres.gravity.gravityfield module

This module provides an abstract base class (abc) for implementing gravity field models.

This abc provides a design guide for building ceres compatible gravity fields. All user defined gravity field models should likely subclass this class to ensure that they implement all of the required properties and methods that ceres expects a gravity field to have.

Theory

Coming Soon

Use

class ceres.gravity.gravityfield.GravityField(mu)[source]

Bases: object

abstract get_acceleration(object_position)[source]

ceres.gravity.pointmass module

The module provides a subclass of GravityField that implements a point mass gravity model.

Theory

Coming Soon

Use

This is a concrete implementation of a GravityField, therefore to use this class you simply need to initialize it with the a valid standard gravitational parameter (mu, sometimes referred to as the “GM”). For instance, say we want to model the gravity of the Earth as a point mass gravity field. We could create a model for this scenario as

>>> from ceres.constants import muEarth
>>> from ceres.models.gravity import PointMass
>>> earth_gravity = PointMass(muEarth)

We can now use this model to calculate the surface acceleration on Earth

>>> from ceres.constants import rEarth
>>> accel = earth_gravity.get_acceleration(rEarth*np.array([1,0,0]))
>>> np.linalg.norm(accel)
0.009820224591618645
class ceres.gravity.pointmass.PointMass(mu, position=array([0, 0, 0]))[source]

Bases: ceres.gravity.gravityfield.GravityField

This class provides an implementation of a point mass gravity field for calculating accelerations.

The PointMass

get_acceleration(object_position)[source]
set_position(position)[source]

Module contents