Jump to content

[1.3](Jan28/17) Landing Aid: Kill your horizontal velocity to land (Now optionally using RCS)


Diazo

Recommended Posts

Version 2.2

-Add support for nearby non-focus vessels.

-Button on toolbar is now highlight in yellow when the mod is actively trying to control the vessel.

Now when you switch away from a vessel, it remembers its settings and will keep controlling your horizontal velocity.

Note that this only works within a few hundred meters of the focus vessel, if you get too far away KSP will think the vessel is debris falling to the ground and delete it. (The actual distance is uncertain, probably 300-450meters, but it varied in testing.)

Hover target arrows are still red for the focus vessel, but any nearby vessels hovering show their target arrows in blue.

Have some formation flying:

c5uvFLj.jpg

Let me know how it goes,

D.

Link to comment
Share on other sites

  • 2 weeks later...
Version 2.2

-Add support for nearby non-focus vessels.

-Button on toolbar is now highlight in yellow when the mod is actively trying to control the vessel.

Now when you switch away from a vessel, it remembers its settings and will keep controlling your horizontal velocity.

Note that this only works within a few hundred meters of the focus vessel, if you get too far away KSP will think the vessel is debris falling to the ground and delete it. (The actual distance is uncertain, probably 300-450meters, but it varied in testing.)

Hover target arrows are still red for the focus vessel, but any nearby vessels hovering show their target arrows in blue.

Have some formation flying:

http://i.imgur.com/c5uvFLj.jpg

Let me know how it goes,

D.

A couple of comments:

First, I'm running on Windows 7, KSP 32 bit, Horizontal Landing Aid 2.2

On the first page, you say the following:

Engage Height: Regardless of which mode the mod is in, it will not activate unless you vessel is within 1000 meters of the ground. As the mod zero's out your velocity relative to a point on the surface, zeroing out too high wastes RCS as you can be moving several meters per second faster due to the larger diameter of the "orbit" you are making as compared to the "orbit" the ground is making. (This limit is adjustable by right-clicking the toolbar icon.)

However, the prompt simply says "LandingAid height". Might I suggest it say something like the following: Max Engage/active height

Second, for whatever reason, when I'm using it on a specific ship, it seems to be very over-controlling. I suspect it is the ship itself acting like a giant pendulum, since this is my first attempt at a skycrane, but it has been very frustrating trying to get this ship down and moved to where I want it. Is there any way to adjust the sensitivity of it, or to, maybe, limit the amount it will tilt a ship?

Thanks

Edited by linuxgurugamer
Link to comment
Share on other sites

Thanks for catching those.

I've re-worded the first post to remove all mentions of RCS being necessary. It has been long enough since I made that change it isn't needed any more.

I'll look at the in-game text for the engage height when I get a chance.

On the ship over-controlling, does this happen in both velocity cancel mode and hover-at-location mode? Or just hover-at-location mode?

If it happens in velocity cancel mode, that may be an issue I need to look at. The vessel tip is directly proportional to your horizontal speed so it should come smoothly to a stop regardless of the vessel size, even if that is a slow stop for larger vessels.

If it is in only hover-at-location mode, I'm not as sure. I did assume a minimum level of torque available for the vessel, but even if you are below this minimum torque all that should happen is that you bounce back and forth over your target location a few times, there shouldn't be actual control issues.

Regardless of the mode you are in, there is a hard limit of 20° off vertical that this mod will never go past. (Barring external factors, if you can't get the craft vertical with the WASD keys, this mod can't get the vessel vertical either.)

I'll at least take a look at it tonight.

D.

Link to comment
Share on other sites

Thanks for catching those.

I've re-worded the first post to remove all mentions of RCS being necessary. It has been long enough since I made that change it isn't needed any more.

I'll look at the in-game text for the engage height when I get a chance.

On the ship over-controlling, does this happen in both velocity cancel mode and hover-at-location mode? Or just hover-at-location mode?

