二行根数转六根数、六根数转经纬坐标
public static void main(String[] args) {
calculateOrbitElement("QIXIANG-001 \n" +
"1 44940U 20001AC 23289.39944927 .00024096 00000+0 16308-2 0 9995\n" +
"2 44940 53.0532 295.9515 0001371 97.1775 262.9370 15.06404965208194");
createXYZ();
}
public static void calculateOrbitElement(String tle){
File orekitData = new File("C:\\Users\\lihao\\Desktop\\orekit-data-master\\orekit-data-master\\");
DataProvidersManager manager = DataContext.getDefault().getDataProvidersManager();
manager.addProvider(new DirectoryCrawler(orekitData)); // 存放orekitdata路径
String[] params = tle.split("\n");
String line1= params[1];
String line2= params[2];
TLE tleObj = new TLE(line1,line2);
TLEPropagator tlePropagator= TLEPropagator.selectExtrapolator(tleObj);
Orbit cartesianOrbit = tlePropagator.getInitialState().getOrbit(); // 笛卡尔轨道
KeplerianOrbit keplerianOrbit = new KeplerianOrbit(cartesianOrbit); // 转换为开普勒轨道
System.out.println("半长轴:"+keplerianOrbit.getA());
System.out.println("离心率:"+keplerianOrbit.getE());
System.out.println("轨道倾角:"+keplerianOrbit.getI());
// System.out.println("升交点赤经:"+Math.toDegrees(keplerianOrbit.getRightAscensionOfAscendingNode())); // 弧度转化为度
// System.out.println("近地点幅角:"+Math.toDegrees(keplerianOrbit.getPerigeeArgument()));
System.out.println("升交点赤经:"+keplerianOrbit.getRightAscensionOfAscendingNode()); // 弧度转化为度
System.out.println("近地点幅角:"+keplerianOrbit.getPerigeeArgument());
System.out.println("真近点角"+keplerianOrbit.getTrueAnomaly());
}
<dependency>
<groupId>org.hipparchus</groupId>
<artifactId>hipparchus-fitting</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>org.hipparchus</groupId>
<artifactId>hipparchus-clustering</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>org.hipparchus</groupId>
<artifactId>hipparchus-fft</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>org.hipparchus</groupId>
<artifactId>hipparchus-filtering</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>org.hipparchus</groupId>
<artifactId>hipparchus-geometry</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>org.hipparchus</groupId>
<artifactId>hipparchus-ode</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>org.hipparchus</groupId>
<artifactId>hipparchus-optim</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>org.hipparchus</groupId>
<artifactId>hipparchus-stat</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>org.hipparchus</groupId>
<artifactId>hipparchus-migration</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>org.orekit</groupId>
<artifactId>orekit</artifactId>
<version>11.3.3</version>
</dependency>
2转6文章地址:
点击
6转经纬坐标地址:
点击
原文地址:https://blog.csdn.net/csdndd521/article/details/136678872
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!