{"id":2006,"date":"2024-03-14T19:59:21","date_gmt":"2024-03-15T00:59:21","guid":{"rendered":"https:\/\/david.bookstaber.com\/Interests\/?p=2006"},"modified":"2024-03-14T19:59:21","modified_gmt":"2024-03-15T00:59:21","slug":"improved-ballistic-calculator","status":"publish","type":"post","link":"https:\/\/david.bookstaber.com\/Interests\/2024\/03\/improved-ballistic-calculator\/","title":{"rendered":"Improved Ballistic Calculator"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/03\/BallisticTrig.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"446\" data-attachment-id=\"2007\" data-permalink=\"https:\/\/david.bookstaber.com\/Interests\/2024\/03\/improved-ballistic-calculator\/ballistictrig\/\" data-orig-file=\"https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/03\/BallisticTrig.png\" data-orig-size=\"3633,1582\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Ballistic Trigonometry\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/03\/BallisticTrig-1024x446.png\" src=\"https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/03\/BallisticTrig-1024x446.png\" alt=\"Graphic by David Bookstaber illustrating the trigonometry behind sight lines and ballistic trajectories.\" class=\"wp-image-2007\" srcset=\"https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/03\/BallisticTrig-1024x446.png 1024w, https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/03\/BallisticTrig-300x131.png 300w, https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/03\/BallisticTrig-150x65.png 150w, https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/03\/BallisticTrig-768x334.png 768w, https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/03\/BallisticTrig-1536x669.png 1536w, https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/03\/BallisticTrig-2048x892.png 2048w, https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/03\/BallisticTrig-624x272.png 624w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Graphic I made to illustrate some of the concepts incorporated into the latest ballistic calculator.<\/figcaption><\/figure>\n\n\n\n<p>While working on my ballistics book I got sidetracked building a ballistic calculator.  I wanted to programmatically generate some examples, so 6 months ago I went to see what was available in open source.  <a rel=\"noreferrer noopener\" href=\"https:\/\/bookstaber.substack.com\/p\/software-engineering\" target=\"_blank\">As I have noted previously, Python is preferred for this sort of hacking<\/a>.  I found <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/o-murphy\/py-ballisticcalc\" target=\"_blank\">this recently active Python project that looked promising and began to play with it<\/a>.  I encountered some bugs, noted them on GitHub, and was soon collaborating with the Ukrainian developer behind the project.  Since then I have sporadically worked on adding features and improving the code in <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/dbookstaber\/py_ballistics#plot-trajectory-with-danger-space\" target=\"_blank\">my fork here<\/a>.  These became quite extensive, and <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/o-murphy\/py-ballisticcalc\/pull\/50\" target=\"_blank\">today we merged all of my work<\/a> into his repository as a version 2 release!<\/p>\n\n\n\n<p>One valuable feature set I added was to clearly handle <em>non-zero look angles<\/em> \u2013 i.e., when the shooter is sighting above or below the horizon.  All useful ballistic calculators accept look angle as an optional parameter, but none that I have seen make it clear in their output if\/when their distance and drop values are relative to the sight line or to the horizon.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"638\" height=\"432\" data-attachment-id=\"2008\" data-permalink=\"https:\/\/david.bookstaber.com\/Interests\/2024\/03\/improved-ballistic-calculator\/output_2_1\/\" data-orig-file=\"https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/03\/output_2_1.png\" data-orig-size=\"638,432\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"output_2_1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/03\/output_2_1.png\" src=\"https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/03\/output_2_1.png\" alt=\"\" class=\"wp-image-2008\" srcset=\"https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/03\/output_2_1.png 638w, https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/03\/output_2_1-300x203.png 300w, https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/03\/output_2_1-150x102.png 150w, https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/03\/output_2_1-624x423.png 624w\" sizes=\"auto, (max-width: 638px) 100vw, 638px\" \/><figcaption class=\"wp-element-caption\">One of the plots generated by the calculator, highlighting danger space for a specific target and trajectory.<\/figcaption><\/figure>\n\n\n\n<p>Technical details:  The calculator simulates a ballistic trajectory using standard aerodynamic drag models together with a point-mass model of motion, sometimes referred to as 3 degree-of-freedom (3 DoF).  It incorporates atmospheric variables, including multiple wind readings, as well as models of the change in air density by altitude over a trajectory.  It adds Litz&#8217;s spin-drift approximation to windage, so I like to call it 3DoF+ since spin is another degree of freedom.  (I don&#8217;t claim 4 degrees of freedom because the spin isn&#8217;t fully modelled.  Amusingly, Hornady published a calculator under the trademark 4DOF<sup>\u00ae<\/sup> even though theirs likewise provides only auxiliary approximations of spin effects.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While working on my ballistics book I got sidetracked building a ballistic calculator. I wanted to programmatically generate some examples, so 6 months ago I went to see what was available in open source. As I have noted previously, Python is preferred for this sort of hacking. I found this recently active Python project that [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":2007,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[133,56],"tags":[],"class_list":["post-2006","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ballistics","category-tech"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/david.bookstaber.com\/Interests\/wp-content\/uploads\/2024\/03\/BallisticTrig.png","jetpack_shortlink":"https:\/\/wp.me\/po3d1-wm","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/david.bookstaber.com\/Interests\/wp-json\/wp\/v2\/posts\/2006","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/david.bookstaber.com\/Interests\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/david.bookstaber.com\/Interests\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/david.bookstaber.com\/Interests\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/david.bookstaber.com\/Interests\/wp-json\/wp\/v2\/comments?post=2006"}],"version-history":[{"count":4,"href":"https:\/\/david.bookstaber.com\/Interests\/wp-json\/wp\/v2\/posts\/2006\/revisions"}],"predecessor-version":[{"id":2012,"href":"https:\/\/david.bookstaber.com\/Interests\/wp-json\/wp\/v2\/posts\/2006\/revisions\/2012"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/david.bookstaber.com\/Interests\/wp-json\/wp\/v2\/media\/2007"}],"wp:attachment":[{"href":"https:\/\/david.bookstaber.com\/Interests\/wp-json\/wp\/v2\/media?parent=2006"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/david.bookstaber.com\/Interests\/wp-json\/wp\/v2\/categories?post=2006"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/david.bookstaber.com\/Interests\/wp-json\/wp\/v2\/tags?post=2006"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}