# Balloon Ascent and Descent

13 views (last 30 days)
Demetris Shields on 20 Nov 2020
Answered: Prudhvi Peddagoni on 24 Nov 2020
Hi, I'm currently working on a project within MATLAB that involves the altitude adjustment of a balloon within Venus' atmosphere. In actuality this program would be taking inputs from a BME280 sensor, however, we do not have access to one physically so the program currently runs off user inputs and allows for manual or automatic altitude adjustment. It is a very simple program that adjusts the balloons altitude depending on the desired altitude range. However, I would like to add options to ascend the balloon and descend the balloon at a certain rate. I'd like implement a rate of ascent of 1000 feet per minute (I pulled this rate from NASA weather balloon speeds). I've attached the program below. Also I'm a freshman in college and honestly have no idea how to approach this step of my program so any help is appreciated. This is also my first post so let me now if more information is needed.
% Unit for altitude inputs is in kilometers (km)
althigh = input('Please enter the highest desired altitude:\n');
altlow = input('Please enter the lowest desired altitude:\n');
altnow = input('Please enter the current altitude:\n');
% Automatic altitude adjustment is performed according to the mean of the highest desired altitude and lowest desired altitude
% Manual altitude adjustment is performed according to user input
if altnow > altlow && altnow <althigh
end
if altnow < altlow || altnow > althigh
mode = input('Balloon is outside of desired altitude range, please input whether adjustments should be made manually (1) or automatically (2)\n');
end
if mode == 1
fprintf('Manual altitude adjustment has been chosen.\n');
altnow = input('Please enter a desired altitude:\n');
elseif mode == 2 && altnow < altlow
fprintf('Automatic altitude adjustment has been chosen.\n');
altnow = altnow+((altlow+althigh)/2)-altnow;
elseif mode == 2 && altnow > althigh
fprintf('Automatic altitude adjustment has been chosen.\n');
altnow = altnow-(altnow-(altlow+althigh)/2);
end
% Future changes:
% Find rate of ascent and descent
% Add ascent and descent (from ground and to ground) options
% Look into adding RNG values to current altitude to help simulate atmospheric changes that may affect the balloons altitude.

Prudhvi Peddagoni on 24 Nov 2020
Hi,
You can introduce another variable for denoting time. let's say t is such variable.
You can use while loop and increment t for every iteration. You can add another variable speed to indicate the speed of the balloon. If the speed is 2 (2 feet per second), then you will increment altnow variable by 2 for every iteration(i.e for every second).
Hope this helps.