- Messages
- 258
- Country
Hi,
In my FS2004 Cessna 172 XML radio stack I set up the standby comms frequency using the knob and then transfer that frequency into the active frequency using the transfer button.
I set up the whole number of the frequency in one LVAR on the outside of the knob and the decimal part in multiples of 25 in another LVAR on the inside of the knob. I merge both LVARS together into another LVAR and display this as the standby frequency in the window.
Then when I want to use that frequency I use a complicated formula which I found on the web some time ago.
Bill Leaming put the formula up on FlightSim in 2005 (nearly a decade ago - doesn't time fly!)
This then becomes the active frequency which is used for radio contact.
Most of the time this procedure works fine. On the odd occasion it doesn't.
For instance, on my latest flight from KOWD to KFMH it really fouled up badly.
The frequencies in KOWD worked fine - 119.950, 121.800 and 126.000.
For Providence, I set up a standby frequency of 128.700, pressed the transfer button and it went across as 128.690.
For Cape, I set up a standby frequency of 118.200, pressed the transfer button and it went across as 118.190.
For Otis, I set up a standby frequency of 121.000, pressed the transfer button and it went across as 120.990.
Having landed, I tried them all again. 118.200 and 121.00 worked fine (!) while 128.700 still fouled up!
Just before I sent this I tried 128.700 once again and this time it worked!
I know the frequency looks ok in the standby window, when it transfers to the active it corrupts.
Obviously there is some problem problem with the stability of my code (surprise, shock, horror!!)
I set up the standby frequency with
(L:Rad1Dec,number) 0.001 * (L:Rad1Whole,number) + (>L:Rad1Freq,number)
and I use the transfer button to set up the active frequency with
(L:Rad1Freq, number) s1 100 * 10000 % int d 10 % r
10 / int d 10 % r 10 / int d 10 % r 10 / int 16
* + 16 * + 16 * + (>K:COM_RADIO_SET)
I have no idea really what all the numbers are doing (though Bill explained it in 2005)- I know it works the vast majority of the time and fails just a few times.
I supect that it is (L:Rad1Freq, number) causing the problems although I have displayed its contents to 7 places of decimal and it looks fine.
Can anyone see how I can ensure that it always works.
Thanks
Walter
In my FS2004 Cessna 172 XML radio stack I set up the standby comms frequency using the knob and then transfer that frequency into the active frequency using the transfer button.
I set up the whole number of the frequency in one LVAR on the outside of the knob and the decimal part in multiples of 25 in another LVAR on the inside of the knob. I merge both LVARS together into another LVAR and display this as the standby frequency in the window.
Then when I want to use that frequency I use a complicated formula which I found on the web some time ago.
Bill Leaming put the formula up on FlightSim in 2005 (nearly a decade ago - doesn't time fly!)
This then becomes the active frequency which is used for radio contact.
Most of the time this procedure works fine. On the odd occasion it doesn't.
For instance, on my latest flight from KOWD to KFMH it really fouled up badly.
The frequencies in KOWD worked fine - 119.950, 121.800 and 126.000.
For Providence, I set up a standby frequency of 128.700, pressed the transfer button and it went across as 128.690.
For Cape, I set up a standby frequency of 118.200, pressed the transfer button and it went across as 118.190.
For Otis, I set up a standby frequency of 121.000, pressed the transfer button and it went across as 120.990.
Having landed, I tried them all again. 118.200 and 121.00 worked fine (!) while 128.700 still fouled up!
Just before I sent this I tried 128.700 once again and this time it worked!
I know the frequency looks ok in the standby window, when it transfers to the active it corrupts.
Obviously there is some problem problem with the stability of my code (surprise, shock, horror!!)
I set up the standby frequency with
(L:Rad1Dec,number) 0.001 * (L:Rad1Whole,number) + (>L:Rad1Freq,number)
and I use the transfer button to set up the active frequency with
(L:Rad1Freq, number) s1 100 * 10000 % int d 10 % r
10 / int d 10 % r 10 / int d 10 % r 10 / int 16
* + 16 * + 16 * + (>K:COM_RADIO_SET)
I have no idea really what all the numbers are doing (though Bill explained it in 2005)- I know it works the vast majority of the time and fails just a few times.
I supect that it is (L:Rad1Freq, number) causing the problems although I have displayed its contents to 7 places of decimal and it looks fine.
Can anyone see how I can ensure that it always works.
Thanks
Walter