February 3, 200818 yr Hello, I'm attempting to simulate the NAV1 LOC/Glide needles. I'm using FS04 with a registered FSUIPC and interfaced into FSBUSCDK 1.2. With FSInterrogate, I can see offsets 0x0c48/0x0c49 (8bit signed) and also offsets [unlisted in the doc I have from FSUIPC] 0x2aac/0x2ab0 (32bit float). The first set is called NAV1 needles and the second set is called VOR1 needles. The issue I have is a CDK issue. I use a simple test, which I use for everything:sub onFNAV1GLIDE print (get("FNAV1GLIDE"))end subWith the first set of offsets, I get only the value 128. With the second, I get a ten digit integer that does respond accordingly. The problem is, called it a 32 bit signed value and not a floater because I don't see that available in the docs. It is not obvious to me what the algorithm is or if it needs to be called a 32bit float in CDK.I realize it is long winded, but has anyone run into this too?Thanks in advance for any help.EricFS04/CDK1.2(Com-DIO-Display x2-Servo)
February 3, 200818 yr I do not know whats the difference between both 2 offsets. I suggest that you use fsinterrogate, look at them while you slew the aircraft around the loc and gs. See what happens.0x0c48/0x0c49 (8bit signed)will need I8 in fscdk0x2aac/0x2ab0 (32bit float)will need I32 or U32, depends what you see in fsinterrogator.If it goes from -2^16 to +2^16 it will be I32from the cdk docs:I8 1 8bit signed integerU8 1 8bit unsigned integerI16 2 16bit signed integ erU16 2 16bit unsigned integerI32 4 32bit signed integerU32 4 32bit unsigned integerI64 8 64bit signed integer
February 3, 200818 yr Thank you for the quick response. I am using FSInterrogate, but maybe not to its fullest potential. I am interrogating those four offsets. The values for the c48/c49 are reported signed 8bit while the others are reported 32bit floating. In the CDK manual, the one you left off was the DBL - an eight byte float. I was thinking that maybe there might be another, unlisted, four byte float. I'm think that by using this fictional '8BFloat' that CDK would return the same values I see in Interrogate. I have no idea why the 8bit signed are not working in CDK, but since I'm getting some kind of output using I32 on the second set of offsets, I thought I'd go with those...
February 3, 200818 yr Norbert,Maybe this might make more sense. These sampled values are close to the same point in time but since one set is from Interrogate and the other is CDK, they're not exactly at the same time. I am still baffeled as to why the 0x0c48/49 sit at 128 in CDK but change in Interrogate as a signed 8bit.0x2aac(32bit float column and not the factored -though they do match)Interrogate CDK -10.35395 -1054496315-15.58044 -1049015936 2.42305 1075516226 11.01713 1093682728(Though I didn't record them, 0x0c48 follows 0x2aac in Interrogate and would be something like -10, -16, 2 , 11 displayed in the factored column and yet only one instance of 128 displayed in CDK.)When I sweep through the LOC midpoint, CDK has these two values:first sweep: 1078111165-1084819115back the other way:-1069492897 1076238715Again it's not obvious to me what the algorthm is or if the I32 is indeed the correct data type. Regards,Eric
February 4, 200818 yr I am still baffeled as to why the 0x0c48/49 sit at 128 in CDK but change in Interrogate as a signed 8bit.-128 to + 128 is the same as signed 8 bit.2^8 =256, so you can count with 8 bits from 0 to 255 or from -128 to +128.Perhaps both pairs offsets do more or less the same, only the lower one is less precise (although more then precise enough I think).You would have 128 positions for a loc needle that can give max 10 degrees of (if it is a VOR) or 2,5 degrees (if it is a localizer)RegardsNorbert
February 4, 200818 yr Thanks again for the response and not to belabor this, but:"Perhaps both pairs offsets do more or less the same, only the lower one is less precise (although more then precise enough I think)."That is exactly what I believe too, and that is what Interrogate shows; they follow each other with the 0x2aac/2ab0 being more precise. However, FSBUS does not report changes in the 0x0c48/49 offset other than the initial interation 128. If I remember twos complementing ok, 128 signed 8bit =-128 and the range is -128 to +127. That's all fine and dandy, but FSBUS is not changing with those(0c48/49) offsets other than the first 128 [at least not on my system]. The other offsets are reporting values that I don't see any pattern. I'm wondering if there is a CDK "F" label called "Single" that refers to a 32bit float.Anyway thanks again for the reponses.Eric
February 5, 200818 yr Norbert, attached are two screen grabs you might find interesting. You'll see on the foreground is Interrogate and on the background is CDK. I'm going to keep working on it but it sounds like it's either a local issue or I'm in uncharted waters.Thanks again for the input.Eric
February 6, 200818 yr Slowly I am understanding your problem. But I do not have the answer. There is a lot off knowledge on the fsuipc forum from Pete Dowson. Perhaps you could try to post it there.
February 7, 200818 yr I'm glad to see your post...I thought maybe I scared you away. Anyhow, I understand my issue better now. CDK does not provide for the single float and I don't think I'll attempt writing a BASIC function for converting the decimal representation of a signed 32-bit to a 32-bit float real; it would be a waste of system resource and my time (though it does sound fun). Additionally, CDK for whatever reason does not like offsets 0x0c48 and 0x0c49. Here is the funny thing, NAV2 LOC/Glide 0x0c59 & 0x0c6e(though Nav2 does not have a Glide needle in the 182IFR) do work - I get the values in CDK. Thank you for the ideas. I have to dig into FSUIPC more. I'm wondering if I might be able to do a conversion out of it. Maybe I'll try the forum you suggested if I don't see anything in the manual. Thanks again,Eric
December 29, 200817 yr Just a follow-up on an issue I have finally worked around within FSBus CDK: (My wife doesn
Create an account or sign in to comment