0
0

Initial commit from DCSP - 2026/1/15 15:11:58

This commit is contained in:
xb
2026-01-15 15:11:58 +08:00
commit c93536b187
100 changed files with 59765 additions and 0 deletions

21
dlx_to_nlg/CMakeLists.txt Normal file
View File

@@ -0,0 +1,21 @@
cmake_minimum_required(VERSION 2.8.12)
if(NOT CMAKE_VERSION VERSION_LESS 3.0)
cmake_policy(SET CMP0048 NEW)
endif()
project(dlx_to_nlg)
set(PROJECT_NAME "dlx_to_nlg")
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/libdynamics.so DESTINATION gnc/${PROJECT_NAME})
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/libdynamics.a DESTINATION gnc/${PROJECT_NAME})
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/TyxkDynamics.h DESTINATION gnc/${PROJECT_NAME})
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/eopc04.dat DESTINATION gnc)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/leap_Second.dat DESTINATION gnc)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findlibdynamics.cmake DESTINATION gnc/${PROJECT_NAME})

View File

@@ -0,0 +1,9 @@
find_path(libdynamics_INCLUDE_DIR TyxkDynamics.h ${CMAKE_CURRENT_LIST_DIR})
find_library(libdynamics_LIBRARY libdynamics.a ${CMAKE_CURRENT_LIST_DIR})
if (libdynamics_INCLUDE_DIR AND libdynamics_LIBRARY)
set(libdynamics_FOUND TRUE)
endif (libdynamics_INCLUDE_DIR AND libdynamics_LIBRARY)

98
dlx_to_nlg/TyxkDynamics.h Normal file
View File

@@ -0,0 +1,98 @@
//
// TyxkDynamics.h
//
// 目的:
//
//
#pragma once
#ifndef INC_TyxkDynamics_H
#define INC_TyxkDynamics_H
#include <iostream>
#include <string>
#include <vector>
namespace Dynamics
{
//简约儒略日转日历
void MJD_UTC(double mjd, int &year, int &mon, int &day, int &hour, int &min, double &sec);
//日历转简约儒略日
void UTC_MJD(int year, int mon, int day, int hour, int min, double sec, double &mjd);
//简约儒略日转北京时
void MJD_BJT(double mjd, int &year, int &mon, int &day, int &hour, int &min, double &sec);
//北京时转简约儒略日
void BJT_MJD(int year, int mon, int day, int hour, int min, double sec, double &mjd);
//日历转北京时
void UTC_BJT(int UTC_year, int UTC_mon, int UTC_day, int UTC_hour, int UTC_min, double UTC_sec, int &BJT_year, int &BJT_mon, int &BJT_day, int &BJT_hour, int &BJT_min, double &BJT_sec);
//北京时转日历
void BJT_UTC(int BJT_year, int BJT_mon, int BJT_day, int BJT_hour, int BJT_min, double BJT_sec, int &UTC_year, int &UTC_mon, int &UTC_day, int &UTC_hour, int &UTC_min, double &UTC_sec);
//日历比较
bool UTCCompare(int UTC1_year, int UTC1_mon, int UTC1_day, int UTC1_hour, int UTC1_min, double UTC1_sec, int UTC2_year, int UTC2_mon, int UTC2_day, int UTC2_hour, int UTC2_min, double UTC2_sec);
//日历加计算
void UTC_add_sec(int year, int mon, int day, int hour, int min, double sec, double addSecs, int &out_year, int &out_mon, int &out_day, int &out_hour, int &out_min, double &out_sec);
//日历减计算
void UTC_sub_sec(int year, int mon, int day, int hour, int min, double sec, double subSecs, int &out_year, int &out_mon, int &out_day, int &out_hour, int &out_min, double &out_sec);
//J2000直角坐标转WGS84直角坐标
void J2000_WGS84(double mjd, double eci[6], double ecf[6]);
//WGS84直角坐标转J2000直角坐标
void WGS84_J2000(double mjd, double ecf[6], double eci[6]);
//WGS84直角坐标转大地坐标
void Pos_LLA(double Pos[3], double LLA[3]);
//WGS84大地坐标转直角坐标
void LLA_Pos(double LLA[3], double Pos[3]);
//J2000坐标系下位置速度转经典六根数
void PosVel_Orb(double eci[6], double orb[6]);
//J2000坐标系下经典六根数转位置速度
void Orb_PosVel(double orb[6], double eci[6]);
//真近点角转平近点角
void TrueAno_MeanAno(double f, double e, double &M);
//平近点角转真近点角
void MeanAno_TrueAno(double M, double e, double &f);
//两行根数转经典六根数
void TLE_ELEM(const std::string &line1,const std::string &line2, double kep[6]);
//TEME坐标系直角坐标转J2000坐标系
void TEME_J2000(double mjd, double teme[6], double eci[6]);
//J2000直角坐标系直角坐标转TEME坐标系直角坐标
void J2000_TEME(double mjd, double eci[6], double teme[6]);
//单点二体外推
void Twobody(double mjd0, double orb0[6] , double mjd , double orb[6]);
//二体外推
void Twobody(double orb0[6] , double dt, double orb[6]);
//单点J2外推
void J2_propagator(double mjd0, double orb0[6] , double mjd , double orb[6]);
//J2外推
void J2_propagator (double orb0[6] , double dt, double orb[6]);
//单点J2外推
void J4_propagator(double mjd0, double orb0[6] , double mjd , double orb[6]);
//J4外推
void J4_propagator (double orb0[6] , double dt, double orb[6]);
//HPOP单点外推
void HPOP(double mjd0, double pv0[6] ,int nEarth , bool bSunMoon, bool bSolarRad,
bool bDrag, double area,double mass, double CR, double CD, double mjd , double pv[6]);
//HPOP外推
void HPOP(double mjd0, double pv0[6] ,int nEarth , bool bSunMoon, bool bSolarRad,
bool bDrag, double aera,double mass, double CR, double CD, double mjd_b, double mjd_e, double step, std::vector< std::vector<double> > &pvlist);
//SGP4单点外推
void SGP4_PV(const std::string &line1,const std::string &line2, double mjd , double pv[6]);
//SGP4多点外推
void SGP4_PV(const std::string &line1,const std::string &line2, double mjd_b, double mjd_e, double step, std::vector< std::vector<double> > &pvlist);
//计算太阳位置
void Sun(double mjd, double r[3]);
//计算月球位置
void Moon(double mjd, double r[3]);
const double pi = 3.14159265358979324;
const double pi2 = 2.0*pi; // 2pi
const double Rad = pi / 180.0; // Radians per degree
const double Deg = 180.0 / pi; // Degrees per radian
const double Arcs = 3600.0*180.0/pi; // Arcseconds per radian
}
#endif

