PDA

View Full Version : Zero lift drag coeficient



PRB
October 4th, 2012, 09:33
In the air file, in the 1101 Primary Aerodynamics section, is a value for CD0, zero-lift drag coeficient. These values are all "large" number, like 33, 47, 25, etc. Such number don't look at all like real CD0 values on real planes, which are usually very small numbers, like 0.05, and such. What going on here?

How are these FS air file values related to real values? Can they be "converted" to real values?

- Paul

sparks
October 4th, 2012, 14:55
This one goes way back to the original design of FS, when floating point processors were optional and expensive.

It's called 'fixed point binary' number, and it's a number system programmers used to express fractional numbers as integer data.

In this case, we have a 16-bit integer being used to store Cd0. Unsigned 16-bit integers have a range of 0 to 65535, so what the programmers did was define 1 as being equal to 1/2048.

To convert a drag coefficient of 0.03 to fixed point binary, you simply multiply 0.03 by 2048, round off to the nearest integer and you have Cd0 = 61.

If all of your numbers are in fixed point binary, the code can use CPU integer math instructions rather than floating point instructions that may or may not have hardware support depending the PC.

PRB
October 4th, 2012, 15:17
Aaah, and the light bulb goes off. In Googling for some real world CD0 values, to compare with FS values, I did notice a rough correlation that fits your explanation. Thank you Sir! :salute:

- Paul