#ifndef DRAG_MODEL_H #define DRAG_MODEL_H #include 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