Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi Pete,

Recently I attempted to crate a gauge in my project for 'battery load' which is offset 282C. I have a strange problem with its output that is really baking my noodle as I have never come across this issue before having used over 50 offsets so far in my project. When I read 282C using the interogator it shows the corect values i.e value = 0 during normal flight or value = -12 when there is an electrical failure. That is great but when I use this offset in my software it does not give the value = 0 during normal flight? What I get is a fast flickering of values between -1 to -9 ?

My read code is very simple

Dim ElecBattM As New Offset(Of Double)(&H282C)

and there is no factoring applied.

The strangest thing is that during an electrical failure it does give the correct value i.e value = -12 as it should.

So why am I getting a good value from interogator but flickering wrong values in my code? It does not make sense! :roll:

Chris

Posted
When I read 282C using the interogator it shows the corect values i.e value = 0 during normal flight or value = -12 when there is an electrical failure. That is great but when I use this offset in my software it does not give the value = 0 during normal flight? What I get is a fast flickering of values between -1 to -9 ?

Have you tried using the real time monitoring facility in FSUIPC -- Logging page, right-hand side. You can have it displayed on screen. You can also log the values you are actually reading.

Please use all of the tools available to you.

I cannot really check anything specific for you here as you fail to mention either the version of FS (FS98, FS2000, FS2002, FS2004, FSX, ESP?) or the version of FSUIPC. Please always do so when asking questions here. I just monitored it (to screen and log) in FSX and whilst the screen value (which is in notmal decimal notation) gives 0.0000000 al the time, the log shows the value as being very very small but varying all the time. e.g.

   114812 Monitor IPC:282C (FLT64) = -0.00000000
   114843 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -2.69647758605e-102
   114875 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -2.34402134588e-102
   114906 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -2.10479821217e-102
   114922 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -1.89314449366e-102
   114953 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -1.70078123536e-102
   114953 Ready Flags: Ready-To-Fly=Y, In Menu=N, In Dlg=N
   114984 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -1.58928557659e-102
   115000 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -1.36379377683e-102
   115031 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -1.23159794733e-102
   115062 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -1.10387645598e-102
   115078 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -9.94076290263e-103
   115109 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -8.93950702964e-103
   115140 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -8.35347267992e-103
   115156 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -7.24917770797e-103
   115187 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -6.51670197912e-103
   115218 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -5.84784386968e-103
   115234 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -5.26991772166e-103
   115265 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -4.7416958265e-103
   115297 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -4.43085132232e-103
   115312 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -3.84305829e-103
   115343 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -3.41260452911e-103
   115375 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -3.0611114593e-103
   115406 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -2.74609930905e-103
   115422 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -2.47336096495e-103
   115453 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -2.22501687082e-103
   115484 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -1.99796020294e-103
   115500 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -1.79736713248e-103
   115531 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -1.61911870096e-103
   115562 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -1.45325340041e-103
   115578 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -1.31040643191e-103
   115609 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -1.17862867593e-103
   115640 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -1.05788793008e-103
   115656 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -9.52334060589e-104
   115687 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -8.58523123058e-104
   115718 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -7.69889999722e-104
   115734 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -6.9499395826e-104
   115765 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -6.27398575577e-104
   115797 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -5.62191823723e-104
   115812 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -5.07740886428e-104
   115843 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -4.50003090349e-104
   115875 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -4.01542790053e-104
   115906 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -3.60286102156e-104
   115922 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -3.2508564805e-104
   115953 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -2.90968344922e-104
   115984 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -2.71893753421e-104
   116000 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -2.35926418884e-104
   116031 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -2.11734951373e-104
   116062 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -1.90439518452e-104
   116078 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -1.7182838351e-104
   116109 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -1.53830613345e-104
   116140 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -1.38796724539e-104
   116156 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -1.24476623282e-104
   116187 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -1.11413917894e-104
   116218 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -1.00182469058e-104
   116234 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -9.36149516419e-105
   116265 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -8.13882435848e-105
   116297 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -7.33030966981e-105
   116312 SimRead: 282C="ELECTRICAL BATTERY LOAD"
            FLT64: -6.59119230004e-105
   116343 SimRead: 282C="ELECTRICAL BATTERY LOAD"

Maybe you are getting these values, which because of the exponent of -100 or more sre EXTREMELY small, almost zero, but you are converting them into print or display incorrectly?

Regards

Pete

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.