Jump to content

[1.8] PersistentRotation 1.8.6


MarkusA380

Recommended Posts

31 minutes ago, hraban said:

The personal test is done in a clean install. Only Persistant Rotation and Mechjeb is installed.

On initiate Persistant Rotation i enable SAS and set the Orientation mode from "prograde" to "stability assist".

Okay. Could you still do the rest of the checklist?

I tried it right now with the EXACT same setup as you did (PR 1.6 & MechJeb) and the procedure worked beautifully. After changing scene from the observatory to the ship, it flicks into the same orientation as when I left it hours before in game time right in the moment physics kick in. (About half a second after coming from the loading screen). I am getting no exceptions at all.

Link to comment
Share on other sites

36 minutes ago, MarkusA380 said:

Okay. Could you still do the rest of the checklist?

I tried it right now with the EXACT same setup as you did (PR 1.6 & MechJeb) and the procedure worked beautifully. After changing scene from the observatory to the ship, it flicks into the same orientation as when I left it hours before in game time right in the moment physics kick in. (About half a second after coming from the loading screen). I am getting no exceptions at all.

I will test it next days. Thank you for the checklist.

Link to comment
Share on other sites

Okay, @hraban, the issue is resolved.

I found out that a reference frame for the celestial bodies was not being calculated into the orientation.

This reference frame presumably changes when in the atmosphere and on the surface of a planet to have no physics issues with the planet rotating.

Of course, an orbit with the inclination of 0° isn't being affected by this, because it looks always the same. Other orbits nevertheless "spin" around the planet when controlling a vessel that is inside the atmosphere or landed on the body. And because rotation is an absolute value, this leads to the orientation of a vessel in an inclinated orbit shifting when switching to a vessel on the ground and having time pass.

I will push a hotfix as soon as possible.

Link to comment
Share on other sites

First off I'd like to commend @MarkusA380 for a very interesting and potentially useful mod. Apparently there are already quite a few folks who consider this to be an indispensable mode.

I am not yet one of those.

As near as I can tell this mod is only compatible with MechJeb if there is either a pilot or a probe core capable of SAS onboard. I routinely build craft that are occasionally unmanned with just the MJ part attached. Also, I often don't include a pilot in the crew since I can do all the piloting I've ever really needed with just a MechJeb part.

So far I've found that if I do have either a probe core or a pilot I can turn on SAS and set it to track the maneuver point. If I do this, then when I engage the MechJeb maneuver the craft will point at the maneuver vector and stay there as it should. So far that's the only way I've discovered of getting it to work.

As I'm in the process of setting up a microwave network, I'd really like to get this mod to work for me. But as things stand I've yet to discover how to switch the damn thing off, and with it on it just makes a total mess out of almost every maneuver I try to execute with MechJeb.

Sorry, I think my frustration is showing. I really do think this mod is a cool idea and I'd very much like to be able to use it. Maybe there's some simple way to switch it off when it get's int he way? It would be freaking awesome if it could just corporate with MechJeb rather than interfering with it.

What am I missing? I've tried every setting I can find in the PR control panel (there aren't that many). I see where others are claiming it *is* compatible with MechJeb. I've tried it in a clean version of KSP 1.1.3 with only KSPI-E, MechJeb, and this mod installed.

Can someone please tell me how to switch it off when it's in the way?

Is there some super secret recipe of settings that can make it compatible with MechJeb? If so, I highly recommend publishing that as an edit the first post in this thread so that it can easily and quickly be found. Even better, can we make that the default behavior?

Link to comment
Share on other sites

@schlosrat: Thank you for your detailled feedback.

A MechJeb part is - technically speaking - also a probe core.

With it you will be able to activate SAS even when only having this part attached and some electric charge left. To keep your vessel from spinning when warping you need to enter the timewarp with almost no angular momentum. MechJeb does this, as long as you have some system for controlling angular momentum up and running (Reaction Wheels + Electricity or RCS thrusters + fuel).

Also, set the reference of the vessel to "None" (you do this by opening the PR Reference Selection Window and clicking "Unset") for MechJeb to be able to correctly work with the vessel. (OR deactivate the Rotation Mode entirely)

