Diazo

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

Recommended Posts

Kill your horizontal velocity before landing, or hover over a selected point on the ground.

Found on the CKAN as Horizontal Landing Aid

Latest Update:

KSP 1.3: Current version works without requiring any updates.

This mod requires a working SAS to function. Make sure you have a pilot kerbal or a high-enough level probe core along for this mod to function.

Download

Download release from GitHub here.

Merge the GameData directory in the .zip file with your KSP-Install\GameData directory.

Source code also on GitHub.

License: GPL3

This mod supports Blizzy's Toolbar mod and will display it's button there if installed. If Blizzy's toolbar is not installed, the button will display on the stock toolbar.

Modulemanager is a required dependency.

Want to control your vertical velocity?

Automated Vertical Velocity Control

iconBlue.jpg Button when showing Blue. Button also shows Red and Gray (or transparent to show window color technically).

The button has 3 colors:

Gray: Mod is off and will not activate.

Left-Click to go to Zero Mode (Blue)

Right-Click to go to Location Hover mode (Red)

Blue: Mod is activated and will cancel your horizontal velocity as fast as it can

Left-Click to turn mod off (Gray)

Right-Click to go to Location Hover mode (Red)

Red: Mod is on and in Location Hover mode.

Left-Click to turn mod off (Gray)

Right-Click to go to Zero mode (Blue)

Yellow Border: When the mod is actively controlling the vessel, the icon will have a yellow border around it.

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 fuel as your vessels' sideways velocity is higher the then sideways velocity of the ground under it. This limit is adjustable by right-clicking the LA button and entering the height you wish to engage at.

SAS: SAS must be enabled to use the mod. In fact, the mod works by controlling the SAS direction. This means that while this mod is enabled, the vessel control keys (WASDQE) are not effective as the mod will override their inputs as soon as you release them.

RCS: While vessel tip is the primary method of control, if the RCS system is on and there are RCS blocks on the vessel, the mod will use the RCS to help out. Particularly on lower gravity worlds, this speeds up the rate at which the vessel responds as even the maximum default tip of 20° only provides a sideways acceleration of about 15% the force of gravity currently pulling downwards on the vessel. Note that the RCS system does not affect if the mod is engaged or not, it is optional. (Unlike the SAS system which must be engaged for the mod to control the vessel.)

To Use:

Zero Mode (Blue): In this mode, the mod will simply cancel your horizontal velocity. Once canceled it will keep you hovering over whichever point on the ground you are over. This is intended for landing a skycrane with a horizontal velocity of zero so there is no chance of tipping over from having too much sideways momentum.

Location Hover (Red): When you enter this mod, a red arrow will attach itself to your mouse. Left-click on the ground to set a target location, the red arrow will now attach itself to this point. This mod will then take your vessel and attempt to hover over the red arrow. Note that it is likely your vessel will overshoot on its first approach I am still tweaking the move-to-point math to get it exactly as I want. I will further tweak this based on people's reports.

Note: For the purposes of location, the part you have selected as the "Control From Here" part is what the mod will keep above the target. If you have a docking port on the side of your vessel, you can "Control from Here" and rotate your vessel around that point for a precision landing.

Note2: Right clicking to enter Location Hover mode also opens the settings screen.

Settings: (Saved on a per vessel basis)

Engage Height: The mod will only take control at or below this height above terrain. Note that the default altimeter at the top of the screen displays height above sea level. Defaults to 500m.

Max Tip: How far off vertical the mod will allow the vessel to go. Defaults to 20° Larger vessels with a slower torque response may wish to lower this.

Speed%: This is the speed with, or the aggressiveness, the mod uses. A lower number will result in a slower approach to target and a slower max speed while traveling. In percent, defaults to 100%. Really large vessels, or odd configurations (such as engines above the center of mass) may benefit from changing this number but player preference will vary.

Use RCS only?: You can have this mod use the RCS only to move your vessel if you set the max tip to 0 and engage the RCS thrusters. Note that this will be highly vessel dependent, it can be painfully slow on larger vessels as effective RCS thrust is so low.

Edited by Diazo
Version 3.0 release/KSP 1.3 update.

Share this post


Link to post
Share on other sites

Time for another field test report! The mod works very well, even with heavy ships in an atmosphere. This will be great for hovering over cargo I want to pick up with winches. I've been using the B9 air thrusters, seeing as how I'm on a VTOL rampage at the moment, and have found using this mod to kill the horizontal speed works much better than the MechJeb version, since it doesn't pitch and roll the ship to hold steady, which MJ could never quite get right. The red landing marker is a nice touch, and well-done. However, if the ship becomes "physics unloaded", by heading back the Space Center, or changing to a vessel outside of physics range, the mod stops working altogether on that ship. If I quick load or only change ships within physics range, it'll still work just fine.

