Difference between revisions of "API:Vessel"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Updating to 1.04 signatures and adding all methods, fields, properties)
(Fixed some bugs in script, formatting, added constructors, better sorting, other API code added)
Line 13: Line 13:
 
   |type=ActionGroupList
 
   |type=ActionGroupList
 
   |name=ActionGroups
 
   |name=ActionGroups
   |desc=
+
   |desc=?
 
   |hasget=1
 
   |hasget=1
 
   |hasset=
 
   |hasset=
Line 20: Line 20:
 
   |type=VesselAutopilot
 
   |type=VesselAutopilot
 
   |name=Autopilot
 
   |name=Autopilot
   |desc=
+
   |desc=?
 
   |hasget=1
 
   |hasget=1
 
   |hasset=
 
   |hasset=
Line 27: Line 27:
 
   |type=Vector3
 
   |type=Vector3
 
   |name=CurrentCoM
 
   |name=CurrentCoM
   |desc=
+
   |desc=?
 
   |hasget=1
 
   |hasget=1
 
   |hasset=
 
   |hasset=
Line 34: Line 34:
 
   |type=DiscoveryInfo
 
   |type=DiscoveryInfo
 
   |name=DiscoveryInfo
 
   |name=DiscoveryInfo
   |desc=
+
   |desc=?
 
   |hasget=1
 
   |hasget=1
 
   |hasset=
 
   |hasset=
Line 41: Line 41:
 
   |type=float
 
   |type=float
 
   |name=distanceLandedPackThreshold
 
   |name=distanceLandedPackThreshold
   |desc=Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
+
   |desc=? Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
 
   |hasget=1
 
   |hasget=1
 
   |hasset=1
 
   |hasset=1
Line 48: Line 48:
 
   |type=float
 
   |type=float
 
   |name=distanceLandedUnpackThreshold
 
   |name=distanceLandedUnpackThreshold
   |desc=Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
+
   |desc=? Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
 
   |hasget=1
 
   |hasget=1
 
   |hasset=1
 
   |hasset=1
Line 55: Line 55:
 
   |type=float
 
   |type=float
 
   |name=distancePackThreshold
 
   |name=distancePackThreshold
   |desc=Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
+
   |desc=? Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
 
   |hasget=1
 
   |hasget=1
 
   |hasset=1
 
   |hasset=1
Line 62: Line 62:
 
   |type=float
 
   |type=float
 
   |name=distanceUnpackThreshold
 
   |name=distanceUnpackThreshold
   |desc=Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
+
   |desc=? Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
 
   |hasget=1
 
   |hasget=1
 
   |hasset=1
 
   |hasset=1
Line 69: Line 69:
 
   |type=bool
 
   |type=bool
 
   |name=HoldPhysics
 
   |name=HoldPhysics
   |desc=
+
   |desc=?
 
   |hasget=1
 
   |hasget=1
 
   |hasset=
 
   |hasset=
Line 76: Line 76:
 
   |type=bool
 
   |type=bool
 
   |name=isActiveVessel
 
   |name=isActiveVessel
   |desc=
+
   |desc=?
 
   |hasget=1
 
   |hasget=1
   |hasset=True if the vessel is the active vessel.
+
   |hasset=
 
}}
 
}}
 
{{Property
 
{{Property
 
   |type=bool
 
   |type=bool
 
   |name=isCommandable
 
   |name=isCommandable
   |desc=
+
   |desc=?
 
   |hasget=1
 
   |hasget=1
 
   |hasset=
 
   |hasset=
Line 90: Line 90:
 
   |type=bool
 
   |type=bool
 
   |name=IsControllable
 
   |name=IsControllable
   |desc=
+
   |desc=?
 
   |hasget=1
 
   |hasget=1
 
   |hasset=
 
   |hasset=
Line 104: Line 104:
 
   |type=bool
 
   |type=bool
 
   |name=isPersistent
 
   |name=isPersistent
   |desc=
+
   |desc=?
 
   |hasget=1
 
   |hasget=1
 
   |hasset=1
 
   |hasset=1
Line 111: Line 111:
 
   |type=bool
 
   |type=bool
 
   |name=IsRecoverable
 
   |name=IsRecoverable
   |desc=
+
   |desc=?
 
   |hasget=1
 
   |hasget=1
 
   |hasset=
 
   |hasset=
Line 118: Line 118:
 
   |type=bool
 
   |type=bool
 
   |name=LandedOrSplashed
 
   |name=LandedOrSplashed
   |desc=
+
   |desc=?
 
   |hasget=1
 
   |hasget=1
 
   |hasset=
 
   |hasset=
Line 125: Line 125:
 
   |type=CelestialBody
 
   |type=CelestialBody
 
   |name=mainBody
 
   |name=mainBody
   |desc=
+
   |desc=?
 
   |hasget=1
 
   |hasget=1
   |hasset=The reference body of the vessel.
+
   |hasset=
 
}}
 
}}
 
