GPS卫星位置计算(卫星位置计算小程序)

目录

 

一、准备以及结果图

二、数据

三、计算

四、全部代码

附:


 

 

一、准备以及结果图

软件:eclipse(2020-6版本)带有WindowBuilder插件

编程语言:Java

结果图:

 

二、数据

t0e

星历的基准时间单位:秒

a_sqrt

轨道半长轴的平方根单位:米

e1

轨道离心率单位:无量纲

i0

倾角(在 t0e时)单位:rad 弧度

omega0

升交点经度(在每星期历元上)单位:rad 弧度

M0

平均近点角(在 t0e时)单位:rad 弧度

I

倾角的变化率单位:rad/s弧度/

omega

升交点经度的变化率单位:rad/s弧度/

ln

对平均角速度的校正值单位:rad/s弧度/

Cuc

对纬度幅角余弦的校正值单位:rad 弧度

Cus

对纬度幅角正弦的校正值单位:rad 弧度

Crc

对轨道半径余弦的校正值单位:米

Crs

对轨道半径正弦的校正值单位:米

Cic

对倾角余弦的校正值单位:rad 弧度

Cis

对倾角正弦的校正值单位:rad 弧度

 

  • 椭球引力常数:  μ = 3.986005e14 m3s-2(GPS )
  • 地球自转角速度 we = 7.2921151467e-5 (rad/s)
  • t1=4800.0;            // 观测时间
  • toe=0.00000000000000000;    // 星历基准时间
  • toc=0.00000000000000000;    // 卫星钟基准时间
  • a_sqrt =  5153.7127704599998 //轨道半长轴平方根
  • //卫星钟飘参数
  • a0 =  0.00028600683435800001
  • a1 =  1.7053025658199999e-012
  • a2 =  0
  • //平均角速度摄动改正参数
  • ln =  4.1115998360700002e-009
  • //参考时刻的平近点角
  • M0     =  1.2263973009600000
  • //轨道离心率
  • e1     =  0.0053100715158500003
  • //近地点角距
  • w    =  -1.6819446292500000
  • //对轨道半径正弦的修正值
  • Crs   =  -105.43750000000000
  • //在轨道径向方向上周期改正余余弦的振幅
  • Crc   =  175.34375000000000
  • //轨道延迹方向上周期改正余弦振幅
  • Cuc   =  -5.5264681577700003e-006
  • //轨道延迹方向上周期改正正弦振幅
  • Cus   =  1.1192634701700000e-005
  • //轨道倾角周期改正余弦项振幅
  • Cic   =  -9.6857547759999998e-008
  • //轨道倾角周期改正正弦项振幅
  • Cis   =  -7.8231096267699997e-008
  • //参考时刻升交点赤径主项
  • omega0   =  -2.9080127721900002
  • //升交点赤径在赤道平面中的长期变化
  • omega     =  -7.7124641122299999e-009
  • //参考时间轨道倾角
  • i0    =  0.97432927738800001
  • //轨道倾角变化率
  • I    =  1.8643633724999999e-010

 

三、计算

计算卫星轨道半长轴

double a_sqrt = Double.parseDouble(a_1.getText().trim());
double a = a_sqrt * a_sqrt;
String Sa = "" + a;
a__1.setText(Sa);

计算卫星运动的平均角速度n

double ln = Double.parseDouble(ln_2.getText().trim());
double u = Double.parseDouble(u_2.getText().trim());
double n0 = Math.pow(u / Math.pow(a, 3), 0.5);
double n = n0 + ln;
String Sn = "" + n;
n_2.setText(Sn);

计算规划时间

double toe = Double.parseDouble(toe_1.getText().trim());
double toc = Double.parseDouble(toc_1.getText().trim());
double t1 = Double.parseDouble(t1_1.getText().trim());
double a0 = Double.parseDouble(a0_1.getText().trim());
double a1 = Double.parseDouble(a1_1.getText().trim());
double a2 = Double.parseDouble(a2_1.getText().trim());
double lt = a0 + a1 * (t1 - toc) + a2 * ((t1 - toc) * (t1 - toc));// 计算卫星钟差
double t = t1 - lt;
double tk = t - toe;
String Stk = "" + tk;
tk_1.setText(Stk);

计算真近点角Vk

double M0 = Double.parseDouble(M0_1.getText().trim());
double e1 = Double.parseDouble(e_1.getText().trim());
double Mk = M0 + n * tk;
String SMk = "" + Mk;
Mk_1.setText(SMk);

double Ek_old = Mk;
double Ek_new = Mk + e1 * Math.sin(Ek_old);
int i = 1;
while (Math.abs(Ek_new - Ek_old) > 10e-8) {
	Ek_old = Ek_new;
	Ek_new = Mk + e1 * Math.sin(Ek_old);
	i += 1;
	if (i > 10)// ?
		break;
	}
	double Ek = Ek_new;
	String SEk = "" + Ek;
	Ek_1.setText(SEk);

