C# Class Trajectories.VesselAerodynamicModel

显示文件 Open project: neuoy/KSPTrajectories Class Usage Examples

Protected Properties

Property Type Description
body_ CelestialBody
cachedForces AeroForceCache
vessel_ Vessel

Public Methods

Method Description
ComputeForces ( double altitude, UnityEngine.Vector3d airVelocity, UnityEngine.Vector3d vup, double angleOfAttack ) : UnityEngine.Vector3d

Compute the aerodynamic forces that would be applied to the vessel if it was in the specified situation (air velocity, altitude and angle of attack).

GetForces ( CelestialBody body, UnityEngine.Vector3d bodySpacePosition, UnityEngine.Vector3d airVelocity, double angleOfAttack ) : UnityEngine.Vector3d

Returns the total aerodynamic forces that would be applied on the vessel if it was at bodySpacePosition with bodySpaceVelocity relatively to the specified celestial body This method makes use of the cache if available, otherwise it will call ComputeForces.

IncrementalUpdate ( ) : void
Invalidate ( ) : void
PackForces ( UnityEngine.Vector3d forces, double altitudeAboveSea, double velocity ) : Vector2

Aerodynamic forces are roughly proportional to rho and squared air velocity, so we divide by these values to get something that can be linearly interpolated (the reverse operation is then applied after interpolation) This operation is optional but should slightly increase the cache accuracy

UnpackForces ( Vector2 packedForces, double altitudeAboveSea, double velocity ) : UnityEngine.Vector3d

See PackForces

VesselAerodynamicModel ( Vessel vessel, CelestialBody body ) : System
isValidFor ( Vessel vessel, CelestialBody body ) : bool

Protected Methods

Method Description
ComputeForces_Model ( UnityEngine.Vector3d airVelocity, double altitude ) : UnityEngine.Vector3d

Computes the aerodynamic forces that would be applied to the vessel if it was in the specified situation (air velocity and altitude). The vessel is assumed to be in its current orientation (the air velocity is already adjusted as needed).

Private Methods

Method Description
ComputeReferenceDrag ( ) : double
InitCache ( ) : void
updateVesselInfo ( ) : void

Method Details

ComputeForces() public method

Compute the aerodynamic forces that would be applied to the vessel if it was in the specified situation (air velocity, altitude and angle of attack).
public ComputeForces ( double altitude, UnityEngine.Vector3d airVelocity, UnityEngine.Vector3d vup, double angleOfAttack ) : UnityEngine.Vector3d
altitude double
airVelocity UnityEngine.Vector3d
vup UnityEngine.Vector3d
angleOfAttack double
return UnityEngine.Vector3d

ComputeForces_Model() protected abstract method

Computes the aerodynamic forces that would be applied to the vessel if it was in the specified situation (air velocity and altitude). The vessel is assumed to be in its current orientation (the air velocity is already adjusted as needed).
protected abstract ComputeForces_Model ( UnityEngine.Vector3d airVelocity, double altitude ) : UnityEngine.Vector3d
airVelocity UnityEngine.Vector3d
altitude double
return UnityEngine.Vector3d

GetForces() public method

Returns the total aerodynamic forces that would be applied on the vessel if it was at bodySpacePosition with bodySpaceVelocity relatively to the specified celestial body This method makes use of the cache if available, otherwise it will call ComputeForces.
public GetForces ( CelestialBody body, UnityEngine.Vector3d bodySpacePosition, UnityEngine.Vector3d airVelocity, double angleOfAttack ) : UnityEngine.Vector3d
body CelestialBody
bodySpacePosition UnityEngine.Vector3d
airVelocity UnityEngine.Vector3d
angleOfAttack double
return UnityEngine.Vector3d

IncrementalUpdate() public method

public IncrementalUpdate ( ) : void
return void

Invalidate() public method

public Invalidate ( ) : void
return void

PackForces() public method

Aerodynamic forces are roughly proportional to rho and squared air velocity, so we divide by these values to get something that can be linearly interpolated (the reverse operation is then applied after interpolation) This operation is optional but should slightly increase the cache accuracy
public PackForces ( UnityEngine.Vector3d forces, double altitudeAboveSea, double velocity ) : Vector2
forces UnityEngine.Vector3d
altitudeAboveSea double
velocity double
return Vector2

UnpackForces() public method

See PackForces
public UnpackForces ( Vector2 packedForces, double altitudeAboveSea, double velocity ) : UnityEngine.Vector3d
packedForces Vector2
altitudeAboveSea double
velocity double
return UnityEngine.Vector3d

VesselAerodynamicModel() public method

public VesselAerodynamicModel ( Vessel vessel, CelestialBody body ) : System
vessel Vessel
body CelestialBody
return System

isValidFor() public method

public isValidFor ( Vessel vessel, CelestialBody body ) : bool
vessel Vessel
body CelestialBody
return bool

Property Details

body_ protected_oe property

protected CelestialBody body_
return CelestialBody

cachedForces protected_oe property

protected AeroForceCache,Trajectories cachedForces
return AeroForceCache

vessel_ protected_oe property

protected Vessel vessel_
return Vessel