{{Property
 
{{Property
 
   |type=Orbit
 
   |type=Orbit
 
   |name=orbit
 
   |name=orbit
   |desc=
+
   |desc=?
 
   |hasget=1
 
   |hasget=1
 
   |hasset=
 
   |hasset=
Line 139: Line 139:
 
   |type=List〈Part〉
 
   |type=List〈Part〉
 
   |name=Parts
 
   |name=Parts
   |desc=
+
   |desc=?
 
   |hasget=1
 
   |hasget=1
 
   |hasset=
 
   |hasset=
Line 146: Line 146:
 
   |type=bool
 
   |type=bool
 
   |name=PatchedConicsAttached
 
   |name=PatchedConicsAttached
   |desc=
+
   |desc=?
 
   |hasget=1
 
   |hasget=1
 
   |hasset=
 
   |hasset=
Line 160: Line 160:
 
   |type=VesselValues
 
   |type=VesselValues
 
   |name=VesselValues
 
   |name=VesselValues
   |desc=
+
   |desc=?
 
   |hasget=1
 
   |hasget=1
 
   |hasset=
 
   |hasset=
Line 167: Line 167:
 
   |type=static float
 
   |type=static float
 
   |name=loadDistance
 
   |name=loadDistance
   |desc=Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
+
   |desc=? Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
 
   |hasget=1
 
   |hasget=1
 
   |hasset=1
 
   |hasset=1
Line 174: Line 174:
 
   |type=static float
 
   |type=static float
 
   |name=unloadDistance
 
   |name=unloadDistance
   |desc=Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
+
   |desc=? Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
 
   |hasget=1
 
   |hasget=1
 
   |hasset=1
 
   |hasset=1
Line 194: Line 194:
 
   |type=Vector3
 
   |type=Vector3
 
   |name=angularMomentum
 
   |name=angularMomentum
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
Line 204: Line 204:
 
   |type=double
 
   |type=double
 
   |name=atmDensity
 
   |name=atmDensity
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=double
 
   |type=double
 
   |name=atmosphericTemperature
 
   |name=atmosphericTemperature
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=Vector3d
 
   |type=Vector3d
 
   |name=CentrifugalAcc
 
   |name=CentrifugalAcc
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
Line 224: Line 224:
 
   |type=double
 
   |type=double
 
   |name=convectiveCoefficient
 
   |name=convectiveCoefficient
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=double
 
   |type=double
 
   |name=convectiveMachFlux
 
   |name=convectiveMachFlux
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=Vector3d
 
   |type=Vector3d
 
   |name=CoriolisAcc
 
   |name=CoriolisAcc
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
Line 249: Line 249:
 
   |type=bool
 
   |type=bool
 
   |name=directSunlight
 
   |name=directSunlight
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=double
 
   |type=double
 
   |name=distanceToSun
 
   |name=distanceToSun
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=double
 
   |type=double
 
   |name=dynamicPressurekPa
 
   |name=dynamicPressurekPa
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=KerbalEVA
 
   |type=KerbalEVA
 
   |name=evaController
 
   |name=evaController
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=double
 
   |type=double
 
   |name=externalTemperature
 
   |name=externalTemperature
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=ConfigNode
 
   |type=ConfigNode
 
   |name=flightPlanNode
 
   |name=flightPlanNode
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=double
 
   |type=double
 
   |name=geeForce
 
   |name=geeForce
   |desc=The current magnitude of gravity, in meters per second squared.
+
   |desc=The current magnitude of gravity, in meters per second squared. (Is this right? geeForce is not gravity)
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=double
 
   |type=double
 
   |name=geeForce_immediate
 
   |name=geeForce_immediate
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=Vector3d
 
   |type=Vector3d
 
   |name=gForce
 
   |name=gForce
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=bool
 
   |type=bool
 
   |name=handlePhysicsStats
 
   |name=handlePhysicsStats
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
Line 304: Line 304:
 
   |type=float
 
   |type=float
 
   |name=heightFromTerrain
 
   |name=heightFromTerrain
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=double
 
   |type=double
 
   |name=horizontalSrfSpeed
 
   |name=horizontalSrfSpeed
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
Line 319: Line 319:
 
   |type=double
 
   |type=double
 
   |name=indicatedAirSpeed
 
   |name=indicatedAirSpeed
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
Line 329: Line 329:
 
   |type=string
 
   |type=string
 
   |name=landedAt
 
   |name=landedAt
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=double
 
   |type=double
 
   |name=latitude
 
   |name=latitude
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=double
 
   |type=double
 
   |name=launchTime
 
   |name=launchTime
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
Line 354: Line 354:
 
   |type=double
 
   |type=double
 
   |name=longitude
 
   |name=longitude
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=double
 
   |type=double
 
   |name=mach
 
   |name=mach
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=double
 
   |type=double
 
   |name=missionTime
 
   |name=missionTime
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=Vector3
 
   |type=Vector3
 
   |name=MOI
 
   |name=MOI
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=double
 
   |type=double
 
   |name=obt_speed
 
   |name=obt_speed
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
Line 384: Line 384:
 
   |type=FlightInputCallback
 
   |type=FlightInputCallback
 
   |name=OnAutopilotUpdate
 
   |name=OnAutopilotUpdate
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=FlightInputCallback
 
   |type=FlightInputCallback
 
   |name=OnFlyByWire
 
   |name=OnFlyByWire
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=Callback
 
   |type=Callback
 
   |name=OnJustAboutToBeDestroyed
 
   |name=OnJustAboutToBeDestroyed
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=FlightInputCallback
 
   |type=FlightInputCallback
 
   |name=OnPostAutopilotUpdate
 
   |name=OnPostAutopilotUpdate
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=FlightInputCallback
 
   |type=FlightInputCallback
 
   |name=OnPreAutopilotUpdate
 
   |name=OnPreAutopilotUpdate
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=OrbitDriver
 
   |type=OrbitDriver
 
   |name=orbitDriver
 
   |name=orbitDriver
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=OrbitRenderer
 
   |type=OrbitRenderer
 
   |name=orbitRenderer
 
   |name=orbitRenderer
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=OrbitTargeter
 
   |type=OrbitTargeter
 
   |name=orbitTargeter
 
   |name=orbitTargeter
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=bool
 
   |type=bool
 
   |name=packed
 
   |name=packed
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=List〈Part〉
 
   |type=List〈Part〉
 
   |name=parts
 
   |name=parts
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=PatchedConicRenderer
 
   |type=PatchedConicRenderer
 
   |name=patchedConicRenderer
 
   |name=patchedConicRenderer
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=PatchedConicSolver
 
   |type=PatchedConicSolver
 
   |name=patchedConicSolver
 
   |name=patchedConicSolver
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=Vector3d
 
   |type=Vector3d
 
   |name=perturbation
 
   |name=perturbation
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=double
 
   |type=double
 
   |name=pqsAltitude
 
   |name=pqsAltitude
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=ProtoVessel
 
   |type=ProtoVessel
 
   |name=protoVessel
 
   |name=protoVessel
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
Line 464: Line 464:
 
   |type=uint
 
   |type=uint
 
   |name=referenceTransformId
 
   |name=referenceTransformId
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
Line 474: Line 474:
 
   |type=Situations
 
   |type=Situations
 
   |name=situation
 
   |name=situation
   |desc=
+
   |desc=?
}}
 
{{Field
 
  |type=enum
 
  |name=Situations
 
  |desc={ LANDED, SPLASHED, PRELAUNCH, FLYING, SUB_ORBITAL, ORBITING, ESCAPING, DOCKED }
 
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=double
 
   |type=double
 
   |name=solarFlux
 
   |name=solarFlux
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
Line 494: Line 489:
 
   |type=double
 
   |type=double
 
   |name=speed
 
   |name=speed
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=double
 
   |type=double
 
   |name=speedOfSound
 
   |name=speedOfSound
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=bool
 
   |type=bool
 
   |name=Splashed
 
   |name=Splashed
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=Vector3d
 
   |type=Vector3d
 
   |name=srf_velocity
 
   |name=srf_velocity
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
Line 519: Line 514:
 
   |type=double
 
   |type=double
 
   |name=srfSpeed
 
   |name=srfSpeed
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=State
 
   |type=State
 
   |name=state
 
   |name=state
   |desc=
+
   |desc=?
}}
 
{{Field
 
  |type=enum
 
  |name=State
 
  |desc={ INACTIVE, ACTIVE, DEAD }
 
 
}}
 
}}
 
