GithubHelp home page GithubHelp logo

jinjinov / external-ballistics-library Goto Github PK

View Code? Open in Web Editor NEW
7.0 4.0 1.0 377 KB

C# port of the GNU Ballistics Library originally created by Derek Yates

License: GNU General Public License v3.0

C# 47.71% HTML 12.41% C++ 39.89%

external-ballistics-library's Introduction

External Ballistics Library

C# port of the GNU Ballistics Library originally created by Derek Yates

original code can be found at: https://sourceforge.net/projects/ballisticslib/

Folder "Ballistics" contains C# code - minimal changes to the original code

Folder "BallisticsLibrary" contains C++ code - refactored from procedural style to OOP. This is very useful if you need multiple projectiles - if you are making a game and/or you want to control the calculation step yourself.

Two bugs were fixed:

##1. bug in original code:

dv = retard(DragFunction,DragCoefficient,v+headwind);

"v" is in feet per second

"headwind" is in miles per hour

should be:

dv = retard(DragFunction,DragCoefficient,v+headwind*5280.0/3600.0);

##2. bug in original code:

ptr[10n+5]=RadtoMOA(atan(ptr[10n+4])); // Windage in MOA

should be:

ptr[10n+5]=RadtoMOA(atan(ptr[10n+4]/(12*x))); // Windage in MOA

external-ballistics-library's People

Contributors

jinjinov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

bratekai

external-ballistics-library's Issues

Explanation of bug

In the README you point out two bugs you found in the code. Can you give more detail on the second one?

##2. bug in original code:

ptr[10n+5]=RadtoMOA(atan(ptr[10n+4])); // Windage in MOA

should be:

ptr[10n+5]=RadtoMOA(atan(ptr[10n+4]/(12*x))); // Windage in MOA

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.