![]() |
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.
******************************************************************************/
/*
Impulse model header file
Author: Alex Reynolds
*/
/*
Metadata for MS GUI:
imdata = {"exclude" : True}
*/
#ifndef MODELS_ACTUATORS_MODELS_IMPULSE_MODEL_H
#define MODELS_ACTUATORS_MODELS_IMPULSE_MODEL_H
#include "simulation/Model.h"
#include "core/CartesianVector.hpp"
namespace warptwin {
/**
* @brief Impulse Model
*
* This model is used to apply a force impulsively (across a single time
* step) to generate a velocity change. It receives a commanded impulse
* and calculates the force necessary to apply it, given the current
* simulation step size. Implictly uses the simulation executive time as input.
*/
MODEL(ImpulseModel)
public:
START_PARAMS
END_PARAMS
// Model inputs
// NAME TYPE DEFAULT VALUE
START_INPUTS
/** Flag to trigger the impulse model to calculate and output a force */
SIGNAL(trigger, int, false)
/** The impulse to be applied across a single timestep */
SIGNAL(impulse__f, CartesianVector3, CartesianVector3({0.0, 0.0, 0.0}))
END_INPUTS
// Model outputs
// NAME TYPE DEFAULT VALUE
START_OUTPUTS
/** The force applied for the timestep. Will read zero when trigger is false */
SIGNAL(force__f, CartesianVector3, CartesianVector3({0.0, 0.0, 0.0}))
END_OUTPUTS
protected:
int16 execute() override;
};
}
#endif