{{Field
 
{{Field
Line 539: Line 529:
 
   |type=ITargetable
 
   |type=ITargetable
 
   |name=targetObject
 
   |name=targetObject
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
Line 569: Line 559:
 
   |type=VesselRanges
 
   |type=VesselRanges
 
   |name=vesselRanges
 
   |name=vesselRanges
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=Transform
 
   |type=Transform
 
   |name=vesselTransform
 
   |name=vesselTransform
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Field
 
{{Field
 
   |type=VesselType
 
   |type=VesselType
 
   |name=vesselType
 
   |name=vesselType
   |desc=
+
   |desc=?
 +
}}
 +
{{Field
 +
  |type=enum
 +
  |name=Situations
 +
  |desc={ LANDED, SPLASHED, PRELAUNCH, FLYING, SUB_ORBITAL, ORBITING, ESCAPING, DOCKED }
 +
}}
 +
{{Field
 +
  |type=enum
 +
  |name=State
 +
  |desc={ INACTIVE, ACTIVE, DEAD }
 
}}
 
}}
 
{{FieldsEnd}}
 
{{FieldsEnd}}
  
 
{{MethodsStart}}
 
{{MethodsStart}}
 +
{{Method
 +
  |returntype=constructor
 +
  |returndesc=
 +
  |name=Vessel
 +
  |args=
 +
  |desc=?
 +
}}
 
{{Method
 
{{Method
 
   |returntype=void
 
   |returntype=void
Line 589: Line 596:
 
   |name=AttachPatchedConicsSolver
 
   |name=AttachPatchedConicsSolver
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 596: Line 603:
 
   |name=BackupVessel
 
   |name=BackupVessel
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 603: Line 610:
 
   |name=CalculatePhysicsStats
 
   |name=CalculatePhysicsStats
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 609: Line 616:
 
   |returndesc=
 
   |returndesc=
 
   |name=ChangeWorldVelocity
 
   |name=ChangeWorldVelocity
   |args=Vector3d velOffset
+
   |args={{arg|Vector3d|velOffset}}
 
   |desc=change the worldspace velocity of this vessel
 
   |desc=change the worldspace velocity of this vessel
 
}}
 
}}
Line 617: Line 624:
 
   |name=checkLanded
 
   |name=checkLanded
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 624: Line 631:
 
   |name=checkSplashed
 
   |name=checkSplashed
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 638: Line 645:
 
   |name=ClearStaging
 
   |name=ClearStaging
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 644: Line 651:
 
   |returndesc=
 
   |returndesc=
 
   |name=ContainsCollider
 
   |name=ContainsCollider
   |args=Collider c
+
   |args={{arg|Collider|c}}
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 652: Line 659:
 
   |name=DespawnCrew
 
   |name=DespawnCrew
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 659: Line 666:
 
   |name=DestroyVesselComponents
 
   |name=DestroyVesselComponents
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 666: Line 673:
 
   |name=DetachPatchedConicsSolver
 
   |name=DetachPatchedConicsSolver
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 673: Line 680:
 
   |name=Die
 
   |name=Die
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 680: Line 687:
 
   |name=FallBackReferenceTransform
 
   |name=FallBackReferenceTransform
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 687: Line 694:
 
   |name=FeedInputFeed
 
   |name=FeedInputFeed
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 694: Line 701:
 
   |name=FindDefaultVesselType
 
   |name=FindDefaultVesselType
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 708: Line 715:
 
   |name=findLocalCenterOfPressure
 
   |name=findLocalCenterOfPressure
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 715: Line 722:
 
   |name=findLocalMOI
 
   |name=findLocalMOI
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 721: Line 728:
 
   |returndesc=
 
   |returndesc=
 
   |name=findLocalMOI
 
   |name=findLocalMOI
   |args=Vector3 worldCoM
+
   |args={{arg|Vector3|worldCoM}}
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 729: Line 736:
 
   |name=FindPartModulesImplementing〈T〉
 
   |name=FindPartModulesImplementing〈T〉
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 743: Line 750:
 
   |name=GetActiveParts
 
   |name=GetActiveParts
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 749: Line 756:
 
   |returndesc=
 
   |returndesc=
 
   |name=GetActiveResource
 
   |name=GetActiveResource
   |args=PartResourceDefinition def
+
   |args={{arg|PartResourceDefinition|def}}
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 757: Line 764:
 
   |name=GetActiveResources
 
   |name=GetActiveResources
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 764: Line 771:
 
   |name=GetCrewCapacity
 
   |name=GetCrewCapacity
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 771: Line 778:
 
   |name=GetCrewCount
 
   |name=GetCrewCount
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 778: Line 785:
 
   |name=GetFwdVector
 
   |name=GetFwdVector
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 785: Line 792:
 
   |name=GetHeightFromSurface
 
   |name=GetHeightFromSurface
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 799: Line 806:
 
   |name=GetName
 
   |name=GetName
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 806: Line 813:
 
   |name=GetObtVelocity
 
   |name=GetObtVelocity
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 813: Line 820:
 
   |name=GetOrbit
 
   |name=GetOrbit
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 820: Line 827:
 
   |name=GetOrbitDriver
 
   |name=GetOrbitDriver
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 827: Line 834:
 
   |name=GetReferenceTransformPart
 
   |name=GetReferenceTransformPart
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 834: Line 841:
 
   |name=GetSrfVelocity
 
   |name=GetSrfVelocity
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 841: Line 848:
 
   |name=GetTargetingMode
 
   |name=GetTargetingMode
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 855: Line 862:
 
   |name=GetTransform
 
   |name=GetTransform
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 862: Line 869:
 
   |name=GetVessel
 
   |name=GetVessel
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 897: Line 904:
 
   |name=HasControlSources
 
   |name=HasControlSources
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 903: Line 910:
 
   |returndesc=
 
   |returndesc=
 
   |name=Initialize
 
   |name=Initialize
   |args=bool fromShipAssembly = false
+
   |args={{arg|bool|fromShipAssembly}}
 
   |desc=Initialize is used in cases where the Vessel component is added to a ship that already exists.
 
   |desc=Initialize is used in cases where the Vessel component is added to a ship that already exists.
 
}}
 
}}
Line 911: Line 918:
 
   |name=IsClearToSave
 
   |name=IsClearToSave
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 918: Line 925:
 
   |name=Load
 
   |name=Load
 
   |args=
 
   |args=
   |desc=Has attribute [ContextMenu("Load")]
