EAL727Capt Posted July 4, 2015 Report Share Posted July 4, 2015 I am in the process of building a Boeing 727-200 using the Dreamfleet 727. For the time-being, I have all the needed instruments. I'm currently working on the engine gauges. I have successfully interfaced the N1 and N2 gauges using automotive stepper motors (SwitecX25/MCR 1109) with the Link2FS program and Arduino Uno and Mega 2650 boards. I'm tackling the EPR gauges right now with the EGT and Fuel Flow gauges to follow. Right now, I'm experiencing difficulties in getting the EPR 'numbers' to interface with Link2FS and Arduino. I'm using the 08BC (Engine 1) offset and have read the FSUIPC SDK where it advises that EPR 1.6 = 16384. My gauge (mimicked from the Dreamfleet 727) will only go from 1.0 to 2.2, although the face of the 'real' gauge goes from 1.0 to 3.0. I have tried all sorts of formulas using Int32, Double, Long and Short in the Link2FS--all to no avail. For what its worth, the readings are as follows: Using SHORT 1.09 = 15203 raw (at idle) 1.10 = 15889 raw 1.20 = 18034 raw 1.30 = 18359 raw 1.40 = 18569 raw 1.50 = 18779 raw 1.60 = 18985 raw 1.70 = 19145 raw 1.80 = 19305 raw 1.90 = 19363 raw 2.00 = 19450 raw 2.10 = 19527 raw 2.20 = 19639 raw (at max power) The SHORT type seems to give the 'make sense' readings. Both Double and Int32 give identical readings. I've also tried the alternate offset of 2030 without success. If anyone reading this is familiar with the Link2FS program and can supply any advice as to what formula I could use to accurately duplicate via Link2FS and Arduino, I would certainly appreciate it. Thank you very kindly. Jay KFLL Link to comment Share on other sites More sharing options...
Pete Dowson Posted July 4, 2015 Report Share Posted July 4, 2015 Right now, I'm experiencing difficulties in getting the EPR 'numbers' to interface with Link2FS and Arduino. I'm using the 08BC (Engine 1) offset and have read the FSUIPC SDK where it advises that EPR 1.6 = 16384. ... The SHORT type seems to give the 'make sense' readings. Both Double and Int32 give identical readings. As the document states, the offset is 2 bytes. That is 16 bits. A "WORD" or "SHORT" is the only type which occupies 16 bits, so it has got to be so. If you are going to do some programming you do need to know a bit about bits and bytes. Try this reference in the FAQ subforum: http://forum.simflight.com/topic/63908-about-bits-numbers-and-hexadecimal/ I've also tried the alternate offset of 2030 without success. As documented, that is certainly a double floating point number, i.e. 64-bits or 8 bytes. It should be more accurate and won't need conversion. FSUIPC derives the FS98/FS2000/FS2002 compatible offset 08BC from the value in 2030 using the 16384=1.6 rule which applied before FS9. Pete Link to comment Share on other sites More sharing options...
EAL727Capt Posted July 5, 2015 Author Report Share Posted July 5, 2015 Thank you for the reply, however, I'm not immediately seeing the connection between a needed mathematic formula to be used and your tutorial. For the gauges I've successfully interfaced, the formula is raw data*100/16384 (the '100' being the percentage of the maximum available on the gauge). This is also using the SHORT data type. Is it so simple that I'm making it more complex? LOL Thank you again! Link to comment Share on other sites More sharing options...
Pete Dowson Posted July 5, 2015 Report Share Posted July 5, 2015 Thank you for the reply, however, I'm not immediately seeing the connection between a needed mathematic formula to be used and your tutorial. Sorry, what "tutorial"? What mathematical formula do you need? If you mean how to convert a value encoded as 0-16384 to the range 0-1.6 then surely it is obviously just (val * 1.6)/16384. Is that all you were lost for? If so, sorry, I obviously misunderstood your question. I thought the scaling arithmetic so easy that your question must just about understanding the correct type of numerical storage. I'm pretty sure that if you use offset 2030 you needn't do any conversion in any case. Just read it directly as a 64-bit double flot ("FLOAT64"). You can always check offset values, either directrly in FSUIPC using the "Monitor" facilities on the right-hand side of the Logging tab, or more flexibly using FSInterrogate, the utility supplied in the FSUIPC SDK. I no longer have FS9 installed (it is, after all, over 11 years old), but here is what I get logged from FSX (engine 1 on the default 747): Idling 280443 Monitor IPC:08BC (U16) = 10915 280443 Monitor IPC:2030 (FLT64) = 1.06590295 280443 SimRead: 08BC="TURB ENG PRESSURE RATIO:1" [also 2030] FLT64: 1.06590295111 280537 Monitor IPC:08BC (U16) = 10891 280537 Monitor IPC:2030 (FLT64) = 1.06353714 280537 SimRead: 08BC="TURB ENG PRESSURE RATIO:1" [also 2030] FLT64: 1.06353713655 Full throttle 325372 Monitor IPC:08BC (U16) = 14026 325372 Monitor IPC:2030 (FLT64) = 1.36970109 325372 SimRead: 08BC="TURB ENG PRESSURE RATIO:1" [also 2030] FLT64: 1.36970108779 325434 Monitor IPC:08BC (U16) = 14027 325434 Monitor IPC:2030 (FLT64) = 1.36978397 325434 SimRead: 08BC="TURB ENG PRESSURE RATIO:1" [also 2030] FLT64: 1.36978397107 On FS9 you won't get the "SimRead" entry -- that's only for SimConnect input. On FS9 and before the values are obtained direct from FS's internals. Pete Link to comment Share on other sites More sharing options...
EAL727Capt Posted July 5, 2015 Author Report Share Posted July 5, 2015 (edited) Okay, thanks anyway. Jay KFLL Edited July 5, 2015 by EAL727Capt Link to comment Share on other sites More sharing options...
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