public Radar(ModuleTCA tca) : base(tca) { CurHit = new Sweep(VSL); BestHit = new Sweep(VSL); DetectedHit = new Sweep(VSL); Altimeter = new PQS_Altimeter(VSL); }
public ToOrbitExecutor(ModuleTCA tca) : base(tca) { InitModuleFields(); Executor = new ManeuverExecutor(tca); GearAction.action = () =>VSL.GearOn(false); ErrorThreshold.Lower = 2*GLB.ORB.Dtol; ErrorThreshold.Upper = 4*GLB.ORB.Dtol; GravityTurnStart = 0; }
public Anchor(ModuleTCA tca) : base(tca) { }
public static void AttachTCA(ModuleTCA tca) { TCA = tca; if(TCA == null) SetDefaultButton(); }
public ManeuverAutopilot(ModuleTCA tca) : base(tca) { }
public VTOLAssist(ModuleTCA tca) : base(tca) { }
public CollisionPreventionSystem(ModuleTCA tca) : base(tca) { }
public HorizontalSpeedControl(ModuleTCA tca) : base(tca) { }
public OnPlanetPanel(ModuleTCA tca) : base(tca) { }
public AutoLander(ModuleTCA tca) : base(tca) { }
public ThrottleControl(ModuleTCA tca) : base(tca) { }
public AttitudeControl(ModuleTCA tca) : base(tca) { }
protected AttitudeControlBase(ModuleTCA tca) : base(tca) { }
public TranslationControl(ModuleTCA tca) : base(tca) { }
public SquadPanel(ModuleTCA tca) : base(tca) { }
public VerticalSpeedControl(ModuleTCA tca) : base(tca) { }
protected TorqueOptimizer(ModuleTCA tca) : base(tca) { }
public AdvancedTab(ModuleTCA tca) : base(tca) { }
protected TrajectoryCalculator(ModuleTCA tca) : base(tca) { }
public CruiseControl(ModuleTCA tca) : base(tca) { }
public HorizontalSpeedControl(ModuleTCA tca) : base(tca) { }
public VTOLControl(ModuleTCA tca) : base(tca) { }
protected AutopilotModule(ModuleTCA tca) : base(tca) { }
public BearingControl(ModuleTCA tca) : base(tca) { }
public AltitudeControl(ModuleTCA tca) : base(tca) { UpDamper.Period = GLB.KeyRepeatTime; DownDamper.Period = GLB.KeyRepeatTime; }
public ManeuverAutopilot(ModuleTCA tca) : base(tca) { }
public ManeuverExecutor(ModuleTCA tca) : base(tca) { InitModuleFields(); }
public ToOrbitAutopilot(ModuleTCA tca) : base(tca) { }
public NavigationPanel(ModuleTCA tca) : base(tca) { }
public NavigationTab(ModuleTCA tca) : base(tca) { var rnd = new System.Random(); wp_editor_ID = rnd.Next(); }
public VerticalSpeedControl(ModuleTCA tca) : base(tca) { }
public AltitudeControl(ModuleTCA tca) : base(tca) { UpDamper.Period = GLB.KeyRepeatTime; DownDamper.Period = GLB.KeyRepeatTime; }
protected OrbitalComponent(ModuleTCA tca) : base(tca) { }
public EngineOptimizer(ModuleTCA tca) : base(tca) { }
public EnginesTab(ModuleTCA tca) : base(tca) { }
public DeorbitAutopilot(ModuleTCA tca) : base(tca) { }
public RCSOptimizer(ModuleTCA tca) : base(tca) { }
protected DrawableComponent(ModuleTCA tca) : base(tca) { }
protected ThrustDirectionControl(ModuleTCA tca) : base(tca) { }
protected TCAModule(ModuleTCA tca) : base(tca) { }
protected ThrustDirectionControl(ModuleTCA tca) : base(tca) { }
protected AutopilotModule(ModuleTCA tca) : base(tca) { }
public CruiseControl(ModuleTCA tca) : base(tca) { }
protected TCAService(ModuleTCA tca) : base(tca) { }
protected TCAComponent(ModuleTCA tca) { TCA = tca; }
protected TCAComponent(ModuleTCA tca) { TCA = tca; }
protected DrawableComponent(ModuleTCA tca) : base(tca) { }
void update_formation_info() { tVSL = CFG.Target.GetVessel(); if (tVSL == null) { reset_formation(); CanManeuver = false; return; } if (tPN == null || !tPN.Valid) { tTCA = ModuleTCA.EnabledTCA(tVSL); tPN = tTCA != null?tTCA.GetModule <PointNavigator>() : null; } var only_count = false; if (tVSL.srf_velocity.sqrMagnitude < C.FormationSpeedSqr) { reset_formation(); CanManeuver = false; only_count = true; } //update followers var offset = 0f; var can_maneuver = true; all_followers.Clear(); for (int i = 0, num_vessels = FlightGlobals.Vessels.Count; i < num_vessels; i++) { var v = FlightGlobals.Vessels[i]; if (v == null || v.packed || !v.loaded) { continue; } var tca = ModuleTCA.EnabledTCA(v); if (tca != null && (tca.vessel == VSL.vessel || tca.CFG.Nav[Navigation.FollowTarget] && tca.CFG.Target.GetTarget() != null && tca.CFG.Target.GetTarget() == CFG.Target.GetTarget())) { var vPN = tca.GetModule <PointNavigator>(); if (vPN == null) { continue; } all_followers.Add(v.id, vPN); if (offset < vPN.VSL.Geometry.R) { offset = vPN.VSL.Geometry.R; } if (v.id != VSL.vessel.id) { can_maneuver &= !vPN.Maneuvering || (Maneuvering && VSL.vessel.id.CompareTo(v.id) > 0); } } } if (only_count) { return; } CanManeuver = can_maneuver; var follower_index = all_followers.IndexOfKey(VSL.vessel.id); if (follower_index == 0) { var forward = tVSL == null? Vector3d.zero : -tVSL.srf_velocity.normalized; var side = Vector3d.Cross(VSL.Physics.Up, forward).normalized; var num_offsets = all_followers.Count + (all_followers.Count % 2); offset *= 2; var target_size = tTCA != null? tTCA.VSL.Geometry.D : Utils.ClampL(Math.Pow(tVSL.totalMass, 1 / 3f), 1); if (offset < target_size) { offset = (float)target_size; } offset *= C.MinDistance; if (Formation == null || Formation.Count != num_offsets || FormationUpdateTimer.TimePassed) { FormationUpdateTimer.Reset(); Formation = new List <FormationNode>(num_offsets); for (int i = 0; i < num_offsets; i++) { Formation.Add(new FormationNode(tVSL, i, forward, side, offset)); } all_followers.ForEach(p => p.Value.UpdateFormation(Formation)); } else { for (int i = 0; i < num_offsets; i++) { Formation[i].Update(forward, side, offset); } } } keep_formation = Formation != null; if (Formation == null || fnode != null) { return; } //compute follower offset var min_d = -1f; var min_off = 0; for (int i = 0; i < Formation.Count; i++) { var node = Formation[i]; if (node.Follower != null) { continue; } var d = node.Distance(VSL.vessel); if (min_d < 0 || min_d > d) { min_d = d; min_off = i; } } Formation[min_off].Follower = VSL.vessel; fnode = Formation[min_off]; }
public TranslationControl(ModuleTCA tca) : base(tca) { }
public PointNavigator(ModuleTCA tca) : base(tca) { }
public MatchVelocityAutopilot(ModuleTCA tca) : base(tca) { }
public FlightStabilizer(ModuleTCA tca) : base(tca) { }
public ThrottleControl(ModuleTCA tca) : base(tca) { }
public BallisticJump(ModuleTCA tca) : base(tca) { }
public ToOrbitAutopilot(ModuleTCA tca) : base(tca) { }
public ManeuverExecutor(ModuleTCA tca) : base(tca) { InitModuleFields(); ddV.Tau = 1; }
public FlightStabilizer(ModuleTCA tca) : base(tca) { }
public CollisionPreventionSystem(ModuleTCA tca) : base(tca) { }
public TimeWarpControl(ModuleTCA tca) : base(tca) { }
public VTOLAssist(ModuleTCA tca) : base(tca) { }