This group of functions is available for manipulating VSPAERO control surface groups through the API. Note, VSPAERO also includes rectangle type sub-surfaces as possible control surfaces.
Click here to return to the main page.
More...
◆ AddAllToVSPAEROControlSurfaceGroup()
void AddAllToVSPAEROControlSurfaceGroup |
( |
int |
CSGroupIndex | ) |
|
Add all available control surfaces to the control surface group at the specified index
string wid =
AddGeom(
"WING",
"" );
- Parameters
-
[in] | CSGroupIndex | Index of the control surface group |
◆ AddSelectedToCSGroup()
void AddSelectedToCSGroup |
( |
int@ [] |
selected, |
|
|
int |
CSGroupIndex |
|
) |
| |
Add each control surfaces in the array of control surface indexes to the control surface group at the specified index.
- Warning
- The indexes in input "selected" must be matched with available control surfaces identified by GetAvailableCSNameVec. The "selected" input uses one- based indexing to associate available control surfaces.
string wid =
AddGeom(
"WING",
"" );
for ( int i = 0; i < cs_name_vec.size(); i++ )
{
cs_ind_vec[i] = i + 1;
}
- See also
- GetAvailableCSNameVec
- Parameters
-
[in] | selected | Array of control surface indexes to add to the group. Note, the integer values are one based. |
[in] | CSGroupIndex | Index of the control surface group |
◆ AutoGroupVSPAEROControlSurfaces()
void AutoGroupVSPAEROControlSurfaces |
( |
| ) |
|
Creates the initial default grouping for the control surfaces. The initial grouping collects all surface copies of the sub-surface into a single group. For example if a wing is defined with an aileron and that wing is symmetrical about the xz plane there will be a surface copy of the master wing surface as well as a copy of the sub-surface. The two sub-surfaces may get deflected differently during analysis routines and can be identified uniquely by their full name.
string wid =
AddGeom(
"WING",
"" );
string vert_id =
AddGeom(
"WING" );
TEST_ASSERT( !vsp::ErrorMgr.PopErrorAndPrint( stdout ) );
printf( "COMPLETE\n" );
printf( "\tSetting control surface group deflection angles..." );
TEST_ASSERT( !vsp::ErrorMgr.PopErrorAndPrint( stdout ) );
string deflection_gain_id;
deflection_gain_id =
vsp::FindParm( control_group_settings_container_id,
"Surf_" + aileron_id +
"_0_Gain",
"ControlSurfaceGroup_0" );
deflection_gain_id =
vsp::FindParm( control_group_settings_container_id,
"Surf_" + aileron_id +
"_1_Gain",
"ControlSurfaceGroup_0" );
string deflection_angle_id =
vsp::FindParm( control_group_settings_container_id,
"DeflectionAngle",
"ControlSurfaceGroup_0" );
- See also
- CreateVSPAEROControlSurfaceGroup
◆ CreateVSPAEROControlSurfaceGroup()
int CreateVSPAEROControlSurfaceGroup |
( |
| ) |
|
Add a new VSPAERO control surface group using the default naming convention. The control surface group will not contain any control surfaces until they are added.
string wid =
AddGeom(
"WING",
"" );
if ( num_group != 1 ) {
Print(
"Error: CreateVSPAEROControlSurfaceGroup" ); }
- See also
- AddSelectedToCSGroup
- Returns
- Index of the new VSPAERO control surface group
◆ GetActiveCSNameVec()
string [] GetActiveCSNameVec |
( |
int |
CSGroupIndex | ) |
|
Get the names of each active (used) control surface in the control surface group at the specified index
string wid =
AddGeom(
"WING",
"" );
Print(
"Active CS in Group Index #",
false );
for ( int i = 0; i < cs_name_vec.size(); i++ )
{
}
- Parameters
-
[in] | CSGroupIndex | Index of the control surface group |
- Returns
- Array of active control surface names
◆ GetAvailableCSNameVec()
string [] GetAvailableCSNameVec |
( |
int |
CSGroupIndex | ) |
|
Get the names of each available (not used) control surface in the control surface group at the specified index
string wid =
AddGeom(
"WING",
"" );
cs_ind_vec[0] = 1;
- Parameters
-
[in] | CSGroupIndex | Index of the control surface group |
- Returns
- Array of active control surface names
◆ GetCompleteCSNameVec()
string [] GetCompleteCSNameVec |
( |
| ) |
|
Get the names of all control surfaces. Some may be active (used) while others may be available.
string wid =
AddGeom(
"WING",
"" );
Print(
"All Control Surfaces: ",
false );
for ( int i = 0; i < cs_name_vec.size(); i++ )
{
}
- Returns
- Array of all control surface names
◆ GetNumControlSurfaceGroups()
int GetNumControlSurfaceGroups |
( |
| ) |
|
Get the total number of control surface groups
string wid =
AddGeom(
"WING",
"" );
string horz_id =
AddGeom(
"WING" );
if ( num_group != 2 ) {
Print(
"Error: GetNumControlSurfaceGroups" ); }
- Returns
- Number of control surface groups
◆ GetVSPAEROControlGroupName()
string GetVSPAEROControlGroupName |
( |
int |
CSGroupIndex | ) |
|
Get the name of the control surface group at the specified index
string wid =
AddGeom(
"WING",
"" );
Print(
"CS Group name: ",
false );
- Parameters
-
[in] | CSGroupIndex | Index of the control surface group |
◆ RemoveAllFromVSPAEROControlSurfaceGroup()
void RemoveAllFromVSPAEROControlSurfaceGroup |
( |
int |
CSGroupIndex | ) |
|
Remove all used control surfaces from the control surface group at the specified index
string wid =
AddGeom(
"WING",
"" );
- Parameters
-
[in] | CSGroupIndex | Index of the control surface group |
◆ RemoveSelectedFromCSGroup()
void RemoveSelectedFromCSGroup |
( |
int@ [] |
selected, |
|
|
int |
CSGroupIndex |
|
) |
| |
Remove each control surfaces in the array of control surface indexes from the control surface group at the specified index.
- Warning
- The indexes in input "selected" must be matched with active control surfaces identified by GetActiveCSNameVec. The "selected" input uses one-based indexing to associate available control surfaces.
string wid =
AddGeom(
"WING",
"" );
- See also
- GetActiveCSNameVec
- Parameters
-
[in] | selected | Array of control surface indexes to remove from the group. Note, the integer values are one based. |
[in] | CSGroupIndex | Index of the control surface group |
◆ SetVSPAEROControlGroupName()
void SetVSPAEROControlGroupName |
( |
const string &in |
name, |
|
|
int |
CSGroupIndex |
|
) |
| |
Set the name for the control surface group at the specified index
string wid =
AddGeom(
"WING",
"" );
Print(
"CS Group name: ",
false );
- Parameters
-
[in] | name | Name to set for the control surface group |
[in] | CSGroupIndex | Index of the control surface group |