Click here to Skip to main content
15,882,063 members
Articles / Programming Languages / C#

Vehicle Casualty Recovery Calculation

Rate me:
Please Sign up or sign in to vote.
3.20/5 (5 votes)
8 Apr 2010CPOL3 min read 40K   778   8   13
This software calculates the recovery requirement for a bogged down vehicle.

1.jpg

Figure 1: The input window

Source of Motivation

Various questions were the source of motivation for development of this project. Among them were:

  1. On what factors does the recovery of vehicle depend?
  2. When and what all is required to recover any vehicle (tools, accessories, ropes and recovery vehicle)?
  3. How are the terms, load resistance, ground factor and terrain dependent on recovery of vehicles?

While addressing the answer to these questions, I was able to develop an application which is capable of solving recovery related problems and propose the user with a suitable solution.

Introduction

This software enables the very simple and interactive way to calculate the recovery resources required to recover a bogged down vehicle. The factors upon which any recovery calculation depend, include:

  1. Rolling Resistance or simply RR, (related to the rolling of tires of the casualty/bogged down vehicle)
  2. Gradient Resistance or GR (related to the angle or slope at which the recovery force is to be applied)
    It is noteworthy that when the direction of application of force is greater than 45 degrees, the GR will become equal to the weight of the casualty. Or in other words, the lift is in action.
  3. Damage Resistance or DR (while the application of force of recovery) - The variety of vehicles capable of recovering the vehicles is also included.
  4. Additional Resistance or AR (any other factor that might include the recovery force magnitude)
  5. Ground Factor or GF (type of ground where the casualty is bogged down, e.g., more force will be applied to recover a vehicle in muddy surface than a grassy ground and vice versa)

The user or recovery vehicle operator puts in these values and gets the output.

2.jpg

Figure 2: The Output Window

Various Calculations

Rolling Resistance (RR) = Weight of the casualty/Ground Factor;

Gradient Resistance (GR)

  1. For Angle (0-45) degrees

    (Weight of Casualty x angle )/60;

  2. For Angle greater than 45 degrees.

    (weight of casualty x 60)/60; (i.e.; GR = weight of Casualty)

Draw Bar Pull (DBP) = Rolling resistance + Gradient Resistance + Damage Resistance + Additional Resistance.

Safety Factor(SF) = DBP/4;

Estimated Pull (EP) = DBP + SF;

Mechanical Advantage (MA) = EP/Applied Pull or Recovery force available.

3.jpg

Figure 3: Tackle Layout (Pictorial Representation)

Tackle Layout shows the pictorial representation of recovery operation, i.e.; how the layout is to be made while performing the required recovery.

4.jpg

Figure 4: List of some notable recovery appliances used in the field.

There are a number of tools which are required in successful completion of recovery operation. I have just included a few (just to develop an understanding of how and when the requisite tool is required) in my application.

The Code

The code that I have implemented is pretty simple.

