Recent posts

#51
Worksheets / Re: Getting Started Workbook -...
Last post by DTV Student - September 18, 2014, 10:22:22 PM
Hi Folks,

I think I am beginning to understand why "Altitude" is not part of the parameters for the BfX_AD and BfX_C functions.  I think it is because the barometric pressure input is expected to be an absolute pressure, not a pressure that has been adjusted to sea level conditions.  I suspect the absolute barometric pressure input is often measured at the rifle range with one of those expensive portable "Kestrel" weather stations. 

I do not have access to that sort of hardware, so I rely on weather reports to supply the temperature, barometric pressure and percent relative humidity.  I try to pick a weather stations close to my rifle range or close to my favorite hunting areas.  I wrote some VBA code last summer to sort of "undo" barometric pressure adjusted to sea level conditions as part of my version of an "Air Density" function.  Most of the formulas were collected from Wikipedia.   The "undo" code is contained in a few lines in the middle of following:

   
   
Public Function AirDensity(Altitude, BarometericPressure, RelativeHumidity, Temperature)
    Const ProcedureName = "AirDensity"
    On Error GoTo ProcedureErrorTrap
   
    Dim Alt As Double                               ' Altitude Above Sea Level (input units = feet)
    Dim BP As Double                               ' Barometeric Pressure (input units = inches Hg)
    Dim RH As Double                               ' Relative Humidity (input units = percent)
    Dim TempF As Double                          ' Ambient Temperature (input units = degrees F)
   
    Dim TempC As Double                          ' Temperature converted to degrees Celcius
    Dim TempK As Double                           ' Temperature converted to degrees Kelvin
    Dim ReportedPressure As Double           ' Reported pressure (inches Hg) at a given altitude
    Dim ExpectedPressure As Double           ' Expected pressure (inches Hg) at a given altitude
    Dim PressureAdjustment As Double        ' Adjustment (inches Hg) for sea level conditions
    Dim ObservedPressure As Double          ' Observed total absolute pressure (inches Hg)
   
    Dim Pta As Double                                ' Total Absolute Pressure (Pascals)
    Dim Pda As Double                               ' Partial Pressure of Dry Air (Pascals)
    Dim Pwv As Double                               ' Partial Pressure of Water Vapor (Pascals)
   
    Dim AirD As Double                              ' Air Density (kg/m^3)
   
    Alt = Altitude
    BP = BarometericPressure
    RH = RelativeHumidity
    TempF = Temperature
    TempC = (TempF - 32) / 1.8                                     ' Units = degrees Celcius
    TempK = TempC + 273.15                                        ' Units = degrees Kelvin
   
    ' A weather station observes the actual total absolute pressure, adjusts this pressure to
    ' what it would be at sea level, and then reports the result as the atmospheric pressure.
    ' We need to reverse this process to estimate the observed total absolute pressure.
   
    ReportedPressure = BP
    ExpectedPressure = 29.92126 * (TempK / (TempK + (-0.0019812 * Alt))) _
        ^ ((32.17405 * 28.9644) / (89494.596 * (-0.0019812)))
    PressureAdjustment = 29.92126 - ExpectedPressure
    ObservedPressure = ReportedPressure - PressureAdjustment         ' Units = inches mercury
   
    Pta = ObservedPressure * (101325 / 29.92)                                  ' Units = Pascals
    Pwv = RH * (6.1078 * 10 ^ ((7.5 * TempC) / (237.3 + TempC)))    ' Units = Pascals
    Pda = Pta - Pwv                                              ' Units = Pascals
   
    AirD = (Pda / (287.05 * TempK)) + (Pwv / (461.495 * TempK))      ' Units = kilograms/cubic meter
   
    'MsgBox "TempF = " & TempF & vbCrLf _
        & "TempC = " & TempC & vbCrLf _
        & "TempK = " & TempK & vbCrLf & vbCrLf _
        & "ReportedPressure = " & Format(ReportedPressure, "0.000") & " (inches Hg)" & vbCrLf _
        & "ExpectedPressure = " & Format(ExpectedPressure, "0.000") & " (inches Hg)" & vbCrLf _
        & "PressureAdjustment = " & Format(PressureAdjustment, "0.000") & " (inches Hg)" & vbCrLf _
        & "ObservedPressure = " & Format(ObservedPressure, "0.000") & " (inches Hg)" & vbCrLf & vbCrLf _
        & "Pta = " & Pta & " (Pascals)" & vbCrLf _
        & "Pwv = " & Pwv & " (Pascals)" & vbCrLf _
        & "Pda = " & Pda & " (Pascals)" & vbCrLf & vbCrLf _
        & "AirD = " & AirD & " (kg/m^3)" & vbCrLf _
        , , "De-Bugging Air Density Calculations"
   
    AirDensity = AirD
    Exit Function
     
