PDA

View Full Version : FS2Phidget rounding??



cpeckinpaugh
07-08-2005, 08:31 AM
Alan,
I'm using offset 2840 (Main Bus Voltage) to control a light.
I want light to come on when Main Bus Voltage bleeds off to a value <=22.
Light is coming on earlier than light on FS2004 panel so I ran FSInterrogate (comes with FSUIPC SDK) in loop mode and find the FS2Phidget reports value as 22 when actual value of offset is < 22.5 and >=21.5. Due to roundoff I guess. Can this be fixed?
Cam

alandyer
07-08-2005, 08:36 AM
Cam,

Have you tried a different format for output ?

Regards,
Alan.

alandyer
07-08-2005, 08:40 AM
Cam,

I am very familiar with FSInterrogate in the FSUIPC SDK.

Read the acknowledgments section in FSUIPC SDK documentation and see who's name comes up for the Borland C++ example.

Regards,
Alan.

cpeckinpaugh
07-09-2005, 07:10 AM
Alan,
Tried formatting to "##.0000"
Assumed I would get four decimal places. Fs Value for offset 2840 on Interface kit tab still shows value as integer. Should I not see a four decimal place value on that display.
Also in the "Edit FS Variables" window the Raw FS Value is an integer.
I'm probably doing something wrong but could use some help.
Cam

alandyer
07-10-2005, 12:07 PM
Cam,

Have a look at FSintergate->Maintenance->Variables...

What is the comment under USAGE column ?

Regards,
Alan.

cpeckinpaugh
07-11-2005, 06:38 AM
Alan,
There is no comment under Usage column. ie. field is blank.
Cam

alandyer
07-11-2005, 09:38 AM
Cam,

I just downloaded latest SDK.
Version I looked at 2 seconds ago reads:
NOT FSUIPC SUPPORTED

under Usage column
?????????

Regards,
Alan.

cpeckinpaugh
07-13-2005, 08:05 AM
Alan,
I finally found the comment "NOT FSUIPC SUPPORTED".
I opened the supplied project FSUIPC.fsi and there it is. I had previously been opening a new project.

Well now I'm more confused than ever and here's why.

1. The FSUIPC documentation "FSUIPC for Programmers (and Adventure Writers)" clearly states that offset 2840 is supported.

The section of the document entitled "Table of additional PANELS variables for FS2000" states that "These variables can be read or written via FSUIPC since version 1.94 or through WideFS from version 3.96, but none of them are guaranteed, and they may not be carried over into future versions of FS or FSUPIC"

2 FSinterrogate reads and correctly displays values for offset 2840 eg. 28.00000
With FS running the default flight ie. sitting at the end of the runway in a cessna with engine running FSinterrogate displays a value of 28.00000.
Now if you shut the engine down FSinterrogate displays values like 23.92345, 23.8xxxx, 23.7xxxx. over time. ie voltage is bleeding off. Remember to un-pause FS.

3. FS2Phidget also reads and displays values for offset 2840, however it diplays the value as an integer. There inlies the problem.

If you run FS as above and FSinterrogate (in continuous mode and looking only at offset 2840 to make the loop time less) and FS2Phidget in parrallel you will find that as voltage bleeds off the values look like this"

FSinterrogate FS2Phidget
24.00000 24
23.9xxxx 24
23.8xxxx 24
23.5xxxx 24
23.49999 23
23.3xxxx 23
22.5xxxx 23
22.49999 22
21.5xxxx 22
etc.

I want the light on the panel to turn on when the voltage is equal to or less than 22
FS2Phidget is reporting the value equal to 22 when it is actually anywhere between 21.5 and 22.49999.

Sorry this is so long winded but Its difficult to provide detail any other way.
Cam

JBaymore
07-13-2005, 01:21 PM
CAm,

Is this setup you are creating for use in the simulator for FUN flying? Or are you creating some sort of "deadly serious" real flight training simulator operation?

best,

....................john

cpeckinpaugh
07-14-2005, 05:19 AM
John,
I am building a DHC-2 Beaver Simulator, a hobby more than anything. Just thought I would try for accuracy!!
Cam

alandyer
07-14-2005, 09:20 AM
Cam,

As it so happens - I just made change for 3.1.1
Did not release in 3.1 until tested.

I have your email. I'm going to send you interim custom version to test.

Regards,
Alan.