C#
// Main Program Loading 
public partial class Form1 : Form
    {
        double a, b, gf, grad, rr, gr, dr, ar, dbp, sf, ep, ma;// assigning the variables
        public Form1()
        {
            InitializeComponent();
            pictureBox1.ImageLocation = Application.StartupPath + 
				"\\as.jpg";//selection of a load image
            other1.Visible = false;
            other1.Text = "";
            Other2.Visible = false;
        }
      //Defining the Type of Casualty
        private void Casualty_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (Casualty.Text == "Jeep")
                a = 1;
            else if (Casualty.Text == "3/4 Ton Vehicles")
                a = 3;
            else if (Casualty.Text == "2-1/2 Ton Vehicles")
                a = 6;
            else if (Casualty.Text == "5 Ton Recovery Vehicles")
                a = 18;
            else if (Casualty.Text == "Tank M-48A5")
                a = 48;
            else if (Casualty.Text == "Tank T-59M")
                a = 36;
            else if (Casualty.Text == "Tank T-69IIM")
                a = 36.7;
            else if (Casualty.Text == "Tank T-85IIAP")
                a = 44;
            else if (Casualty.Text == "Tank T-80UD")
                a = 46;
            else if (Casualty.Text == "Tank Centurion")
                a = 52;
            else if (Casualty.Text == "SP M-109A2/M 110A2")
                a = 46;
            else if (Casualty.Text == "Other")
            {
                other1.Visible = true; //for assigning the user based casualty
            }            
        }
        //Defining the Type of Recovery available
         private void Recovery_Veh_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (Recovery_Veh.Text == "Truck Wrecker M-816")
                b = 22.5;
            else if (Recovery_Veh.Text == "Tatra AV-8")
                b = 25;
            else if (Recovery_Veh.Text == "Truck Wrecker FIAT 90.17WM")
                b = 6;
            else if (Recovery_Veh.Text == "ARV M-88A1")
                b = 45;
            else if (Recovery_Veh.Text == "ARV W-653")
                b = 35;
            else if (Recovery_Veh.Text == "Towing Tractor T-59")
                b = 22.5;
            else if (Recovery_Veh.Text == "2-1/2 Ton Vehicle")
                b = 5;
            else if (Recovery_Veh.Text == "Truck Wrecker IVECO 140E24W")
                b = 7.5;
            else if (Recovery_Veh.Text == "Other")//for user assignment
                Other2.Visible = true;
        }
        //Defining the Type of Ground Factor
        private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (comboBox3.Text == "Smooth Road")
                gf = 25;
            else if (comboBox3.Text == "Grass")
                gf = 7;
            else if (comboBox3.Text == "Gravel")
                gf = 5;
            else if (comboBox3.Text == "Soft Sand")
                gf = 4;
            else if (comboBox3.Text == "Loose Dry Sand")
                gf = 4;
            else if (comboBox3.Text == "Shallow Mud")
                gf = 3;
            else if (comboBox3.Text == "Wet Sand")
                gf = 3;
            else if (comboBox3.Text == "Mud")
                gf = 3;
            else if (comboBox3.Text == "Soft Clay and Sand")
                gf = 2;
            else if (comboBox3.Text == "Clay with Sand")
                gf = 2;
            else if (comboBox3.Text == "Deep Mud")
                gf = 2;          
        }
                //Performing calculations
private void btnCal_Click(object sender, EventArgs e)
        {
            try
            {
                if (textBoxGrad.Text != "")
                {
                    grad = double.Parse(textBoxGrad.Text);
                    rr = a / gf; //rolling resistance = weight of casualty/ground factor
                    textBox1.Text += string.Format("{0:0.0}", rr);


                    if (textBoxDR.Text == "")
                        dr = 0; //damage resistance
                    else
                        dr = double.Parse(textBoxDR.Text);
                    if (textBoxAR.Text == "")
                        ar = 0;//additional resistance
                    else
                        ar = double.Parse(textBoxAR.Text);
                    if (grad > 90 || grad < 0) //input for gradient(slope) value
                    {
                        MessageBox.Show("Invalid entry for Value of Gradient\n\n 
			(Enter any value from 0 to 90 Degrees)");
                    }

                    else
                    {
                        if (grad <= 45)
                        {
                            gr = (a * grad) / 60; 	//gradient resistance based on 
						//the value of gradient
                        }
                        else
                            gr = a;
                    }
                    textBoxGR.Text += string.Format("{0:0.0}", gr);

                    dbp = rr + gr + ar + dr; //draw bar pull = rolling resistance + 
		        //gradient resistance + additional resistance + drag resistance
                    textBoxDBP.Text += string.Format("{0:0.0}", dbp);

                    sf = dbp / 4; //safety factor = draw bar pull/4 (formula)
                    textBoxSF.Text += string.Format("{0:0.0}", sf);

                    ep = dbp + sf; //estimated pull = draw bar pull + safety factor
                    textBoxEP.Text += string.Format("{0:0.0}", ep);

                    ma = ep / b; 	//mechanical advantage = 
				//estimated pull/recovery vehicle available
                    double tt = 0;//for selection of tackle layout figure.
                    for (double ab = 0; ab < 10; ab++)//can support upto 9:1 tackle layout
                    {
                        if (ab > ma)
                        {
                            tt = ab;
                            ab = 80;// just to break the loop
                            textBoxMA.Text += string.Format("{0:0}", tt);
                        }
                    }

                    double t = 0;
                    for (double ab = 0; ab < 8; ab++)
                    {
                        if (ab > ma)
                        {
                            t = ab;
                            textBox2.Text += t + " : 1";//selection of image for 
							//tackle layout
                            ab = 8;
                            pictureBox1.ImageLocation = Application.StartupPath + 
							"\\" + t + ".jpg";
                        }
                    }
                }
                else
                {
                    MessageBox.Show("Please enter the Value of 
			Gradient\n \n Help! (From 0 to 90 Degrees)");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error: " + ex.Message);
            }
        }
        private void button2_Click(object sender, EventArgs e)//refresh
        {
            textBox1.Text = "";
            textBox2.Text = "";
            textBoxAR.Text = "";
            textBoxDBP.Text = "";
            textBoxDR.Text = "";
            textBoxEP.Text = "";
            textBoxGR.Text = "";
            textBoxGrad.Text = "";
            textBoxMA.Text = "";
            textBoxSF.Text = "";
            pictureBox1.ImageLocation = Application.StartupPath + "\\as.jpg";
            other1.Text = "";
            Other2.Text = "";
            other1.Visible = false;
            Other2.Visible = false;
        }
        private void other1_TextChanged(object sender, EventArgs e)
        {
            if (other1.Text != "")//for user input of casualty
                a = double.Parse(other1.Text);
        }
        private void Other2_TextChanged(object sender, EventArgs e)
        {
            if (Other2.Text != "")//for user input of recovery
                b = double.Parse(Other2.Text);
        }
        private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AboutBox1 ab = new AboutBox1();//pretty simple about box
            ab.ShowDialog();
        }
        private void recoveryAppliancesToolStripMenuItem1_Click
				(object sender, EventArgs e)
        {
            Form2 rec_ap = new Form2();//dialog window for recovery appliances.
            rec_ap.ShowDialog();
        }
        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
       {
           Close();
       }
        private void excelFileToolStripMenuItem_Click
		(object sender, EventArgs e)//for loading Excel file
       {
           OpenFileDialog book = new OpenFileDialog();
           book.InitialDirectory = Application.StartupPath;
           book.Filter = "(*.jpg) |*.jpg|All files (*.*)|*.*";
           String name = book.FileName;
           //book.FileName = Application.StartupPath + "\\as";
           
           //book.OpenFile = Application.StartupPath + "\\as";
           book.ShowDialog();

          //
          //
           
           //book.ShowDialog();           
           
           //OpenFileDialog book = new OpenFileDialog();
           //OpenFileDialog high = new OpenFileDialog();
           ////high.DefaultExt = "//.jpg";

           ////book.DefaultExt = Application.StartupPath + "\\.jpg";
           //high.FileName = Application.StartupPath + "\\a.xls";
          // high.ShowDialog();
          
           //book.OpenFile = Application.StartupPath + "\\as.jpg";

           //book.ShowDialog();
       }        
    }