+
   |desc=? Has attribute [ContextMenu("Load")]
 
}}
 
}}
 
{{Method
 
{{Method
Line 925: Line 932:
 
   |name=MakeActive
 
   |name=MakeActive
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 932: Line 939:
 
   |name=MakeInactive
 
   |name=MakeInactive
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 939: Line 946:
 
   |name=MurderCrew
 
   |name=MurderCrew
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 946: Line 953:
 
   |name=OnDestroy
 
   |name=OnDestroy
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 952: Line 959:
 
   |returndesc=
 
   |returndesc=
 
   |name=OnLoadFlightState
 
   |name=OnLoadFlightState
   |args=Dictionary〈string, KSPParseable〉 dataPool
+
   |args={{arg|Dictionary〈string, KSPParseable〉|dataPool}}
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 959: Line 966:
 
   |returndesc=
 
   |returndesc=
 
   |name=OnSaveFlightState
 
   |name=OnSaveFlightState
   |args=Dictionary〈string, KSPParseable〉 dataPool
+
   |args={{arg|Dictionary〈string, KSPParseable〉|dataPool}}
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 967: Line 974:
 
   |name=PQSAltitude
 
   |name=PQSAltitude
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 974: Line 981:
 
   |name=printCollisions
 
   |name=printCollisions
 
   |args=
 
   |args=
   |desc=Has attribute [ContextMenu("Print All Collisions")]
+
   |desc=? Has attribute [ContextMenu("Print All Collisions")]
 
}}
 
}}
 
