Jump to content

Need to force all antennas to be retracted


Recommended Posts

Due to a bug/bad interaction between RT and HyperEdit, deployed antennas are ripped off when hyperediting from the launchpad.  

This is affecting my sim mod, since I am using the Hyperedit code for this.

I believe that the following will get me a list of the parts of the vessel:  FlightGlobals.fetch.activeVessel.GetActiveParts

I'll be researching this, but if someone could give me an example, that would be great

Thanks

Link to comment
Share on other sites

I don't know RT module well but I guess :

Vessel vessel = FlightGlobals.fetch.activeVessel;
for (int i = 0; i < vessel.parts.Count; i++)
{
    Part p = vessel.parts[i];
    foreach (ModuleRTAntenna a in p.Modules.OfType<ModuleRTAntenna>())
    {
        a.EventClose()
    }
}

@erendrake ?

 

Link to comment
Share on other sites

I've noticed when HyperEditing a vessel from in atmosphere that the further I'm trying to send it the more like it is to blow up. Occasionally I'll see a brief glimpse of the craft with re-entry (exit?) effects on its way up. Found it more reliable to hyper edit to low orbit, then to where I want it. Maybe not a RT issue but just that antennas are more fragile than most other parts?

Link to comment
Share on other sites

4 hours ago, linuxgurugamer said:

Due to a bug/bad interaction between RT and HyperEdit, deployed antennas are ripped off when hyperediting from the launchpad.  

This is affecting my sim mod, since I am using the Hyperedit code for this.

I believe that the following will get me a list of the parts of the vessel:  FlightGlobals.fetch.activeVessel.GetActiveParts

I'll be researching this, but if someone could give me an example, that would be great

Thanks

Edit the antennas cfg and take out

%MaxQ = ********

sure do what you want

Link to comment
Share on other sites

I'm sorry, you don't understand what I'm doing.

I've written a mod, which will do simulations.  A simulation can start on the launchpad/runway, in orbit around any body, or landed on any body.

A tester found this problem when he created a small probe, set the antenna to be extended at launch, and tried to do a simulation starting in orbit.  Due to the way KSP does physics, the simulation first starts on the launchpad, then teleports the craft to the desired orbit.  If the sim is a landed sim, it then teleports the craft to a short distance above the surface of the body.  This is based on the Hyperedit code, and this problem also occurs if you use hyperedit to move a craft.

If the antenna is set to start extended on the launchpad, the RT code thinks that the teleport exceeds the speed at which the antenna would be ripped off in atmosphere.

So, what I am trying to do is to have some code which will tell all antennas to start retracted (or to retract on the launchpad) to avoid this problem.  It would be nice if I could also then extend the antennas after teleporting to allow RT connectivity.

This is only a problem with RT (I haven't yet tested AntennaRange).  

If I can't solve this, then I'll just have to create a dialog to remind people that antennas need to be retracted before starting the simulation, but I'd rather avoid that, if possible.

Link to comment
Share on other sites

3 hours ago, linuxgurugamer said:

I'm sorry, you don't understand what I'm doing.

I've written a mod, which will do simulations.  A simulation can start on the launchpad/runway, in orbit around any body, or landed on any body.

A tester found this problem when he created a small probe, set the antenna to be extended at launch, and tried to do a simulation starting in orbit.  Due to the way KSP does physics, the simulation first starts on the launchpad, then teleports the craft to the desired orbit.  If the sim is a landed sim, it then teleports the craft to a short distance above the surface of the body.  This is based on the Hyperedit code, and this problem also occurs if you use hyperedit to move a craft.

If the antenna is set to start extended on the launchpad, the RT code thinks that the teleport exceeds the speed at which the antenna would be ripped off in atmosphere.

So, what I am trying to do is to have some code which will tell all antennas to start retracted (or to retract on the launchpad) to avoid this problem.  It would be nice if I could also then extend the antennas after teleporting to allow RT connectivity.

This is only a problem with RT (I haven't yet tested AntennaRange).  

If I can't solve this, then I'll just have to create a dialog to remind people that antennas need to be retracted before starting the simulation, but I'd rather avoid that, if possible.

Did you try it ?

Link to comment
Share on other sites

You might not want to edit the actual part config to remove the MaxQ value, but since it is a KSPField you could just cache all of the values for loaded modules, set them to -1, then set them back after you have finished moving the vessel. It seems like the least invasive method without any action from RT.

Link to comment
Share on other sites

6 minutes ago, MeCripp said:

Yes you can make a MM to take out MaxQ=****  and all is good don't know why you would try or want to make a plugin to do something that MM can do

Read my post above, which you replied to.  Making a MM patch is intrusive into other mods, this is a SIMULATION mod, and will only run when requested.  A MM patch is global to the game

 

21 minutes ago, DMagic said:

You might not want to edit the actual part config to remove the MaxQ value, but since it is a KSPField you could just cache all of the values for loaded modules, set them to -1, then set them back after you have finished moving the vessel. It seems like the least invasive method without any action from RT.

This is an interesting idea, but...

I was looking at the RT code, and found where the problem is.  I think it is actually a bug in RT.  It's an edge case, so most of the time it won't be apparent.  Hyperedit and my mod (KRASH) both are in the edge case. 

I created an issue on Github for this, detailing the problem and a proposed solution, will wait to see what the RT people say.  For now, I'll just note in the instructions that if RT is being used, that all antennas should be retracted before starting the sim.

https://github.com/RemoteTechnologiesGroup/RemoteTech/issues/528

Edited by linuxgurugamer
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...