summaryrefslogtreecommitdiffstats
path: root/include/context.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/context.h86
1 files changed, 66 insertions, 20 deletions
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 <stddef.h>
#include <stdlib.h>
+#include <stdbool.h>
+
+#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