C++ Module: stochasticAtmDensity
Executive Summary
The StochasticAtmDensity module applies scalar mean-reverting stochastic noise to atmospheric density by
specializing MeanRevertingNoise. It scales incoming atmospheric
density by a stochastic multiplicative factor and republishes the perturbed atmosphere message.
Message Interfaces
Msg Variable Name |
Msg Type |
Description |
|---|---|---|
atmoDensInMsg |
Input atmosphere properties message containing baseline |
|
atmoDensOutMsg |
Output atmosphere properties message with stochastic density correction applied to |
Module Description
The inherited Ornstein-Uhlenbeck state \(x\) evolves as
The output neutral density is
All other atmospheric payload fields are passed through unchanged.
Verification and Testing
The module behavior is validated in
src/simulation/mujocoDynamics/stochasticAtmDensity/_UnitTest/test_stochasticAtmDensity.py by checking that the output
density time series has the expected OU statistics (mean, variance, and correlation time) for a constant nominal
density input.
-
class StochasticAtmDensity : public MeanRevertingNoise
- #include <stochasticAtmDensity.h>
Applies a mean-reverting (Ornstein–Uhlenbeck) correction to atmospheric density.
Derives from MeanRevertingNoise. Scales the incoming neutral density by \((1 + x)\), where \(x\) is the OU state maintained by the base class.
Public Members
-
ReadFunctor<AtmoPropsMsgPayload> atmoDensInMsg
Input atmospheric properties message.
This message is read each step to obtain the unperturbed atmospheric density and temperature before applying the stochastic correction.
-
Message<AtmoPropsMsgPayload> atmoDensOutMsg
Output atmospheric properties message.
This message is written each step with the corrected neutral density value.
Protected Functions
-
void writeOutput(uint64_t CurrentSimNanos, double x) override
Apply the OU correction factor and write output.
Called automatically by MeanRevertingNoise::UpdateState(), after the stochastic state has been updated and before the simulation advances.
- Parameters:
CurrentSimNanos – Current simulation time in nanoseconds.
x – Current value of the scalar mean-reverting correction factor.
-
ReadFunctor<AtmoPropsMsgPayload> atmoDensInMsg