Main Menu

Recent posts

#51
Ballistics / How to calculate Cd
Last post by 375CT - September 22, 2014, 08:31:54 PM
Folks, I wonder if someone has the equations to compute Cd (coeff of drag) from observed downrange velocities.

I know how to do that with BCs, now I'd like to know how to do the same for Cd. Any help is much appreciated in advance. :)
#52
Worksheets / Re: Getting Started Workbook -...
Last post by admin - September 20, 2014, 11:05:02 PM
Years ago I was puzzling with these matters, should altitude be a paremeter?
Yet it is much easier to measure pressure and calculate the density from it. Hence I removed the altitude parameter.

Clearly one can study the sensitivity of a path to atmospheric conditions via BfX_C. Yet, in al those years I have used BfX, I seldom used it. And, if so, mostly for rather academic purposes, to develop an intuition.

Some of the guys on the forum, shooting long range in Australia and Finland, at extreme temperatures, might be devoted users.

Measuring pressure certainly does not require devices that exceed 20 Euro's. For that price I have a electronic weather station over here (not measuring wind speed)

Furthermore, I think that the influence of temperature on the burning of the powder might cause more deviation  than through density fluctuations. However, I am not able to do te calculations. The aformementioned forum users keep their amunition in a  coolbox. In Finland to keep them warm, in Australia to keep them cool  ;D


#53
General discussion / Re: Newbie problems installing
Last post by admin - September 20, 2014, 10:42:55 PM
Thanks for the compliments,

Fine that you managed to install. I certainly wouldn't be able to help you with XP and Office 2003 anymore.

Robert
#54
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
#55
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

#56
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
#57
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.
#58
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



#59
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
#60
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  :(