View File

@@ -0,0 +1,9 @@
find_path(libdynamics_INCLUDE_DIR TyxkDynamics.h ${CMAKE_CURRENT_LIST_DIR})
find_library(libdynamics_LIBRARY libdynamics.a ${CMAKE_CURRENT_LIST_DIR})
if (libdynamics_INCLUDE_DIR AND libdynamics_LIBRARY)
set(libdynamics_FOUND TRUE)
endif (libdynamics_INCLUDE_DIR AND libdynamics_LIBRARY)

21884
dlx_to_nlg/eopc04.dat Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,41 @@
# Value of TAI-UTC in second valid beetween the initial value until
# the epoch given on the next line. The last line reads that NO
# leap second was introduced since the corresponding date
# Updated through IERS Bulletin 62 issued in July 2021
#
#
# File expires on 28 June 2022
#
#
# MJD Date TAI-UTC (s)
# day month year
# --- -------------- ------
#
41317.0 1 1 1972 10
41499.0 1 7 1972 11
41683.0 1 1 1973 12
42048.0 1 1 1974 13
42413.0 1 1 1975 14
42778.0 1 1 1976 15
43144.0 1 1 1977 16
43509.0 1 1 1978 17
43874.0 1 1 1979 18
44239.0 1 1 1980 19
44786.0 1 7 1981 20
45151.0 1 7 1982 21
45516.0 1 7 1983 22
46247.0 1 7 1985 23
47161.0 1 1 1988 24
47892.0 1 1 1990 25
48257.0 1 1 1991 26
48804.0 1 7 1992 27
49169.0 1 7 1993 28
49534.0 1 7 1994 29
50083.0 1 1 1996 30
50630.0 1 7 1997 31
51179.0 1 1 1999 32
53736.0 1 1 2006 33
54832.0 1 1 2009 34
56109.0 1 7 2012 35
57204.0 1 7 2015 36
57754.0 1 1 2017 37

BIN
dlx_to_nlg/libdynamics.a Normal file

Binary file not shown.

BIN
dlx_to_nlg/libdynamics.so Normal file

Binary file not shown.

Binary file not shown.