If it happens in velocity cancel mode, that may be an issue I need to look at. The vessel tip is directly proportional to your horizontal speed so it should come smoothly to a stop regardless of the vessel size, even if that is a slow stop for larger vessels.

If it is in only hover-at-location mode, I'm not as sure. I did assume a minimum level of torque available for the vessel, but even if you are below this minimum torque all that should happen is that you bounce back and forth over your target location a few times, there shouldn't be actual control issues.

Regardless of the mode you are in, there is a hard limit of 20° off vertical that this mod will never go past. (Barring external factors, if you can't get the craft vertical with the WASD keys, this mod can't get the vessel vertical either.)

I'll at least take a look at it tonight.

D.

I was doing the hover-at-location mode. I think i need to expand on my description:

I have a ship which has 2-3 MKS modules stacked along with their bases. My skycrane is at the top of this stack. There is a manned module on top of the skycrane. The skycrane is only somewhat wider than the MKS modules.

My main ship landed on Minmus. Then I separated from the landing stage, and was trying to use the skycrane to move the stack to a specific point on the ground. Once there, I land, detach the lowest module, and then take off and move over to land the next one.

i'm also using your Vertical Velocity control to hover.

What happens is that I lift off, make sure that RCS and SAS is engaged, then use the Landing aid to select a landing spot. Since the rockets are at the top of this long stack, it acts like a pendulum. The 20 degrees is too much for this, there is a very severe delay in the ship responding to the rockets, so it swings back and forth, and actually orbits around the landing spot.

I think that being able to reduce the max tilt to maybe 5 degrees, or some way to specify the max tilt on a per-rocket basis would help a lot.

Here are a couple of pictures of one of my ships:

After initial landing:

https://www.dropbox.com/s/hnuhqvk3wpf0qw4/screenshot9.png?dl=0

After separation from landing stage:

https://www.dropbox.com/s/4cj0s71tl1zwmep/screenshot10.png?dl=0

and here is a link to one of the craft files:

https://www.dropbox.com/s/8vd25q4pvq37z8v/Minmus%20station%20%26%20lander%204.craft?dl=0

Edited by linuxgurugamer
Link to comment
Share on other sites

Hmmm. I never did test a vessel with rockets above the CoM like that, didn't even think of it.

Anyways, should be reasonably easy to fix, or at least give you access to the options to set the limits such as max degrees off vertical.

I'll poke at it tonight.

D.

Link to comment
Share on other sites

Hmmm. I never did test a vessel with rockets above the CoM like that, didn't even think of it.

Anyways, should be reasonably easy to fix, or at least give you access to the options to set the limits such as max degrees off vertical.

I'll poke at it tonight.

D.

Figures I'd do something like this :-)

For now, I'm just doing it by hand, using the Vertical Velocity control and just goosing it by hand. Next time I'll probably add some RCS thrusters all along the sides to be able to translate while keeping upright, but would be nice to be able to automate this.

Thanks for looking into it.

Link to comment
Share on other sites

Why is it that it needs the SAS to function? I don't remember it needing it in earlier versions, and as of now I can't use mechjebs Smart A.S.S at the same time.

If don't have the smartass on, your mod starts swaying my VTOL over the spot, it stays still, but it sways around a lot even if it indeed stays over its designated place.

Is there a possibility to have that depency on SAS toggleable? It really does conflict with the smartass.

Here's video where I use your 2 mods with Davon throttle control and Mechjebs SmartASS back in November.

Link to comment
Share on other sites

No, the dependency on SAS is not toggelable in this version.

The previous version used the RCS thruster blocks to control horizontal velocity. However, the low thrust of the RCS blocks meant you were layering them on to get any sort of reasonable thrust. As vessels got larger the mod became kind of useless because so many RCS blocks were required. (My test Kerbal 2 generally had 16 RCS blocks on it to get even a so-so sideways acceleration.)