double Vk1 = (Math.pow(1 - e1 * e1, 0.5) * Math.sin(Ek)) / (1 - e1 * Math.cos(Ek));// sinVk
double Vk2 = (Math.cos(Ek) - e1) / (1 - e1 * Math.cos(Ek)); // cosVk
double Vk;
	if (Vk2 == 0) {
		if (Vk1 > e1)
			Vk = Math.PI / 2;
		else
			Vk = -Math.PI / 2;
	} else {
		Vk = Math.atan(Vk1 / Vk2);
		if (Vk2 < 0) {
			if (Vk1 >= 0)
				Vk += Math.PI;
			else
				Vk -= Math.PI;
		}
	}
String SVk = "" + Vk;
Vk_1.setText(SVk);

计算升交距角u0

double w = Double.parseDouble(w_1.getText().trim());
double u0 = Vk + w;
String Su0 = "" + u0;
u0_1.setText(Su0);

计算经过摄动改正的升交距角uk、卫星的地心距离rk、轨道倾角ik

double Crs = Double.parseDouble(Crs_1.getText().trim());
double Crc = Double.parseDouble(Crc_1.getText().trim());
double Cuc = Double.parseDouble(Cuc_1.getText().trim());
double Cus = Double.parseDouble(Cus_1.getText().trim());
double Cic = Double.parseDouble(Cic_1.getText().trim());
double Cis = Double.parseDouble(Cis_1.getText().trim());
double i0 = Double.parseDouble(i0_1.getText().trim());
double I = Double.parseDouble(I_1.getText().trim());
double u_k = Cus * Math.sin(2 * u0) + Cuc * Math.cos(2 * u0);
double r_k = Crs * Math.sin(2 * u0) + Crc * Math.cos(2 * u0);
double i_k = Cis * Math.sin(2 * u0) + Cic * Math.cos(2 * u0);

String Su_k = "" + u_k;
u_k_1.setText(Su_k);
String Sr_k = "" + r_k;
r_k_1.setText(Sr_k);
String Si_k = "" + i_k;
i_k_1.setText(Si_k);

double uk = u0 + u_k;
double rk = a * (1 - e1 * Math.cos(Ek)) + r_k;
double ik = i0 + i_k + I * tk;

String Suk = "" + uk;
uk_1.setText(Suk);
String Srk = "" + rk;
rk_1.setText(Srk);
String Sik = "" + ik;
ik_1.setText(Sik);

计算卫星的轨道平面直角坐标

double xk = rk * Math.cos(uk);
double yk = rk * Math.sin(uk);

String Sxk = "" + xk;
xk_1.setText(Sxk);
String Syk = "" + yk;
yk_1.setText(Syk);

坐标转换

double omega = Double.parseDouble(omega_1.getText().trim());
double omega0 = Double.parseDouble(omega0_1.getText().trim());
double we = Double.parseDouble(we_1.getText().trim());
double omegak = omega0 + omega * (t - toe) - we * t;
String Somegak = "" + omegak;
omegak_1.setText(Somegak);

double xk1 = xk * Math.cos(omegak) - yk * Math.cos(ik) * Math.sin(omegak);
double yk1 = xk * Math.sin(omegak) + yk * Math.cos(ik) * Math.cos(omegak);
double zk1 = yk * Math.sin(ik);

String Sxk1 = "" + xk1;
xk1_1.setText(Sxk1);
String Syk1 = "" + yk1;
yk1_1.setText(Syk1);
String Szk1 = "" + zk1;
zk1_1.setText(Szk1);

四、全部代码

package rtf;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Font;

public class sd extends JFrame {

