fsVarsAVarXYZGet
The fsVarsAVarXYZGet function can be used to get the value of a specific AVar stored as a three dimensional vector (including LLA).
Syntax
FsVarError fsVarsAVarXYZGet(
FsAVarId aVarId,
FsUnitId unitId,
FsVarParamArray param,
FsVec3d* result,
FsObjectId target
);
Parameters
| Parameters | Description |
|---|---|
aVarId |
The ID of an |
unitId |
The ID of a unit (found using fsVarsGetUnitId). |
param |
A parameter which might be mandatory to access the AVar (in the case of an indexed AVar, for example). Elements in param can be FsCrc, String or index. |
result |
The variable that will receive the value of the AVar if others parameters are right. |
target |
The ID of the object from which the variable is being retrieved. Possible targets are:
Default: |
Return Values
The function returns a FsVarError, where 0 means there is no error (in which case, the value of the AVar has been set in result).
Example
FsUnitId unitId = fsVarsGetUnitId("feet per seconds");
FsAVarId aVarId = fsVarsGetAVarId("STRUCT WORLDVELOCITY");
FsVec3d result {0, 0 ,0};
if (fsVarsAVarXYZGet(aVarId, unitId, {}, &result) == FS_VAR_ERROR_NONE)
{
// valid
}
else
{
// error
}