Since version 2.0, this mod takes over the SAS system and rather then controlling the vessel directly, it changes the desired SAS direction and lets KSP control the vessel through SAS. This is why it conflicts with MechJeb, both this mod and MechJeb are trying to point the vessel in their desired direction and those directions do not match.

This new method of tipping the vessel over a bit to generate sideways thrust means the mod works with vessels of any size as the thrust available to the mod automatically scales up as the player builds bigger vessels with bigger engines.

Now, the VTOL swaying in place thing is a problem, it should not be doing that. Can you give me more details on that so I can look into it? And which SASS mode are you using in MechJeb?

Thanks,

D.

Link to comment
Share on other sites

Here's the vid.

As you can see 1 minute in, after I've activated your mod the ship starts to enter some heavy swaying. I've tried what I can, and perhaps it's a design issue. I don't have any loose parts though.

I do however have 400 SAS torque, and I havent tried deactivating all but the cockpit. Might give that a try!

Edited by SlimJim89
Link to comment
Share on other sites

Nice, thanks for the video.

And I have to say that is really weird.

First, you are using the mod exactly as I intended, I don't see anything in the video you could do different.

Second, I have not run any tests yet, but from watching the video my first suspicion is the RCS jets.

Because I use the in-built SAS, I don't actually have direct control of them and from looking at the exhaust plumes, it looks like KSP is pulsing the RCS on max causing an overshoot.

By this, I mean following is happening in your video:

1) Engage this mod. Things are good.

2) Drift happens, craft is moving horizontally at a very slow speed.

3) Mod changes SAS direction slightly to compensate.

4) KSP sees the changed SAS direction, notes it has RCS enabled, decides to use them.

5) KSP pulses the RCS but due to how they are programmed, the pulse is max thrust. All was needed was a pulse at 10% thrust.

6) This mod notes the overshoot, sets the SAS direction back the other way, but farther this time to compensate for the overshoot.

7) Repeat again and again, overshooting farther each time.

Testing this is easy however, can you repeat the circumstances of the above video, just with the RCS off please? If I'm right, the sway will not happen. If the sway still happens, something else is going on and I'll be running tests tomorrow to figure it out.

Regardless, I will be making some tweaks to this mod. Looking at the math for the issue linuxgurugamer reported made me realize that on low-grav worlds I'm not happy with how little sideways acceleration just tipping the vessel gets you. A 10° tip is only about 15% the acceleration of the force of gravity. Quite reasonable on Kerbin, not so reasonable on the Mun (or Minmus). Have not decided on a course of action about this issue yet.

Thanks for the great help on this,

D.

Link to comment
Share on other sites

