Skip to main content

exercise2.pro


;Read in the data
read_ascii_cols,'/nfs/see-fs-02_users/earnadr/public_html/Teaching/IDL_course/data/core_imk-dornier128_20050629_2.na',data,header,29,head_length=45
;plot a time-series of temperature (column 20)
plot, data(0,*),data(19,*),xtitle='Time / s',ytitle='Temperature / DegC',title='Exercise 2'
;Find where the aircraft was flying level using the pitch attitude (column 13)
lev=where(data(12,*) gt -.5 and data(12,*) lt .5)
;plot the level time-series
plot, data(0,lev),data(19,lev),xtitle='Time / s',ytitle='Temperature / DegC',title='Level flight'
;Find where the aircraft was both straight and level by using the pitch attitude and the bank attitude (column 12)
straightlev=where(data(12,*) gt -0.5 and data(12,*) lt 0.5 and data(11,*) gt -0.5 and data(11,*) lt 0.5)
plot, data(0,straightlev),data(19,straightlev),xtitle='Time / s',ytitle='Temperature / DegC',title='Straight and level flight'
END