//

More to Come

  1. I have deliberately ignored a few factors which are often used in recovery operation.
    1. Sheeve Resistance (the resistance offered by the pulleys)
    2. Fording Resistance
  2. Rope Tension Calculation should be made prior to performing the recovery operation.

History

  • Version 1 - Uploaded
  • Article revised

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Comments and Discussions

 
QuestionAustralian Army version required, can anyone help Pin
Ryan Waldram31-May-12 11:53
Ryan Waldram31-May-12 11:53 
AnswerRe: Australian Army version required, can anyone help Pin
User 65215439-Jun-12 21:32
User 65215439-Jun-12 21:32 
GeneralRe: Australian Army version required, can anyone help Pin
Ryan Waldram15-Jul-12 23:28
Ryan Waldram15-Jul-12 23:28 
GeneralComments Pin
Jaime Olivares8-Apr-10 10:58
Jaime Olivares8-Apr-10 10:58 
GeneralRe: Comments Pin
User 65215439-Apr-10 1:22
User 65215439-Apr-10 1:22 
GeneralRe: Comments Pin
Ryan Waldram15-Jul-12 23:44
Ryan Waldram15-Jul-12 23:44 
GeneralMy vote of 1 Pin
luisnike198-Apr-10 9:49
luisnike198-Apr-10 9:49 
GeneralMy vote of 1 Pin
BigTuna8-Apr-10 7:31
BigTuna8-Apr-10 7:31 
GeneralRe: My vote of 1 Pin
luisnike198-Apr-10 9:52
luisnike198-Apr-10 9:52 
GeneralRe: My vote of 1 Pin
User 65215439-Apr-10 1:26
User 65215439-Apr-10 1:26 
GeneralRe: My vote of 1 Pin
BigTuna9-Apr-10 10:06
BigTuna9-Apr-10 10:06 
GeneralRe: My vote of 1 Pin
M i s t e r L i s t e r12-Apr-10 12:00
M i s t e r L i s t e r12-Apr-10 12:00 
Do you want this re-written by a professional programmer?
GeneralRe: My vote of 1 Pin
User 652154312-Apr-10 21:42
User 652154312-Apr-10 21:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.