One of the features of the inbuilt SAS system is that if the RCS system is on, the SAS system will fire them automatically to supplement the torque available from reaction wheels. However I believe that they are then over-torquing the vessel when the fire because they fire on max, hence the request in my previous post to try disabling them and see what happens on reaction wheels only. (I'm assuming that vessel is stable with RCS off for this request.)

D.

edit: oops, got the two recent issues mixed up. But yes, there are a couple tricks I can do with RCS that will help. (I think, have not had a chance to test anything yet.)

Edited by Diazo
Link to comment
Share on other sites

One of the features of the inbuilt SAS system is that if the RCS system is on, the SAS system will fire them automatically to supplement the torque available from reaction wheels. However I believe that they are then over-torquing the vessel when the fire because they fire on max, hence the request in my previous post to try disabling them and see what happens on reaction wheels only. (I'm assuming that vessel is stable with RCS off for this request.)

D.

edit: oops, got the two recent issues mixed up. But yes, there are a couple tricks I can do with RCS that will help. (I think, have not had a chance to test anything yet.)

Take your time. Your efforts are appreciated.

I'm not in a hurry, I finished those missions and will not do them again for a while. When you get a fix, I'll do one more to test it for you.

Link to comment
Share on other sites

Version 2.3

Download here.

-Limit RCS thrust to avoid over-torquing.

-Add Settings screen to tweak variables.

-RCS can now be used to assist in moving the vessel around. (Optional)

Alright, RCS is back. While totally optional, if the RCS system is on and there are available RCS blocks, this mod will fire the RCS to assist the vessel tip in moving the vessel around.

Also added the settings so that atypical vessel builds can tweak them so this mod works better.

One trick this now opens up is that if you set the MaxTip to 0° and engage the RCS, the vessel will move around with only the RCS and no tipping of the vessel. Note this does not remove the conflict with MechJeb, SAS must still be on for this to work.

This should resolve both of the recent issues, the engines above the CoM causing a pendulum and the vessel wobbling back and forth when hovering in place.

Happy KSPing all.

D.

Link to comment
Share on other sites

  • 2 months later...

While I don't know of anything breaking in this mod, I have not been able to test it yet.

I need to get the Vertical Velocity control working first so that the vessel will hover and KSP 1.0 broke that mod hard.

I think figured that out last night though so I should be able to get to this mod tonight.

D.

Link to comment
Share on other sites

Version 2.4

Download here.

-KSP 1.0 Update, no functionality changes. (KSP 1.0.2 also)

Note that due to the new aero system, a vessel will tend to wobble around the target point on the ground when in target mode (red button). Cancel velocity (blue button) is not affected by this.

I'll try to add some math to compensate in the next update but as everything works fine I wanted to get the KSP 1.0 update released.

Happy KSPing.

D.

Edited by Diazo
Link to comment
Share on other sites

  • 1 month later...

Reporting an exception that happens a few times in code location:


RCSLandAid.RCSLandingAid.Update

And this happens when the button is clicked on, the color of it does not change either though my current craft may not be capable of it, in code location:


RCSLandAid.RCSLandingAid.LeftClick

Edited by OvermindDL1
Link to comment
Share on other sites

Reporting an exception that happens a few times in code location:


RCSLandAid.RCSLandingAid.Update

Does this happen once on switching to a new vessel, most likely at the start of a new Flight scene? That's a known issue that the next version will fix.

And this happens when the button is clicked on, the color of it does not change either though my current craft may not be capable of it, in code location:


RCSLandAid.RCSLandingAid.LeftClick

That is new however, are there any more details you could get me? An output.log in particular would be very helpful.

D.

Link to comment
Share on other sites

Does this happen once on switching to a new vessel, most likely at the start of a new Flight scene? That's a known issue that the next version will fix.

That is new however, are there any more details you could get me? An output.log in particular would be very helpful.

D.

It is just a normal null pointer exception, easy to fix in code by checking if it is null first :-), full stacktrace:


[FONT=monospace][COLOR=#000000][EXC 18:15:56.598] NullReferenceException: Object reference not set to an instance of an object[/COLOR]
RCSLandAid.RCSLandingAid.[COLOR=#ffffff]LeftClick[/COLOR][COLOR=#000000] ()[/COLOR]
RCSLandAid.RCSLandingAid.<Start>b__0 (RCSLandAid.ClickEvent e)
RCSLandAid.Button.clicked (System.Object realEvent)
Toolbar.Command.click ()
UnityEngine.Debug:LogException(Exception)
Toolbar.Log:log(LogLevel, Exception, String, Object[])
Toolbar.Log:error(Exception, String, Object[])
Toolbar.Command:click()
Toolbar.Button:click()
Toolbar.Button:drawInToolbar(Rect, Boolean)
Toolbar.Toolbar:drawButtons()
Toolbar.Toolbar:draw()
Toolbar.ToolbarManager:OnGUI()
[/FONT]

Link to comment
Share on other sites

@JohnMarstonArg: The GameData folder inside the .zip file should be merged with your KSP's GameData folder.

Looking at your folder your installed them one level too high, the GameData\RCSLandAid folder should be at GameData\Diazo\RCSLandAid.

That should fix it for you.

D.

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