C# Class RemoteTech.FlightComputer.Commands.ManeuverCommand

Inheritance: AbstractCommand
Exibir arquivo Open project: RemoteTechnologiesGroup/RemoteTech Class Usage Examples

Public Properties

Property Type Description
Node ManeuverNode
OriginalDelta double
RemainingDelta double
RemainingTime double

Public Methods

Method Description
CommandCanceled ( FlightComputer computer ) : void

This method will be triggerd after deleting a command from the list.

CommandEnqueued ( FlightComputer computer ) : void

This method will be triggerd right after the command was enqueued to the flight computer list.

Execute ( FlightComputer computer, FlightCtrlState ctrlState ) : bool

Executes the maneuver burn for the configured maneuver node.

Load ( ConfigNode n, FlightComputer fc ) : bool

Find the maneuver node by the saved node id (index id of the meneuver list)

Pop ( FlightComputer f ) : bool
Save ( ConfigNode n, FlightComputer fc ) : void

Save the index of the maneuver node to the persistent

WithNode ( int nodeIndex, FlightComputer f ) : ManeuverCommand
getMaxBurnTime ( FlightComputer f ) : double

Returns the total time for this burn in seconds

Private Methods

Method Description
AbortManeuver ( FlightComputer computer ) : void

getRemainingDeltaV ( FlightComputer computer ) : double

Gets the current remaining delta velocity for this maneuver burn determined by the vessels burn vector of the passed FlightComputer instance.

Method Details

CommandCanceled() public method

This method will be triggerd after deleting a command from the list.
public CommandCanceled ( FlightComputer computer ) : void
computer FlightComputer Current flight computer
return void

CommandEnqueued() public method

This method will be triggerd right after the command was enqueued to the flight computer list.
public CommandEnqueued ( FlightComputer computer ) : void
computer FlightComputer Current flightcomputer
return void

Execute() public method

Executes the maneuver burn for the configured maneuver node.
public Execute ( FlightComputer computer, FlightCtrlState ctrlState ) : bool
computer FlightComputer FlightComputer instance of the computer of the vessel the ManeuverCommand is for.
ctrlState FlightCtrlState FlightCtrlState instance of the current state of the vessel.
return bool

Load() public method

Find the maneuver node by the saved node id (index id of the meneuver list)
public Load ( ConfigNode n, FlightComputer fc ) : bool
n System.ConfigNode Node with the command infos
fc FlightComputer Current flightcomputer
return bool

Pop() public method

public Pop ( FlightComputer f ) : bool
f FlightComputer
return bool

Save() public method

Save the index of the maneuver node to the persistent
public Save ( ConfigNode n, FlightComputer fc ) : void
n System.ConfigNode
fc FlightComputer
return void

WithNode() public static method

public static WithNode ( int nodeIndex, FlightComputer f ) : ManeuverCommand
nodeIndex int
f FlightComputer
return ManeuverCommand

getMaxBurnTime() public method

Returns the total time for this burn in seconds
public getMaxBurnTime ( FlightComputer f ) : double
f FlightComputer Flightcomputer for the current vessel
return double

Property Details

Node public_oe property

public ManeuverNode Node
return ManeuverNode

OriginalDelta public_oe property

public double OriginalDelta
return double

RemainingDelta public_oe property

public double RemainingDelta
return double

RemainingTime public_oe property

public double RemainingTime
return double