From 866393b70f5baddcaf9571b7240ebd4ce44bc67c Mon Sep 17 00:00:00 2001 From: hybrid Date: Sat, 11 Jul 2026 10:15:52 +0300 Subject: add: tmp commit --- include/context.h | 86 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 66 insertions(+), 20 deletions(-) (limited to 'include/context.h') diff --git a/include/context.h b/include/context.h index 95580ee..a2f651f 100644 --- a/include/context.h +++ b/include/context.h @@ -1,34 +1,80 @@ +#ifndef CONTEXT_H +#define CONTEXT_H + +#include #include +#include + +#include "ace.h" typedef enum { - ATM_1, - ATM_2 -} ATM_MODEL; + BC_UNKNOWN = 0, + BC_G1, + BC_G2, + BC_G3, + BC_G4, + BC_G5, + BC_G6, + BC_G7, +} BallisticModel; + +typedef enum { + ICAO, + ASM, +} AtmosphereModel; typedef struct { - float scope_angle; - float bullet_mass; - float bore_height; - float muzzle_vel; - float ballistic_coef; + double scope_angle; + double bullet_mass; + double bore_height; + double muzzle_velocity; + double ballistic_coef; size_t drag_model; - float twist_dir; -} gun_config; + double twist_dir; +} GunConfig; typedef struct { - float termperature; - float bar_pressure; - float rel_humidity; - float wind_speed; + double temperature; + double barometric_pressure; + double relative_humidity; + double wind_speed[2]; size_t wind_dir; - ATM_MODEL atmosphere_model; -} atmo_context; + AtmosphereModel atmosphere_model; +} AtmoContext; typedef struct { - float target_speed; - float target_range; -} target_context; + double speed; + double range; + double inclination_angle; + double latitude; + size_t direction; +} TargetContext; typedef struct { - gun_config gun; + GunConfig gun; + TargetContext target; + AtmoContext atmosphere; + size_t sim_steps; + bool store_range_card; + size_t stability_factor; +} ATragMXContext; + +typedef struct { + double w1; + double w2; +} Windage; + +typedef struct { + double elev; + Windage windage; + double lead; + double time_of_flight; + double remaining_velocity; + double remaining_energy; + double coriolis_vdrift; + double coriolis_hdrift; + double spin_drift; + double *range_card; } ATragMXSolution; + +#endif -- cgit v1.3.1