• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

doubts getting three variables

Messages
9
Country
spain
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
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
 
well, i have resolved two problem, that were sintactical problems, so Radar Height and AirSpeed Indicated now are working already.

But Turn Coordinator Ball value is still freezy in 0.0. I have read something about to stop the auto rudder, but i dont know how to or what it is.

any idea?
 
Try removing the 128 from the definition:

Code:
hr = SimConnect_AddToDataDefinition(hSimConnect, DEFINITION_1, "Turn Coordinator Ball", "position");   **
 
i have tried it but no way. Are you sure it is necessary? Cause in other sites i have seen ti is position 128, and in the simconnect reference the variable unit is position 128 as well.

do you know anything about switching on or off the auto rudder ??

thanks a lot anyway
 
yeah, i was teking a look before posting here, but the problem is that they dont specify how to disable the autorudder,

anybody does??

thanks a lot people
 
fantastic, i have found it.
Its an option of configuration. If anybody needs it you can find it here:
go to -> settings -> realism -> disable the auto rudder checkbox down, left of the windows

thanks to everybody for their time
see ya
 
It's mentioned in the FS "Learning Center," which -for some odd reason- flightsimmers in general refuse to even open, much less read... :stirthepo
 
Back
Top