	private JPanel contentPane;
	private JTextField a_1;
	private JTextField a__1;
	private JLabel lblln;
	private JLabel lblNewLabel_1;
	private JLabel lblNewLabel_2;
	private JLabel lblNewLabel_3;
	private JLabel lblNewLabel_4;
	private JLabel lblNewLabel_5;
	private JLabel lblNewLabel_6;
	private JLabel lblNewLabel_7;
	private JLabel lblNewLabel_8;
	private JLabel lblNewLabel_9;
	private JLabel lblNewLabel_10;
	private JLabel lblNewLabel_11;
	private JLabel lblNewLabel_12;
	private JLabel lblNewLabel_13;
	private JLabel lblNewLabel_14;
	private JLabel lblNewLabel_15;
	private JLabel lblNewLabel_16;
	private JTextField ln_2;
	private JTextField a0_1;
	private JTextField a1_1;
	private JTextField a2_1;
	private JLabel lbltk;
	private JTextField tk_1;
	private JLabel lblNewLabel_17;
	private JTextField u_2;
	private JLabel lbla;
	private JTextField n_2;
	private JTextField toc_1;
	private JTextField t1_1;
	private JTextField toe_1;
	private JTextField M0_1;
	private JTextField e_1;
	private JLabel lblmk;
	private JTextField Mk_1;
	private JLabel lblNewLabel_18;
	private JLabel lblvk;
	private JTextField Ek_1;
	private JTextField Vk_1;
	private JTextField w_1;
	private JLabel lblNewLabel_19;
	private JTextField u0_1;
	private JLabel lblNewLabel_20;
	private JLabel lblNewLabel_21;
	private JLabel lblNewLabel_22;
	private JTextField Crs_1;
	private JTextField Crc_1;
	private JTextField Cuc_1;
	private JTextField Cus_1;
	private JTextField Cic_1;
	private JTextField Cis_1;
	private JTextField i0_1;
	private JTextField I_1;
	private JLabel lblNewLabel_23;
	private JLabel lblNewLabel_24;
	private JLabel lblNewLabel_25;
	private JLabel lblNewLabel_26;
	private JLabel lblNewLabel_27;
	private JLabel lblNewLabel_28;
	private JTextField u_k_1;
	private JTextField r_k_1;
	private JTextField i_k_1;
	private JTextField uk_1;
	private JTextField rk_1;
	private JTextField ik_1;
	private JTextField xk_1;
	private JTextField yk_1;
	private JLabel lblNewLabel_29;
	private JLabel lblNewLabel_30;
	private JLabel lblNewLabel_31;
	private JLabel lblNewLabel_32;
	private JTextField omega_1;
	private JTextField omega0_1;
	private JTextField we_1;
	private JTextField omegak_1;
	private JLabel lblNewLabel_33;
	private JLabel lblNewLabel_34;
	private JLabel lblNewLabel_35;
	private JTextField xk1_1;
	private JTextField yk1_1;
	private JTextField zk1_1;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {

					sd frame = new sd();
					frame.setVisible(true);
					frame.setTitle("卫星位置计算小程序");
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public sd() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 1144, 721);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);

		JLabel lblasqrt = new JLabel("卫星轨道的半\r\n长轴开方a_sqrt:\r\n");
		lblasqrt.setBounds(34, 26, 203, 21);
		contentPane.add(lblasqrt);

		a_1 = new JTextField();
		a_1.setBounds(247, 26, 183, 21);
		contentPane.add(a_1);
		a_1.setColumns(10);

		JLabel lblNewLabel = new JLabel("卫星运行的平均角速度n:");
		lblNewLabel.setBounds(34, 437, 172, 15);
		contentPane.add(lblNewLabel);

		a__1 = new JTextField();
		a__1.setBounds(247, 389, 183, 21);
		contentPane.add(a__1);
		a__1.setColumns(10);

		JButton btnNewButton = new JButton("计算");
		btnNewButton.setFont(new Font("SimSun", Font.PLAIN, 18));
		btnNewButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				// 计算轨道半长轴
				double a_sqrt = Double.parseDouble(a_1.getText().trim());
				double a = a_sqrt * a_sqrt;
				String Sa = "" + a;
				a__1.setText(Sa);
				// 计算卫星运动的平均角速度n
				double ln = Double.parseDouble(ln_2.getText().trim());
				double u = Double.parseDouble(u_2.getText().trim());
				double n0 = Math.pow(u / Math.pow(a, 3), 0.5);
				double n = n0 + ln;
				String Sn = "" + n;
				n_2.setText(Sn);
				// 计算规划时间
				double toe = Double.parseDouble(toe_1.getText().trim());
				double toc = Double.parseDouble(toc_1.getText().trim());
				double t1 = Double.parseDouble(t1_1.getText().trim());
				double a0 = Double.parseDouble(a0_1.getText().trim());
				double a1 = Double.parseDouble(a1_1.getText().trim());
				double a2 = Double.parseDouble(a2_1.getText().trim());
				double lt = a0 + a1 * (t1 - toc) + a2 * ((t1 - toc) * (t1 - toc));// 计算卫星钟差
				double t = t1 - lt;
				double tk = t - toe;
				String Stk = "" + tk;
				tk_1.setText(Stk);
				// 计算真近点角Vk
				double M0 = Double.parseDouble(M0_1.getText().trim());
				double e1 = Double.parseDouble(e_1.getText().trim());
				double Mk = M0 + n * tk;
				String SMk = "" + Mk;
				Mk_1.setText(SMk);

				double Ek_old = Mk;
				double Ek_new = Mk + e1 * Math.sin(Ek_old);
				int i = 1;
				while (Math.abs(Ek_new - Ek_old) > 10e-8) {
					Ek_old = Ek_new;
					Ek_new = Mk + e1 * Math.sin(Ek_old);
					i += 1;
					if (i > 10)// ?
						break;
				}
				double Ek = Ek_new;
				String SEk = "" + Ek;
				Ek_1.setText(SEk);

				double Vk1 = (Math.pow(1 - e1 * e1, 0.5) * Math.sin(Ek)) / (1 - e1 * Math.cos(Ek));// sinVk
				double Vk2 = (Math.cos(Ek) - e1) / (1 - e1 * Math.cos(Ek)); // cosVk
				double Vk;
				if (Vk2 == 0) {
					if (Vk1 > e1)
						Vk = Math.PI / 2;
					else
						Vk = -Math.PI / 2;
				} else {
					Vk = Math.atan(Vk1 / Vk2);
					if (Vk2 < 0) {
						if (Vk1 >= 0)
							Vk += Math.PI;
						else
							Vk -= Math.PI;
					}
				}
				String SVk = "" + Vk;
				Vk_1.setText(SVk);

				// 计算升交距角u0
				double w = Double.parseDouble(w_1.getText().trim());
				double u0 = Vk + w;
				String Su0 = "" + u0;
				u0_1.setText(Su0);

				// 计算经过摄动改正的升交距角uk、卫星的地心距离rk、轨道倾角ik
				double Crs = Double.parseDouble(Crs_1.getText().trim());
				double Crc = Double.parseDouble(Crc_1.getText().trim());
				double Cuc = Double.parseDouble(Cuc_1.getText().trim());
				double Cus = Double.parseDouble(Cus_1.getText().trim());
				double Cic = Double.parseDouble(Cic_1.getText().trim());
				double Cis = Double.parseDouble(Cis_1.getText().trim());
				double i0 = Double.parseDouble(i0_1.getText().trim());
				double I = Double.parseDouble(I_1.getText().trim());
				double u_k = Cus * Math.sin(2 * u0) + Cuc * Math.cos(2 * u0);
				double r_k = Crs * Math.sin(2 * u0) + Crc * Math.cos(2 * u0);
				double i_k = Cis * Math.sin(2 * u0) + Cic * Math.cos(2 * u0);

				String Su_k = "" + u_k;
				u_k_1.setText(Su_k);
				String Sr_k = "" + r_k;
				r_k_1.setText(Sr_k);
				String Si_k = "" + i_k;
				i_k_1.setText(Si_k);

				double uk = u0 + u_k;
				double rk = a * (1 - e1 * Math.cos(Ek)) + r_k;
				double ik = i0 + i_k + I * tk;

				String Suk = "" + uk;
				uk_1.setText(Suk);
				String Srk = "" + rk;
				rk_1.setText(Srk);
				String Sik = "" + ik;
				ik_1.setText(Sik);

				// 计算卫星的轨道平面直角坐标
				double xk = rk * Math.cos(uk);
				double yk = rk * Math.sin(uk);

				String Sxk = "" + xk;
				xk_1.setText(Sxk);
				String Syk = "" + yk;
				yk_1.setText(Syk);

				// 坐标转换
				double omega = Double.parseDouble(omega_1.getText().trim());
				double omega0 = Double.parseDouble(omega0_1.getText().trim());
				double we = Double.parseDouble(we_1.getText().trim());
				double omegak = omega0 + omega * (t - toe) - we * t;
				String Somegak = "" + omegak;
				omegak_1.setText(Somegak);

				double xk1 = xk * Math.cos(omegak) - yk * Math.cos(ik) * Math.sin(omegak);
				double yk1 = xk * Math.sin(omegak) + yk * Math.cos(ik) * Math.cos(omegak);
				double zk1 = yk * Math.sin(ik);

				String Sxk1 = "" + xk1;
				xk1_1.setText(Sxk1);
				String Syk1 = "" + yk1;
				yk1_1.setText(Syk1);
				String Szk1 = "" + zk1;
				zk1_1.setText(Szk1);

			}
		});
		btnNewButton.setBounds(30, 326, 1067, 29);
		contentPane.add(btnNewButton);

		lblln = new JLabel("摄动改正数ln:");
		lblln.setBounds(34, 66, 203, 15);
		contentPane.add(lblln);

		lblNewLabel_1 = new JLabel("卫星钟飘数a0:");
		lblNewLabel_1.setBounds(34, 134, 203, 15);
		contentPane.add(lblNewLabel_1);

		lblNewLabel_2 = new JLabel("卫星钟飘数a1:");
		lblNewLabel_2.setBounds(34, 168, 203, 15);
		contentPane.add(lblNewLabel_2);

		lblNewLabel_3 = new JLabel("卫星钟飘数a2:");
		lblNewLabel_3.setBounds(34, 202, 203, 15);
		contentPane.add(lblNewLabel_3);

		lblNewLabel_4 = new JLabel("toc:");
		lblNewLabel_4.setBounds(34, 236, 203, 15);
		contentPane.add(lblNewLabel_4);

		lblNewLabel_5 = new JLabel("轨道离心率e1:");
		lblNewLabel_5.setBounds(460, 102, 109, 15);
		contentPane.add(lblNewLabel_5);

		lblNewLabel_6 = new JLabel("平近点角M0:");
		lblNewLabel_6.setBounds(460, 67, 109, 15);
		contentPane.add(lblNewLabel_6);

		lblNewLabel_7 = new JLabel("toe:");
		lblNewLabel_7.setBounds(34, 270, 203, 15);
		contentPane.add(lblNewLabel_7);

		lblNewLabel_8 = new JLabel("观测时间t1:");
		lblNewLabel_8.setBounds(460, 32, 109, 15);
		contentPane.add(lblNewLabel_8);

		lblNewLabel_9 = new JLabel("Cis:");
		lblNewLabel_9.setBounds(852, 68, 54, 15);
		contentPane.add(lblNewLabel_9);

		lblNewLabel_10 = new JLabel("Cic:");
		lblNewLabel_10.setBounds(852, 32, 54, 15);
		contentPane.add(lblNewLabel_10);

		lblNewLabel_11 = new JLabel("Crs:");
		lblNewLabel_11.setBounds(460, 172, 109, 15);
		contentPane.add(lblNewLabel_11);

		lblNewLabel_12 = new JLabel("近地点角距w:");
		lblNewLabel_12.setBounds(460, 137, 109, 15);
		contentPane.add(lblNewLabel_12);

		lblNewLabel_13 = new JLabel("yk:");
		lblNewLabel_13.setBounds(852, 437, 62, 15);
		contentPane.add(lblNewLabel_13);

		lblNewLabel_14 = new JLabel("xk:");
		lblNewLabel_14.setBounds(852, 395, 62, 15);
		contentPane.add(lblNewLabel_14);

		lblNewLabel_15 = new JLabel("I:");
		lblNewLabel_15.setBounds(852, 140, 54, 15);
		contentPane.add(lblNewLabel_15);

		lblNewLabel_16 = new JLabel("i0:");
		lblNewLabel_16.setBounds(852, 104, 54, 15);
		contentPane.add(lblNewLabel_16);

		ln_2 = new JTextField();
		ln_2.setColumns(10);
		ln_2.setBounds(247, 61, 183, 21);
		contentPane.add(ln_2);

		a0_1 = new JTextField();
		a0_1.setColumns(10);
		a0_1.setBounds(247, 131, 183, 21);
		contentPane.add(a0_1);

		a1_1 = new JTextField();
		a1_1.setColumns(10);
		a1_1.setBounds(247, 166, 183, 21);
		contentPane.add(a1_1);

		a2_1 = new JTextField();
		a2_1.setColumns(10);
		a2_1.setBounds(247, 201, 183, 21);
		contentPane.add(a2_1);

		lbltk = new JLabel("计算规划时间tk:");
		lbltk.setBounds(34, 479, 172, 15);
		contentPane.add(lbltk);

		tk_1 = new JTextField();
		tk_1.setColumns(10);
		tk_1.setBounds(247, 473, 183, 21);
		contentPane.add(tk_1);

		lblNewLabel_17 = new JLabel("椭球引力常数u:");
		lblNewLabel_17.setBounds(34, 100, 203, 15);
		contentPane.add(lblNewLabel_17);

		u_2 = new JTextField();
		u_2.setColumns(10);
		u_2.setBounds(247, 96, 183, 21);
		contentPane.add(u_2);

		lbla = new JLabel("卫星轨道的半长轴a:");
		lbla.setBounds(34, 395, 172, 15);
		contentPane.add(lbla);

		n_2 = new JTextField();
		n_2.setBounds(247, 431, 183, 21);
		contentPane.add(n_2);
		n_2.setColumns(10);

		toc_1 = new JTextField();
		toc_1.setBounds(247, 236, 183, 21);
		contentPane.add(toc_1);
		toc_1.setColumns(10);

		t1_1 = new JTextField();
		t1_1.setBounds(579, 29, 207, 21);
		contentPane.add(t1_1);
		t1_1.setColumns(10);

		toe_1 = new JTextField();
		toe_1.setColumns(10);
		toe_1.setBounds(247, 271, 183, 21);
		contentPane.add(toe_1);

		M0_1 = new JTextField();
		M0_1.setBounds(579, 64, 207, 21);
		contentPane.add(M0_1);
		M0_1.setColumns(10);

		e_1 = new JTextField();
		e_1.setColumns(10);
		e_1.setBounds(579, 99, 207, 21);
		contentPane.add(e_1);

		lblmk = new JLabel("平近点角Mk:");
		lblmk.setBounds(34, 521, 172, 15);
		contentPane.add(lblmk);

		Mk_1 = new JTextField();
		Mk_1.setBounds(247, 515, 183, 21);
		contentPane.add(Mk_1);
		Mk_1.setColumns(10);

		lblNewLabel_18 = new JLabel("偏近点角Ek:");
		lblNewLabel_18.setBounds(34, 563, 172, 15);
		contentPane.add(lblNewLabel_18);

		lblvk = new JLabel("真近点角Vk:");
		lblvk.setBounds(34, 605, 172, 15);
		contentPane.add(lblvk);

		Ek_1 = new JTextField();
		Ek_1.setBounds(247, 557, 183, 21);
		contentPane.add(Ek_1);
		Ek_1.setColumns(10);

		Vk_1 = new JTextField();
		Vk_1.setColumns(10);
		Vk_1.setBounds(247, 599, 183, 21);
		contentPane.add(Vk_1);

		w_1 = new JTextField();
		w_1.setBounds(579, 134, 207, 21);
		contentPane.add(w_1);
		w_1.setColumns(10);

		lblNewLabel_19 = new JLabel("升交距角u0:");
		lblNewLabel_19.setBounds(34, 647, 172, 15);
		contentPane.add(lblNewLabel_19);

		u0_1 = new JTextField();
		u0_1.setBounds(247, 641, 183, 21);
		contentPane.add(u0_1);
		u0_1.setColumns(10);

		lblNewLabel_20 = new JLabel("Crc:");
		lblNewLabel_20.setBounds(460, 207, 109, 15);
		contentPane.add(lblNewLabel_20);

		lblNewLabel_21 = new JLabel("Cuc:");
		lblNewLabel_21.setBounds(460, 242, 109, 15);
		contentPane.add(lblNewLabel_21);

		lblNewLabel_22 = new JLabel("Cus:");
		lblNewLabel_22.setBounds(460, 277, 109, 15);
		contentPane.add(lblNewLabel_22);

		Crs_1 = new JTextField();
		Crs_1.setColumns(10);
		Crs_1.setBounds(579, 169, 207, 21);
		contentPane.add(Crs_1);

		Crc_1 = new JTextField();
		Crc_1.setColumns(10);
		Crc_1.setBounds(579, 204, 207, 21);
		contentPane.add(Crc_1);

		Cuc_1 = new JTextField();
		Cuc_1.setColumns(10);
		Cuc_1.setBounds(579, 239, 207, 21);
		contentPane.add(Cuc_1);

		Cus_1 = new JTextField();
		Cus_1.setColumns(10);
		Cus_1.setBounds(579, 274, 207, 21);
		contentPane.add(Cus_1);

		Cic_1 = new JTextField();
		Cic_1.setColumns(10);
		Cic_1.setBounds(913, 26, 207, 21);
		contentPane.add(Cic_1);

		Cis_1 = new JTextField();
		Cis_1.setColumns(10);
		Cis_1.setBounds(913, 62, 207, 21);
		contentPane.add(Cis_1);

		i0_1 = new JTextField();
		i0_1.setColumns(10);
		i0_1.setBounds(913, 98, 207, 21);
		contentPane.add(i0_1);

		I_1 = new JTextField();
		I_1.setColumns(10);
		I_1.setBounds(913, 134, 207, 21);
		contentPane.add(I_1);

		lblNewLabel_23 = new JLabel("u_k:");
		lblNewLabel_23.setBounds(477, 395, 54, 15);
		contentPane.add(lblNewLabel_23);

		lblNewLabel_24 = new JLabel("r_k:");
		lblNewLabel_24.setBounds(477, 437, 54, 15);
		contentPane.add(lblNewLabel_24);

		lblNewLabel_25 = new JLabel("i_k:");
		lblNewLabel_25.setBounds(477, 479, 54, 15);
		contentPane.add(lblNewLabel_25);

		lblNewLabel_26 = new JLabel("uk:");
		lblNewLabel_26.setBounds(477, 521, 54, 15);
		contentPane.add(lblNewLabel_26);

		lblNewLabel_27 = new JLabel("rk:");
		lblNewLabel_27.setBounds(477, 563, 54, 15);
		contentPane.add(lblNewLabel_27);

		lblNewLabel_28 = new JLabel("ik:");
		lblNewLabel_28.setBounds(477, 605, 54, 15);
		contentPane.add(lblNewLabel_28);

		u_k_1 = new JTextField();
		u_k_1.setBounds(579, 389, 207, 21);
		contentPane.add(u_k_1);
		u_k_1.setColumns(10);

		r_k_1 = new JTextField();
		r_k_1.setColumns(10);
		r_k_1.setBounds(579, 431, 207, 21);
		contentPane.add(r_k_1);

		i_k_1 = new JTextField();
		i_k_1.setColumns(10);
		i_k_1.setBounds(579, 473, 207, 21);
		contentPane.add(i_k_1);

		uk_1 = new JTextField();
		uk_1.setColumns(10);
		uk_1.setBounds(579, 515, 207, 21);
		contentPane.add(uk_1);

		rk_1 = new JTextField();
		rk_1.setColumns(10);
		rk_1.setBounds(579, 557, 207, 21);
		contentPane.add(rk_1);

		ik_1 = new JTextField();
		ik_1.setColumns(10);
		ik_1.setBounds(579, 599, 207, 21);
		contentPane.add(ik_1);

		xk_1 = new JTextField();
		xk_1.setColumns(10);
		xk_1.setBounds(913, 389, 207, 21);
		contentPane.add(xk_1);

		yk_1 = new JTextField();
		yk_1.setColumns(10);
		yk_1.setBounds(913, 431, 207, 21);
		contentPane.add(yk_1);

		lblNewLabel_29 = new JLabel("omega:");
		lblNewLabel_29.setBounds(852, 176, 54, 15);
		contentPane.add(lblNewLabel_29);

		lblNewLabel_30 = new JLabel("omega0:");
		lblNewLabel_30.setBounds(852, 212, 54, 15);
		contentPane.add(lblNewLabel_30);

		lblNewLabel_31 = new JLabel("we:");
		lblNewLabel_31.setBounds(852, 248, 54, 15);
		contentPane.add(lblNewLabel_31);

		lblNewLabel_32 = new JLabel("omegak:");
		lblNewLabel_32.setBounds(852, 479, 62, 15);
		contentPane.add(lblNewLabel_32);

		omega_1 = new JTextField();
		omega_1.setBounds(913, 170, 207, 21);
		contentPane.add(omega_1);
		omega_1.setColumns(10);

		omega0_1 = new JTextField();
		omega0_1.setColumns(10);
		omega0_1.setBounds(913, 206, 207, 21);
		contentPane.add(omega0_1);

		we_1 = new JTextField();
		we_1.setColumns(10);
		we_1.setBounds(913, 242, 207, 21);
		contentPane.add(we_1);

		omegak_1 = new JTextField();
		omegak_1.setColumns(10);
		omegak_1.setBounds(913, 473, 207, 21);
		contentPane.add(omegak_1);

		lblNewLabel_33 = new JLabel("xk1:");
		lblNewLabel_33.setBounds(852, 521, 62, 15);
		contentPane.add(lblNewLabel_33);

		lblNewLabel_34 = new JLabel("yk1:");
		lblNewLabel_34.setBounds(852, 563, 62, 15);
		contentPane.add(lblNewLabel_34);

		lblNewLabel_35 = new JLabel("zk1:");
		lblNewLabel_35.setBounds(852, 605, 62, 15);
		contentPane.add(lblNewLabel_35);

		xk1_1 = new JTextField();
		xk1_1.setColumns(10);
		xk1_1.setBounds(913, 515, 207, 21);
		contentPane.add(xk1_1);

		yk1_1 = new JTextField();
		yk1_1.setColumns(10);
		yk1_1.setBounds(913, 557, 207, 21);
		contentPane.add(yk1_1);

		zk1_1 = new JTextField();
		zk1_1.setColumns(10);
		zk1_1.setBounds(913, 599, 207, 21);
		contentPane.add(zk1_1);
	}

}

