From 4b1b0462565cdf2aacbca203c32f3cad2a9cc555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=82=AB=E9=94=9F?= <11661656+dazzle-kun@user.noreply.gitee.com> Date: Mon, 10 Apr 2023 12:31:09 +0000 Subject: [PATCH] update AstroLib/Src/AsCoordSystem_2023.cpp. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 炫锟 <11661656+dazzle-kun@user.noreply.gitee.com> --- AstroLib/Src/AsCoordSystem_2023.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/AstroLib/Src/AsCoordSystem_2023.cpp b/AstroLib/Src/AsCoordSystem_2023.cpp index 324106f..6a83ae4 100644 --- a/AstroLib/Src/AsCoordSystem_2023.cpp +++ b/AstroLib/Src/AsCoordSystem_2023.cpp @@ -14,4 +14,28 @@ using namespace std; +//******************************************************************** +/// 地固系到发射坐标系的转换矩阵 +/// 发射坐标系:x轴平行地面指向发射方向,y垂直地面铅锤向上,z成右手直角坐标系 +/// @author fangxuankun +/// @Date 2023.4.5 +/// @Input +/// @Param A0 发射方位角A0,定义为发射方向与当地正北的夹角,顺时针度量为正(rad) +/// @Param Lon 发射点的经度(rad) +/// @Param Lan 发射点的纬度(rad) +/// @Output +/// @Param mtx 地固系到发射坐标系的转换矩阵 +//******************************************************************** +void AsCBFToLCMtx(double A0,double Lon,double Lat,CMatrix& mtx) +{ + double a, b, c; + a = Lon - AsCHalfPI; + b = Lat; + c = -A0 - AsCHalfPI; + CMatrixMx(1, 0, 0, 0, cos(b), sin(b), 0, -sin(b), cos(b)); + CMatrixMy(cos(c), 0, -sin(c), 0, 1, 0, sin(c), 0, cos(c)); + CMatrixMz(cos(a), sin(a), 0, -sin(a), cos(a), 0, 0, 0, 1); + CMatrixM = My*Mx*Mz; + mtx = M; +} -- Gitee