{{Method
 
{{Method
Line 981: Line 988:
 
   |name=printGroundContacts
 
   |name=printGroundContacts
 
   |args=
 
   |args=
   |desc=Has attribute [ContextMenu("Print Ground Contacts")]
+
   |desc=? Has attribute [ContextMenu("Print Ground Contacts")]
 
}}
 
}}
 
{{Method
 
{{Method
Line 988: Line 995:
 
   |name=RenameVessel
 
   |name=RenameVessel
 
   |args=
 
   |args=
   |desc=Has attribute [ContextMenu("Rename Vessel")]
+
   |desc=? Has attribute [ContextMenu("Rename Vessel")]
 
}}
 
}}
 
{{Method
 
{{Method
Line 995: Line 1,002:
 
   |name=ResetCollisionIgnores
 
   |name=ResetCollisionIgnores
 
   |args=
 
   |args=
   |desc=Has attribute [ContextMenu("Reset Collision Ignores")]
+
   |desc=? Has attribute [ContextMenu("Reset Collision Ignores")]
 
}}
 
}}
 
{{Method
 
{{Method
Line 1,002: Line 1,009:
 
   |name=ResumeStaging
 
   |name=ResumeStaging
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 1,009: Line 1,016:
 
   |name=ResumeTarget
 
   |name=ResumeTarget
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 1,016: Line 1,023:
 
   |name=RevealAltitude
 
   |name=RevealAltitude
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 1,023: Line 1,030:
 
   |name=RevealMass
 
   |name=RevealMass
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 1,030: Line 1,037:
 
   |name=RevealName
 
   |name=RevealName
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 1,037: Line 1,044:
 
   |name=RevealSituationString
 
   |name=RevealSituationString
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 1,044: Line 1,051:
 
   |name=RevealSpeed
 
   |name=RevealSpeed
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 1,051: Line 1,058:
 
   |name=RevealType
 
   |name=RevealType
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 1,058: Line 1,065:
 
   |name=SetActiveInternalPart
 
   |name=SetActiveInternalPart
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 1,064: Line 1,071:
 
   |returndesc=
 
   |returndesc=
 
   |name=SetActiveInternalPart
 
   |name=SetActiveInternalPart
   |args=List〈Part〉 visibleParts
+
   |args={{arg|List〈Part〉|visibleParts}}
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 1,071: Line 1,078:
 
   |returndesc=
 
   |returndesc=
 
   |name=SetActiveInternalPart
 
   |name=SetActiveInternalPart
   |args=Part visiblePart
+
   |args={{arg|Part|visiblePart}}
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 1,078: Line 1,085:
 
   |returndesc=
 
   |returndesc=
 
   |name=SetPosition
 
   |name=SetPosition
   |args=Vector3 position
+
   |args={{arg|Vector3|position}}
 
   |desc=Sets the worldspace position of this vessel, and all its parts
 
   |desc=Sets the worldspace position of this vessel, and all its parts
 
}}
 
}}
Line 1,085: Line 1,092:
 
   |returndesc=
 
   |returndesc=
 
   |name=SetPosition
 
   |name=SetPosition
   |args=Vector3 position, bool usePristineCoords
+
   |args={{arg|Vector3|position}},{{arg|bool|usePristineCoords}}
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 1,092: Line 1,099:
 
   |returndesc=
 
   |returndesc=
 
   |name=SetReferenceTransform
 
   |name=SetReferenceTransform
   |args=Part p
+
   |args={{arg|Part|p}}
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 1,099: Line 1,106:
 
   |returndesc=
 
   |returndesc=
 
   |name=SetRotation
 
   |name=SetRotation
   |args=Quaternion rotation
+
   |args={{arg|Quaternion|rotation}}
 
   |desc=Sets the worldspace rotation of this vessel, and all its parts
 
   |desc=Sets the worldspace rotation of this vessel, and all its parts
 
}}
 
}}
Line 1,106: Line 1,113:
 
   |returndesc=
 
   |returndesc=
 
   |name=SetWorldVelocity
 
   |name=SetWorldVelocity
   |args=Vector3d vel