附:

结果图数据:

a_sqrt:5153.7127704599998

ln:4.1115998360700002e-009

u:3.986005e14

a0:0.00028600683435800001

a1:1.7053025658199999e-012

a2:0

toc:0

toe:0

t1:4800

M0:1.2263973009600000

e1:0.0053100715158500003

w:-1.6819446292500000

Crs:-105.43750000000000

Crc:175.34375000000000

Cuc:-5.5264681577700003e-006

Cus:1.1192634701700000e-005

Cic:-9.6857547759999998e-008

Cis:-7.8231096267699997e-008

i0:0.97432927738800001

I:1.8643633724999999e-010

omega:-7.7124641122299999e-009

omega0:-2.9080127721900002

we:7.2921151467e-5

 

代入数据结果图:

 

 

a=a_sqrt*a_sqrt

半轴长

n=ln+(u/a^3)^1/2

经校正的平均角速度

lt= a0+a1(t-toc)+a2(t-toc)^2

计算卫星种差

tk = t - toe

从星历历元算起的时间

Mk = M0 + n * tk

平均近点角

Ek= Mk + e1 * sin(Ek)

k为偏心近点角,必须用迭代法解出

sinVk=(Math.pow(1 - e1 * e1, 0.5) * sin(Ek)) / (1 - e1 * cos(Ek))

