当前位置: 首页>>代码示例>>C#>>正文


C# Orbit.GetDTforTrueAnomaly方法代码示例

本文整理汇总了C#中Orbit.GetDTforTrueAnomaly方法的典型用法代码示例。如果您正苦于以下问题:C# Orbit.GetDTforTrueAnomaly方法的具体用法?C# Orbit.GetDTforTrueAnomaly怎么用?C# Orbit.GetDTforTrueAnomaly使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Orbit的用法示例。


在下文中一共展示了Orbit.GetDTforTrueAnomaly方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TimeAtOpposition

	/// <summary>
	/// Calculates the earliest universal time after <paramref name="after"/> when <paramref name="destination"/> will be 180 degrees from the <paramref name="origin"/> position.
	/// </summary>
	/// <returns>The universal time when <paramref name="destination"/> will be in opposition to <paramref name="origin"/>.</returns>
	/// <param name="origin">Origin position.</param>
	/// <param name="destination">Destination orbit.</param>
	/// <param name="after">Universal time after which to find the opposition.</param>
	public static double TimeAtOpposition(Vector3d origin, Orbit destination, double after = 0)
	{
		Vector3d normal = destination.GetOrbitNormal().normalized;
		double trueAnomaly = TrueAnomaly(destination, Vector3d.Exclude(normal, -origin));
		double ut = Planetarium.GetUniversalTime() + destination.GetDTforTrueAnomaly(trueAnomaly, 0);
        if (ut <= after) {
            ut += destination.period * Math.Floor((after - ut) / destination.period + 1);
        }

		return ut;
	}
开发者ID:mercutiodesign,项目名称:TransferWindowPlanner,代码行数:18,代码来源:LambertSolver.cs


注:本文中的Orbit.GetDTforTrueAnomaly方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。