diff options
author | rodri <rgl@antares-labs.eu> | 2024-01-16 23:02:46 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-01-16 23:02:46 +0000 |
commit | 44d868b0684ef88d830f2e99624b826fc4c3507e (patch) | |
tree | b37a4891f8fc271a209acc8250c3cb8d75083122 /dat.h | |
parent | d6be49085c76bbea87b7d7c61455b93883669bf1 (diff) | |
download | ballistics-44d868b0684ef88d830f2e99624b826fc4c3507e.tar.gz ballistics-44d868b0684ef88d830f2e99624b826fc4c3507e.tar.bz2 ballistics-44d868b0684ef88d830f2e99624b826fc4c3507e.zip |
add air drag.
Diffstat (limited to 'dat.h')
-rw-r--r-- | dat.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,4 +1,6 @@ -#define Eg 9.81 +#define Eg 9.81 /* earth's gravity (m·s⁻²) */ +#define Cd 0.45 /* drag coefficient for a sphere */ +#define ρ 1.293 /* air density (kg·m⁻³) */ #define PIX2M 0.001 #define M2PIX (1.0/PIX2M) @@ -6,6 +8,7 @@ enum { Stheta = 0, Spos, Svel, + Sdrag, Sdeltax, Seta, SLEN, @@ -17,4 +20,5 @@ struct Projectile { Point2 p, v; double mass; + double r; }; |