cosVk=(cos(Ek) - e1) / (1 - e1 * cos(Ek))

真近点角

u0 = Vk + w

升交距角

u_k = Cus * sin(2 * u0) + Cuc * cos(2 * u0)

升交距角校正值

r_k = Crs * Math.sin(2 * u0) + Crc * Math.cos(2 * u0)

向径校正值

i_k = Cis * Math.sin(2 * u0) + Cic * Math.cos(2 * u0)

倾角校正值

uk = u0 + u_k

经校正的升交距角

rk = a * (1 - e1 * Math.cos(Ek)) + r_k

经校正的向径

ik = i0 + i_k + I * tk

经校正的倾角

omegak = omega0 + omega * (t - toe) - we * t

经校正的升交点经度 地球自转角速度

xk = rk * Math.cos(uk)

在轨道平面中的x位置

yk = rk * Math.sin(uk)

在轨道平面中的y位置

xk1 = xk * Math.cos(omegak) - yk * Math.cos(ik) * Math.sin(omegak)

ECEF x坐标

yk1 = xk * Math.sin(omegak) + yk * Math.cos(ik) * Math.cos(omegak)

ECEF y坐标

zk1 = yk * Math.sin(ik)

ECEF z坐标

热门文章

暂无图片
编程学习 ·

牧牛链,牧牛帮排线

