Functions | |
TiglReturnCode | tiglControlSurfaceGetControlParameter (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, double *controlParameter) |
Returns the current value for the control parameter of a control device. More... | |
TiglReturnCode | tiglControlSurfaceGetDeflection (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, double *deflection) |
This function is deprecated. It has been renamed to tiglControlSurfaceGetControlParameter. More... | |
TiglReturnCode | tiglControlSurfaceGetMaximumControlParameter (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, double *maxParameter) |
Returns the maximum value for the control parameter of a control device. More... | |
TiglReturnCode | tiglControlSurfaceGetMaximumDeflection (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, double *maxDeflection) |
This function is deprecated. It has been renamed to tiglControlSurfaceGetMaximumControlParameter. More... | |
TiglReturnCode | tiglControlSurfaceGetMinimumControlParameter (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, double *minParameter) |
Returns the minimum value for the control parameter of a control device. More... | |
TiglReturnCode | tiglControlSurfaceGetMinimumDeflection (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, double *minDeflection) |
This function is deprecated. It has been renamed to tiglControlSurfaceGetMinimumControlParameter. More... | |
TiglReturnCode | tiglControlSurfaceSetControlParameter (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, double controlParameter) |
Sets the current value for the control parameter of a control device. More... | |
TiglReturnCode | tiglControlSurfaceSetDeflection (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, double deflection) |
This function is deprecated. It has been renamed to tiglControlSurfaceSetControlParameter. More... | |
TiglReturnCode | tiglGetControlSurfaceCount (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, int *numControlSurfaces) |
Returns the number of control surfaces belonging to a component segment. More... | |
TiglReturnCode | tiglGetControlSurfaceType (TiglCPACSConfigurationHandle cpacsHandle, const char *controlSurfaceUID, TiglControlSurfaceType *controlSurfaceType) |
Returns the type of a control surface given its UID. More... | |
TiglReturnCode | tiglGetControlSurfaceUID (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, int controlSurfaceIndex, char **controlSurfaceUID) |
Returns the UID of a control surface given its index in a component segment. More... | |
TiglReturnCode | tiglGetWingCount (TiglCPACSConfigurationHandle cpacsHandle, int *wingCountPtr) |
Returns the number of wings in a CPACS configuration. More... | |
TiglReturnCode | tiglWingComponentSegmentComputeEtaIntersection (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, double csEta1, double csXsi1, double csEta2, double csXsi2, double eta, double *xsi, TiglBoolean *hasWarning) |
This function is deprecated. Use the generalized function tiglWingInterpolateXsi. More... | |
TiglReturnCode | tiglWingComponentSegmentFindSegment (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, double x, double y, double z, char **segmentUID, char **wingUID) |
Returns the segmentUID and wingUID for a given point on a componentSegment. The returned strings must not be freed by the user anymore. More... | |
TiglReturnCode | tiglWingComponentSegmentGetNumberOfSegments (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, int *nsegments) |
Returns the number of segments belonging to a component segment. More... | |
TiglReturnCode | tiglWingComponentSegmentGetPoint (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, double eta, double xsi, double *x, double *y, double *z) |
Returns x,y,z coordinates for a given eta and xsi on a componentSegment. More... | |
TiglReturnCode | tiglWingComponentSegmentGetSegmentIntersection (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, const char *segmentUID, double csEta1, double csXsi1, double csEta2, double csXsi2, double segmentEta, double *segmentXsi, TiglBoolean *hasWarning) |
This function is deprecated. Use the generalized function tiglWingInterpolateXsi. More... | |
TiglReturnCode | tiglWingComponentSegmentGetSegmentUID (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, int segmentIndex, char **segmentUID) |
Returns the segment UID of a segment belonging to a component segment. The segment is specified with its index, which is in the 1...nsegments. The number of segments nsegments can be queried with tiglWingComponentSegmentGetNumberOfSegments. More... | |
TiglReturnCode | tiglWingComponentSegmentPointGetEtaXsi (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, double pX, double pY, double pZ, double *eta, double *xsi, double *errorDistance) |
Projects a points onto the chord face of the wing component segment and returns the eta/xsi coordinates of the point of projection. More... | |
TiglReturnCode | tiglWingComponentSegmentPointGetSegmentEtaXsi (TiglCPACSConfigurationHandle cpacsHandle, const char *componentSegmentUID, double eta, double xsi, char **wingUID, char **segmentUID, double *segmentEta, double *segmentXsi) |
Returns eta, xsi, segmentUID and wingUID for a given eta and xsi on a componentSegment. More... | |
TiglReturnCode | tiglWingGetChordNormal (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, double eta, double xsi, double *normalXPtr, double *normalYPtr, double *normalZPtr) |
Returns a normal vector on the wing chord surface for a a given wing and segment index. More... | |
TiglReturnCode | tiglWingGetChordPoint (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, double eta, double xsi, double *pointXPtr, double *pointYPtr, double *pointZPtr) |
Returns a point on the wing chord surface for a a given wing and segment index. More... | |
TiglReturnCode | tiglWingGetComponentSegmentCount (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int *compSegmentCountPtr) |
Returns the number of component segments for a wing in a CPACS configuration. More... | |
TiglReturnCode | tiglWingGetComponentSegmentIndex (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, const char *compSegmentUID, int *segmentIndexPtr) |
Returns the Index of a component segment of a wing. More... | |
TiglReturnCode | tiglWingGetComponentSegmentUID (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int compSegmentIndex, char **uidNamePtr) |
Returns the UID of a component segment of a wing. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed. More... | |
TiglReturnCode | tiglWingGetIndex (TiglCPACSConfigurationHandle cpacsHandle, const char *wingUID, int *wingIndexPtr) |
Returns the Index of a wing. More... | |
TiglReturnCode | tiglWingGetInnerConnectedSegmentCount (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, int *segmentCountPtr) |
Returns the count of wing segments connected to the inner section of a given segment. More... | |
TiglReturnCode | tiglWingGetInnerConnectedSegmentIndex (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, int n, int *connectedIndexPtr) |
Returns the index (number) of the n-th wing segment connected to the inner section of a given segment. n starts at 1. More... | |
TiglReturnCode | tiglWingGetInnerSectionAndElementIndex (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, int *sectionIndexPtr, int *elementIndexPtr) |
Returns the section index and section element index of the inner side of a given wing segment. More... | |
TiglReturnCode | tiglWingGetInnerSectionAndElementUID (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, char **sectionUIDPtr, char **elementUIDPtr) |
Returns the section UID and section element UID of the inner side of a given wing segment. More... | |
TiglReturnCode | tiglWingGetLowerPoint (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, double eta, double xsi, double *pointXPtr, double *pointYPtr, double *pointZPtr) |
Returns a point on the lower wing surface for a a given wing and segment index. More... | |
TiglReturnCode | tiglWingGetLowerPointAtDirection (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, double eta, double xsi, double dirx, double diry, double dirz, double *pointXPtr, double *pointYPtr, double *pointZPtr, double *errorDistance) |
Returns a point on the lower wing surface for a a given wing and segment index. This function is different from tiglWingGetLowerPoint: First, a point on the wing chord surface is computed (defined by segment index and eta,xsi). Then, a line is constructed, which is defined by this point and a direction given by the user. The intersection of this line with the lower wing surface is finally returned. The point is returned in absolute world coordinates. More... | |
TiglReturnCode | tiglWingGetMAC (TiglCPACSConfigurationHandle cpacsHandle, const char *wingUID, double *mac_chord, double *mac_x, double *mac_y, double *mac_z) |
This function calculates location of the quarter of mean aerodynamic chord, and gives the chord length as well. More... | |
TiglReturnCode | tiglWingGetOuterConnectedSegmentCount (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, int *segmentCountPtr) |
Returns the count of wing segments connected to the outer section of a given segment. More... | |
TiglReturnCode | tiglWingGetOuterConnectedSegmentIndex (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, int n, int *connectedIndexPtr) |
Returns the index (number) of the n-th wing segment connected to the outer section of a given segment. n starts at 1. More... | |
TiglReturnCode | tiglWingGetOuterSectionAndElementIndex (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, int *sectionIndexPtr, int *elementIndexPtr) |
Returns the section index and section element index of the outer side of a given wing segment. More... | |
TiglReturnCode | tiglWingGetOuterSectionAndElementUID (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, char **sectionUIDPtr, char **elementUIDPtr) |
Returns the section UID and section element UID of the outer side of a given wing segment. More... | |
TiglReturnCode | tiglWingGetProfileName (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int sectionIndex, int elementIndex, char **profileNamePtr) |
Returns the name of a wing profile. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed. More... | |
TiglReturnCode | tiglWingGetSectionCount (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int *sectionCount) |
Returns the number of sections of a wing. More... | |
TiglReturnCode | tiglWingGetSectionUID (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int sectionIndex, char **uidNamePtr) |
Returns the UID of a section of a wing. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed. More... | |
TiglReturnCode | tiglWingGetSegmentCount (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int *segmentCountPtr) |
Returns the number of segments for a wing in a CPACS configuration. More... | |
TiglReturnCode | tiglWingGetSegmentEtaXsi (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, double pointX, double pointY, double pointZ, int *segmentIndex, double *eta, double *xsi, int *isOnTop) |
Inverse function to tiglWingGetLowerPoint and tiglWingGetLowerPoint. Calculates to a point (x,y,z) in global coordinates the wing segment coordinates and the wing segment index. More... | |
TiglReturnCode | tiglWingGetSegmentIndex (TiglCPACSConfigurationHandle cpacsHandle, const char *segmentUID, int *segmentIndexPtr, int *wingIndexPtr) |
Returns the Index of a segment of a wing. More... | |
TiglReturnCode | tiglWingGetSegmentUID (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, char **uidNamePtr) |
Returns the UID of a segment of a wing. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed. More... | |
TiglReturnCode | tiglWingGetSpan (TiglCPACSConfigurationHandle cpacsHandle, const char *wingUID, double *pSpan) |
Returns the span of a wing. More... | |
TiglReturnCode | tiglWingGetSymmetry (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, TiglSymmetryAxis *symmetryAxisPtr) |
Returns the Symmetry Enum if the wing has symmetry-axis. More... | |
TiglReturnCode | tiglWingGetUID (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, char **uidNamePtr) |
Returns the UID of a wing. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed. More... | |
TiglReturnCode | tiglWingGetUpperPoint (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, double eta, double xsi, double *pointXPtr, double *pointYPtr, double *pointZPtr) |
Returns a point on the upper wing surface for a a given wing and segment index. More... | |
TiglReturnCode | tiglWingGetUpperPointAtDirection (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, double eta, double xsi, double dirx, double diry, double dirz, double *pointXPtr, double *pointYPtr, double *pointZPtr, double *errorDistance) |
Returns a point on the upper wing surface for a a given wing and segment index. This function is different from tiglWingGetUpperPoint: First, a point on the wing chord surface is computed (defined by segment index and eta,xsi). Then, a line is constructed, which is defined by this point and a direction given by the user. The intersection of this line with the upper wing surface is finally returned. The point is returned in absolute world coordinates. More... | |
TiglReturnCode | tiglWingInterpolateXsi (TiglCPACSConfigurationHandle cpacsHandle, const char *firstUID, double firstEta, double firstXsi, const char *secondUID, double secondEta, double secondXsi, const char *intersectionUID, double intersectionEta, double *intersectionXsi, TiglBoolean *hasWarning) |
Given a straight line in space defined by a pair of segment / component segment (eta,xsi) coordinates, the function computes the intersection of the line with an iso-eta line of a segment or component segment. More... | |
TiglReturnCode | tiglWingSegmentPointGetComponentSegmentEtaXsi (TiglCPACSConfigurationHandle cpacsHandle, const char *segmentUID, const char *componentSegmentUID, double segmentEta, double segmentXsi, double *eta, double *xsi) |
Returns eta, xsi coordinates of a componentSegment given segmentEta and segmentXsi on a wing segment. More... | |
TiglReturnCode | tiglWingSetGetPointBehavior (TiglCPACSConfigurationHandle cpacsHandle, TiglGetPointBehavior behavior) |
Sets the behavior of the tiglWingGetUpperPoint and tiglWingGetLowerPoint functions. More... | |
Function to handle wing geometry's with TIGL.
TiglReturnCode tiglControlSurfaceGetControlParameter | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | controlSurfaceUID, | ||
double * | controlParameter | ||
) |
Returns the current value for the control parameter of a control device.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | controlSurfaceUID | UID of the control surface |
[out] | controlParameter | Value for the controlParameter |
TiglReturnCode tiglControlSurfaceGetDeflection | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | controlSurfaceUID, | ||
double * | deflection | ||
) |
This function is deprecated. It has been renamed to tiglControlSurfaceGetControlParameter.
TiglReturnCode tiglControlSurfaceGetMaximumControlParameter | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | controlSurfaceUID, | ||
double * | maxParameter | ||
) |
Returns the maximum value for the control parameter of a control device.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | controlSurfaceUID | UID of the control surface |
[out] | maxParameter | Maximum value for the control parameter |
TiglReturnCode tiglControlSurfaceGetMaximumDeflection | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | controlSurfaceUID, | ||
double * | maxDeflection | ||
) |
This function is deprecated. It has been renamed to tiglControlSurfaceGetMaximumControlParameter.
TiglReturnCode tiglControlSurfaceGetMinimumControlParameter | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | controlSurfaceUID, | ||
double * | minParameter | ||
) |
Returns the minimum value for the control parameter of a control device.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | controlSurfaceUID | UID of the control surface |
[out] | minParameter | Minimum value for the control parameter |
TiglReturnCode tiglControlSurfaceGetMinimumDeflection | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | controlSurfaceUID, | ||
double * | minDeflection | ||
) |
This function is deprecated. It has been renamed to tiglControlSurfaceGetMinimumControlParameter.
TiglReturnCode tiglControlSurfaceSetControlParameter | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | controlSurfaceUID, | ||
double | controlParameter | ||
) |
Sets the current value for the control parameter of a control device.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | controlSurfaceUID | UID of the control surface |
[out] | controlParameter | Value for the control parameter |
TiglReturnCode tiglControlSurfaceSetDeflection | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | controlSurfaceUID, | ||
double | deflection | ||
) |
This function is deprecated. It has been renamed to tiglControlSurfaceSetControlParameter.
TiglReturnCode tiglGetControlSurfaceCount | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | componentSegmentUID, | ||
int * | numControlSurfaces | ||
) |
Returns the number of control surfaces belonging to a component segment.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | componentSegmentUID | UID of the componentSegment |
[out] | numControlSurfaces | number of control surfaces of the componentSegment |
TiglReturnCode tiglGetControlSurfaceType | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | controlSurfaceUID, | ||
TiglControlSurfaceType * | controlSurfaceType | ||
) |
Returns the type of a control surface given its UID.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | controlSurfaceUID | UID of the control surface |
[out] | controlSurfaceType | Type of the control surface |
TiglReturnCode tiglGetControlSurfaceUID | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | componentSegmentUID, | ||
int | controlSurfaceIndex, | ||
char ** | controlSurfaceUID | ||
) |
Returns the UID of a control surface given its index in a component segment.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | componentSegmentUID | UID of the componentSegment |
[in] | controlSurfaceIndex | Index of the control surface, starting at 1 |
[out] | controlSurfaceUID | UID of the control surface |
TiglReturnCode tiglGetWingCount | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int * | wingCountPtr | ||
) |
Returns the number of wings in a CPACS configuration.
[in] | cpacsHandle | Handle for the CPACS configuration |
[out] | wingCountPtr | Pointer to the number of wings |
TiglReturnCode tiglWingComponentSegmentComputeEtaIntersection | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | componentSegmentUID, | ||
double | csEta1, | ||
double | csXsi1, | ||
double | csEta2, | ||
double | csXsi2, | ||
double | eta, | ||
double * | xsi, | ||
TiglBoolean * | hasWarning | ||
) |
This function is deprecated. Use the generalized function tiglWingInterpolateXsi.
Given a straight line in space defined by a pair of component segment (eta,xsi) coordinates, the function computes the intersection of the line with a component segment iso-eta line.
The function is similar to tiglWingComponentSegmentGetSegmentIntersection, with the difference, that an iso-line of the component segment is used instead of an iso-line of a segment. The line is defined by its inner and outer point, both given in component segment coordinates. Typically, these might be spar positions or leading edge coordinates of flaps. The eta value for the iso-eta line should be in the range [csEta1, csEta2]. The function returns the xsi coordinate (depth coordinate) of the intersection point. This coordinate is given in the component segment coordinate system. See image below for details.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | componentSegmentUID | UID of the componentSegment |
[in] | csEta1,csEta2 | Start and end eta coordinates of the intersection line (given as component segment coordinates) |
[in] | csXsi1,csXsi2 | Start and end xsi coordinates of the intersection line (given as component segment coordinates) |
[in] | eta | Eta coordinate of the iso-eta component segment intersection line |
[out] | xsi | Xsi coordinate of the intersection point on the wing component segment |
[out] | hasWarning | The hasWarning flag is true (1), if the resulting xsi value is either outside the valid range [0,1]. It is up to the user to handle these cases properly. This flag is only valid, if the function returns TIGL_SUCCESS. |
TiglReturnCode tiglWingComponentSegmentFindSegment | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | componentSegmentUID, | ||
double | x, | ||
double | y, | ||
double | z, | ||
char ** | segmentUID, | ||
char ** | wingUID | ||
) |
Returns the segmentUID and wingUID for a given point on a componentSegment. The returned strings must not be freed by the user anymore.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | componentSegmentUID | UID of the componentSegment to search for |
[in] | x,y,z | Coordinates of the point of the componentSegment |
[out] | segmentUID | UID of the segment that fits to the given point and componentSegment. In contrast to old releases, the returned string must not be freed by the user! |
[out] | wingUID | UID of the wing that fits to the given point and componentSegment In contrast to old releases, the returned string must not be freed by the user! |
TiglReturnCode tiglWingComponentSegmentGetNumberOfSegments | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | componentSegmentUID, | ||
int * | nsegments | ||
) |
Returns the number of segments belonging to a component segment.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | componentSegmentUID | UID of the componentSegment |
[out] | nsegments | Number of segments belonging to the component segment |
TiglReturnCode tiglWingComponentSegmentGetPoint | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | componentSegmentUID, | ||
double | eta, | ||
double | xsi, | ||
double * | x, | ||
double * | y, | ||
double * | z | ||
) |
Returns x,y,z coordinates for a given eta and xsi on a componentSegment.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | componentSegmentUID | UID of the componentSegment to search for |
[in] | eta,xsi | Eta and Xsi of the point of the componentSegment |
[out] | x | X coordinate of the point on the corresponding segment. |
[out] | y | Y coordinate of the point on the corresponding segment. |
[out] | z | Z coordinate of the point on the corresponding segment. |
TiglReturnCode tiglWingComponentSegmentGetSegmentIntersection | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | componentSegmentUID, | ||
const char * | segmentUID, | ||
double | csEta1, | ||
double | csXsi1, | ||
double | csEta2, | ||
double | csXsi2, | ||
double | segmentEta, | ||
double * | segmentXsi, | ||
TiglBoolean * | hasWarning | ||
) |
This function is deprecated. Use the generalized function tiglWingInterpolateXsi.
Computes the intersection of a line (defined by component segment coordinates) with an iso-eta line on a specified wing segment.
The component segment line is defined by its inner and outer point, both defined in component segment coordinates. Typically, these might be spar positions or leading edge coordinates of flaps. The segment line is defined by a iso-eta line. Typically, the intersection with a wing section would be computed (i.e. eta=1 or eta=0). The function returns the xsi coordinate (depth coordinate) of the intersection point. This coordinate is given in the segment coordinate system. See image below for details.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | componentSegmentUID | UID of the componentSegment |
[in] | segmentUID | UID of the segment, the intersection should be calculated with |
[in] | csEta1,csEta2 | Start and end eta coordinates of the intersection line (given as component segment coordinates) |
[in] | csXsi1,csXsi2 | Start and end xsi coordinates of the intersection line (given as component segment coordinates) |
[in] | segmentEta | Eta coordinate of the iso-eta segment intersection line |
[out] | segmentXsi | Xsi coordinate of the intersection point on the wing segment |
[out] | hasWarning | The hasWarning flag is true (1), if the resulting xsi value is outside the valid range [0,1]. It is up to the user to handle these cases properly. This flag is only valid, if the function returns TIGL_SUCCESS. |
TiglReturnCode tiglWingComponentSegmentGetSegmentUID | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | componentSegmentUID, | ||
int | segmentIndex, | ||
char ** | segmentUID | ||
) |
Returns the segment UID of a segment belonging to a component segment. The segment is specified with its index, which is in the 1...nsegments. The number of segments nsegments can be queried with tiglWingComponentSegmentGetNumberOfSegments.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | componentSegmentUID | UID of the componentSegment |
[in] | segmentIndex | Index of the segment (1 <= index <= nsegments) |
[out] | segmentUID | UID of the segment |
TiglReturnCode tiglWingComponentSegmentPointGetEtaXsi | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | componentSegmentUID, | ||
double | pX, | ||
double | pY, | ||
double | pZ, | ||
double * | eta, | ||
double * | xsi, | ||
double * | errorDistance | ||
) |
Projects a points onto the chord face of the wing component segment and returns the eta/xsi coordinates of the point of projection.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | componentSegmentUID | UID of the componentSegment to search for |
[in] | pX | X coordinate of the point to project |
[in] | pY | Y coordinate of the point to project |
[in] | pZ | Z coordinate of the point to project |
[out] | eta | Eta coordinate of the projected point |
[out] | xsi | Xsi coordinate of the projected point |
[out] | errorDistance | Distance between the point and the projected point on the component segment. If the point already lies on the component segment's chord face, the errorDistance should be zero! |
TiglReturnCode tiglWingComponentSegmentPointGetSegmentEtaXsi | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | componentSegmentUID, | ||
double | eta, | ||
double | xsi, | ||
char ** | wingUID, | ||
char ** | segmentUID, | ||
double * | segmentEta, | ||
double * | segmentXsi | ||
) |
Returns eta, xsi, segmentUID and wingUID for a given eta and xsi on a componentSegment.
If the given component segment point lies outside the wing chord surface, the function returns an error distance > 0. If this distance is larger than 1 mm, the point is first projected onto the segment (see image). Then, this point is transformed into segment coordinates. It is up to the user to handle this case correctly.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | componentSegmentUID | UID of the componentSegment to search for |
[in] | eta,xsi | Eta and Xsi of the point of the componentSegment |
[out] | wingUID | UID of the wing that fits to the given point and componentSegment. In contrast to old releases, the returned string must not be freed by the user! |
[out] | segmentUID | UID of the segment that fits to the given point and componentSegment. In contrast to old releases, the returned string must not be freed by the user! |
[out] | segmentEta | Eta of the point on the corresponding segment. |
[out] | segmentXsi | Xsi of the point on the corresponding segment. |
TiglReturnCode tiglWingGetChordNormal | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
int | segmentIndex, | ||
double | eta, | ||
double | xsi, | ||
double * | normalXPtr, | ||
double * | normalYPtr, | ||
double * | normalZPtr | ||
) |
Returns a normal vector on the wing chord surface for a a given wing and segment index.
Returns a normal vector on the wing chord surface in dependence of parameters eta and xsi, which range from 0.0 to 1.0.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of the wing, starting at 1 |
[in] | segmentIndex | The index of the segment of the wing, starting at 1 |
[in] | eta | eta in the range 0.0 <= eta <= 1.0 |
[in] | xsi | xsi in the range 0.0 <= xsi <= 1.0 |
[out] | normalXPtr | Pointer to the x-coordinate of the resulting normal vector |
[out] | normalYPtr | Pointer to the y-coordinate of the resulting normal vector |
[out] | normalZPtr | Pointer to the z-coordinate of the resulting normal vector |
TiglReturnCode tiglWingGetChordPoint | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
int | segmentIndex, | ||
double | eta, | ||
double | xsi, | ||
double * | pointXPtr, | ||
double * | pointYPtr, | ||
double * | pointZPtr | ||
) |
Returns a point on the wing chord surface for a a given wing and segment index.
Returns a point on the wing chord surface in dependence of parameters eta and xsi, which range from 0.0 to 1.0. For eta = 0.0, xsi = 0.0 the point is equal to the leading edge on the inner section of the given segment. For eta = 1.0, xsi = 1.0 the point is equal to the trailing edge on the outer section of the given segment. The point is returned in absolute world coordinates.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of the wing, starting at 1 |
[in] | segmentIndex | The index of the segment of the wing, starting at 1 |
[in] | eta | eta in the range 0.0 <= eta <= 1.0 |
[in] | xsi | xsi in the range 0.0 <= xsi <= 1.0 |
[out] | pointXPtr | Pointer to the x-coordinate of the point in absolute world coordinates |
[out] | pointYPtr | Pointer to the y-coordinate of the point in absolute world coordinates |
[out] | pointZPtr | Pointer to the z-coordinate of the point in absolute world coordinates |
TiglReturnCode tiglWingGetComponentSegmentCount | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
int * | compSegmentCountPtr | ||
) |
Returns the number of component segments for a wing in a CPACS configuration.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of the wing, starting at 1 |
[out] | compSegmentCountPtr | Pointer to the number of component segments |
TiglReturnCode tiglWingGetComponentSegmentIndex | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
const char * | compSegmentUID, | ||
int * | segmentIndexPtr | ||
) |
Returns the Index of a component segment of a wing.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of a wing, starting at 1 |
[in] | compSegmentUID | The uid of the wing |
[out] | segmentIndexPtr | The index of a segment, starting at 1 |
Usage example:
TiglReturnCode returnCode; int segmentIndex; returnCode = tiglWingGetComponentSegmentIndex(cpacsHandle, wing, uidName, &segmentIndex); printf("The Index of the component segment of wing %d is %d\n", wing, segmentIndex);
TiglReturnCode tiglWingGetComponentSegmentUID | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
int | compSegmentIndex, | ||
char ** | uidNamePtr | ||
) |
Returns the UID of a component segment of a wing. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of a wing, starting at 1 |
[in] | compSegmentIndex | The index of a segment, starting at 1 |
[out] | uidNamePtr | The uid of the wing |
Usage example:
TiglReturnCode returnCode; char* uidPtr = 0; returnCode = tiglWingGetComponentSegmentUID(cpacsHandle, wing, segmentID, &uidPtr); printf("The UID of the component segment of wing %d is %s\n", wing, uidPtr);
TiglReturnCode tiglWingGetIndex | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | wingUID, | ||
int * | wingIndexPtr | ||
) |
Returns the Index of a wing.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingUID | The uid of the wing |
[out] | wingIndexPtr | The index of a wing, starting at 1 |
Usage example:
TiglReturnCode returnCode; int wingIndex; returnCode = tiglWingGetUID(cpacsHandle, wingUID, &wingIndex); printf("The Index of the wing is %d\n", wingIndex);
TiglReturnCode tiglWingGetInnerConnectedSegmentCount | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
int | segmentIndex, | ||
int * | segmentCountPtr | ||
) |
Returns the count of wing segments connected to the inner section of a given segment.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of a wing, starting at 1 |
[in] | segmentIndex | The index of a segment, starting at 1 |
[out] | segmentCountPtr | Pointer to the count of connected segments |
TiglReturnCode tiglWingGetInnerConnectedSegmentIndex | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
int | segmentIndex, | ||
int | n, | ||
int * | connectedIndexPtr | ||
) |
Returns the index (number) of the n-th wing segment connected to the inner section of a given segment. n starts at 1.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of a wing, starting at 1 |
[in] | segmentIndex | The index of a segment, starting at 1 |
[in] | n | n-th segment searched, 1 <= n <= tiglWingGetInnerConnectedSegmentCount(...) |
[out] | connectedIndexPtr | Pointer to the segment index of the n-th connected segment |
TiglReturnCode tiglWingGetInnerSectionAndElementIndex | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
int | segmentIndex, | ||
int * | sectionIndexPtr, | ||
int * | elementIndexPtr | ||
) |
Returns the section index and section element index of the inner side of a given wing segment.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of a wing, starting at 1 |
[in] | segmentIndex | The index of a segment, starting at 1 |
[out] | sectionIndexPtr | The section index of the inner side |
[out] | elementIndexPtr | The section element index of the inner side |
TiglReturnCode tiglWingGetInnerSectionAndElementUID | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
int | segmentIndex, | ||
char ** | sectionUIDPtr, | ||
char ** | elementUIDPtr | ||
) |
Returns the section UID and section element UID of the inner side of a given wing segment.
Important change: The memory necessary for the two UIDs must not be freed by the user anymore.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of a wing, starting at 1 |
[in] | segmentIndex | The index of a segment, starting at 1 |
[out] | sectionUIDPtr | The section UID of the inner side |
[out] | elementUIDPtr | The section element UID of the inner side |
TiglReturnCode tiglWingGetLowerPoint | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
int | segmentIndex, | ||
double | eta, | ||
double | xsi, | ||
double * | pointXPtr, | ||
double * | pointYPtr, | ||
double * | pointZPtr | ||
) |
Returns a point on the lower wing surface for a a given wing and segment index.
Returns a point on the lower wing surface in dependence of parameters eta and xsi, which range from 0.0 to 1.0. For eta = 0.0, xsi = 0.0 the point is equal to the leading edge on the inner section of the given segment. For eta = 1.0, xsi = 1.0 the point is equal to the trailing edge on the outer section of the given segment. The point is returned in absolute world coordinates.
The behavior of this function can be modified using tiglWingSetGetPointBehavior. The options are asParametersOnSurface or onLinearLoft. For the first, the inputs are interpreted as normalized parameters on the surface and the point corresponding to these parameters is returned (default). For the second, the inputs are interpreted as eta-xsi coordinates on the chordface spanned by the leading edge and trailing edge points of the inner and outer elements.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of the wing, starting at 1 |
[in] | segmentIndex | The index of the segment of the wing, starting at 1 |
[in] | eta | eta in the range 0.0 <= eta <= 1.0 |
[in] | xsi | xsi in the range 0.0 <= xsi <= 1.0 |
[out] | pointXPtr | Pointer to the x-coordinate of the point in absolute world coordinates |
[out] | pointYPtr | Pointer to the y-coordinate of the point in absolute world coordinates |
[out] | pointZPtr | Pointer to the z-coordinate of the point in absolute world coordinates |
TiglReturnCode tiglWingGetLowerPointAtDirection | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
int | segmentIndex, | ||
double | eta, | ||
double | xsi, | ||
double | dirx, | ||
double | diry, | ||
double | dirz, | ||
double * | pointXPtr, | ||
double * | pointYPtr, | ||
double * | pointZPtr, | ||
double * | errorDistance | ||
) |
Returns a point on the lower wing surface for a a given wing and segment index. This function is different from tiglWingGetLowerPoint: First, a point on the wing chord surface is computed (defined by segment index and eta,xsi). Then, a line is constructed, which is defined by this point and a direction given by the user. The intersection of this line with the lower wing surface is finally returned. The point is returned in absolute world coordinates.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of the wing, starting at 1 |
[in] | segmentIndex | The index of the segment of the wing, starting at 1 |
[in] | eta | eta in the range 0.0 <= eta <= 1.0; eta = 0 for inner section , eta = 1 for outer section |
[in] | xsi | xsi in the range 0.0 <= xsi <= 1.0; xsi = 0 for Leading Edge, xsi = 1 for Trailing Edge |
[in] | dirx | X-component of the direction vector. |
[in] | diry | Y-component of the direction vector. |
[in] | dirz | Z-component of the direction vector. |
[out] | pointXPtr | Pointer to the x-coordinate of the point in absolute world coordinates |
[out] | pointYPtr | Pointer to the y-coordinate of the point in absolute world coordinates |
[out] | pointZPtr | Pointer to the z-coordinate of the point in absolute world coordinates |
[out] | errorDistance | If the lower surface is missed by the line, the absolute distance between line and the nearest point on the surface is returned. The distance is zero in case of successful intersection. It's up to the user to decide, if the distance is too large and the result has to be treated as an error. |
TiglReturnCode tiglWingGetMAC | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | wingUID, | ||
double * | mac_chord, | ||
double * | mac_x, | ||
double * | mac_y, | ||
double * | mac_z | ||
) |
This function calculates location of the quarter of mean aerodynamic chord, and gives the chord length as well.
It uses the classical method that can be applied to trapozaidal wings. This method is used for each segment. The values are found by taking into account of sweep and dihedral. But the effect of insidance angle is neglected. These values should coincide with the values found with tornado tool.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingUID | UID of the Wing |
[out] | mac_chord | Mean areadynamic chord length |
[out] | mac_x,mac_y,mac_z | - Position of the MAC |
TiglReturnCode tiglWingGetOuterConnectedSegmentCount | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
int | segmentIndex, | ||
int * | segmentCountPtr | ||
) |
Returns the count of wing segments connected to the outer section of a given segment.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of a wing, starting at 1 |
[in] | segmentIndex | The index of a segment, starting at 1 |
[out] | segmentCountPtr | Pointer to the count of connected segments |
TiglReturnCode tiglWingGetOuterConnectedSegmentIndex | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
int | segmentIndex, | ||
int | n, | ||
int * | connectedIndexPtr | ||
) |
Returns the index (number) of the n-th wing segment connected to the outer section of a given segment. n starts at 1.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of a wing, starting at 1 |
[in] | segmentIndex | The index of a segment, starting at 1 |
[in] | n | n-th segment searched, 1 <= n <= tiglWingGetOuterConnectedSegmentCount(...) |
[out] | connectedIndexPtr | Pointer to the segment index of the n-th connected segment |
TiglReturnCode tiglWingGetOuterSectionAndElementIndex | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
int | segmentIndex, | ||
int * | sectionIndexPtr, | ||
int * | elementIndexPtr | ||
) |
Returns the section index and section element index of the outer side of a given wing segment.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of a wing, starting at 1 |
[in] | segmentIndex | The index of a segment, starting at 1 |
[out] | sectionIndexPtr | The section index of the outer side |
[out] | elementIndexPtr | The section element index of the outer side |
TiglReturnCode tiglWingGetOuterSectionAndElementUID | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
int | segmentIndex, | ||
char ** | sectionUIDPtr, | ||
char ** | elementUIDPtr | ||
) |
Returns the section UID and section element UID of the outer side of a given wing segment.
Important change: The memory necessary for the two UIDs must not be freed by the user anymore.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of a wing, starting at 1 |
[in] | segmentIndex | The index of a segment, starting at 1 |
[out] | sectionUIDPtr | The section UID of the outer side |
[out] | elementUIDPtr | The section element UID of the outer side |
TiglReturnCode tiglWingGetProfileName | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
int | sectionIndex, | ||
int | elementIndex, | ||
char ** | profileNamePtr | ||
) |
Returns the name of a wing profile. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of a wing, starting at 1 |
[in] | sectionIndex | The index of a section, starting at 1 |
[in] | elementIndex | The index of an element on the section |
[out] | profileNamePtr | The name of the wing profile |
Usage example:
TiglReturnCode returnCode; char* namePtr = 0; returnCode = tiglWingGetProfileName(cpacsHandle, wing, section, element, &namePtr); printf("Profile name is %s\n", namePtr);
TiglReturnCode tiglWingGetSectionCount | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
int * | sectionCount | ||
) |
Returns the number of sections of a wing.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of a wing, starting at 1 |
[out] | sectionCount | The number of sections of the wing |
Usage example:
TiglReturnCode returnCode; int sectionCount = 0; returnCode = tiglWingGetSectionUID(cpacsHandle, wingIndex, §ionCount); printf("The Number of sections of wing %d is %d\n", wingIndex, sectionCount);
TiglReturnCode tiglWingGetSectionUID | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
int | sectionIndex, | ||
char ** | uidNamePtr | ||
) |
Returns the UID of a section of a wing. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of a wing, starting at 1 |
[in] | sectionIndex | The index of a section, starting at 1 |
[out] | uidNamePtr | The uid of the wing |
Usage example:
TiglReturnCode returnCode; char* uidPtr = 0; returnCode = tiglWingGetSectionUID(cpacsHandle, wing, sectionUID, &uidPtr); printf("The UID of the section of wing %d is %s\n", wing, uidPtr);
TiglReturnCode tiglWingGetSegmentCount | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
int * | segmentCountPtr | ||
) |
Returns the number of segments for a wing in a CPACS configuration.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of the wing, starting at 1 |
[out] | segmentCountPtr | Pointer to the number of segments |
TiglReturnCode tiglWingGetSegmentEtaXsi | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
double | pointX, | ||
double | pointY, | ||
double | pointZ, | ||
int * | segmentIndex, | ||
double * | eta, | ||
double * | xsi, | ||
int * | isOnTop | ||
) |
Inverse function to tiglWingGetLowerPoint and tiglWingGetLowerPoint. Calculates to a point (x,y,z) in global coordinates the wing segment coordinates and the wing segment index.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of the wing, starting at 1 |
[in] | pointX | X-Coordinate of the global point |
[in] | pointY | Y-Coordinate of the global point |
[in] | pointZ | Z-Coordinate of the global point |
[out] | segmentIndex | The index of the segment of the wing, starting at 1 |
[out] | eta | Eta value in segment coordinates |
[out] | xsi | Xsi value in segment coordinates |
[out] | isOnTop | isOnTop is 1, if the point lies on the upper wing face, else 0. |
TiglReturnCode tiglWingGetSegmentIndex | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | segmentUID, | ||
int * | segmentIndexPtr, | ||
int * | wingIndexPtr | ||
) |
Returns the Index of a segment of a wing.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | segmentUID | The uid of the wing |
[out] | segmentIndexPtr | The index of a segment, starting at 1 |
[out] | wingIndexPtr | The index of a wing, starting at 1 |
Usage example:
TiglReturnCode returnCode; int segmentIndex, wingIndex; returnCode = tiglWingGetSegmentIndex(cpacsHandle, segmentUID, &segmentIndex, &wingIndex); printf("The Index of the segment of wing %d is %d\n", wingIndex, segmentIndex);
TiglReturnCode tiglWingGetSegmentUID | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
int | segmentIndex, | ||
char ** | uidNamePtr | ||
) |
Returns the UID of a segment of a wing. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of a wing, starting at 1 |
[in] | segmentIndex | The index of a segment, starting at 1 |
[out] | uidNamePtr | The uid of the wing |
Usage example:
TiglReturnCode returnCode; char* uidPtr = 0; returnCode = tiglWingGetSegmentUID(cpacsHandle, wing, segmentID, &uidPtr); printf("The UID of the segment of wing %d is %s\n", wing, uidPtr);
TiglReturnCode tiglWingGetSpan | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | wingUID, | ||
double * | pSpan | ||
) |
Returns the span of a wing.
The calculation of the wing span is realized as follows:
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingUID | UID of the Wing |
[out] | pSpan | Wing span |
TiglReturnCode tiglWingGetSymmetry | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
TiglSymmetryAxis * | symmetryAxisPtr | ||
) |
Returns the Symmetry Enum if the wing has symmetry-axis.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | Index of the Wing to export |
[out] | symmetryAxisPtr | Returning TiglSymmetryAxis enum pointer |
TiglReturnCode tiglWingGetUID | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
char ** | uidNamePtr | ||
) |
Returns the UID of a wing. The string returned must not be deleted by the caller via free(). It will be deleted when the CPACS configuration is closed.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of a wing, starting at 1 |
[out] | uidNamePtr | The uid of the wing |
Usage example:
TiglReturnCode returnCode; char* uidPtr = 0; returnCode = tiglWingGetUID(cpacsHandle, wing, &uidPtr); printf("The UID of the wing is %s\n", uidPtr);
TiglReturnCode tiglWingGetUpperPoint | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
int | segmentIndex, | ||
double | eta, | ||
double | xsi, | ||
double * | pointXPtr, | ||
double * | pointYPtr, | ||
double * | pointZPtr | ||
) |
Returns a point on the upper wing surface for a a given wing and segment index.
Returns a point on the upper wing surface in dependence of parameters eta and xsi, which range from 0.0 to 1.0. For eta = 0.0, xsi = 0.0 the point is equal to the leading edge on the inner section of the given segment. For eta = 1.0, xsi = 1.0 the point is equal to the trailing edge on the outer section of the given segment. The point is returned in absolute world coordinates.
The behavior of this function can be modified using tiglWingSetGetPointBehavior. The options are asParametersOnSurface or onLinearLoft. For the first, the inputs are interpreted as normalized parameters on the surface and the point corresponding to these parameters is returned (default). For the second, the inputs are interpreted as eta-xsi coordinates on the chordface spanned by the leading edge and trailing edge points of the inner and outer elements.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of the wing, starting at 1 |
[in] | segmentIndex | The index of the segment of the wing, starting at 1 |
[in] | eta | eta in the range 0.0 <= eta <= 1.0; eta = 0 for inner section , eta = 1 for outer section |
[in] | xsi | xsi in the range 0.0 <= xsi <= 1.0; xsi = 0 for Leading Edge, xsi = 1 for Trailing Edge |
[out] | pointXPtr | Pointer to the x-coordinate of the point in absolute world coordinates |
[out] | pointYPtr | Pointer to the y-coordinate of the point in absolute world coordinates |
[out] | pointZPtr | Pointer to the z-coordinate of the point in absolute world coordinates |
TiglReturnCode tiglWingGetUpperPointAtDirection | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
int | wingIndex, | ||
int | segmentIndex, | ||
double | eta, | ||
double | xsi, | ||
double | dirx, | ||
double | diry, | ||
double | dirz, | ||
double * | pointXPtr, | ||
double * | pointYPtr, | ||
double * | pointZPtr, | ||
double * | errorDistance | ||
) |
Returns a point on the upper wing surface for a a given wing and segment index. This function is different from tiglWingGetUpperPoint: First, a point on the wing chord surface is computed (defined by segment index and eta,xsi). Then, a line is constructed, which is defined by this point and a direction given by the user. The intersection of this line with the upper wing surface is finally returned. The point is returned in absolute world coordinates.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | wingIndex | The index of the wing, starting at 1 |
[in] | segmentIndex | The index of the segment of the wing, starting at 1 |
[in] | eta | eta in the range 0.0 <= eta <= 1.0; eta = 0 for inner section , eta = 1 for outer section |
[in] | xsi | xsi in the range 0.0 <= xsi <= 1.0; xsi = 0 for Leading Edge, xsi = 1 for Trailing Edge |
[in] | dirx | X-component of the direction vector. |
[in] | diry | Y-component of the direction vector. |
[in] | dirz | Z-component of the direction vector. |
[out] | pointXPtr | Pointer to the x-coordinate of the point in absolute world coordinates |
[out] | pointYPtr | Pointer to the y-coordinate of the point in absolute world coordinates |
[out] | pointZPtr | Pointer to the z-coordinate of the point in absolute world coordinates |
[out] | errorDistance | If the upper surface is missed by the line, the absolute distance between line and the nearest point on the surface is returned. The distance is zero in case of successful intersection. It's up to the user to decide, if the distance is too large and the result has to be treated as an error. |
TiglReturnCode tiglWingInterpolateXsi | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | firstUID, | ||
double | firstEta, | ||
double | firstXsi, | ||
const char * | secondUID, | ||
double | secondEta, | ||
double | secondXsi, | ||
const char * | intersectionUID, | ||
double | intersectionEta, | ||
double * | intersectionXsi, | ||
TiglBoolean * | hasWarning | ||
) |
Given a straight line in space defined by a pair of segment / component segment (eta,xsi) coordinates, the function computes the intersection of the line with an iso-eta line of a segment or component segment.
The line is defined by its inner and outer point, both given in segment or component segment coordinates. Typically, these might be spar positions or leading edge coordinates of flaps. The function returns the xsi coordinate (depth coordinate) of the intersection point in the coordinate system defined by the uid. Hence, this coordinate is given in either the segment or component segment coordinate system. See image below for details.
[in] | cpacsHandle | |
[in] | firstUID,firstEta,firstXsi | Starting point of the intersection line (on segment or component segment) |
[in] | secondUID,secondEta,secondXsi | Ending point of the intersection line (on segment or component segment) |
[in] | intersectionUID | UID of the segment or componentSegment that relates to eta |
[in] | intersectionEta | Eta coordinate of the iso-eta segment or component segment intersection line |
[out] | intersectionXsi | Xsi coordinate of the intersection point on the referred segment or component segment |
[out] | hasWarning | The hasWarning flag is true (1), if the resulting xsi value is either outside the valid range [0,1]. It is up to the user to handle these cases properly. This flag is only valid, if the function returns TIGL_SUCCESS. |
TiglReturnCode tiglWingSegmentPointGetComponentSegmentEtaXsi | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
const char * | segmentUID, | ||
const char * | componentSegmentUID, | ||
double | segmentEta, | ||
double | segmentXsi, | ||
double * | eta, | ||
double * | xsi | ||
) |
Returns eta, xsi coordinates of a componentSegment given segmentEta and segmentXsi on a wing segment.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | segmentUID | UID of the wing segment to search for |
[in] | componentSegmentUID | UID of the associated componentSegment |
[in] | segmentEta,segmentXsi | Eta and Xsi coordinates of the point on the wing segment |
[out] | eta | Eta of the point on the corresponding component segment. |
[out] | xsi | Xsi of the point on the corresponding component segment. |
TiglReturnCode tiglWingSetGetPointBehavior | ( | TiglCPACSConfigurationHandle | cpacsHandle, |
TiglGetPointBehavior | behavior | ||
) |
Sets the behavior of the tiglWingGetUpperPoint and tiglWingGetLowerPoint functions.
This function sets the behavior of the tiglWingGetUpperPoint and tiglWingGetLowerPoint functions. The options are asParameterOnSurface or onLinearLoft. For the first, the inputs are interpreted as normalized parameters on the surface and the point corresponding to these parameters is returned. For the second, the inputs are interpreted as eta-xsi coordinates on the chordface spanned by the leading edge and trailing edge points of the inner and outer elements.
[in] | cpacsHandle | Handle for the CPACS configuration |
[in] | behavior | enum describing the desired behavior of the function. Possible values are asParameterOnSurface and onLinearLoft. |