+
   |args={{arg|Vector3d|vel}}
 
   |desc=set the absolute world velocity of this vessel
 
   |desc=set the absolute world velocity of this vessel
 
}}
 
}}
Line 1,114: Line 1,121:
 
   |name=SpawnCrew
 
   |name=SpawnCrew
 
   |args=
 
   |args=
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 1,120: Line 1,127:
 
   |returndesc=
 
   |returndesc=
 
   |name=StartFromBackup
 
   |name=StartFromBackup
   |args=ProtoVessel pv
+
   |args={{arg|ProtoVessel|pv}}
 
   |desc=Start from backup is used when the scene is being resumed, and the Vessel component is added before the parts themselves. Note that this method won't load the parts. It only creates the vessel object. To load parts, use the Vessel.Load() method.
 
   |desc=Start from backup is used when the scene is being resumed, and the Vessel component is added before the parts themselves. Note that this method won't load the parts. It only creates the vessel object. To load parts, use the Vessel.Load() method.
 
}}
 
}}
Line 1,127: Line 1,134:
 
   |returndesc=
 
   |returndesc=
 
   |name=Translate
 
   |name=Translate
   |args=Vector3 offset
+
   |args={{arg|Vector3|offset}}
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{Method
 
{{Method
Line 1,135: Line 1,142:
 
   |name=Unload
 
   |name=Unload
 
   |args=
 
   |args=
   |desc=Has attribute [ContextMenu("Unload")]
+
   |desc=? Has attribute [ContextMenu("Unload")]
 
}}
 
}}
 
