blob: 5dfad313964e0e96056263bac5abf5e204cbeca3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
#ifndef CONTEXT_H
#define CONTEXT_H
#include <stddef.h>
#include <stdlib.h>
#include <stdbool.h>
#include "ace.h"
#include "drag_model.h"
typedef enum {
ICAO,
ASM,
} AtmosphereModel;
typedef struct {
double scope_angle;
double bullet_mass;
double bore_height;
double muzzle_velocity;
double ballistic_coef;
DragFunction drag_model;
double twist_dir;
} GunConfig;
typedef struct {
double temperature;
double barometric_pressure;
double relative_humidity;
double wind_speed[2];
size_t wind_dir;
AtmosphereModel atmosphere_model;
} AtmoContext;
typedef struct {
double speed;
double range;
double inclination_angle;
double latitude;
size_t direction;
} TargetContext;
typedef struct {
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
|