Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7569883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:16:40+00:00 2026-05-30T15:16:40+00:00

I am working on building a little game program like this one for a

  • 0

I am working on building a little game program like this one for a sky diving sim and I have got a lot of the equations down but my terminal velocity is way too high for the given alt for any of this. I have been looking at this and gone over it the only thing I can think of is that I have one of the measurements wrong or something. Any help will be appreciated with this.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GasLaws
 {
   class Program
{


    static void Main(string[] args)
    {

           double temperature;
           double airPressure;
           double airDensity;
           double tV;

           double alt;

           //constants
           const double gasCont = 287.05;
           const double startTemp = 15; //this is C ground level
           const double aidRate = 0.0065; //adiobatic rate for temperature by elevation

        //Human Constannts
           const double drag = 0.7; //in meters
           const double area = 7.5; //ft^2
           const double wieght = 175;



        Console.WriteLine("Enter the alt in feet");
        int tempint = Int32.Parse(Console.ReadLine());
        alt = (double)tempint * 0.3048; //convert feet to meters
        Console.WriteLine("Alt = " + alt + " m");

        //calculate air pressur
        airPressure = AirPressure(alt);
        temperature = CalTemp(startTemp, alt, aidRate);
        airDensity = AirDensity(airPressure, gasCont, temperature);
        tV = TerminalVelocity(wieght, drag, airDensity, area);

        //pasue screen for a second
        Console.ReadLine();

    }

    //p = 101325(1-2.25577 * 10^-5 * alt) ^5
    //this calculates correctly
    private static double  AirPressure(double al) 
    {
        double tempAlt = 1 - 2.25577 * 0.00001 * al;
        Console.WriteLine("Inside eq = " + tempAlt);
        tempAlt = Math.Pow(tempAlt, 5 );
        Console.WriteLine("Power of 5 = " + tempAlt);
        tempAlt = 101325 * tempAlt;
        Console.WriteLine("Pressure is = " + tempAlt + " Pascal");
        return tempAlt;
    }

    //temperature calculation
    // use adiobatic rate to calculate this
    //this is right
    private static double CalTemp(double t, double al, double rate) //start temperature and altitude 
    {

        double nTemp = t;
        for (int i = 0; i < al; i++)
            {
                nTemp -= rate;
            }
        Console.WriteLine("Temperature in for loop = " + nTemp);
        return nTemp;
    }

    //claculate like this
    //D  Pressure / gas constant * temperature
    //this works fine
    private static double AirDensity(double pres, double gas, double temp) 
    {
        temp = temp + 273.15; //convert temperautre to Kelvans
        double dens = pres / (gas * temp);
        dens = dens / 1000;
        Console.WriteLine("PResure = " + pres);
        Console.WriteLine("Gas cont = " + gas);
        Console.WriteLine("Temperture = " + temp);
        Console.WriteLine("Air Density is: " + dens);
        return dens;

    }

    private static double TerminalVelocity(double w, double cd, double p, double a)
    {
        double v = (2 * w) / (cd * p * a) ;
        v = Math.Sqrt(v);
        Console.WriteLine("Terminal Velocity = " + v);
        return v;

    }
}

}

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T15:16:42+00:00Added an answer on May 30, 2026 at 3:16 pm

    Your formula doesn’t seem to include gravitational acceleration, and you are also mixing SI and US/imperial units. What unit will your calculated velocity have? It would probably be easier if you stay with SI units only. Another thing that looks a little strange is this line:

    const double drag = 0.7; //in meters
    

    The drag coefficient is a dimensionless number. It shouldn’t have a physical unit (like meter).

    The correct formula is:

    v = sqrt((2 * m * g) / (d * A * C))
    

    The variables, with corresponding SI units, are:

    m [kg] – Mass of falling body.

    g [m/s^2] – Gravitational acceleration.

    d [kg/m^3] – Air density.

    A [m^2] – Projected area.

    C [-] – Drag coefficient.

    If you use these units, the formula will yield the velocity in [m/s]. As an example. let’s try the following values with units as above: m=80, g=9.8, d=1, A=0.7, C=0.7

    This gives the terminal velocity v = 57 m/s which seems reasonable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A little background: We're building a library/framework for working with scientific models. We have
I've got my little asp.net mvc app working as expected, however I'm building the
I'm working on building a development tool that is written in JavaScript. This will
I'm working on building a tree structure in MySQL and have been experimenting with
I've got an odd little dilemma in this jQuery slideshow plugin that I am
Working with one of our partners, we have developed now two separate sets of
I'm working on building a chess game in Java, and I'm currently having a
I needed to randomize answer choices for a little game I'm building using html/jquery.
I've been building a game application for iOS. The application was working fairly well,
Let's say you're building something simple, like a data entry/CRUD form for working on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.