本文整理汇总了Java中org.orekit.time.AbsoluteDate.shiftedBy方法的典型用法代码示例。如果您正苦于以下问题:Java AbsoluteDate.shiftedBy方法的具体用法?Java AbsoluteDate.shiftedBy怎么用?Java AbsoluteDate.shiftedBy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.orekit.time.AbsoluteDate
的用法示例。
在下文中一共展示了AbsoluteDate.shiftedBy方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDate
import org.orekit.time.AbsoluteDate; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public AbsoluteDate getDate(final double lineNumber) {
if (datation.size() < 2) {
return datation.get(0).getSecond();
}
// find entries bracketing the line number
int sup = 0;
while (sup < datation.size() - 1) {
if (datation.get(sup).getFirst() >= lineNumber) {
break;
}
++sup;
}
final int inf = (sup == 0) ? sup++ : (sup - 1);
final double lInf = datation.get(inf).getFirst();
final AbsoluteDate dInf = datation.get(inf).getSecond();
final double lSup = datation.get(sup).getFirst();
final AbsoluteDate dSup = datation.get(sup).getSecond();
final double alpha = (lineNumber - lInf) / (lSup - lInf);
return dInf.shiftedBy(alpha * dSup.durationFrom(dInf));
}
示例2: createPV
import org.orekit.time.AbsoluteDate; //导入方法依赖的package包/类
private TimeStampedPVCoordinates createPV(AbsoluteDate t0, double dt,
double px, double py, double pz,
double vx, double vy, double vz) {
return new TimeStampedPVCoordinates(t0.shiftedBy(dt),
new Vector3D(px, py, pz),
new Vector3D(vx, vy, vz),
Vector3D.ZERO);
}
示例3: createQ
import org.orekit.time.AbsoluteDate; //导入方法依赖的package包/类
private TimeStampedAngularCoordinates createQ(AbsoluteDate t0, double dt,
double q0, double q1, double q2, double q3) {
return new TimeStampedAngularCoordinates(t0.shiftedBy(dt),
new Rotation(q0, q1, q2, q3, true),
Vector3D.ZERO, Vector3D.ZERO);
}