Share this post


Link to post
Share on other sites

@Volculus: Thank you for the report.

Unfortunately, once a vessel is physics unloaded it is on rails and I can't do anything to it. That's a hard limitation KSP imposes.

To help out with the pitch/yaw wobble, I'm actually going to add a SAS "lock" function where if this mod is engaged it will change your SAS hold vector to straight up. This will prevent your main engines from generating sideways thrust when they are slightly off vertical that this mod has to fight. (Optional of course, I can envision flight profiles that would want this off.)

Two other things I'm looking at changing that I'm hoping you can offer you thoughts on:

1) The red target arrow going from 5 to 7 meters high. At any real distance, the arrow could become hard to see, but I don't want to make it so big that close up it's 5 times the size of your ship.

2) Reducing the distance you can set a target at from 5000 to 2000 meters. Outside the 2,500m physics range the ray cast I'm using goes wonky and I'm not sure you want to be riding your RCS that far horizontally anyway.

@ObsessedWithKSP: Well, yes I am. :)

My first mod (the vertical velocity) was started because I simply could not land a sky crane without crashing it because I have an older keyboard and it quite heavy handed. Try to add a touch more thrust for that final deceleration to land? Nope, you are shooting back up into the atmosphere (or orbit for the low-grav stuff). When the smallest tap on the Shift key I can physically manage is a 10-15% thrust change, you have to reach for another solution.

Then I just started seeing things that bug me and decided to do something about it. I've got one last mod at about 80% complete (an on-screen joystick to fly planes with the mouse, not the keyboard) that I think will satisfy me, then I'll actually get back to playing KSP. ;)

D.

Share this post


Link to post
Share on other sites

Diazo, what I meant was, that if you assume manual control of a ship after it's been physics unloaded once, then the mod stops functioning. I didn't mean when I left the ship to it's own devices well out of range. For example:

1) Load ship on runway or launchpad.

2) Activate RCS mod. Enjoy the fruits of Diazo's labor.

3) Hit Escape, return to the Space Center, or switch to another object outside of physics range.

4) Return to original ship.

5) Sad face, because the mod is now somehow turned off, and won't work again. =(

For your other questions, a larger target marker would be just fine, though it never occurred to me to try and set it way beyond where I was already hovering, so it's always been easy to see. :)

Edited by Voculus

Share this post


Link to post
Share on other sites
Diazo, what I meant was, that if you assume manual control of a ship after it's been physics unloaded once, then the mod stops functioning. I didn't mean when I left the ship to it's own devices well out of range. For example:

1) Load ship on runway or launchpad.

2) Activate RCS mod. Enjoy the fruits of Diazo's labor.

3) Hit Escape, return to the Space Center, or switch to another object outside of physics range.

4) Return to original ship.

5) Sad face, because the mod is now somehow turned off, and won't work again. =(

For your other questions, a larger target marker would be just fine, though it never occurred to me to try and set it way beyond where I was already hovering, so it's always been easy to see. :)

Bah, that sounds like my "has the current ship changed" code is not working correctly.

Should be an easy fix. (Will just have to wait until I'm home from work.)

D.

Share this post


Link to post
Share on other sites

This is awesome! I haven't tried it yet but this sounds like exactly what I need. That last tiny bit of lateral velocity always kills me :(

Share this post


Link to post
Share on other sites

so uh could you perhaps also make a uhm vtol module that auto lands unbalanced shuttle like vtol craft? that would be epic!

Share this post


Link to post
Share on other sites
so uh could you perhaps also make a uhm vtol module that auto lands unbalanced shuttle like vtol craft? that would be epic!

There's already several auto-balance mods out there that do this so I have no plans to add anything like that to any of mine.

Have you looked at Davon's Throttle Control? That combined with my Vertical Velocity mod sounds exactly like what you are looking for.

This mod uses RCS to control your horizontal velocity.

My vertical velocity mod controls your vertical velocity.

Davon Throttle Control compensates for unbalanced craft and controls which engines are used for takeoff/landing.

These 3 mods combined are my standard set of "landing mods" that I use with skycranes these days.

D.

Share this post


Link to post
Share on other sites

thanks I will give that a try! too bad your vertical velocity mod cant compensate unbalanced sky cranes, it would be awesome if it could figure out how much thrust each vtol engine would have to output to belance it :)