牧牛链医疗鉴证区块链 截至到目前为止,国家大数据局尚未完成对所有医疗机构内生成的医疗数据收集整理,也未完成对居民个人健康档案或病历的电子化进程。医疗机构上传数据和居民主动上传意愿不强烈。越来越多的医疗纠纷报道已经严重影响到医生群体的工作热情。许多医生对于基于…
暂无图片
编程学习 ·

80端口被占用怎么处理

以管理员权限运行c:\windows\system32\cmd.exeC:\WINDOWS\system32>net stop httpHTTP Service 服务已成功停止。C:\WINDOWS\system32>netstat -ano | findstr 0.0.0.0:80C:\WINDOWS\system32>sc config http start=disabled[SC] ChangeServiceConfig 成功即可
暂无图片
编程学习 ·

qqwwee/keras-yolo3 多gpu训练问题

qqwweee/keras-yolo3模型默认采用的是一块GPU,在直接使用model = multi_gpu_model(model,gpus=N)时,模型会报错tensorflow.python.framework.errors_impl.InvalidArgumentError: Can’t concatenate scalars (use tf.stack instead) for ‘yolo_loss_1/concat’ (op: ‘Conca…
暂无图片
编程学习 ·

智慧RFID工地人员定位-工地人员定位系统-新导智能

随着RFID技能的逐渐老练,RFID工地人员定位系统系在施工项目中越来越多地被运用到实践当中。尤其是在工地分布范围广,现场环境恶劣的项目施行现场,为了对施工现场进行安全规范办理,在施工项目应用根据RFID工地人员定位体系,能够实时监测各个施工现场的人员状况,统一办理,…
暂无图片
中恒嘉业 ·

学习笔记六——循环神经网络

一、RNN 前馈神经网络&#xff1a;信息往一个方向流动。包括MLP和CNN 循环神经网络&#xff1a;信息循环流动&#xff0c;网络隐含层输出又作为自身输入&#xff0c;包括RNN、LSTM、GAN等。 RNN模型结构如下图所示&#xff1a; 展开之后相当于堆叠多个共享隐含层参数的前馈…
暂无图片
郑州普通话 ·

学习笔记六——循环神经网络

一、RNN 前馈神经网络&#xff1a;信息往一个方向流动。包括MLP和CNN 循环神经网络&#xff1a;信息循环流动&#xff0c;网络隐含层输出又作为自身输入&#xff0c;包括RNN、LSTM、GAN等。 RNN模型结构如下图所示&#xff1a; 展开之后相当于堆叠多个共享隐含层参数的前馈…
暂无图片
代理记账 ·

学习笔记六——循环神经网络

一、RNN 前馈神经网络&#xff1a;信息往一个方向流动。包括MLP和CNN 循环神经网络&#xff1a;信息循环流动&#xff0c;网络隐含层输出又作为自身输入&#xff0c;包括RNN、LSTM、GAN等。 RNN模型结构如下图所示&#xff1a; 展开之后相当于堆叠多个共享隐含层参数的前馈…
暂无图片
cgfy ·

学习笔记六——循环神经网络

一、RNN 前馈神经网络&#xff1a;信息往一个方向流动。包括MLP和CNN 循环神经网络&#xff1a;信息循环流动&#xff0c;网络隐含层输出又作为自身输入&#xff0c;包括RNN、LSTM、GAN等。 RNN模型结构如下图所示&#xff1a; 展开之后相当于堆叠多个共享隐含层参数的前馈…
暂无图片
coreui ·

Heap Sort 讲解

Heap Sort sorts a group of unordered elements using the Heap data structure. The sorting algorithm using a Min Heap is as follows: Heapify all elements into a Min HeapRecord and delete the top elementPut to top element into an array T that stores all so
暂无图片
未来博客 ·

Heap Sort 讲解

Heap Sort sorts a group of unordered elements using the Heap data structure. The sorting algorithm using a Min Heap is as follows: Heapify all elements into a Min HeapRecord and delete the top elementPut to top element into an array T that stores all so
暂无图片
建站日记 ·

[react] 你觉得react上手快不快?它有哪些限制?

[react] 你觉得react上手快不快&#xff1f;它有哪些限制&#xff1f; 相对vue来说不快。 限制 需要学习JSX需要工程化的配置需要对原生JavaScript有相当的掌握react只是一个UI层面的库&#xff0c;像vue内置了动画处理、keep-alive等功能&#xff0c;react则需要去找第三方库…
暂无图片
mfbz ·

学习笔记六——循环神经网络

一、RNN 前馈神经网络&#xff1a;信息往一个方向流动。包括MLP和CNN 循环神经网络&#xff1a;信息循环流动&#xff0c;网络隐含层输出又作为自身输入&#xff0c;包括RNN、LSTM、GAN等。 RNN模型结构如下图所示&#xff1a; 展开之后相当于堆叠多个共享隐含层参数的前馈…
暂无图片
mfbz ·

AOV网是否存在回路-拓扑排序-C++

拓扑排序是对测试AOV网是否存在回路的方法&#xff01; 拓扑排序的过程中&#xff0c;由于需要查找所有以某顶点为尾的弧&#xff0c;即找到该顶点的所有出边&#xff0c;故图要采用邻接表的存储方式。但拓扑排序较邻接表的存储方式有一点不同&#xff0c;由于要查找入度为0的点…
暂无图片
珊珊日记 ·

学习笔记六——循环神经网络

一、RNN 前馈神经网络&#xff1a;信息往一个方向流动。包括MLP和CNN 循环神经网络&#xff1a;信息循环流动&#xff0c;网络隐含层输出又作为自身输入&#xff0c;包括RNN、LSTM、GAN等。 RNN模型结构如下图所示&#xff1a; 展开之后相当于堆叠多个共享隐含层参数的前馈…
暂无图片
珊珊日记 ·

AOV网是否存在回路-拓扑排序-C++

拓扑排序是对测试AOV网是否存在回路的方法&#xff01; 拓扑排序的过程中&#xff0c;由于需要查找所有以某顶点为尾的弧&#xff0c;即找到该顶点的所有出边&#xff0c;故图要采用邻接表的存储方式。但拓扑排序较邻接表的存储方式有一点不同&#xff0c;由于要查找入度为0的点…