Since Version 1.6 you can configure PersistentRotation to either have no reference when warping or to always have the main body as reference. As default the reference is none, so I guess you have either an older version of the mod installed or you migrated the cfg files, wich can be dangerous. :D

I hope that helps.

Edited by MarkusA380
Link to comment
Share on other sites

@MarkusA380 thanks for the quick reply.

I don't think I understand what you mean when you say MechJeb is a probe core. Yes, it allows control of stability through it's SmartASS function, but No you can't bring up stock SAS (or if you can I certainly don't know how). So far the only way I've found of getting PR to play nice with MJ is to have stock SAS set to point at the maneuver vector. I must be missing something there. I normally have the MechJeb SmartASS window up when carrying out maneuvers with MJ, but of course it switches to one setting (Auto) during the actual maneuver while the MJ autopilot is in control.

If I understand what you said about having almost no angular momentum prior to time warp, then it appears a more correct assessment might be that PR is incompatible with MJ's "Create and execute" button in the Maneuver Planner. I've tried a couple things to see if I could effect a reasonable outcome using MJ to perform a very simple maneuver to go from a circular 200km orbit around Kerbin to a coplanar 300km orbit using a craft with a high degree of control authority (very nimble in attitude, quickly getting to and holding any orientation). If I create the node, then use SmartASS to point to the Node, then wait for the craft to appear to be quite steadily pointed to the node, then execute the node, the result is my orientation diverges fairly quickly and soon enough MJ comes out of time warp and we begin to oscillate back and forth across the maneuver node vector. That didn't work so well, so I tried a variant: Create node, Point at node, Kill rotation, wait a bit to be sure, execute node. This resulted in a slower drift away from the maneuver node, but it did drift significantly nonetheless and the only solution to stop the endless oscillation when coming out of warp was to abort the node execution and repeat the process starting with point at the node, etc.

Is that how it's supposed to work? If so, then I'd rate this mod as marginally compatible with MJ in that it doesn't flat out break the users ability to program and cary out maneuvers, it just interferes with it in an annoying and tedious way. Again I really hope I'm missing something basic here and have just not caught on to how I should be or could be using this mod.

Speaking of such things:

How does one open the PR Reference Selection Window? And on a related note is there any source for documentation on how to use PR? Maybe what I really need here is a basic how to that covers such things. If such a guide already exists then could there be a pointer to it prominently located in this forum?

Here's what I see when I try to configure PR:

When I go to a vessel in flight the PR window is up at the top of my screen with two buttons: a cogwheel that brings up a Configure window, and box that if clicked becomes a line and adds a "Rotation" and "Momentum" button, with "Rotation" in green and "Momentum" in red. Below that it says "Enable SAS to use this mode!". Of course I can't do that since clicking on SAS produces the onscreen KSP message that "<Vessel> has no operational SAS modules and no pilots aboard. Cannot engage SAS".

In the Configure window I've got two possible things to control: "GUI Visibility Mode" (Always, Stock, and Blizzy's), and below that "Default Reference Body" with choices of None and Dynamic. I've tried both None and Dynamic with the same results. And I can click on the Rotation and Momentum buttons to my hearts content with no effect (meaning they don't change color or seem to do anything). If I've got a probe core or a pilot, of course I can switch on SAS and then the "Rotation" and "Momentum" buttons become functional.

What am I missing?

Link to comment
Share on other sites

Tried it again this time being careful to set Default Reference Body to None. Seems to work better, but still requires Create Node > Point at Node > Stop Rotation > Execute Next Node. I saw less oscillation this time, but definitely there as some oscillation going on right before executing the burn. For a burn with a fairly precise start time requirement that could inadvertently delay the start of the burn.

All in all I'd love to have this on my microwave repeater stations, but I'd also love to be able to turn it completely off when it gets in the way of using MJ to program and execute a maneuver. Could there be an "Off" button?

I did at one point have v 1.5 installed, but I thought I had removed the entire PR folder from Game Date before copying in v 1.7. I'll do that again and see if I get a better result.

Thanks for the help.

Link to comment
Share on other sites

Hmmm...

Deleted PR folder from GameData

Copied in fresh copy of 1.7

