Skip to content

Commit

Permalink
Merge pull request #3060 from acemod/abVerticleCentripetal
Browse files Browse the repository at this point in the history
Ab - 	Fix Eotvos effect
  • Loading branch information
thojkooi committed Jan 8, 2016
2 parents 45986c0 + bba908f commit 1ee4c12
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
Binary file modified ace_advanced_ballistics.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions extensions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ endif()

string(TIMESTAMP ACE_BUILDSTAMP "%Y-%m-%dT%H:%M:%SZ")
set(ACE_VERSION_MAJOR 3)
set(ACE_VERSION_MINOR 2)
set(ACE_VERSION_REVISION 0)
set(ACE_VERSION_MINOR 4)
set(ACE_VERSION_REVISION 1)
EXECUTE_PROCESS(COMMAND git rev-parse --verify HEAD
OUTPUT_VARIABLE T_ACE_VERSION_BUILD
OUTPUT_STRIP_TRAILING_WHITESPACE
Expand Down
5 changes: 3 additions & 2 deletions extensions/advanced_ballistics/AdvancedBallistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <unordered_map>
#include <random>


#define GRAVITY 9.80665f
#define ABSOLUTE_ZERO_IN_CELSIUS -273.15f
#define KELVIN(t) (t - ABSOLUTE_ZERO_IN_CELSIUS)
Expand Down Expand Up @@ -572,8 +573,8 @@ void __stdcall RVExtension(char *output, int outputSize, const char *function)
positionOffset[1] += cos(bulletDir + M_PI / 2) * horizontalDeflectionPartial;
}

double centripetalAccel = 2 * 0.0000729 * (bulletDatabase[index].muzzleVelocity / -32.2) * cos(bulletDatabase[index].latitude) * sin(bulletDir);
velocityOffset[2] -= centripetalAccel * deltaT;
double centripetalAccel = 2 * 0.0000729 * (bulletDatabase[index].muzzleVelocity) * cos(bulletDatabase[index].latitude) * sin(bulletDir);
velocityOffset[2] += centripetalAccel * deltaT;

double spinDrift = bulletDatabase[index].twistDirection * 0.0254 * 1.25 * (bulletDatabase[index].stabilityFactor + 1.2) * pow(TOF, 1.83);
double spinDriftPartial = spinDrift - bulletDatabase[index].spinDrift;
Expand Down
5 changes: 4 additions & 1 deletion extensions/common/shared.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#pragma once

//_USE_MATH_DEFINES + cmath needs to be first or M_PI won't be defined in VS2015
#define _USE_MATH_DEFINES
#include <cmath>

#include "targetver.h"
#include <assert.h>
#include <stdio.h>
Expand All @@ -11,7 +15,6 @@
#include <map>
#include <unordered_map>
#include <memory>
#include <cmath>
#include <cstdint>
#include <streambuf>
#include "ace_version.hpp"
Expand Down

0 comments on commit 1ee4c12

Please sign in to comment.