Post · 4 min read· pp. 486–489

aerosandbox.dynamics.point_mass.point_2D

Submodules

Classes

Package Contents

class aerosandbox.dynamics.point_mass.point_2D.DynamicsPointMass2DCartesian(mass_props=None, x_e=0, z_e=0, u_e=0, w_e=0, alpha=0) : Bases: aerosandbox.dynamics.point_mass.point_3D.cartesian.DynamicsPointMass3DCartesian

code
Dynamics instance:
\* simulating a point mass
\* in 2D
\* with velocity parameterized in Cartesian coordinates

State variables:
:   x\_e: x-position, in Earth axes. [meters]
    z\_e: z-position, in Earth axes. [meters]
    u\_e: x-velocity, in Earth axes. [m/s]
    w\_e: z-velocity, in Earth axes. [m/s]

Indirect control variables:
:   alpha: Angle of attack. [degrees]

Control variables:
:   Fx\_e: Force along the Earth-x axis. [N]
    Fz\_e: Force along the Earth-z axis. [N]

Parameters:
:   - **mass\_props** ([*aerosandbox.weights.mass\_properties.MassProperties*](/u/921f7ad402625b18#aerosandbox-weights-mass-properties-massproperties)) –
    - **x\_e** (*Union**[**float**,* *aerosandbox.numpy.ndarray**]*) –
    - **z\_e** (*Union**[**float**,* *aerosandbox.numpy.ndarray**]*) –
    - **u\_e** (*Union**[**float**,* *aerosandbox.numpy.ndarray**]*) –
    - **w\_e** (*Union**[**float**,* *aerosandbox.numpy.ndarray**]*) –
    - **alpha** (*Union**[**float**,* *aerosandbox.numpy.ndarray**]*) –

mass\_props
:   For each state variable, self.state\_var = state\_var

    For each indirect control variable, self.indirect\_control\_var = indirect\_control\_var

    For each control variable, self.control\_var = 0

x\_e *= 0*

y\_e *= 0*

z\_e *= 0*

u\_e *= 0*

v\_e *= 0*

w\_e *= 0*

alpha *= 0*

beta *= 0*

bank *= 0*

Fx\_e *= 0*

Fy\_e *= 0*

Fz\_e *= 0*

*property* state*: Dict[str, float | aerosandbox.numpy.ndarray]*
:   Returns the state variables of this Dynamics instance as a Dict.

    Keys are strings that give the name of the variables.
    Values are the variables themselves.

    This method should look something like:
    :   ```default

{ "x_e": self.x_e, "u_e": self.u_e, ... }

code

        Return type:
        :   Dict[str, Union[float, aerosandbox.numpy.ndarray]]

    *property* control\_variables*: Dict[str, float | aerosandbox.numpy.ndarray]*
    :   Return type:
        :   Dict[str, Union[float, aerosandbox.numpy.ndarray]]

    state\_derivatives()
    :   A function that returns the derivatives with respect to time of the state specified in the state property.

        Should return a Dict with the same keys as the state property.

        Return type:
        :   Dict[str, Union[float, aerosandbox.numpy.ndarray]]

<a id="aerosandbox.dynamics.point_mass.point_2D.DynamicsPointMass2DSpeedGamma"></a> *class* aerosandbox.dynamics.point\_mass.point\_2D.DynamicsPointMass2DSpeedGamma(*mass\_props=None*, *x\_e=0*, *z\_e=0*, *speed=0*, *gamma=0*, *alpha=0*)
:   Bases: [`aerosandbox.dynamics.point_mass.point_3D.speed_gamma_track.DynamicsPointMass3DSpeedGammaTrack`](/u/e8628e94265ea671#aerosandbox-dynamics-point-mass-point-3d-speed-gamma-track-dynamicspointmass3dspeedgammatrack)

    Dynamics instance:
    \* simulating a point mass
    \* in 2D
    \* with velocity parameterized in speed-gamma space.

    State variables:
    :   x\_e: x-position, in Earth axes. [meters]
        z\_e: z-position, in Earth axes. [meters]
        speed: Speed; equivalent to u\_w, the x-velocity in wind axes. [m/s]
        gamma: Flight path angle. [rad]

    Indirect control variables:
    :   alpha: Angle of attack. [degrees]

    Control variables:
    :   Fx\_w: Force along the wind-x axis. [N]
        Fz\_w: Force along the wind-z axis. [N]

    Parameters:
    :   - **mass\_props** ([*aerosandbox.weights.mass\_properties.MassProperties*](/u/921f7ad402625b18#aerosandbox-weights-mass-properties-massproperties)) –
        - **x\_e** (*Union**[**float**,* *aerosandbox.numpy.ndarray**]*) –
        - **z\_e** (*Union**[**float**,* *aerosandbox.numpy.ndarray**]*) –
        - **speed** (*Union**[**float**,* *aerosandbox.numpy.ndarray**]*) –
        - **gamma** (*Union**[**float**,* *aerosandbox.numpy.ndarray**]*) –
        - **alpha** (*Union**[**float**,* *aerosandbox.numpy.ndarray**]*) –

    mass\_props
    :   For each state variable, self.state\_var = state\_var

        For each indirect control variable, self.indirect\_control\_var = indirect\_control\_var

        For each control variable, self.control\_var = 0

    x\_e *= 0*

    y\_e *= 0*

    z\_e *= 0*

    speed *= 0*

    gamma *= 0*

    track *= 0*

    bank *= 0*

    alpha *= 0*

    beta *= 0*

    Fx\_w *= 0*

    Fy\_w *= 0*

    Fz\_w *= 0*

    *property* state*: Dict[str, float | aerosandbox.numpy.ndarray]*
    :   Returns the state variables of this Dynamics instance as a Dict.

        Keys are strings that give the name of the variables.
        Values are the variables themselves.

        This method should look something like:
        :   ```default
>>> {
>>>     "x_e": self.x_e,
>>>     "u_e": self.u_e,
>>>     ...
>>> }
code
    Return type:
    :   Dict[str, Union[float, aerosandbox.numpy.ndarray]]

*property* control\_variables*: Dict[str, float | aerosandbox.numpy.ndarray]*
:   Return type:
    :   Dict[str, Union[float, aerosandbox.numpy.ndarray]]

state\_derivatives()
:   A function that returns the derivatives with respect to time of the state specified in the state property.

    Should return a Dict with the same keys as the state property.

    Return type:
    :   Dict[str, Union[float, aerosandbox.numpy.ndarray]]