{{StaticMethod
 
{{StaticMethod
Line 1,141: Line 1,148:
 
   |returndesc=
 
   |returndesc=
 
   |name=AutoRename
 
   |name=AutoRename
   |args=Vessel v, string baseName
+
   |args={{arg|Vessel|v}},{{arg|string|baseName}}
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{StaticMethod
 
{{StaticMethod
Line 1,148: Line 1,155:
 
   |returndesc=
 
   |returndesc=
 
   |name=GetLandedAtString
 
   |name=GetLandedAtString
   |args=string landedAt
+
   |args={{arg|string|landedAt}}
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{StaticMethod
 
{{StaticMethod
Line 1,155: Line 1,162:
 
   |returndesc=
 
   |returndesc=
 
   |name=GetMETString
 
   |name=GetMETString
   |args=Vessel v
+
   |args={{arg|Vessel|v}}
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{StaticMethod
 
{{StaticMethod
Line 1,162: Line 1,169:
 
   |returndesc=
 
   |returndesc=
 
   |name=GetSituationString
 
   |name=GetSituationString
   |args=Vessel v
+
   |args={{arg|Vessel|v}}
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{StaticMethod
 
{{StaticMethod
Line 1,169: Line 1,176:
 
   |returndesc=
 
   |returndesc=
 
   |name=IsValidVesselName
 
   |name=IsValidVesselName
   |args=string name
+
   |args={{arg|string|name}}
   |desc=
+
   |desc=?
 
}}
 
}}
 
{{MethodsEnd}}
 
{{MethodsEnd}}
 +
 +
== Other API ==
 +
 +
Vessel also contains the following, not included above.
 +
 +
<syntaxhighlight>
 +
...
 +
public Part this[int index] { get; }
 +
public Part this[uint flightID] { get; }
 +
 +
public class ActiveResource
 +
{
 +
  public double amount;
 +
  public PartResourceDefinition info;
 +
  public double maxAmount;
 +
  public List<Part> parts;
 +
 +
  public ActiveResource(PartResourceDefinition def);
 +
}
 +
...
 +
</syntaxhighlight>
  
 
[[Category:Community API Documentation]]
 
[[Category:Community API Documentation]]

Revision as of 19:50, 12 October 2015

A Vessel represents a ship, or a piece of debris that was once part of a ship. You can access the vessel that your Part is part of with this.vessel. Particularly useful members are vessel.orbit, which gives your orbit, and vessel.mainBody, which gives CelestialBody whose influence you are currently under.

Vessel Class

Inherits Implements
MonoBehaviour
  • IShipconstruct
  • ITargetable
  • IDiscoverable

Vessels define individual ships in flight. They work essentially as a header for the set of parts that make up the ship.

Properties

The following are public properties available in Vessel.

Signature Description
ActionGroupList ActionGroups { get; }  ?
VesselAutopilot Autopilot { get; }  ?
Vector3 CurrentCoM { get; }  ?
DiscoveryInfo DiscoveryInfo { get; }  ?
float distanceLandedPackThreshold { get; set; }  ? Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
float distanceLandedUnpackThreshold { get; set; }  ? Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
float distancePackThreshold { get; set; }  ? Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
float distanceUnpackThreshold { get; set; }  ? Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
bool HoldPhysics { get; }  ?
bool isActiveVessel { get; }  ?
bool isCommandable { get; }  ?
bool IsControllable { get; }  ?
bool isEVA { get; } True if the vessel is an EVA kerbal.
bool isPersistent { get; set; }  ?
bool IsRecoverable { get; }  ?
bool LandedOrSplashed { get; }  ?
CelestialBody mainBody { get; }  ?
Orbit orbit { get; }  ?
List〈Part〉 Parts { get; }  ?
bool PatchedConicsAttached { get; }  ?
Transform ReferenceTransform { get; } The reference transform is used to define the orientation of a vessel for controls and gauges. It defines which way is 'up' or 'forward' or which way pitch rotates, for instance. Read only. Use SetReferenceTransform to set. Defaults to vessel transform if no other transform is set.
VesselValues VesselValues { get; }  ?
static float loadDistance { get; set; }  ? Has attribute [Obsolete("Use Vessel.vesselRanges instead")]
static float unloadDistance { get; set; }  ? Has attribute [Obsolete("Use Vessel.vesselRanges instead")]

Fields

The following is a list of publically-accessible fields in Vessel. This includes protected items, which can be accessed by subclasses.

Signature Description
Vector3d acceleration The current acceleration vector of the vessel.
double altitude Height above the surface of the reference body, including liquid bodies.
Vector3 angularMomentum  ?
Vector3 angularVelocity The angular velocity vector of the vessel.
double atmDensity  ?
double atmosphericTemperature  ?
Vector3d CentrifugalAcc  ?
Vector3 CoM The vector corresponding to the vessel's center of mass, relative to the vessel origin.
double convectiveCoefficient  ?
double convectiveMachFlux  ?
Vector3d CoriolisAcc  ?
FlightCtrlState ctrlState The vessel's flight control state object, used for accessing and modifying user and fly-by-wire input.
int currentStage Current stage of the vessel.
bool directSunlight  ?
double distanceToSun  ?
double dynamicPressurekPa  ?
KerbalEVA evaController  ?
double externalTemperature  ?
ConfigNode flightPlanNode  ?
double geeForce The current magnitude of gravity, in meters per second squared. (Is this right? geeForce is not gravity)
double geeForce_immediate  ?
Vector3d gForce  ?
bool handlePhysicsStats  ?
float heightFromSurface The height above the surface of the reference body, including liquid bodies.
float heightFromTerrain  ?
double horizontalSrfSpeed  ?
Guid id Unique identifier for each vessel.
double indicatedAirSpeed  ?
bool Landed True if the vessel has landed.
string landedAt  ?
double latitude  ?
double launchTime  ?
bool loaded True if the vessel has loaded.
Vector3 localCoM This is used for persistence purposes. Use findLocalCenterOfMass() if you just want the center of mass.
double longitude  ?
double mach  ?
double missionTime  ?
Vector3 MOI  ?
double obt_speed  ?
Vector3d obt_velocity The orbital velocity vector of the vessel, relative to the reference body.
FlightInputCallback OnAutopilotUpdate  ?
FlightInputCallback OnFlyByWire  ?
Callback OnJustAboutToBeDestroyed  ?
FlightInputCallback OnPostAutopilotUpdate  ?
FlightInputCallback OnPreAutopilotUpdate  ?
OrbitDriver orbitDriver  ?
OrbitRenderer orbitRenderer  ?
OrbitTargeter orbitTargeter  ?
bool packed  ?
List〈Part〉 parts  ?
PatchedConicRenderer patchedConicRenderer  ?
PatchedConicSolver patchedConicSolver  ?
Vector3d perturbation  ?
double pqsAltitude  ?
ProtoVessel protoVessel  ?
Vector3 rb_velocity The current velocity of the Unity physics rigidbody.
uint referenceTransformId  ?
Part rootPart The root part of the vessel.
Situations situation  ?
double solarFlux  ?
double specificAcceleration Specific acceleration is the vessel's potential acceleration per unit of throttle. Used to estimate burn times and such. NOTE: this value is calculated based on smoothed acceleration, so it isn't completely accurate. It will also change as the vessel's mass is reduced as fuel burns away. (it does get pretty accurate after burning for a few seconds)
double speed  ?
double speedOfSound  ?
bool Splashed  ?
Vector3d srf_velocity  ?
Quaternion srfRelRotation The Quaternion corresponding to the vessel's rotation, relative to the surface of reference body.
double srfSpeed  ?
State state  ?
double staticPressurekPa The current atmospheric pressure of this vessel.
ITargetable targetObject  ?
double terrainAltitude The height of the terrain, relative to the center of the reference body.
Vector3 terrainNormal The vector perpendicular to the terrain.
Vector3d upAxis Vector corresponding to the vessel's up facing direction.
double verticalSpeed The vertical speed of the vessel, relative to the surface of the reference body.
string vesselName Name identifier of the vessel.
VesselRanges vesselRanges  ?
Transform vesselTransform  ?
VesselType vesselType  ?
enum Situations { LANDED, SPLASHED, PRELAUNCH, FLYING, SUB_ORBITAL, ORBITING, ESCAPING, DOCKED }
enum State { INACTIVE, ACTIVE, DEAD }

Methods

The following are methods included in Vessel.

Signature Description
constructor Vessel()  ?
void AttachPatchedConicsSolver()  ?
ProtoVessel BackupVessel()  ?
void CalculatePhysicsStats()  ?
void ChangeWorldVelocity(Vector3d velOffset) change the worldspace velocity of this vessel
bool checkLanded()  ?
bool checkSplashed()  ?
bool checkVisibility() Returns true if this vessel is within the visible range of any commandable (focusable) vessel, false otherwise.
void ClearStaging()  ?
bool ContainsCollider(Collider c)  ?
void DespawnCrew()  ?
void DestroyVesselComponents()  ?
void DetachPatchedConicsSolver()  ?
void Die()  ?
void FallBackReferenceTransform()  ?
void FeedInputFeed()  ?
VesselType FindDefaultVesselType()  ?
Vector3 findLocalCenterOfMass() Finds the local center of mass recursively from the given ship part.
Vector3 findLocalCenterOfPressure()  ?
Vector3 findLocalMOI()  ?
Vector3 findLocalMOI(Vector3 worldCoM)  ?
List〈T〉 FindPartModulesImplementing〈T〉()  ?
Vector3 findWorldCenterOfMass() Finds the world center of mass recursively from the given ship part.
List〈Part〉 GetActiveParts()  ?
ActiveResource GetActiveResource(PartResourceDefinition def)  ?
List〈ActiveResource〉 GetActiveResources()  ?
int GetCrewCapacity()  ?
int GetCrewCount()  ?
Vector3 GetFwdVector()  ?
float GetHeightFromSurface()  ?
float GetHeightFromTerrain() The vessel's altitude above the reference body's terrain, not including liquid bodies.
string GetName()  ?
Vector3 GetObtVelocity()  ?
Orbit GetOrbit()  ?
OrbitDriver GetOrbitDriver()  ?
Part GetReferenceTransformPart()  ?
Vector3 GetSrfVelocity()  ?
VesselTargetModes GetTargetingMode()  ?
float GetTotalMass() Get the sum of the mass of all (physical) parts on this vessel
Transform GetTransform()  ?
Vessel GetVessel()  ?
List〈ProtoCrewMember〉 GetVesselCrew() Returns a list of ProtoCrewMembers corresponding to each kerbal on board. ProtoCrewMember contains many fields relating to the kerbals stats such as name, courage, etc.
Vector3d GetWorldPos3D() Get a double precision vector for the vessel's worldspace position (for when transform.position isn't accurate enough)
void GoOffRails() puts the ship back into a simulated orbit and reenables physics
void GoOnRails() disables physics and puts the ship into a propagated orbit
bool HasControlSources()  ?
bool Initialize(bool fromShipAssembly) Initialize is used in cases where the Vessel component is added to a ship that already exists.
ClearToSaveStatus IsClearToSave()  ?
void Load()  ? Has attribute [ContextMenu("Load")]
void MakeActive()  ?
void MakeInactive()  ?
void MurderCrew()  ?
void OnDestroy()  ?
void OnLoadFlightState(Dictionary〈string, KSPParseable〉 dataPool)  ?
void OnSaveFlightState(Dictionary〈string, KSPParseable〉 dataPool)  ?
double PQSAltitude()  ?
void printCollisions()  ? Has attribute [ContextMenu("Print All Collisions")]
void printGroundContacts()  ? Has attribute [ContextMenu("Print Ground Contacts")]
void RenameVessel()  ? Has attribute [ContextMenu("Rename Vessel")]
void ResetCollisionIgnores()  ? Has attribute [ContextMenu("Reset Collision Ignores")]
void ResumeStaging()  ?
void ResumeTarget()  ?
double RevealAltitude()  ?
float RevealMass()  ?
string RevealName()  ?
string RevealSituationString()  ?
double RevealSpeed()  ?
string RevealType()  ?
void SetActiveInternalPart()  ?
void SetActiveInternalPart(List〈Part〉 visibleParts)  ?
void SetActiveInternalPart(Part visiblePart)  ?
void SetPosition(Vector3 position) Sets the worldspace position of this vessel, and all its parts
void SetPosition(Vector3 position,bool usePristineCoords)  ?
void SetReferenceTransform(Part p)  ?
void SetRotation(Quaternion rotation) Sets the worldspace rotation of this vessel, and all its parts
void SetWorldVelocity(Vector3d vel) set the absolute world velocity of this vessel
void SpawnCrew()  ?
void StartFromBackup(ProtoVessel pv) Start from backup is used when the scene is being resumed, and the Vessel component is added before the parts themselves. Note that this method won't load the parts. It only creates the vessel object. To load parts, use the Vessel.Load() method.
void Translate(Vector3 offset)  ?
void Unload()  ? Has attribute [ContextMenu("Unload")]
static string AutoRename(Vessel v,string baseName)  ?
static string GetLandedAtString(string landedAt)  ?
static string GetMETString(Vessel v)  ?
static string GetSituationString(Vessel v)  ?
static bool IsValidVesselName(string name)  ?

Other API

Vessel also contains the following, not included above.

...
public Part this[int index] { get; }
public Part this[uint flightID] { get; }
 
public class ActiveResource
{
  public double amount;
  public PartResourceDefinition info;
  public double maxAmount;
  public List<Part> parts;
 
  public ActiveResource(PartResourceDefinition def);
}
...