Open jrodrigv opened 7 years ago
I'm trying to deorbit a vessel that is not the "active vessel". I've everything set on the vessel that I want to deorbit and then I switch to a different vessel.
I will debug TCA so see what is failing, I guess it should be something around here:
public List
Sorry for the long absence. One question to be able to reproduce this: How do you activate the Deorbit from another vessel? Squadron Mode, or you first initiate the deorbit and then switch from it?
In any case, this may be not a good idea since non-active vessels in atmosphere should remain in loading range, or they'll be destroyed by KSP.
I found this issue using this mod implemented by me.
http://forum.kerbalspaceprogram.com/index.php?/topic/158344-ksp-13x-physics-range-extender-v140/
https://github.com/jrodrigv/PhysicsRangeExtender
I have to say that I have manage to land a vessel using TCA and Mechjeb however only when the deorbit burn has been executed.
If I switch to a different vessel (warp mode always deactivated) and and I wait for TCA to execute the deorbit maneaver, then I can see TCA throwing exceptions.
I understand this is corner case for TCA because I'm playing beyond the known limits of KSP it self :)
BTW if you watch this video you will realize exactly what I'm trying to achieve.
Ok. I've tested it a bit and see that it totally breaks TCA; even without exceptions the autopilot behaves unpredictably. I need to investigate this much more.
Thanks! I think it would be very funny to be able to use some of the functions of TCA remotely from a different vessel!
However I know there are some limitations. For example, StageManager will not work unless you are the active vessel (the code is highly couple with the Stage UI) so it will not be possible to put something in orbit remotely.
Well, TCA is actually able to activate stages remotely: e.g. you can activate Rendezvous autopilot from the launchpad, then watch as the rocket takes off from another ship nearby. It is also capable of piloting many VTOLs in wedge formation, and of independent path navigation. Most atmospheric functions are intended for multi-ship usage. But orbital stuff is a different matter: since the stock game is very restrictive with regard to unfocused vessels, it never occurred to me to develop these autopilots with multiple vessels in mind.
Nice code!
GameEvents.onStageActivate.Fire(next_stage); vessel.parts.ForEach(p => p.activate(next_stage, vessel)); vessel.currentStage = next_stage; vessel.ActionGroups.ToggleGroup(KSPActionGroup.Stage);
I used a similar approach for multi-stage missiles for BDArmory. However that approach is even better because I did not think about the possibility of using staging using the stage group.
I will have to re-implement it using that code!
I have seen this exception looking at my logs. KSP 1.2.2. & TCA 3.4.1.
ArgumentOutOfRangeException: Argument is out of range. Parameter name: capacity System.Collections.Generic.List
1[ThrottleControlledAvionics.AtmosphericConditions]..ctor (Int32 capacity) ThrottleControlledAvionics.LandingTrajectory.GetAtmosphericCurve (Double dT, Double endUT) ThrottleControlledAvionics.DeorbitAutopilot.Update () ThrottleControlledAvionics.TCAModule.OnFixedUpdate () ThrottleControlledAvionics.ModuleTCA.<FixedUpdate>m__D (ThrottleControlledAvionics.TCAModule m) System.Collections.Generic.List
1[ThrottleControlledAvionics.TCAModule].ForEach (System.Action`1 action) ThrottleControlledAvionics.ModuleTCA.FixedUpdate ()