function rocketprogram

% CC Violeta Ivanova, MIT Informaiton Services and Technology
% ROCKET opens a GUI for computing the velocity of a rocket 
% for a circular orbit above a planet.

fig1 = openfig('rocketGUI.fig', 'reuse');
figure(fig1)

set(fig1, 'DoubleBuffer',       'on')
set(fig1, 'HandleVisibility',   'on')

planet_popup            = findobj( fig1, 'Tag', 'planet_popup');
units_popup             = findobj( fig1, 'Tag', 'units_popup');
radius_value_text       = findobj( fig1, 'Tag', 'radius_value_text');
radius_units_text       = findobj( fig1, 'Tag', 'radius_units_text');
gravity_value_text      = findobj( fig1, 'Tag', 'gravity_value_text');
gravity_units_text      = findobj( fig1, 'Tag', 'gravity_units_text');
altitude_input_text     = findobj( fig1, 'Tag', 'altitude_input_text');
altitude_units_text     = findobj( fig1, 'Tag', 'altitude_units_text');
compute_velocity_button = findobj( fig1, 'Tag', 'compute_velocity_button');
velocity_result_text    = findobj( fig1, 'Tag', 'velocity_result_text');
velocity_units_text     = findobj( fig1, 'Tag', 'velocity_units_text');

set( planet_popup,          'String', {'Earth',  'Mars'});
set( units_popup,           'String', {'Metric', 'English'});
set( planet_popup,          'Value' ,  1);
set( units_popup,           'Value' ,  1);
set( radius_value_text,     'String', '6376');
set( radius_units_text,     'String', 'km');
set( gravity_value_text,    'String', '9.814');
set( gravity_units_text,    'String', 'm/sec^2');
set( altitude_input_text,   'String',  '100');
set( altitude_units_text,   'String', 'km');
set( velocity_result_text,  'String', '28257');
set( velocity_units_text,   'String', 'km/hr');

set(planet_popup,            'Callback', 'velocitycallback');
set(units_popup,             'Callback', 'velocitycallback');
set(altitude_input_text,     'Callback', 'velocitycallback');
set(compute_velocity_button, 'Callback', 'velocitycallback');

return





