1
/*
2
 *=============================================================================
3
 *  flex based parser for DATCOM input cards.
4
 *
5
 *  Copyright (C) 2009  Anders Gidenstam (anders(at)gidenstam.org)
6
 *  Copyright (C) 2009  Ronald Jensen    (ron(at)jentronics.com)
7
 *  http://www.gidenstam.org
8
 *  http://www.jentronics.com
9
 *
10
 *  This program is free software; you can redistribute it and/or modify
11
 *  it under the terms of the GNU General Public License as published by
12
 *  the Free Software Foundation; either version 3 of the License, or
13
 *  (at your option) any later version.
14
 *
15
 *  This program is distributed in the hope that it will be useful,
16
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 *  GNU General Public License for more details.
19
 *
20
 *  You should have received a copy of the GNU General Public License
21
 *  along with this program; if not, write to the Free Software
22
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23
 *=============================================================================
24
 */
25
26
#ifndef DATCOM_PARSER_H
27
#define DATCOM_PARSER_H
28
29
#include "modeler.h"
30
31
typedef struct DATCOM_AIRFOIL {
32
  int     TYPEIN;
33
  int     DWASH;
34
  int     NPTS;
35
  double* XCORD;
36
  double* YUPPER;
37
  double* YLOWER;
38
  char*   NACA_DESCR;
39
} DATCOM_AIRFOIL;
40
41
typedef struct AIRCRAFT {
42
  struct BODY    body;
43
  struct SYNTHS  synths;
44
  struct OPTINS  optins;
45
  struct WGPLNF  wing;
46
  struct WGPLNF  htail;
47
  struct WGPLNF  vtail;
48
  struct WGPLNF  vfin;
49
  struct PROPWR  propwr;
50
  DATCOM_AIRFOIL wingfoil;
51
  DATCOM_AIRFOIL htailfoil;
52
  DATCOM_AIRFOIL vtailfoil;
53
  DATCOM_AIRFOIL vfinfoil;
54
} AIRCRAFT;
55
56
void ReadDatcom(char* filename, AIRCRAFT* aircraft);
57
int DatcomFoil(DATCOM_AIRFOIL *dfoil, struct AIRFOIL *foil);
58
59
#endif