C# Class Kramax.VesselData

Show file Open project: Kramax/KramaxAutoPilot Class Usage Examples

Public Properties

Property Type Description
AoA double
acceleration double
bank double
heading double
lastPlanetUp UnityEngine.Vector3d
obtNormal Vector3
obtRadial Vector3
pitch double
planetEast UnityEngine.Vector3d
planetNorth UnityEngine.Vector3d
planetUp UnityEngine.Vector3d
progradeHeading double
radarAlt double
srfNormal Vector3
srfRadial Vector3
surfVelForward UnityEngine.Vector3d
surfVelRight UnityEngine.Vector3d
surfVesForward UnityEngine.Vector3d
surfVesRight UnityEngine.Vector3d
velocity UnityEngine.Vector3d
vertSpeed double
yaw double

Public Methods

Method Description
VesselData ( ) : System
destroyArrow ( ) : void
drawArrow ( Vector3 dir, Transform t ) : void
findVesselFwdAxis ( Vessel v ) : void

Find the vessel orientation at the CoM by interpolating from surrounding part transforms This orientation should be significantly more resistant to vessel flex/wobble than the vessel transform (root part) as a free body rotates about it's CoM Has an issue with the origin shifter causing random bounces

updateAttitude ( Vessel vessel ) : void

Called in OnPreAutoPilotUpdate. Do not call multiple times per physics frame or the "lastPlanetUp" vector will not be correct and VSpeed will not be calculated correctly Can't just leave it to a Coroutine becuase it has to be called before anything else

Method Details

VesselData() public method

public VesselData ( ) : System
return System

destroyArrow() public method

public destroyArrow ( ) : void
return void

drawArrow() public method

public drawArrow ( Vector3 dir, Transform t ) : void
dir Vector3
t UnityEngine.Transform
return void

findVesselFwdAxis() public method

Find the vessel orientation at the CoM by interpolating from surrounding part transforms This orientation should be significantly more resistant to vessel flex/wobble than the vessel transform (root part) as a free body rotates about it's CoM Has an issue with the origin shifter causing random bounces
public findVesselFwdAxis ( Vessel v ) : void
v Vessel
return void

updateAttitude() public method

Called in OnPreAutoPilotUpdate. Do not call multiple times per physics frame or the "lastPlanetUp" vector will not be correct and VSpeed will not be calculated correctly Can't just leave it to a Coroutine becuase it has to be called before anything else
public updateAttitude ( Vessel vessel ) : void
vessel Vessel
return void

Property Details

AoA public property

public double AoA
return double

acceleration public property

public double acceleration
return double

bank public property

public double bank
return double

heading public property

public double heading
return double

lastPlanetUp public property

public Vector3d,UnityEngine lastPlanetUp
return UnityEngine.Vector3d

obtNormal public property

public Vector3 obtNormal
return Vector3

obtRadial public property

public Vector3 obtRadial
return Vector3

pitch public property

public double pitch
return double

planetEast public property

public Vector3d,UnityEngine planetEast
return UnityEngine.Vector3d

planetNorth public property

public Vector3d,UnityEngine planetNorth
return UnityEngine.Vector3d

planetUp public property

public Vector3d,UnityEngine planetUp
return UnityEngine.Vector3d

progradeHeading public property

public double progradeHeading
return double

radarAlt public property

public double radarAlt
return double

srfNormal public property

public Vector3 srfNormal
return Vector3

srfRadial public property

public Vector3 srfRadial
return Vector3

surfVelForward public property

public Vector3d,UnityEngine surfVelForward
return UnityEngine.Vector3d

surfVelRight public property

public Vector3d,UnityEngine surfVelRight
return UnityEngine.Vector3d

surfVesForward public property

public Vector3d,UnityEngine surfVesForward
return UnityEngine.Vector3d

surfVesRight public property

public Vector3d,UnityEngine surfVesRight
return UnityEngine.Vector3d

velocity public property

public Vector3d,UnityEngine velocity
return UnityEngine.Vector3d

vertSpeed public property

public double vertSpeed
return double

yaw public property

public double yaw
return double