Hi to all, im working in a project, and i get what i want, but i have a doubt with 3 variables that i'm getting, cause they return to me 0 as value, and i dont knot if it is normal , or it's an error in any part.
here you have some code
the problem that i have is that the values of three variables are always 0.0 or -0.0
the variables are:
Airspeed Indicated
Turn Coordinator Ball
Radio Height
I dont know if the type of variables (double) that i use in the struct to get them are the right type, or id the units are ok.
i think that everything is right, but these values are still at 0.0 while the other values are getting right, so i dont kno if is the normal behaviour or there ir a mistake.
could anyone help ?
thanks a lot
here you have some code
Code:
this is the struct where i read the variables, it has more variables but the rest of them work as expected.
struct Struct1
{
...
double planeHeadingMagnetic;
double airspeedTrue;
double airspeedIndicated;
double verticalSpeed;
double turnCoordinatorBall;
double radioHeight;
};
here is the other part when i notify the variables that i'm going to request
...
hr = SimConnect_AddToDataDefinition(hSimConnect, DEFINITION_1, "Airpeed True", "knots");
hr = SimConnect_AddToDataDefinition(hSimConnect, DEFINITION_1, "Airpeed Indicated", "knots"); **
hr = SimConnect_AddToDataDefinition(hSimConnect, DEFINITION_1, "Vertical Speed", "feet/second");
hr = SimConnect_AddToDataDefinition(hSimConnect, DEFINITION_1, "Turn Coordinator Ball", "position 128"); **
hr = SimConnect_AddToDataDefinition(hSimConnect, DEFINITION_1, "Radio Height", "feet"); **
and finally i print the values with a printf:
printf(" \nAirSpeedTrue=%f \nAirSpeedIndicated=%f \nVerticalSpeed=%f \nTurnCoordinatorBall=%f \nRadio Height=%f\n", pS->airspeedTrue, pS->airspeedIndicated, pS->verticalSpeed, pS->turnCoordinatorBall, pS->radioHeight);
pS being the struct to get the variables.
the problem that i have is that the values of three variables are always 0.0 or -0.0
the variables are:
Airspeed Indicated
Turn Coordinator Ball
Radio Height
I dont know if the type of variables (double) that i use in the struct to get them are the right type, or id the units are ok.
i think that everything is right, but these values are still at 0.0 while the other values are getting right, so i dont kno if is the normal behaviour or there ir a mistake.
could anyone help ?
thanks a lot