ProcedureExit:
    Exit Function
   
ProcedureErrorTrap:
    Select Case Err.Number
        Case Else
            MsgBox "ProcedureName = " & ProcedureName & vbCrLf & vbCrLf _
                & "Err.Number = " & Err.Number & vbCrLf & vbCrLf _
                & "Err.Description = " & Err.Description, vbCritical, "We Have An Error..."
            Resume ProcedureExit
    End Select
End Function



Thank you,
DTV Student
#52
Worksheets / Getting Started Workbook - BfX...
Last post by DTV Student - September 16, 2014, 10:06:05 PM
Hi Folks,

I am a newbie and have been exploring some of the BfX functions documented in the "Getting Started.XLS" file.  The one I am currently working on is for calculating Air Density, BfX_AD. 

I noticed that there is NOT an input parameter for the "Altitude Above Sea Level".  I live near the "Smoky Mountains".  They are old and eroded.  They are not impressive when compared to the Swiss Alps.  LOL...  The altitude of my "hills" range from 1000 feet to about 6000 feet above sea level.

The atmospheric pressure reported on the radio, television, and internet is NOT reported as absolute pressure.  The reported pressure has been adjusted for the local weather station's altitude to sea level conditions.

The adjustment to sea level means that the normal range of fluctuations in atmospheric pressure is the same for everyone.  The pressures that are considered high pressure or low pressure do not depend on geographical location.  This makes isobars on weather maps meaningful and useful tools.

So, I am thinking this is another good reason to know what the local altitude is so that the reported barometric pressure can be corrected back to the observed absolute pressure.

I have heard that changes in the Air Density due to temperature, barometric pressure, altitude, and % relative humidity might have as much as a 5 % effect on the flight path of a projectile.  Is this true?

Your comments and suggestions are always appreciated.

DTV Student

#53
General discussion / Re: Newbie problems installing
Last post by DTV Student - September 16, 2014, 03:51:25 PM
Hi Folks,

I have an ancient, 10 year old, laptop, running Windows XP and Office Suite 2003.  I recently discovered the BfX website and decided to download the BfX addin for Excel.  I first tried the automatic installation which seemed to work until I tried to select BfX.xll for an addin from the "C:\Program Files\BfX Excel AddIns" directory.  BfX.xll was there.  When I tried to load it, I got an error message... something about not being a valid addin.  Ouch!!!

After trying to install it 2 or 3 more times and getting the same error message, I looked around the website and found another way to just download BfX.xll for Excel 2003.  I downloaded this BfX.xll and moved it to the same directory as above.  This BfX.xll had a much more recent date than the previous BfX.xll and it worked!!!

After reading through most of the "Getting Started.XLS" tabs, I very quickly was able to construct a trajectory table and chart for my 55 year old squirrel rifle, a Marlin Model 80, using a ballistic coefficient of 0.12 with the RA4 drag function.  I was amazed.  For several hours daily during July and August, I researched and wrote my own version of an Excel ballistics calculator.  It works, but my efforts writing a quickly converging solution for the angle of departure which including air drag leaves a lot to be desired.  It is very slow and requires many iterations.  LOL !!!

The BfX.xll is much, much, much faster and offers more drag functions.  Fantastic !!!

Thank you so very much for all your hard work !!!

Bravo !!!

DTV Student
#54
Updates / Re: Update 2014
Last post by meccastreisand - August 04, 2014, 06:41:21 PM
Please check out www.ballisticxlr.com, you can download my current version from there, it's in Excel 97-2004 format (.xls). There's a very nice spin drift equation there. It's not super advanced in that it doesn't take polymer tips and such into account but it's been good to me out to 1500m with BTHP and A-Max projectiles from Hornady, Sierra, Berger and Nosler.
#55
Updates / Update 2014
Last post by admin - July 29, 2014, 01:12:44 PM
Currently I am working on an update.

this would ensure that you run the latest MS software in Excel.

BfX_U will get the possibility to do scoring on several targets: e.g. BfX_U("300mI";12;"cm") would return 8, as the eight ring on that target has a radius of 15 cm and the nine ring has  10 cm radius.

From BfX/Forum users I got several requests  to extend BfX, e.g. spin drift.
Some of you manufactured some Excel software for this.
Please mail me your wishes and the corresponding algorithms.

Robert



#56
Ballistics / Re: Weapon Employment Zone
Last post by 375CT - July 02, 2014, 06:20:43 AM
In case you guys need to go VB.net some day here is a useful RNG (Gaussian) snippet I tested and works really well. The original code was written in C# which I later converted.

Public Class RandomGenerator
 
