加载中…
个人资料
Volvop
Volvop
  • 博客等级:
  • 博客积分:0
  • 博客访问:204
  • 关注人气:26
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

环境卫星观测天顶角和方位角的计算

(2011-10-25 20:54:31)
标签:

it

分类: 技术

6S大气校正中有两个参数是卫星天顶角和方位角,在环境卫星的大气校正过程中,这两个角度不太容易获得,在网上搜索了一下没有看到合适的解决办法,相关文献中也没有提及,所以用IDL自己写了一小段,供大家参考,程序很简单,可以基本准确地计算研究区的这两个角度。代码如下:

pro Read_zenith_azimuth_HJ
compile_opt idl2

openname=dialog_pickfile(PATH="d:\work",TITLE="Pick input file",$
filter="*.txt",GET_PATH=openpath);
;*****************************************************************
;Following shows how to read the column data from a ascii file.
openr,lun,openname,/get_lun;
filetemplate=ascii_template(openname);
;variable "sat" means "satellite angles"
sat=read_ascii(openname,template=filetemplate);
line=sat.field3;
sample=sat.field4;
lon=sat.field5;
lat=sat.field6;
zenith=sat.field7;
azimuth=sat.field8;
print,size(sat);
;print,sat;
free_lun,lun;
;Create a pts variable for Georeference procedure.
numl=n_elements(line);
;variable "nums" means number of column of the input file.
nums=6;
pts=dblarr(nums,numl);
pts[0,*]=line;
pts[1,*]=sample;
pts[2,*]=lon;
pts[3,*]=lat;
pts[4,*]=zenith; 
pts[5,*]=azimuth; 
print,size(pts);
;***************************************************************
;"where" function returns positions of values which match the searching terms.
;find eligible points for research area.
;envi_report_init, ["Processing......"], title="Status Window",base=base;
find_pos=where((lat gt 30.53 )and( lat lt 30.55) and $ 
(lon gt 117.29) and (lon lt 117.31)); 
;envi_report_init,base=base,/finish; 
print,find_pos;
vol=n_elements(find_pos);
sum_zen=0.0d;
sum_azi=0.0d;
for i=0,vol-1 do begin
print,zenith[find_pos[i]],azimuth[find_pos[i]];
sum_zen=sum_zen+zenith[find_pos[i]];
sum_azi=sum_azi+azimuth[find_pos[i]];
endfor
aver_zen=sum_zen/vol;
aver_azi=sum_azi/vol;
print,"The Zenith is :",aver_zen;
print,"The Azimuth is:",aver_azi; 

end程序是针对环境卫星压缩包中的setangle文件写的,可以从文件中读取到所有列的数值,红色标注的是角度数组和需要改动的经纬度。

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有