![]() |
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.
******************************************************************************/
/*
Point mass gravity model header file
Author: Alex Reynolds
*/
/*
Metadata for MS GUI:
imdata = {"exclude" : True}
*/
#ifndef MODELS_STATES_RANGE_AZ_EL_SENSOR_MODEL_H
#define MODELS_STATES_RANGE_AZ_EL_SENSOR_MODEL_H
#include "constants/unitutils.h"
#include "simulation/Model.h"
#include "frames/Frame.h"
#include "frames/Node.h"
#include "frames/frameutils.h"
namespace warptwin {
/**
* @brief Model to calculate range, range rate, azimuth, and elevation given a frame state output
*
* This model is a simple range, range rate, azimuth, and
* elevation sensor model. It uses the relative position
* and interial velocity between two frames to compute the
* listed parameters.
*
* Parameters are defined as follows:
* AZIMUTH is defined relative to the +Y vector
* ELEVATION is defined relative to the X-Y plane
* This makes the model follow the behavior exhibited by a ground station
* in the ENU frame.
*
* This model does not care about frame particulars. It will
* give you answers relative to the frame you've provided.
*/
MODEL(RangeAzElSensorModel)
public:
// Model params
// NAME TYPE DEFAULT VALUE
START_PARAMS
/** This is the elevation mask value, in radians, for the sensor. Default is zero degrees*/
SIGNAL(elevation_mask_rad, double, 0.0)
/** This is the low-end azimuth mask value, in radians, for the sensor. Default is no mask*/
SIGNAL(azimuth_mask_low, double, -warpos::TWO_PI)
/** This is the high-end azimuth mask value, in radians, for the sensor. Default is no mask*/
SIGNAL(azimuth_mask_high, double, warpos::TWO_PI)
END_PARAMS
// Model inputs
// NAME TYPE DEFAULT VALUE
START_INPUTS
/** The position of the object body in given reference frame */
SIGNAL(pos_obj__ref, CartesianVector3, CartesianVector3({0.0, 0.0, 0.0}))
/** The inertial velocity of the object relative to the reference frame origin,
* reepresented in reference frame coordinates*/
SIGNAL(vel_obj__ref, CartesianVector3, CartesianVector3({0.0, 0.0, 0.0}))
END_INPUTS
// Model outputs
// NAME TYPE DEFAULT VALUE
START_OUTPUTS
/** This is the range of the input object to the frame. Will be zero if masked.*/
SIGNAL(range, double, 0.0)
/** This is the range rate of the input object to the frame. Will be zero if masked.*/
SIGNAL(range_rate, double, 0.0)
/** This is the azimuth of the object wrt the frame x vector, in radians. Will be zero if masked */
SIGNAL(azimuth, double, 0.0)
/** This is the elevation of the object wrt the frame x-y plane, in radians. Will be zero if masked. */
SIGNAL(elevation, double, 0.0)
/** This is the mask flag for the ground station. True for masked, False for visible */
SIGNAL(masked, bool, true)
END_OUTPUTS
protected:
int16 execute() override;
};
}
#endif