Private ReadOnly _random As Random
'indicates that an extra deviates was already calculated 
Private _hasAnotherDeviate As Boolean
'The other deviate calculated using the Box-Muller transformation 
Private _otherGaussianDeviate As Double
Public Sub New()
Me.New(New Random())
End Sub

Public Sub New(ByVal seed As Integer)
Me.New(New Random(seed))
End Sub

Public Sub New(ByVal random As Random)
_random = random
End Sub

' returns a normally distributed deviate with zero mean and unit variance. 
' Adapted from Numerical Recipe page 289: Normal (Gaussian) Deviates
 
Public Function NormalDeviate() As Double
Dim rsq, v1, v2 As Double
If _hasAnotherDeviate Then
'we have an extra deviate handy. Reset the flag and return it     
   _hasAnotherDeviate = False
  Return _otherGaussianDeviate
End If
Do
v1 = UniformDeviate(-1, 1) 'pick two uniform number
v2 = UniformDeviate(-1, 1) 'in the square extending from -1 to +1
rsq = v1 * v1 + v2 * v2 'see if they are in the unit circle
Loop While rsq >= 1.0 OrElse rsq = 0.0
'now make the box-muller transformation to get two normal deviates. 
Dim fac As Double = Math.Sqrt(-2.0 * Math.Log(rsq) / rsq)
'Return one and save one for next time
_otherGaussianDeviate = v1 * fac
_hasAnotherDeviate = True
Return v2 * fac
End Function

' Returns a uniformly distributed random number between min and max.
Public Function UniformDeviate(ByVal min As Double, ByVal max As Double) As Double
Return (max - min) * _random.NextDouble() + min
End Function

' Returns a random number between 0 and 1 
Public Function NextDouble() As Double
  Return _random.NextDouble()
End Function

End Class
#57
Ballistics / Re: Weapon Employment Zone
Last post by 375CT - July 01, 2014, 08:11:31 PM
Mman,

Great work, really liked the new sheet. Sorry if I miswrote my question, but I meant that MC was just for creating the random sampling, then applying CEP to yield the HP in one of the calcs you did. Please correct me if I'm wrong.

Got it regarding the variations and SD inputs.

Any time later, english comments would be nice, my finnish is awful  :(
#58
Ballistics / Re: Weapon Employment Zone
Last post by mman - July 01, 2014, 11:28:38 AM
Quote from: admin on July 01, 2014, 10:44:34 AM
Quote from: mman on July 01, 2014, 09:12:33 AM

This input field allows you to move group center in relation to target, if that is what you meant?


Yes. I our case, at 300m, people aim with their telecopes at a white sticker 20cm below the electronic target center.
But I guess aiming error is compensated with equivalent scope correction so that group center is on correct place?

You can download my wez tool from here:
http://wikisend.com/download/171348/WEZ CEP&MC eng.xlsm

Most of it is still in finnish, sorry.
#59
Ballistics / Re: Weapon Employment Zone
Last post by admin - July 01, 2014, 10:44:34 AM
Quote from: mman on July 01, 2014, 09:12:33 AM

This input field allows you to move group center in relation to target, if that is what you meant?


Yes. I our case, at 300m, people aim with their telecopes at a white sticker 20cm below the electronic target center.
#60
Ballistics / Re: Weapon Employment Zone
Last post by mman - July 01, 2014, 09:12:33 AM
Quote from: admin on June 30, 2014, 08:08:28 PM
would it be possible to include the effects of a hold over/under (and the horizontal equivalent)? (in combination with cant)

This input field allows you to move group center in relation to target, if that is what you meant?



Quote from: 375CT on June 30, 2014, 08:55:22 PM
Is this WEZ tool inlcuded in your Hit Prob spreadsheet? Asking because I'd like to ry it if you don't mind.
Yes, it is. I'll attach it later today.

Quote from: 375CT on June 30, 2014, 08:55:22 PM
LIked the idea of going Monte Carlo for the random sequence then using CEP for hit prob. Nice touch.
That's not the case. I calculated hit probability with two different methods:
1. CEP which is nothing to do with random sequence. Basicly it is just analytical way to express hit probability on round target.
2. Monte carlo which is based on Robert's rang.

Quote from: 375CT on June 30, 2014, 08:55:22 PM
Not quite clear the difference in the MV fields errors, any more detail will be kindly grateful.
On dispersion factors field you define SD of group (all values are expressed in standard deviations). On group center bias field you define how far away in average group center is from target center.
e.g. "Muzzle velocity variation" of 3 m/s means that your MV SD is 3 m/s. "Wrong muzzle velocity" of 3 m/s means that you have assumed muzzle velocity to be 3 m/s higher than it actually is. --> Your ballistic calculation gives you wrong holdover/scope correction clicks which leads to group center shift downwards.