DATCOM, every aerospace engineer must be familiar with this word for sure. Yep, it is a software created by USAF (if I’m not mistaken) to estimate an aircraft’s aerodynamic performance. This software is widely used for preliminary aircraft design. By just creating an ASCI text file containing the parameter of your aircraft configuration as its input, this software allows you to find out the aerodynamic stability of your aircraft for given atmospheric conditions. Me myself has been using this software for some times. The first time was when I was taking flight dynamics course. This is when I started learning about DATCOM. The second time was when I was taking aircraft design course and the third time was when I was taking advanced flight mechanics class in my graduate study and publishing paper for RCMEAE 2010.
Using DATCOM is pretty easy. You just need to create an ASCI text file named for005.dat, write the parameter of your aircraft configuration in it (of course according to DATCOM’s rule), and execute the DATCOM program. DATCOM will instantly calculate your aircraft’s aerodynamic stability derivatives and write it in for006.dat. Unfortunately, since both the input and output are text files, it is quite hard to see whether the aircraft configuration written in the input files is correct and the same with the configuration that wanted to be evaluated. Mistakes in the values of some parameters due to typo, misinterpretation of parameter definition, or carelessness may still enabling the program to work, but it yields results for different aircraft configuration other than what was meant. And since there aren’t any visualization or GUI, the only solution is to check the input file patiently and carefully.
For a guy like me, I’m always feeling a little insecure in doing manual check of the input file because you can’t guarantee that you won’t miss a thing. On the other hand, I’m also feeling insecure if I’m not checking the input file. As the result, I constantly rechecks the input file for every 5 minutes, even though the output file seems already correct. Since I know that I will be using DATCOM again in the future and I can’t afford to recheck the input file every time, I decided to save me the trouble by creating a MATLAB code that will read the input file and draw the aircraft from the configuration parameters written in it. This way, I can view the aircraft first to ensure that I’m entering the correct values for each parameter in the input file (and I can sleep soundly in the night, knowing that my input file is correct).
So, starting from 6 November last month, I started learning about textscanning and textreading in MATLAB and started drafting the code. The progress of this code development is quite slow because I also have other jobs to do to feed my self (and because I also went to Manado for vacation). Thankfully, early this week, the code was done. I’ve tested with several DATCOM input files that I have and the result was pretty good. Here are several drawing results from the input files that I have.
drawDATCOMaircraft’s result for test file 1 (PSK-01 Walet)
drawDATCOMaircraft’s result for test file 2 (Unknown)
drawDATCOMaircraft’s result for test file 3 (ZLIN-142)
drawDATCOMaircraft’s result for test file 4 (ASW-20)
drawDATCOMaircraft’s result for test file 5 (Boeing B737)
drawDATCOMaircraft’s result for test file 6 (Ercoupe 415C)
drawDATCOMaircraft’s result for test file 7 (P-51 Mustang)
As usual, I’m going to share the code in ths blog. However, I realized that I can’t put this code in my MATLAB Aerodynamics Toolbox page because it is not about aerodynamics. I guess I’m gonna create another new toolbox pages. It may be Aeroutility Toolbox or Aircraft DEsign Toolbox, but I haven’t decide it yet, so I haven’t put this code in this blog. However, I figured that a lot of people is using DATCOM and this code may help them to check their DATCOM input file. I tried my luck and post this code to MATLAB file exchange center and it got accepted. So, while waiting for me to create the new toolbox, you can get the code (Draw DATCOM Aircraft code) from the MATLAB file exchange center.
Well, it’s already 4PM in my time, so, I’m gonna stop the announcement here and go straight to my bed and take a nap:D. I hope the code help and as usual, all critics and comments are welcomed.