卫星定位技术与方法--根据广播星历参数计算卫星坐标作业报告指导教师:***班级:测绘二班学生姓名:***学生学号: 2 0 0 8 0 7 8 3作业日期:2010 年12月08 日目录一. 已知数据 (2)二. 计算步骤 (2)1.平均角速度 (mean angular speed) (2)2.规化时刻(normal time) (3)3.平近点角(mean anomaly) (3)4.偏近点角(eccentric anomaly) (3)5.真近点角(true anomaly) (3)6.升交距角(argument of ascending node) (3)7. 轨道向径(Orbital radius) (3)8. 扰动改正(Perturbed correction) (4)10.卫星在升交点轨道直角坐标系中的坐标 (4)11. 升交点经度(Longitude of ascending node) (5)三. 源程序 (5)四.程序运行结果 (14)七.作业体会 (15)根据广播星历参数计算卫星坐标一. 已知数据: 根据以下的广播星历参数计算UTC2004年1月30日8点0分00秒—20分00秒,每隔一分钟的PRN7的卫星坐标。
Compute the coordinate of PRN7 with interval of 1 minute.Navigation data:卫星导航文件格式:二. 计算步骤:The steps for satellite coordinates1.平均角速度 (mean angular speed):∆n 由广播星历获得, GM=3.986005e+14n n n ∆+=030a GMn =2.规化时刻(normal time):t0已知(由广播星历获得),t 为GPS 周秒3.平近点角(mean anomaly):M0已知(由广播星历获得)4.偏近点角(eccentric anomaly):迭代求解:初始值取E=M ,以弧度为单位5.真近点角(true anomaly):6.升交距角(argument of ascending node):ω近地点角距(argument of perigee)7. 轨道向径(Orbital radius ):k k t n M M ⋅+=0)cos 1(k k E e a r ⋅-⋅=e E E e V k kk --=cos sin 1arctan 2k k k E e M E sin ⋅+=0t t t k -=ωφ+=k 0V8. 扰动改正(Perturbed correction ):• 升交角距(Argument of ascending node )• • 轨道向径(Orbital radius )• 轨道顷角(Orbital inclination )是升交角距 (the argument of ascending node)9. 改正后升交角距、轨道向径、轨道倾角改正后升交角距(Corrected argument of ascending nod )改正后的轨道向径(Corrected orbital radius)改正后的轨道倾角(Corrected orbital inclination )10.卫星在升交点轨道直角坐标系中的坐标:如下图所示0φ00i 2sin 2cos φφδiS iC C C +=00r 2sin 2cos φφδrS rC C C +=00u 2sin 2cos φφδuS uC C C +=rk k )cosE e 1(a r δ+⋅-⋅=u0k u δφ+=ki 0k t )IDOT (i i ++=δ11. 升交点经度(Longitude of ascending node ):如下图所示12. 在地固坐标系中的卫星位置(Expressed in spheric coordinate system )三. 源程序:using System;using System.Collections.Generic;using ponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.IO;using System.Text.RegularExpressions;kk k k k k sinu r y cosu r x ==s/rad 102921151467.7t t )(5-e 0e k e 0t ⨯=--Ω+Ω=ωωωλekk k k k k k k k k i y Z i y x Y i y x sin cos cos sin sin cos cos k k k k k =+=-=X λλλλnamespace Test{public partial class Form1 : Form{public Form1(){InitializeComponent();listView1.Columns.Add("序号", 40);listView1.Columns.Add("星历内容", 130);listView1.Columns.Add("导航数据", 130);listView1.GridLines = true; //显示表格线listView1.View = View.Details;//显示表格细节listView1.HeaderStyle = ColumnHeaderStyle.Clickable;//对表头进行设置listView2.Columns.Add("时间", 60);listView2.Columns.Add("x坐标", 150);listView2.Columns.Add("y坐标", 150);listView2.Columns.Add("z坐标", 150);listView2.GridLines = true; //显示表格线listView2.View = View.Details;//显示表格细节listView2.HeaderStyle = ColumnHeaderStyle.Clickable;//对表头进行设置}private void button1_Click(object sender, EventArgs e){//读取相对路径string str1 =AppDomain.CurrentDomain.SetupInformation.ApplicationBase;string filename = str1 + "navigation data.txt ";//读取卫星广播星历文件StreamReader myreader = new StreamReader(filename, Encoding.Default);string myinfo = myreader.ReadToEnd();myreader.Close();//把卫星广播星历里的D改为e,以便后续计算string mystring = myinfo;string myinfor = mystring;myinfor = mystring.Replace("D", "e");//把数据分开读入到一个数组中存储string[] split = new string[] { " " };string[] arrs = myinfor.Split(split,StringSplitOptions.RemoveEmptyEntries);double[] M = new double[arrs.Length];//星历代码string[] N = new string[arrs.Length];N[0] = "PRN"; N[1] = "Yer"; N[2] = "Mon"; N[3] = "day"; N[4] = "H"; N[5] = "M"; N[6] = "sec"; N[7] = "a0"; N[8] = "a1"; N[9] = "a2"; N[10] = "IODE"; N[11] = "Crs"; N[12] = "delta-n"; N[13] = "M0";N[14] = "Cuc"; N[15] = "e"; N[16] = "Cus"; N[17] = "sqrt(a)"; N[18] = "t0e"; N[19] = "Cic"; N[20] = "omega0"; N[21] = "Cis"; N[22] = "i0"; N[23] = "Crc"; N[24] = "omega"; N[25] = "omega-spot";N[26] = "IDOT"; N[27] = "Codes on L2 channel"; N[28] = "GPS Week"; N[29] = "L2 P data flag";N[30] = "SV accuracy"; N[31] = "SV health"; N[32] = "TGD"; N[33] = "IODC Issue of Data";N[34] = "Transmission time of message";//把卫星广播星历读入到数组中for (int i = 0; i < arrs.Length; i++){ListViewItem li = new ListViewItem();li.Text = (i + 1).ToString();li.SubItems.Add(N[i]);li.SubItems.Add(arrs[i]);listView1.Items.Add(li);M[i] = double.Parse(arrs[i]);}double t0e=460800.00;double t;double[] XK = new double[21];double[] YK = new double[21];double[] ZK = new double[21];for (int l = 0; l < 21;l++ ){//计算平均角速度double GM = 3986004.418e008;double n, n0;n0 = Math.Sqrt(GM / (Math.Pow(M[17], 6)));n = M[12] + n0;//规划时刻t=t0e+l*60;double tk = t-t0e;double Mk = M[13] + n * tk;// 迭代计算平近点角的计算double Ek, Ek1;Ek = Mk;Ek1 = Mk + M[15] * Math.Sin(Ek);do{Ek = Ek1;Ek1 = Mk + M[15] * Math.Sin(Ek);}while (Math.Abs(Ek1 - Ek) > 1e-15);//计算真近点角double Vk = Math.Atan(((Math.Sqrt(1 - M[15] * M[15]) * Math.Sin(Ek))) / (Math.Cos(Ek) - M[15]));//反正切值的象限处理double A1 = Math.Atan(((Math.Sqrt(1 - M[15] * M[15]) * Math.Sin(Ek))));double A2 = Math.Cos(Ek) - M[15];if (Vk < 0){if (A1 < 0 && A2 > 0){Vk += 2 * Math.PI;}if (A1 > 0 && A2 < 0){Vk += Math.PI;}}else{if (A1 <= 0 && A2 <= 0)Vk = Vk + Math.PI;}//计算升交角距double fk = Vk + M[24];//摄动改正值的计算double du = M[14] * Math.Cos(2 * fk) + M[16] * Math.Sin(2 * fk);double dr = M[23] * Math.Cos(2 * fk) + M[11] * Math.Sin(2 * fk);double di = M[19] * Math.Cos(2 * fk) + M[21] * Math.Sin(2 * fk);//摄动改正double uk = fk + du;double rk = Math.Pow(M[17], 2) * (1 - M[15] * Math.Cos(Ek))+ dr;double ik = M[22] + di + M[26] * tk;//计算卫星在升交点轨道直角坐标系的坐标double xk = rk * Math.Cos(uk);double yk = rk * Math.Sin(uk);//计算升交点经度double we = 7.2921151467e-05;double jdt = M[20] + (M[25] - we) * tk - we * M[18];//卫星在地固坐标系中的空间直角坐标XK[l] = xk * Math.Cos(jdt) - yk * Math.Cos(ik) * Math.Sin(jdt);YK[l] = xk * Math.Sin(jdt) + yk * Math.Cos(ik) * Math.Cos(jdt);ZK[l] = yk * Math.Sin(ik);}//输出卫星在地固坐标系中的空间直角坐标for (int i = 0; i < 21; i++){ListViewItem list = new ListViewItem();list.Text = "第" + i.ToString() + "分钟";list.SubItems.Add(XK[i].ToString());list.SubItems.Add(YK[i].ToString());list.SubItems.Add(ZK[i].ToString());listView2.Items.Add(list);}}private void button2_Click(object sender, EventArgs e) {//读取相对路径string str1 =AppDomain.CurrentDomain.SetupInformation.ApplicationBase;string filename = str1 + "navigation data.txt ";//读取卫星广播星历文件StreamReader myreader = new StreamReader(filename, Encoding.Default);string myinfo = myreader.ReadToEnd();myreader.Close();//把卫星广播星历里的D改为e,以便后续计算string mystring = myinfo;string myinfor = mystring;myinfor = mystring.Replace("D", "e");//把数据分开读入到一个数组中存储string[] split = new string[] { " " };string[] arrs = myinfor.Split(split, StringSplitOptions.RemoveEmptyEntries);//星历代码string[] N = new string[arrs.Length];N[0] = "PRN"; N[1] = "Yer"; N[2] = "Mon"; N[3] = "day"; N[4] = "H"; N[5] = "M"; N[6] = "sec"; N[7] = "a0"; N[8] = "a1"; N[9] = "a2"; N[10] = "IODE"; N[11] = "Crs"; N[12] = "delta-n"; N[13] = "M0";N[14] = "Cuc"; N[15] = "e"; N[16] = "Cus"; N[17] = "sqrt(a)"; N[18] = "t0e"; N[19] = "Cic"; N[20] = "omega0"; N[21] = "Cis"; N[22] = "i0"; N[23] = "Crc"; N[24] = "omega"; N[25] = "omega-spot";N[26] = "IDOT"; N[27] = "Codes on L2 channel"; N[28] = "GPS Week"; N[29] = "L2 P data flag";N[30] = "SV accuracy"; N[31] = "SV health"; N[32] = "TGD"; N[33] = "IODC Issue of Data";N[34] = "Transmission time of message";//把卫星广播星历文件内容输出到listView进行查看for (int i = 0; i < arrs.Length; i++){ListViewItem li = new ListViewItem();li.Text = (i + 1).ToString();li.SubItems.Add(N[i]);li.SubItems.Add(arrs[i]);listView1.Items.Add(li);}}}}四.程序运行结果:星历内容的读取、显示:卫星坐标计算结果:运行界面:作业体会:此次作业,收获颇多。