Question


Stopping sight distance (SSD) is defined as the distance needed for a driver to see an object on the roadway and then stop be
I .6 0.625 Coefficient Road Grade of Friction SSD Reaction Speed Time (s) -03 (downhill 12.S 2.S 30 mph 47 1.5 +.03 (uphill)
Stopping sight distance (SSD) is defined as the distance needed for a driver to see an object on the roadway and then stop before colliding with it. It's composed of the distance to react on first seeing the object and then the distance to stop after the brake is engaged. The following is a formula for determining stopping sight distance: ssi) = (. | c:/ + |-. SSD is the stopping sight distance (m or ft e is the conversion factor .278 m-hr/km-s (metric units) or 1.47 f-hr/mi-sec (U.S. Customary units). v is the speed (km/hr or mihr). t is the reaction time (sec). g is the acceleration caused by gravity 9.81 m/s2 or 32.2 ft/sec2. fis the road's coefficient of friction (dimensionless). G is the road grade, as a decimal (dimensionless) Using this equation, write, compile, and run a C++ program that first prompts the user for the unit system to use (metric or U.S. Customary units). Based on the response, your program should select the correct conversion factor request the remaining data, and display the stopping sight distance. Use your program to complete the following chart:
I .6 0.625 Coefficient Road Grade of Friction SSD Reaction Speed Time (s) -03 (downhill 12.S 2.S 30 mph 47 1.5 +.03 (uphill) - 03 (downhill) 30 mph 47 47 +.03 (uphill) 47 1.5 47 .03(downhill) +.03 (uphill) 03 (downhill) 47 1.5 47 , 2Gİ 40 km/hr .5 40 km/hr 40426 65 km/hr h0625 65 km/hr 5T-2 90 km/hr 47 +.03 (uphill) -03 (downhill) 47 +.03 (uphill) 47 47 -3% (downhil) +.03 (uphill) 47 C 28 90 km/hr
0 0
Add a comment Improve this question Transcribed image text
Answer #1


/*
 *  C++ Program to Calculate Stopping Site Distance
 */

#include <iostream>
#include <cstdio>
using namespace std;

#define gM 9.81
#define gF 32.2
#define cM 0.278
#define cF 1.47

int main()
{
  int ch;

  cout << "Enter choice of units -" << endl;
  cout << "1. Metric" << endl;
  cout << "2. U.S. Customery Units" << endl;
  cout << "Enter Choice: ";
  cin >> ch;
  
  int v;
  float t, f, G;
  double SSD;

  switch(ch)
  {
    case 1: 
            cout << "Enter speed (km/h): ";
            cin >> v;
            cout << "Enter reaction time (sec): ";
            cin >> t;
            cout << "Enter Coefficient of friction: ";
            cin >> f;
            cout << "Enter Road Grade: ";
            cin >> G;
            SSD = (cM*v*t) + ((cM*cM*v*v)/(2*gM*(f + G)));
            cout << "SSD: " << SSD << " m";
            break;
    
    case 2:
            cout << "Enter speed (mi/h): ";
            cin >> v;
            cout << "Enter reaction time (sec): ";
            cin >> t;
            cout << "Enter Coefficient of friction: ";
            cin >> f;
            cout << "Enter Road Grade: ";
            cin >> G;
            SSD = (cF*v*t) + ((cF*cF*v*v)/(2*gF*(f + G)));
            cout << "SSD: " << SSD << " ft";
            break;
  }
  
  return 0;
}
/*  Program ends here */

Gimtusharsharma/BewitchedUpsetFormulas C Nodescription shareは +new rep my repls languages talk intusharhar ▼ run main.cpp 日 っ

Note: The complete program is tested and the output is attached, please wait the table is being updated. I will attach once it is done.

Add a comment
Know the answer?
Add Answer to:
Stopping sight distance (SSD) is defined as the distance needed for a driver to see an object on the roadway and t...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT