Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ab - Fix Eotvos effect #3060

Merged
merged 2 commits into from
Jan 8, 2016
Merged

Ab - Fix Eotvos effect #3060

merged 2 commits into from
Jan 8, 2016

Conversation

PabstMirror
Copy link
Contributor

@ulteq

This could really use another set of eyes on the math, but I think this is a fix for the vertical Coriolis effecting being off.

Ref https://en.wikipedia.org/wiki/E%C3%B6tv%C3%B6s_effect

2 * OMEGA[rotationRate (radians / second)] * u [MuzzleVelocity in the eastern direction (meters / second)] * cos (PHI[latitude])

which is in m/(s^2)

m/(s^2) * deltaTime = change in velocity Over DeletaTime

It used to divide by -32.2 which is gravity in freedom units???
I think this was used in a calculation for getting the unit-less gravity multiplier, but here we want the actual acceleration.

Also, I am not sure why we are using muzzleVelocity * sin(bulletDir), as when the bullet slows down the effect should drop, but this difference would be minor and might just be so it matches the calculations in the atragmx

Just use #define _USE_MATH_DEFINES for cmath
@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label Dec 20, 2015
@PabstMirror
Copy link
Contributor Author

Is this ok for 3.4.2 / should I recompile dll for 3.4.2?

set(ACE_VERSION_MINOR 2)
set(ACE_VERSION_REVISION 0)
set(ACE_VERSION_MINOR 4)
set(ACE_VERSION_REVISION 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 if for 3.4.2

@bux
Copy link
Member

bux commented Jan 5, 2016

👍
IIRC @J3aLeiNe has confirmed that this change is working.

How's the process with BattleEye if we recompile the DLL's? Do they have to whitelist them?
@ViperMaul do you happen to know that?

@jonpas
Copy link
Member

jonpas commented Jan 5, 2016

AFAIK ACE3 DLLs are automatically whitelisted.

@Laid3acK
Copy link
Contributor

Laid3acK commented Jan 5, 2016

This change works but i think it could be interesting to do more test with "g" in metric unit.
The AtragMx uses the same Bryan Litz's formula with metric unit and the vertical coriolis effect's corrections are accurate in game : _eoetvoesMultiplier = 2 * (0.0000729 * _muzzleVelocity / -9.80665) * cos(_latitude) * sin(_directionOfFire);

I suppose that it will be the same with the bullet trajectory in game ?

@PabstMirror PabstMirror added this to the 3.5.0 milestone Jan 7, 2016
@thojkooi thojkooi assigned thojkooi and unassigned ulteq Jan 8, 2016
@thojkooi thojkooi modified the milestones: 3.4.2, 3.5.0 Jan 8, 2016
thojkooi added a commit that referenced this pull request Jan 8, 2016
@thojkooi thojkooi merged commit 1ee4c12 into release Jan 8, 2016
@thojkooi thojkooi deleted the abVerticleCentripetal branch January 8, 2016 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix Release Notes: **FIXED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants