clear all
close all
format long g


fname=strcat('windsond_feb13.csv');

ndata=importdata(fname);
ndata=ndata.data;

 ptmp=ndata(:,2); % hPa                   
tair=ndata(:,3); % degrees C
rh=ndata(:,4); % relative humidity
tdew=ndata(:,7); % dewpoint
%ghght=ndata(:,10)+isselev; % geopotential height
altitude = ndata(:,1) + 2188; % altitude above sea level
pwnd=ptmp; % pressure for use plotting wind barbs
wdir=ndata(:,6);
wspd=ndata(:,5); % m/s


%data = csvread('Station_Default_clean.dat')

%data_len = length(data)
 
%start_date = datenum('30-Jan-2018 14:15:00')

%for i = 1:data_len
%    date_time(i) = start_date;
%    start_date = addtodate(start_date, 5, 'minute');
%end

figure(1)
plot(tair, altitude)
set(gca,'Xtick',date_time(1):0.125000000931323*2:date_time(data_len))
set(gca,'XMinorTick','on')
datetick('x','dd/mmm HH:MM','keepticks')
%axis([date_time(1) date_time(data_len) min(data(1:data_len,14))-0.5 max(data(1:data_len,14))+0.5])
%title('Battery Voltage')
%xlabel('Date and Time')
%ylabel('Battery Voltage (Volts)')

