Skip to content

MASITransfer

MOARdV edited this page Nov 29, 2016 · 15 revisions

#MASITransfer.cs

The MASITransfer module does calculations to find phase angles and ejection angles for Hohmann transfer orbits. It provides functionality equivalent to the Protractor mod, but focused strictly on computations involving the current vessel and a target (either another vessel or a Celestial Body).

Note that MASITransfer assumes the target has a small relative inclination. It will generate erroneous results for high inclination and retrograde relative orbits.


##Ejection Angle Category

The Ejection Angle provides information on the ejection angle. The ejection angle is used on interplanetary transfers to determine when the vessel should start its burn to escape the world it currently orbits.

When the vessel is orbiting a moon in preparation for an interplanetary transfer, the target ejection angle will reflect the ejection angle required to take advantage of the Oberth effect during the ejection.

###transfer.CurrentEjectionAngle()

Returns: Current ejection angle in degrees, or 0 if there is no ejection angle.

Reports the vessel's current ejection angle. When this value matches the transfer ejection angle, it is time to start an interplanetary burn.

This angle is a measurement of the vessel from the planet's prograde direction.

###transfer.RelativeEjectionAngle()

Returns: Relative ejection angle in degrees, or 0 if there is no ejection angle.

Reports the difference between the vessel's current ejection angle and the transfer ejection angle. When this value is 0, it is time to start an interplanetary burn.

NOT IMPLEMENTED

###transfer.TimeUntilEjection()

Returns: Time until the relative ejection angle is 0, in seconds, or 0 if there is no ejection angle.

Provides the time until the vessel reaches the transfer ejection angle.

NOT IMPLEMENTED

###transfer.TransferEjectionAngle()

Returns: Transfer ejection angle in degrees, or 0 if there is no ejection angle.

Reports the ejection angle when an interplanetary Hohmann transfer orbit should begin. This is of use for transfers from one planet to another - once the transfer phase angle has been reached, the vessel should launch when the next transfer ejection angle is reached.

NOT IMPLEMENTED


##Phase Angle Category

The Phase Angle section provides measurements of the phase angle, the measure of the angle created by drawing lines from the object being orbited to the vessel and to the target. This angle shows relative position of the two objects, and it is continuously changing as long as the craft are not in the same orbit.

To do a Hohmann transfer between orbits, the vessel should initiate a burn when its current phase angle reaches the transfer phase angle. Alternatively, when the relative phase angle reaches 0, initiate a burn.

###transfer.CurrentPhaseAngle()

Returns: Current phase angle in degrees, from 0 to 360.

Returns the current phase angle between the vessel and its target.

###transfer.RelativePhaseAngle()

Returns: The difference between the transfer phase angle and the current phase angle in degrees, ranging from 0 to 360.

Returns the difference (in degrees) between the current phase angle and the transfer phase angle. When this value reaches 0, it is time to start the transfer burn. If there is no valid target, this value is 0.

###transfer.TimeUntilPhaseAngle()

Returns: Time until transfer, in seconds, or 0 if there is no solution.

Returns the time in seconds until the vessel reaches the correct phase angle for initiating a burn to transfer to the target.

###transfer.TransferPhaseAngle()

Returns: Required phase angle in degrees (always betweeen 0 and 180).

Returns the phase angle required to initiate a Hohmann transfer orbit. This is the absolute phase angle, so it does not vary over time when comparing two stable orbits. Use fc.RelativePhaseAngle() to count down to a transfer.

Returns 0 if there is no active target.

###transfer.ProjectAngle2D(Vector3d a, Vector3d b)

  • a: First ray
  • b: Second ray

Returns: Angle between the two vectors in degrees [0, 360).

Project vectors onto a plane, measure the angle between them.

###transfer.GetSolarOrbit(Orbit orbit, out int numHops)

For

###transfer.GetCommonOrbits(ref Orbit vesselOrbit, ref Orbit destinationOrbit, out int vesselOrbitSteps)

Find the orbits we can use to determine phase angle. These orbits need to share a common reference body. We also report how many parent bodies we had to look at to find the returned vesselOrbit, so we can compute the correct ejection angle (either ejection angle, or moon ejection angle for Oberth transfers).

###transfer.UpdateTransferParameters()

Updater method - called at most once per FixedUpdate when the transfer parameters are being queried.


This documentation was automatically generated from source code at 13:36 UTC on 3/Nov/2016.

Clone this wiki locally