ostk.astrodynamics.guidance_law.QLaw

class QLaw(
self: ostk.astrodynamics.guidance_law.QLaw,
target_coe: ostk.astrodynamics.trajectory.orbit.model.kepler.COE,
gravitational_parameter: ostk.physics.unit.Derived,
parameters: ostk.astrodynamics.guidance_law.QLaw.Parameters,
gradient_strategy: ostk.astrodynamics.guidance_law.QLaw.GradientStrategy = <GradientStrategy.FiniteDifference: 1>,
)

Bases: GuidanceLaw

This class implements the Q-law guidance law.

The Q-law is a Lyapunov feedback control law developed by Petropoulos, based on analytic expressions for maximum rates of change of the orbit elements and the desired changes in the elements. Q, the proximity quotient, serves as a candidate Lyapunov function. As the spacecraft approaches the target orbit, Q decreases monotonically (becoming zero at the target orbit).

Constructor.

Parameters:
  • coe (COE) -- The target orbit described by Classical Orbital Elements.

  • gravitational_parameter (float) -- The gravitational parameter of the central body.

  • parameters (QLaw.Parameters) -- A set of parameters for the QLaw.

  • gradient_strategy (QLaw.GradientStrategy) -- The strategy used to compute the gradient dQ_dOE. Defaults to FiniteDifference.

Methods

calculate_thrust_acceleration_at

Calculate the thrust acceleration at the provided coordinates and instant.

get_gradient_strategy

Get the gradient strategy.

get_name

Get the name of the guidance law.

get_parameters

Get the parameters.

get_target_coe

Get the target COE.

class GradientStrategy(
self: ostk.astrodynamics.guidance_law.QLaw.GradientStrategy,
value: int,
)

Bases: pybind11_object

Gradient strategy.

Members:

Analytical : Analytical

FiniteDifference : Finite Differenced

property name
class Parameters(
self: ostk.astrodynamics.guidance_law.QLaw.Parameters,
element_weights: dict[ostk.astrodynamics.trajectory.orbit.model.kepler.COE.Element, tuple[float, float]],
m: int = 3,
n: int = 4,
r: int = 2,
b: float = 0.01,
k: int = 100,
periapsis_weight: float = 0.0,
minimum_periapsis_radius: ostk.physics.unit.Length = Length.kilometers(6578.0),
absolute_effectivity_threshold: ostk.core.type.Real = Undefined,
relative_effectivity_threshold: ostk.core.type.Real = Undefined,
)

Bases: pybind11_object

Q-law parameters.

Constructor.

Parameters:
  • element_weights (dict) -- Key-value pair of COE elements and the (weights, tolerances) for the targeter.

  • m (int) -- Scaling parameter for Semi-Major Axis delta. Default to 3.

  • n (int) -- Scaling parameter for Semi-Major Axis delta. Default to 4.

  • r (int) -- Scaling parameter for Semi-Major Axis delta. Default to 2.

  • b (float) -- Scaling parameter for Argument of Periapsis maximal change. Default to 0.01.

  • k (int) -- Penalty parameter for periapsis. Default to 100.

  • periapsis_weight (float) -- Periapsis weight. Default to 0.0.

  • minimum_periapsis_radius (Length) -- Minimum periapsis radius. Default to 6578.0 km.

  • absolute_effectivity_threshold (Real) -- Absolute effectivity threshold. Default to undefined (not used).

  • relative_effectivity_threshold (Real) -- Relative effectivity threshold. Default to undefined (not used).

property absolute_effectivity_threshold

Absolute effectivity threshold.

Type:

Real

property b

Scaling parameter for Argument of Periapsis.

Type:

float

get_control_weights(
self: ostk.astrodynamics.guidance_law.QLaw.Parameters,
) numpy.ndarray[numpy.float64[5, 1]]

Get the control weights.

Returns:

The control weights.

Return type:

np.array

get_minimum_periapsis_radius(
self: ostk.astrodynamics.guidance_law.QLaw.Parameters,
) ostk.physics.unit.Length

Get the minimum periapsis radius.

Returns:

The minimum periapsis radius.

Return type:

Length

property k

Penalty parameter for periapsis.

Type:

int

property m

Scaling parameter for Semi-Major Axis delta.

Type:

int

property n

Scaling parameter for Semi-Major Axis delta.

Type:

int

property periapsis_weight

Periapsis weight.

Type:

float

property r

Scaling parameter for Semi-Major Axis delta.

Type:

int

property relative_effectivity_threshold

Relative effectivity threshold.

Type:

Real

calculate_thrust_acceleration_at(
self: ostk.astrodynamics.guidance_law.QLaw,
instant: ostk.physics.time.Instant,
position_coordinates: numpy.ndarray[numpy.float64[3, 1]],
velocity_coordinates: numpy.ndarray[numpy.float64[3, 1]],
thrust_acceleration: ostk.core.type.Real,
output_frame: ostk.physics.coordinate.Frame,
) numpy.ndarray[numpy.float64[3, 1]]

Calculate the thrust acceleration at the provided coordinates and instant.

Parameters:
  • instant (Instant) -- Instant of computation.

  • position_coordinates (np.array) -- Position coordinates.

  • velocity_coordinates (np.array) -- Velocity coordinates.

  • thrust_acceleration (float) -- Thrust acceleration magnitude.

  • output_frame (Frame) -- The frame the acceleration is expressed in.

Returns:

The acceleration.

Return type:

np.array

get_gradient_strategy(
self: ostk.astrodynamics.guidance_law.QLaw,
) ostk.astrodynamics.guidance_law.QLaw.GradientStrategy

Get the gradient strategy.

Returns:

The gradient strategy.

Return type:

QLaw.GradientStrategy

get_name(self: ostk.astrodynamics.GuidanceLaw) ostk.core.type.String

Get the name of the guidance law.

Returns:

The name of the guidance law.

Return type:

str

get_parameters(
self: ostk.astrodynamics.guidance_law.QLaw,
) ostk.astrodynamics.guidance_law.QLaw.Parameters

Get the parameters.

Returns:

The parameters.

Return type:

QLaw.Parameters

get_target_coe(
self: ostk.astrodynamics.guidance_law.QLaw,
) ostk.astrodynamics.trajectory.orbit.model.kepler.COE

Get the target COE.

Returns:

The target COE.

Return type:

COE