Orekit使用心得(六)——卫星对地观测的可见性计算

在本实验中,我们使用GAOFEN-6_43484号卫星,选取喀什作为地面站,选取的观测时间为2023年9月15日4:00至2023年9月15日8:00,完成卫星事件处理任务。下面是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, 9, 15, 4, 0, 00.000, TimeScalesFactory.getUTC());

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

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

final Vector3D position = new Vector3D(2797914.567, -2288195.171, 6012468.374);

final Vector3D velocity = new Vector3D(-6089.132, 2403.774, 3732.121);

final PVCoordinates pvCoordinates = new PVCoordinates(position, velocity);

final Orbit initialOrbit = new KeplerianOrbit(pvCoordinates, inertialFrame, initialDate, mu);

(2)定义propagator类型(备注:orekit将propagation分为:Analytical propagation、Numerical propagation、Semianalytical propagation、Field propagation四个大类,每一类propagation中又有多种具体的propagator类型)。

// Propagator : consider a simple Keplerian motion (could be more elaborate)

final Propagator kepler = new KeplerianPropagator(initialOrbit);

(3)定义地球框架

// 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);

(4)定义地面站的经度、纬度、高度

// Station

final double longitude = FastMath.toRadians(75.9797);

final double latitude  = FastMath.toRadians(39.4547);

final double altitude  = 0.;

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

final TopocentricFrame sta1Frame = new TopocentricFrame(earth, station1, "喀什");

(5)定义事件处理器并进行事件处理

final EventDetector sta1Visi =

new ElevationDetector(maxcheck, threshold, sta1Frame).withConstantElevation(elevation).withHandler((s, detector, increasing) -> {

       System.out.println(" Visibility on " +                              detector.getTopocentricFrame().getName() +(increasing ? " begins at " : " ends at ") +s.getDate());

       return increasing ? Action.CONTINUE : Action.STOP;

       });



// Add event to be detected

kepler.addEventDetector(sta1Visi);

(6)定义事件处理的持续时间

// Propagate from the initial date to the first raising or for the fixed duration

final SpacecraftState finalState = kepler.propagate(initialDate.shiftedBy(14400.));

(7)打印输出观测结果

System.out.println(" Final state : " + finalState.getDate().durationFrom(initialDate));

输出结果:

(8)输出多测观测结果

但是,我们将orekit观测结果与STK所给的观测结果进行对比时,发现在上述时间和卫星状态下,卫星有三段时间可以观测到喀什地面站,但是orekit输出的结果只有一个,这里我们需要修改orekit教程中给出的事件处理代码,从而将所有的可见时间段进行输出。

// Event definition

final double maxcheck = 60.0;

final double threshold = 0.001;

final double elevation = FastMath.toRadians(5.0);

final EventDetector sta1Visi = new ElevationDetector(maxcheck, threshold, sta1Frame).withConstantElevation(elevation).withHandler((s, detector, increasing) -> {

if (increasing) {

System.out.println("Visibility begins on " + detector.getTopocentricFrame().getName() + " at " + s.getDate());

} else {

System.out.println("Visibility ends on " + detector.getTopocentricFrame().getName() + " at " + s.getDate());

  }

return Action.CONTINUE; // Continue processing the event

});



// Add event to be detected

kepler.addEventDetector(sta1Visi);

输出结果:

这样我们就完成了卫星对地面目标的多次观测。

  • 16
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

上善若水阳阳

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

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

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

打赏作者

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

抵扣说明:

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

余额充值