summaryrefslogtreecommitdiffstats
path: root/include/drag_model.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/drag_model.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/drag_model.h b/include/drag_model.h
index baf5f72..8c18bed 100644
--- a/include/drag_model.h
+++ b/include/drag_model.h
@@ -1,6 +1,29 @@
#ifndef DRAG_MODEL_H
#define DRAG_MODEL_H
+#include <stddef.h>
+typedef enum {
+ DRAG_G1,
+ DRAG_G2,
+ DRAG_G5,
+ DRAG_G6,
+ DRAG_G7,
+ DRAG_G8,
+ DRAG_COUNT
+} DragFunction;
+
+typedef struct {
+ size_t num_points;
+ const double *mach;
+ const double *cd;
+} DragModel;
+
+extern const DragModel drag_models[DRAG_COUNT];
+
+static inline const DragModel* get_drag_model(DragFunction func) {
+ if (func >= DRAG_COUNT) return NULL;
+ return &drag_models[func];
+}
#endif