Ing. Nieto Posted February 26, 2020 Report 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
Pete Dowson Posted February 26, 2020 Report 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 聽
spokes2112 Posted February 26, 2020 Report 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) 聽
John Dowson Posted February 27, 2020 Report 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.
spokes2112 Posted February 27, 2020 Report 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
peterk54 Posted March 2, 2020 Report 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
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