diff options
| author | hybrid <hybrid@hybridlabs.pro> | 2026-07-18 11:44:43 +0300 |
|---|---|---|
| committer | hybrid <hybrid@hybridlabs.pro> | 2026-07-18 11:44:43 +0300 |
| commit | 17eaf66bb7713378b95cce0fccd2cf32bde213a6 (patch) | |
| tree | d5a0d7221c6976ab7dbdd6a53e04d47208ac83ac /include/drag_model.h | |
| parent | 2cff971b86fdd0f53014d302d66c83cd5a6088c5 (diff) | |
| download | a3catragmx-17eaf66bb7713378b95cce0fccd2cf32bde213a6.tar.gz a3catragmx-17eaf66bb7713378b95cce0fccd2cf32bde213a6.tar.bz2 a3catragmx-17eaf66bb7713378b95cce0fccd2cf32bde213a6.zip | |
add: tmp
Diffstat (limited to '')
| -rw-r--r-- | include/drag_model.h | 23 |
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 |