Restarted game

No change in effect, but I have found that if I wait longer (20 or 30 seconds) after having MJ point at the node the drift rate is considerably reduced. There is still oscillation at the end.

I'm still confused about how it may be possible to have the mod installed and also switch it off entirely. I'm deeply concerned about how it will impact my career game for trickier things like landing, etc. There are times when you just don't have 10's of seconds to wait for stability to fall within some range that this mod will not make your ship go crazy. I may try a simple Mun landing in sandbox mode so that I don't make a mess of my career mode game, but all in all I'd really rather just have an Off button I could toggle before such a time sensitive maneuver.

Also, I've been using MJ to watch the actual angular velocity of my craft and waiting until all three axes show 0.000. Then the drift rate is sometimes very good, and sometimes not so good, and there is still always a little oscillation at the end - but things are better.

Edited by schlosrat
Link to comment
Share on other sites

11 minutes ago, schlosrat said:

I think that would help. I'd certainly like to give it a shot.

I'm still confused about how to switch the mod off other than simply removing it. But perhaps if the MJ SmartASS worked like SAS I wouldn't need to.

Thanks!

Thing is, I will never add a "turn off" button. This mod is not just a cool gimmick, but an enhancement for the game physics! :wink:

Link to comment
Share on other sites

1 hour ago, MarkusA380 said:

Okay, I now finally understood the problem.

You want an active SmartASS to be interpreted the same way as the stock SAS by PR.

I believe I could implement that. Would that be okay for you?

If I'm understanding correctly, when I have MJ installed (almost always), I always use MJ SmartSAS, and never use stock SAS, so i guess I would be in favor of this... ??

Link to comment
Share on other sites

I do agree this is a realism upgrade, and can well imagine how useful it will be for things like microwave beamed power relay sats, and also long low thrust high impulse electric motors, etc.

I'm going to continue to play around with it to see if I can get the hang of using it with MJ. I eagerly look forward to seeing it treat MJ's SmartASS as if it's SAS.

Thanks!

Link to comment
Share on other sites

Allright.

MechJeb and PersistentRotation are now compatible. Because this is quite a lot of new code I want to prerelease the new version so that you guys can test it out and report critical issues.

Here's the download link: https://github.com/MarkusA380/PersistentRotation/archive/Development.zip

Please test it extensiveley and give me some feedback.

There is still one decision to be made: Wich smartASS mode should toggle reference rotation when vessel is on rails? It is, of course, possible to have any mode other than "OFF" completley turn off PR for this vessel. It would also be possible to have every mode use PR when on rails, wich would cause reorientation behaviour of the vessels when exiting warp. Also, it wouldn't fix the problem to begin with. For this prerelease I instead decided to have any mode other than "NODE" or "KILL ROT" use PR when unloaded. This means "NODE" and "KILL ROT" will behave like PR was not installed at all, with absolute rotation and momentum whatever you do, unless your craft spins faster than the threshold. I think this "compromise" and integration of some way of these two mods is the best possible solution, but if you guys think differentley, let me know.

Have fun rotating!

Link to comment
Share on other sites

2 hours ago, MarkusA380 said:

MechJeb and PersistentRotation are now compatible. Because this is quite a lot of new code I want to prerelease the new version so that you guys can test it out and report critical issues.

I admit, I really mostly just use PR for the Body Relative Rotation for satellites... Mostly my RemoteTech constellations...
And, I hate to bring it up, but that begs another question: RemoteTech ALSO has its own Flight Computer, to add yet another fly in the ointment...

I dont beleive I ever use RT without MJ installed, and I always use the MJ flight computer (SmartASS™) over the RT one... I've never had any problems with RT computer interfering with MJ, at least by just being installed... I've never tried using both actively, or switching between them...

Also, Markus, are there any specific areas/functions to test out, or to look for problems with?... (I guess mainly related to the use of MJ SmartASS & PR)

Link to comment
Share on other sites

4 hours ago, Stone Blue said:

I admit, I really mostly just use PR for the Body Relative Rotation for satellites... Mostly my RemoteTech constellations...
And, I hate to bring it up, but that begs another question: RemoteTech ALSO has its own Flight Computer, to add yet another fly in the ointment...