or is Davon Throttle Control systems capable of balancing the ship and then your vertical velocity can land it peacefully

Edited by BelgarionNL

Share this post


Link to post
Share on other sites

Yes, Davon Throttle can balance the ship, that is the primary reason I use it. The fact I can control which engines do what with it is a nice bonus as well.

D.

Share this post


Link to post
Share on other sites
do you have an example ship + davon setup! because I cant get it to stay level for the life of me!

I'll try and give you a quick pictorial, Belgarion. I forgot to grab a screen showing how off center the CoT was in relation to the CoM, but rest assured, it was unbalanced! Also remember to slap on the Davon Control Module somewhere on your ship, before launching. Until it gets toolbar support, you'll need to right-click on that module to activate it, initially. Once that's done:

DTC01.png?psid=1

DTC02.png?psid=1

Assuming you did correctly, you can right-click on any of your engines, and you'll see where the mod had automatically changed the thrust limiter on any engines that need it. It will change in real time to keep your ship flying right.

Don't forget to check out the Original Thread, which will hopefully explain more than my crappy pics. :)

Edited by Voculus

Share this post


Link to post
Share on other sites

@Voculus: Version 1.1 is almost ready to go, hopefully tonight.

It has several fixes and improvements in, including the one-use bug you are asking about.

I just need to get one last quanterion to cooperate and it will be ready for release.

D.

Share this post


Link to post
Share on other sites

Version 1.1 Release

Now a settings window opens when you right-click the mod icon to go into Location Hover mode. You can set the height at which the mod engages.

The Force SAS option is currently non-functional and the button does nothing at the moment.

Note that the height currently does not save.

The mod now only uses 95% of an RCS blocks available thrust to leave 5% available for SAS.

Add settings window and ability to set altitude at which the mod engages.

Fix mod sometimes no longer working after switching vessels

Increase landing target arrow from 5m to 7m

Decrease range of ability to set target arrow from 5000 to 2000 meters. (It goes wonky due to KSP's co-ordinate system past the 2.5 physics limit.)

Planned for next version:

Enable SAS to force vessel perfectly vertical so the mod is not fighting any sideways thrust generated by the main engines.

Save the height the player sets the mod to engage at on a global basis. It currently resets to 500m every time you load the flight scene. (No plans to save this on a per vessel basis.)

Edited by Diazo

Share this post


Link to post
Share on other sites

Thanks for the update, Diazo. Everything works as advertised, and you've made the world of VTOLs that much more enjoyable. Thanks! :cool:

Share this post


Link to post
Share on other sites

Version 1.2 Release

Settings now save globally so you can decide at what height the mod will start canceling your sideways velocity and if the mod Force's SAS. This is saved globally for all vessels, there are no plans to save this on a per vessel basis.

Force SAS: The SAS can now force the SAS to lock the vessel straight up so the RCS blocks trying to cancel your sideways velocity do not have to fight the sideways thrust generated by your main engines being off vertical. If enabled, this option activates at the same height the RCS blocks do and both the SAS and RCS systems must be on. It also only sets the direction once upon activation, if you change the SAS direction after activation, you will have to disable and re-enable it. Tapping either RCS or SAS off-on will work for this. It will also auto-detect which of the six control axis is currently closest to up and use that as up so both VTOLs (with cockpits) and rockets (with control pods) are both supported.

As always, let me know how it goes.

D.

Share this post


Link to post
Share on other sites

Very nice. Simple and done well. It's nice having controls like this without having to use MechJeb. Both this and your Vertical Velocity controls are going into my pile of mods for 0.24.

Share this post


Link to post
Share on other sites

Good news, Diazo. Your RCS Landing Aid still works flawlessly with the x64 0.24 release! :D

Share this post


Link to post
Share on other sites

Yup, just testing is on my end also.

Updating mod version 1.2 to support KSP 0.24, no re-download required.

Just in case I have recompiled against the 64 bit version of KSP and you can download version 1.2a if you want. There are no code changes in the mod, this is just a precaution for the jump for 32 to 64 bit.

D.

Edited by Diazo

Share this post


Link to post
Share on other sites

Diazo,

I have installed this but I don't see the toolbar button anywhere. I have RCS turned on and I am within the hard ceiling, but nothing happens.

KSP 0.24 x64

I have the mod installed as such: ..\Kerbal Space Program\GameData\RCSLandAid

Share this post


Link to post
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.