finding altitude using matlab atmosisa given pressure

7 visualizaciones (últimos 30 días)
Irfan
Irfan el 20 de Oct. de 2024
Respondida: Sam Chak el 20 de Oct. de 2024
hello, im trying to determine altitude using matlab atmosisa function, given P = 61.7*1000;
What is the best way to go about solving this, thank you.
matlab atmosisa function
[T,a,P,rho,nu,mu] = atmosisa(height)
% given
p = 61.7*1000; % pascal

Respuesta aceptada

Sam Chak
Sam Chak el 20 de Oct. de 2024
You can use this minimization approach.
altitude = ga(@costfun, 1, [], [], [], [], 3.9e3, 4e3)
ga stopped because the average change in the fitness value is less than options.FunctionTolerance.
altitude = 3.9926e+03
%% Check result
[~, ~, P, ~, ~, ~] = atmosisa(altitude)
P = 6.1700e+04
%% Cost function
function J = costfun(height)
[~, ~, P, ~, ~, ~] = atmosisa(height);
p = 61.7*1000;
J = (P - p)^2;
end

Más respuestas (1)

Walter Roberson
Walter Roberson el 20 de Oct. de 2024
Make sure you convert pascal to millibars .

Etiquetas

Productos


Versión

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by