I dont beleive I ever use RT without MJ installed, and I always use the MJ flight computer (SmartASS™) over the RT one... I've never had any problems with RT computer interfering with MJ, at least by just being installed... I've never tried using both actively, or switching between them...

Also, Markus, are there any specific areas/functions to test out, or to look for problems with?... (I guess mainly related to the use of MJ SmartASS & PR)

First of all... I might implement RT compatibility. Not yet though.

Please look for SmartASS compatibility and that no Exceptions related to PR pop up.

 

Addition:

I have pushed an even newer version to Dev branch. When MechJeb is enabled PR will not interfere, unless the vessel momentum is above the threshold. No reference rotation. If you want to have reference rotation or momentum autopilot, you will have to set the stock SAS on hold. Everything else will have absolute rotation. This decision was made due to the fact that apart from a perfectly circular orbit and the main body as reference all the other control modes (prograde, normal and so on) don't keep the right direction when packed. I *might* add a feature that is especially made for this. Please test extensiveley.

Edited by MarkusA380
Link to comment
Share on other sites

So far so good. Was able to do an ascent, rendezvous, and docking without issue. I learned during that last manuever that my craft wasn't very stiff (which in hindsight was to be expected given the hasty way I slapped it together) and I was pleased to see how it, and later the docked conglomeration of it and something much larger behaved wrt rotations.

I'll continue to play around with MJ attitude control modes, but so far everything seems to be fine.

Thanks!

Link to comment
Share on other sites

15 hours ago, MarkusA380 said:

New Version released!

Have fun rotating, now even with MechJeb and RemoteTech!

Glad you are updating this. Must have for me.

I have noticed, however, that I am unable to remove the stock PR window. I have Blizzy's Tool bar installed, but I cannot get rid of the window. I have it selected as shown and have restarted the game entirely and it still pops up. I'm sure I'm missing something..

2 minutes ago, Stratickus said:

Glad you are updating this. Must have for me.

I have noticed, however, that I am unable to remove the stock PR window. I have Blizzy's Tool bar installed, but I cannot get rid of the window. I have it selected as shown and have restarted the game entirely and it still pops up. I'm sure I'm missing something..

Disregard. When I moved it to Toolbar, I was able to click it there and it removed the window.

Cheers,

Link to comment
Share on other sites

I just experienced an interesting bug while playing RP-0/RO/RSS. It's reproducible (I've had it happen 3, after reloading to a point before the bug).

What happens is that the ship ends up 'somewhere' in the sun. First in the sun's atmosphere and then on a launchpad at the sun.

Anyways, I have logs, so hopefully they're helpful and obviously, I can redo it and get more data if you want. Or if you think the bug isn't with PR, I can go poke other people.

 

https://gist.github.com/ahmedcharles/93e87d6c3683183d947b93681d56a6b5/raw/51815d3a31f6b5e5309753c542bbf43eee875010/KSP.log

https://gist.github.com/ahmedcharles/93e87d6c3683183d947b93681d56a6b5/raw/51815d3a31f6b5e5309753c542bbf43eee875010/output_log.txt

Link to comment
Share on other sites

4 hours ago, Conventia said:

I just experienced an interesting bug while playing RP-0/RO/RSS. It's reproducible (I've had it happen 3, after reloading to a point before the bug).

What happens is that the ship ends up 'somewhere' in the sun. First in the sun's atmosphere and then on a launchpad at the sun.

Anyways, I have logs, so hopefully they're helpful and obviously, I can redo it and get more data if you want. Or if you think the bug isn't with PR, I can go poke other people.

 

https://gist.github.com/ahmedcharles/93e87d6c3683183d947b93681d56a6b5/raw/51815d3a31f6b5e5309753c542bbf43eee875010/KSP.log

https://gist.github.com/ahmedcharles/93e87d6c3683183d947b93681d56a6b5/raw/51815d3a31f6b5e5309753c542bbf43eee875010/output_log.txt

I checked through the log file. This problem does not originate from PR. I found exceptions from MechJeb, RemoteTech, FAR, RealChute and something called PQS in the file. Hope that helps.

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...