![]() |
WarpTwin
Documentation for WarpTwin models and classes.
|
/******************************************************************************
* Copyright (c) ATTX INC 2025. All Rights Reserved.
*
* This software and associated documentation (the "Software") are the
* proprietary and confidential information of ATTX, INC. The Software is
* furnished under a license agreement between ATTX and the user organization
* and may be used or copied only in accordance with the terms of the agreement.
* Refer to 'license/attx_license.adoc' for standard license terms.
*
* EXPORT CONTROL NOTICE: THIS SOFTWARE MAY INCLUDE CONTENT CONTROLLED UNDER THE
* INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) OR THE EXPORT ADMINISTRATION
* REGULATIONS (EAR99). No part of the Software may be used, reproduced, or
* transmitted in any form or by any means, for any purpose, without the express
* written permission of ATTX, INC.
******************************************************************************/
/*
Flat plate drag model header file
Author: Alex Reynolds
*/
/*
Metadata for MS GUI:
imdata = {"displayname" : "Flat Plate Aero. Drag",
"exclude" : False,
"category" : "Dynamics"
}
aliases = {"cd" : "Drag Coefficient",
"area" : "S.C. Frontal Area",
"density" : "Atmos. Density",
"wind_velo__f" : "Velo. WRT Wind",
"body_mass" : "Spacecraft Mass",
"drag_force__f" : "Drag Force"
}
*/
#ifndef MODELS_ACTUATORS_FLAT_PLATE_DRAG_MODEL_H
#define MODELS_ACTUATORS_FLAT_PLATE_DRAG_MODEL_H
#include "simulation/Model.h"
#include "frames/Frame.h"
#include "frames/Node.h"
#include "frames/frameutils.h"
namespace warptwin {
/**
* @brief Simplified atmospheric drag model which produces a drag force opposite the wind relative velocity
*/
MODEL(FlatPlateDragModel)
public:
// Model params
// NAME TYPE DEFAULT VALUE
START_PARAMS
/** The coefficient of drag for the object. Default value is 1.0 */
SIGNAL(cd, double, 1.0)
END_PARAMS
// Model inputs
// NAME TYPE DEFAULT VALUE
START_INPUTS
/** The current frontal area of the object (normal to oncoming wind).
Default is 1.0 m^2 */
SIGNAL(area, double, 1.0)
/** The current atmospheric density, in default units kg/m^3 */
SIGNAL(density, double, 0.0)
/** The velocity of the object in the wind frame. NOTE: This is not the
* relative wind. It is the velocity of the spacecraft in the wind frame */
SIGNAL(wind_velo__f, CartesianVector3, CartesianVector3({0.0, 0.0, 0.0}))
END_INPUTS
// Model outputs
// NAME TYPE DEFAULT VALUE
START_OUTPUTS
/** The drag force on the object. Output is in the same frame as the wind velocity vector.
Default units are N. */
SIGNAL(drag_force__f, CartesianVector3, CartesianVector3({0.0, 0.0, 0.0}))
END_OUTPUTS
protected:
int16 execute() override;
};
}
#endif