Ing. Nieto Posted February 26, 2020 Report Share Posted February 26, 2020 (edited) Hola, estoy haciendo un programa con Visual Studio 2017, el cual se conecta a Prepar3D V4 mediante FSUIPC, esto hace que se muevan varios instrumentos dentro del simulador de avión, entre ellos el "heading bug adjust Knob", adf, Nav 1, Nav2 y altimeter; mi duda es la siguiente, estoy tratando de agregar un botón, el cual al momento de presionarlo, quiero que mueva el "heading bug adjust knob" a donde se encuentra la aguja del "heading" , encontre un offset el cual es 0C3E GyroDrift, pero tengo un problema, este offset va bien con aviones que tienen el "Heading Indicator Adjust Knob" como el avion Cessna Skyhawk 172SP, pero para otro tipo de aviones como el Beech King Air 350 no lo reconoce, lo que quiero es que con cualquier avion pueda obtener la posición del angulo de la aguja del heading y poder mover el "heading bug adjust knob" a esta posicion cuando se oprima el boton, si hay algun offset para poder obtener el valor de este angulo, seria de gran ayuda, ya intente con los offsets del manual que se refieren al heading, pero ninguno me funciona Edited February 26, 2020 by Ing. Nieto Link to comment Share on other sites More sharing options...
Pete Dowson Posted February 26, 2020 Report Share Posted February 26, 2020 1 hour ago, Ing. Nieto said: My question is the following, I am trying to add a button, which at the moment of pressing it, I want it to move the "heading bug adjust knob" to where the "heading" needle is located, I think you need to read the heading and set the bug to that value. 1 hour ago, Ing. Nieto said: I found an offset which is 0C3E GyroDrift, but I have a problem, this offset goes well with airplanes that have the "Heading Indicator Adjust Knob" So, it is not the heading bug you want to set, but to reset any gyro drift? Pete Link to comment Share on other sites More sharing options...
spokes2112 Posted February 26, 2020 Report Share Posted February 26, 2020 On the press of the button send either, depending on what you want: 1) 0x0580 4 dWORD Heading, *360/(65536*65536) for degrees TRUE. -OR- 2) 0x2B00 8 FLOAT64 Gyro compass heading (MAGNETIC), including any drift. 64-bit floating point. send to, after math & variable type conversions - 0x07CC 2, WORD - Autopilot heading value, as degrees*65536/360) ----------------------------------------------------------------------------------------------------- Al presionar el botón enviar, dependiendo de lo que desee: 1) 0x0580 4 dWORD Heading, * 360 / (65536 * 65536) para grados VERDADERO. -O- 2) 0x2B00 8 FLOAT64 Rumbo del compás giroscópico (MAGNÉTICO), incluida cualquier deriva. Punto flotante de 64 bits. enviar a, después de las conversiones de matemática y tipo variable - 0x07CC 2, WORD - Valor de rumbo del piloto automático, como grados * 65536/360) Link to comment Share on other sites More sharing options...
John Dowson Posted February 27, 2020 Report Share Posted February 27, 2020 12 hours ago, spokes2112 said: 2) 0x2B00 8 FLOAT64 Gyro compass heading (MAGNETIC), including any drift. 64-bit floating point. According to the docs, 0x2B00 is read-only, so better to use 0x0580 if writing. Link to comment Share on other sites More sharing options...
spokes2112 Posted February 27, 2020 Report Share Posted February 27, 2020 My writing is terrible.. 👎 On click, for true heading - 0x0580 --> [ value & variable type conversion ] --> 0x07CC On click for magnetic heading - 0x2B00 --> [ value & variable type conversion ] --> 0x07CC It think that is what Ing. Nieto is getting at, setting the heading bug to the current heading. Roman Link to comment Share on other sites More sharing options...
peterk54 Posted March 2, 2020 Report Share Posted March 2, 2020 @Ing Nieto I think you have to use: / Creo que tienes que usar: Offset &H07CC, 2 Bytes, Autopilot heading value, as degrees *65536/360Offset &H07CC, 2 bytes, valor de rumbo del piloto automático, como grados * 65536/360 It is not heading TRUE or MAGNETIC / No se dirige a VERDADERO o MAGNÉTICO Hope this helps / Espero que esto ayude Peter / Pedro Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now