The Mars Climate Orbiter was a space probe launched by NASA

The Mars Climate Orbiter was a space probe launched by NASA in 1998 to study the Martian climate and atmosphere. Additionally, it was meant to act as a communications relay for future programs. However, on September 23, 1999, NASA lost communication with the spacecraft when the spacecraft went on a trajectory that brought it too close to the planet causing it to enter the upper atmosphere and disintegrate. After an internal peer review, it was determined that the reason for the spacecraft entering the wrong trajectory was due a computer software error related to the fact that one part of the code used English units (e.g., inches, feet, and pounds) whereas another part of the code used metric units. Specifically, one part used the units of pound-seconds (lbf s) instead of the metric unit of newton-seconds (N s). This discrepancy resulted in incorrect thruster firings and ultimately over $300 million was lost.

In most engineering practices, metric units are recommended (in particular the SI base units), however, in some cases it is necessary to work in other units such as when dealing with legacy systems. In this problem, you will use MATLAB to convert various quantities given in non-metric units to metric units.

For example, the expression

length_meter = length_inch * 2.54e-2;


converts a length quantity given in inches to the SI unit of meters. Similarly, the expression

weight_kg = weight_pound * 0.453592;


converts a weight quantity given in pounds to the SI unit of kg. In both expressions, note the use of the units in the variable name. This is a good practice to develop as it makes it clear what are the units of the variable.

For the 5 different quantity types below (a-e), give a MATLAB expression similar to those above that converts each into standard SI units or SI derived units. If you are unsure of the units to use or the conversion factor, consult a reference related to the International System of Units (SI). Also, be sure to use descriptive and meaningful variable names. Points will be deducted for variable names that are unclear.

distance given in feet

time given in minutes

temperature given in Fahrenheit

power given in horsepower

momentum given in lbF-s (i.e., pounds of force seconds)

length_meter = length_inch * 2.54e-2;

Solution

MATLAB expression

>> distance_meter = distance_feet * 3.28084

>> time_sec = time_minutes * 60

>> temp_Kelvin = 5*(temp_Fahrenheit - 32)/9 + 273.15

>> power_watt = power_horsepower * 745.7

>> Newton_sec = lbF-sec * 4.44822

MATLAB script

A = \'1: distance given in feet\';
B = \'2: time given in minutes\';
C = \'3: temperature given in Fahrenheit\';
D = \'4: power given in horsepower\';
E = \'5: momentum given in lbF-s (i.e., pounds of force seconds)\';

disp(A)
disp(B)
disp(C)
disp(D)
disp(E)

x = input(\'Enter the number 1/2/3/4/5 (unit you want to convert): \');

y = input(\'Enter the value: \');

if x == 1
distance_meter = y * 3.28084
elseif x == 2
time_sec = y * 60
elseif x == 3
temp_Kelvin = 5*(y - 32)/9 + 273.15
elseif x == 4
power_watt = y * 745.7
else
Newton_sec = y * 4.44822
end

The Mars Climate Orbiter was a space probe launched by NASA in 1998 to study the Martian climate and atmosphere. Additionally, it was meant to act as a communic
The Mars Climate Orbiter was a space probe launched by NASA in 1998 to study the Martian climate and atmosphere. Additionally, it was meant to act as a communic

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site