Module: zeroWindModel
Executive Summary
Zero wind model representing atmospheric conditions with no wind perturbations beyond co-rotation. The module is a sub-class of the Module: windBase base class. See that class for the nominal messages used and general instructions.
Module Description
The ZeroWindModel computes atmospheric wind velocity due solely to planetary co-rotation. For a spacecraft at
inertial position \(\mathbf{r}_{BP,N}\) relative to the planet center, the co-rotating atmosphere velocity
\(\mathbf{v}_{\mathrm{corot},N}\) is:
where \(\boldsymbol{\omega}_{P/N}\) is the planet angular velocity in the inertial frame (default: Earth rotation rate of \(7.292115\times 10^{-5}\) rad/s).
The output WindMsgPayload contains:
v_air_N: Full air velocity = co-rotating velocity (sincev_wind_N= 0)v_wind_N: Wind perturbation velocity = 0 (no additional wind)
Planet angular velocity can be set manually via setPlanetOmega_N() or automatically derived from SPICE
when J20002Pfix_dot is available.
User Guide
Setup
Import the module and create an instance:
from Basilisk.simulation import zeroWindModel
windModel = zeroWindModel.ZeroWindModel()
Connect the required input messages:
# Connect planet state message (from SPICE interface)
windModel.planetPosInMsg.subscribeTo(planetStateMsg)
# Add spacecraft to track
windModel.addSpacecraftToModel(scStateMsg)
Configuration
Set planet angular velocity (default: Earth rotation rate):
import numpy as np
omega = np.array([0.0, 0.0, 7.292115e-5]) # [rad/s]
windModel.setPlanetOmega_N(omega)
Enable/disable SPICE-derived angular velocity (default: enabled):
windModel.setUseSpiceOmegaFlag(True) # Use SPICE when available
windModel.setUseSpiceOmegaFlag(False) # Use only manual value
See Module: windBase for details on the SPICE vs. manual omega selection logic.
Message Connection Descriptions
The following table lists all the module specific input and output messages. The module msg connection is set by the user from python. The msg type contains a link to the message structure definition, while the description provides information on what this message is used for.
Msg Variable Name |
Msg Type |
Description |
|---|---|---|
planetPosInMsg |
Planet SPICE state input message used to compute spacecraft position relative to planet and derive planet angular velocity |
|
scStateInMsgs |
Array of SCStatesMsgPayload |
Spacecraft state input messages (vector). Use |
envOutMsgs |
Array of WindMsgPayload |
Wind velocity output messages (vector). Automatically created when spacecraft are added. |
-
class ZeroWindModel : public WindBase
- #include <zeroWindModel.h>
Zero wind model.
This model represents a zero wind condition, where the only atmospheric motion comes from the co-rotating atmosphere (handled by WindBase). The wind perturbation component v_wind_N is always zero.
The module is a sub-class of
windBase. See that class for the nominal messages used and setup instructions.Private Functions
-
void evaluateWindModel(WindMsgPayload *msg, const Eigen::Vector3d &r_BP_N, const Eigen::Vector3d &v_corotatingAir_N, double currentTime) override
Evaluates the wind velocity at the spacecraft position.
This sets
v_wind_Nto zero since there are no wind perturbations. The co-rotating atmosphere component is handled by WindBase.- Parameters:
msg – Wind output message to populate.
r_BP_N – Spacecraft position relative to planet in inertial frame [m].
v_corotatingAir_N – Co-rotating atmosphere velocity [m/s] in N frame.
currentTime – Current simulation time (s) - unused in this model.
-
void evaluateWindModel(WindMsgPayload *msg, const Eigen::Vector3d &r_BP_N, const Eigen::Vector3d &v_corotatingAir_N, double currentTime) override