C# 클래스 RemoteTech.FlightComputer.FlightComputer

This class describe the RemoteTech Flight Computer (FC). A FC is mostly used to handle the delay ('normal' + manual delay) if any and queue commands.
상속: IDisposable
파일 보기 프로젝트 열기: RemoteTechnologiesGroup/RemoteTech 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
LastTarget RemoteTech.FlightComputer.Commands.TargetCommand
OnActiveCommandAbort System.Action
OnNewCommandPop System.Action
Tf double
TfMax double
TfMin double
kdFactor double
kiFactor double
kpFactor double

공개 메소드들

메소드 설명
Dispose ( ) : void

Called when the flight computer is disposed. This happens when the ModuleSPU is destroyed.

Enqueue ( ICommand cmd, bool ignoreControl = false, bool ignoreDelay = false, bool ignoreExtra = false ) : void

Enqueue a command in the flight computer command queue.

FlightComputer ( ISignalProcessor s ) : System

Flight Computer constructor.

HasManeuverCommandByNode ( ManeuverNode node ) : bool

Looks for the passed node on the command queue and returns true if the node is already on the list.

HasManeuverCommands ( ) : bool

Returns true if there's a least one ManeuverCommand on the queue.

Load ( ConfigNode configNode ) : void

Restores the flight computer from the persistent save.

OnFixedUpdate ( ) : void

Called by the ModuleSPU.OnFixedUpdate method during the "Physics" engine phase.

OnUpdate ( ) : void

Called by the ModuleSPU.Update method during the Update() "Game Logic" engine phase.

This checks if there are any commands that can be removed from the FC queue if their delay has elapsed.

OnVesselChange ( Vessel vessel ) : void

After switching the vessel hide the current flight computer UI.

OrderCommandList ( ) : void

Orders the command queue to be chronological.

Remove ( ICommand cmd ) : void

Remove a command from the flight computer command queue.

RemoveManeuverCommandByNode ( ManeuverNode node ) : void

Triggers a CancelCommand for the given node

Reset ( ) : void

Abort all active commands.

Save ( ConfigNode n ) : void

Saves all values for the flight computer to the persistent.

setPIDParameters ( ) : void
updatePIDParameters ( ) : void

비공개 메소드들

메소드 설명
Enqueue ( FlightCtrlState fs ) : void

Enqueue a FlightCtrlState to the flight control queue.

OnFlyByWirePost ( FlightCtrlState fcs ) : void

Control the flight. Called after the Vessel.OnFlyByWire method.

OnFlyByWirePre ( FlightCtrlState fcs ) : void

Control the flight. Called before the Vessel.OnFlyByWire method.

OnSceneSwitchRequested ( GameScenes>.GameEvents data ) : void

Called when a game switch is requested: close the current computer.

OnVesselSwitching ( Vessel fromVessel, Vessel toVessel ) : void

Called when there's a vessel switch, switching from `fromVessel` to `toVessel`.

PopCommand ( ) : void

Check whether there are commands that can be removed from the flight computer command queue (when their delay time has elapsed).

This is done during the Update() phase of the game engine. OnUpdate method.

PopFlightCtrl ( FlightCtrlState fcs, ISatellite sat ) : void

Remove a FlightCtrlState from the flight control queue.

UpdateLastTarget ( ) : void

Updates the last target command used by the flight computer.

메소드 상세

Dispose() 공개 메소드

Called when the flight computer is disposed. This happens when the ModuleSPU is destroyed.
public Dispose ( ) : void
리턴 void

Enqueue() 공개 메소드

Enqueue a command in the flight computer command queue.
public Enqueue ( ICommand cmd, bool ignoreControl = false, bool ignoreDelay = false, bool ignoreExtra = false ) : void
cmd ICommand The command to be enqueued.
ignoreControl bool If true the command is not enqueued.
ignoreDelay bool If true, the command is executed immediately, otherwise the light speed delay is applied.
ignoreExtra bool If true, the command is executed without manual delay (if any). The normal light speed delay still applies.
리턴 void

FlightComputer() 공개 메소드

Flight Computer constructor.
public FlightComputer ( ISignalProcessor s ) : System
s ISignalProcessor A signal processor (most probably a instance.)
리턴 System

HasManeuverCommandByNode() 공개 메소드

Looks for the passed node on the command queue and returns true if the node is already on the list.
public HasManeuverCommandByNode ( ManeuverNode node ) : bool
node ManeuverNode Node to search in the queued commands
리턴 bool

HasManeuverCommands() 공개 메소드

Returns true if there's a least one ManeuverCommand on the queue.
public HasManeuverCommands ( ) : bool
리턴 bool

Load() 공개 메소드

Restores the flight computer from the persistent save.
public Load ( ConfigNode configNode ) : void
configNode System.ConfigNode Node with the informations for the flight computer
리턴 void

OnFixedUpdate() 공개 메소드

Called by the ModuleSPU.OnFixedUpdate method during the "Physics" engine phase.
public OnFixedUpdate ( ) : void
리턴 void

OnUpdate() 공개 메소드

Called by the ModuleSPU.Update method during the Update() "Game Logic" engine phase.
This checks if there are any commands that can be removed from the FC queue if their delay has elapsed.
public OnUpdate ( ) : void
리턴 void

OnVesselChange() 공개 메소드

After switching the vessel hide the current flight computer UI.
public OnVesselChange ( Vessel vessel ) : void
vessel Vessel The **new** vessel we are changing to.
리턴 void

OrderCommandList() 공개 메소드

Orders the command queue to be chronological.
public OrderCommandList ( ) : void
리턴 void

Remove() 공개 메소드

Remove a command from the flight computer command queue.
public Remove ( ICommand cmd ) : void
cmd ICommand The command to be removed from the command queue.
리턴 void

RemoveManeuverCommandByNode() 공개 메소드

Triggers a CancelCommand for the given node
public RemoveManeuverCommandByNode ( ManeuverNode node ) : void
node ManeuverNode Node to cancel from the queue
리턴 void

Reset() 공개 메소드

Abort all active commands.
public Reset ( ) : void
리턴 void

Save() 공개 메소드

Saves all values for the flight computer to the persistent.
public Save ( ConfigNode n ) : void
n System.ConfigNode Node to save in
리턴 void

setPIDParameters() 공개 메소드

public setPIDParameters ( ) : void
리턴 void

updatePIDParameters() 공개 메소드

public updatePIDParameters ( ) : void
리턴 void

프로퍼티 상세

LastTarget 공개적으로 프로퍼티

The last TargetCommand used by the Flight Computer.
public TargetCommand,RemoteTech.FlightComputer.Commands LastTarget
리턴 RemoteTech.FlightComputer.Commands.TargetCommand

OnActiveCommandAbort 공개적으로 프로퍼티

Action triggered if the active command is aborted.
public Action,System OnActiveCommandAbort
리턴 System.Action

OnNewCommandPop 공개적으로 프로퍼티

Action triggered if a new command popped to an active command.
public Action,System OnNewCommandPop
리턴 System.Action

Tf 공개적으로 프로퍼티

public double Tf
리턴 double

TfMax 공개적으로 프로퍼티

public double TfMax
리턴 double

TfMin 공개적으로 프로퍼티

public double TfMin
리턴 double

kdFactor 공개적으로 프로퍼티

public double kdFactor
리턴 double

kiFactor 공개적으로 프로퍼티

public double kiFactor
리턴 double

kpFactor 공개적으로 프로퍼티

public double kpFactor
리턴 double