summaryrefslogtreecommitdiffstats
path: root/src/atragmx.c
diff options
context:
space:
mode:
authorhybrid <hybrid@hybridlabs.pro>2026-07-12 21:30:48 +0300
committerhybrid <hybrid@hybridlabs.pro>2026-07-12 21:30:48 +0300
commit4020a7124a80a608acd41a913ca5f6ad3ff3d488 (patch)
tree53ecefe6279497a4d2c6a921cab6dade6ed85e40 /src/atragmx.c
parent866393b70f5baddcaf9571b7240ebd4ce44bc67c (diff)
downloada3catragmx-4020a7124a80a608acd41a913ca5f6ad3ff3d488.tar.gz
a3catragmx-4020a7124a80a608acd41a913ca5f6ad3ff3d488.tar.bz2
a3catragmx-4020a7124a80a608acd41a913ca5f6ad3ff3d488.zip
add: tmp commit
Diffstat (limited to 'src/atragmx.c')
-rw-r--r--src/atragmx.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/atragmx.c b/src/atragmx.c
index af68b2c..ff684c3 100644
--- a/src/atragmx.c
+++ b/src/atragmx.c
@@ -97,8 +97,7 @@ ATragMXSolution *ATragMXCalcSolution(ATragMXContext *ctx, ace_config *ace) {
if (ace->ballistics->enabled)
ctx->gun.ballistic_coef
- = atmospheric_correction(
- ctx->gun.ballistic_coef,
+ = atmospheric_correction(ctx->gun.ballistic_coef,
ctx->atmosphere.temperature,
ctx->atmosphere.barometric_pressure,
ctx->atmosphere.relative_humidity,
@@ -129,8 +128,17 @@ ATragMXSolution *ATragMXCalcSolution(ATragMXContext *ctx, ace_config *ace) {
// calculate magnitude of bullet.velocity
bullet.speed = hypot(bullet.velocity[0],
hypot(bullet.velocity[1], bullet.velocity[2]));
+ memcpy(local_solution.true_velocity,
+ (double[3]){bullet.velocity[0] - wind1[0],
+ bullet.velocity[1] - wind1[1],
+ bullet.velocity[2] - wind1[2]},
+ sizeof(local_solution.true_velocity));
+ local_solution.true_speed = hypot(local_solution.true_velocity[0],
+ hypot(local_solution.true_velocity[1],
+ local_solution.true_velocity[2]));
+
+ if (ace->ballistics->enabled)
-
}
return sln;