Orekit使用心得(七)——附带矩形传感器的卫星对地进行可见性计算

首先我们需要了解orekit库对于使用传感器进行可见性计算的思路。

Orekit中的Event Detector是一种检测连续传播过程中发生的离散事件的方法。每一个事件是否发生是通过一个函数g进行定义的,该函数的取决于航天器状态,即时间、轨道、姿态、质量和用户可能嵌入到航天器状态中的其他信息。当函数g的符号改变时(从正到负还是从负到正),我们会认为事件发生了一次。如果函数值从正到负,然后又回到正,然后又回到负,那么事件将认为被触发了几次,即每次过零点时事件被触发一次。

使用传感器完成对地面站的观测分成两个事件,一个事件e1是地面站可以观测到卫星,另一个事件e2是卫星上面的传感器可以观测到地面。我们分别定义这两个事件的Detector为d1和d2,这两个事件的检测器将使用orekit库中的BooleanDetector.andCombine(d1, d2)方法进行连接,它将e1对应的的函数g1和e2对应的函数g2结合起来,即g=f(g1,g2)。函数g的正负号取决于两个事件是否发生,当两个事件同时发生时为正,其他情况为负。

因此,我们希望检测器d1代表卫星可以被地面站观测的条件,检测器d2代表从卫星传感器视野可以观测到地面站的条件。我们使用orekit中的ElevationDetector来定义检测器d1,当卫星的elevation大于我们设定的阈值时,函数g1为正,表示事件发生。对于检测器d2,我们不能直接使用orekit提供的FieldOfViewDetector,因它表示的意义为:当目标点(这里的目标点是地面站)在视野内时,函数g2为负,当目标点在视野外时,函数g2为正。它的符号与我们想要的正好相反。因此,我们需要使用orekit提供的NegateDetector方法来反转符号。

最后我们组合g1和g2,完成矩形传感器完成对地面的可见性计算。即卫星的elevation大于设定的阈值时,且地面站位于从卫星传感器的视野范围内时,才会触发可见性事件的开始和结束。

下面是使用orekit给出的具体的执行步骤:

注意,在使用Orekit库之前,我们需要读取Orekit文件,详细的读取步骤请移步下面的文章观看:

Orekit使用心得(一)——读取orekit数据icon-default.png?t=N7T8https://blog.csdn.net/whq002/article/details/135258646?spm=1001.2014.3001.5501

(1)定义卫星、地球框架、地面站相关参数

 // Initial state definition : date, orbit

final AbsoluteDate initialDate = new AbsoluteDate(2023, 11, 10, 0, 0, 00.000, TimeScalesFactory.getUTC());

final double mu = 3.986004415e+14; // gravitation coefficient

final Frame inertialFrame = FramesFactory.getEME2000(); // inertial frame for orbit definition

final double a = 24396159; // semi major axis in meters

final double e = 0.72831215; // eccentricity

final double i = FastMath.toRadians(7); // inclination

final double omega = FastMath.toRadians(180); // perigee argument

final double raan = FastMath.toRadians(30); // right ascension of ascending node

final double lM = 0; // mean anomaly

final Orbit initialOrbit = new KeplerianOrbit(a, e, i, omega, raan, lM, PositionAngle.MEAN,

                inertialFrame, initialDate, mu);

        

// Earth and frame

final Frame earthFrame = FramesFactory.getITRF(IERSConventions.IERS_2010, true);

final BodyShape earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS,

                Constants.WGS84_EARTH_FLATTENING, earthFrame);



// Station

final double longitude = FastMath.toRadians(31.8639);

final double latitude = FastMath.toRadians(117.281);

final double altitude = 20.7967;

final GeodeticPoint station1 = new GeodeticPoint(latitude, longitude, altitude);

final TopocentricFrame sta1Frame = new TopocentricFrame(earth, station1, "合肥");

(2)定义传感器基本参数

// Defining rectangular field of view

double halfApertureAlongTrack = FastMath.toRadians(20);

double halfApertureAcrossTrack = FastMath.toRadians(20);

FieldOfView fov = new DoubleDihedraFieldOfView(Vector3D.MINUS_I,                 Vector3D.PLUS_K, halfApertureAcrossTrack,Vector3D.PLUS_J, halfApertureAlongTrack,0);

//Defining attitude provider

AttitudeProvider attitudeProvider = new LofOffset(inertialFrame, LOFType.LVLH);

(3)定义卫星propagator类型

// Defining your propagator and setting up the attitude provider

Propagator propagator = new KeplerianPropagator(initialOrbit);

propagator.setAttitudeProvider(attitudeProvider);

(4)定义地面站观测卫星事件的检测器d1

 // Event definition

final double maxcheck = 60.0;

final double threshold = 0.1;

final double elevation = FastMath.toRadians(0.0);

final EventDetector d1 = new ElevationDetector(maxcheck, threshold, sta1Frame).withConstantElevation(elevation);

(5)定义矩形传感器观测地面站事件的检测器d2

FieldOfViewDetector d2 = new FieldOfViewDetector(sta1Frame, fov);

(6)将d1和d2结合起来,并执行观测任务,输出观测结果

  • 26
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 19
    评论
评论 19
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

上善若水阳阳

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值