Jump to content

[1.3](Jun04/17) Automate Vertical Velocity and Altitude Control


Diazo

Recommended Posts

Diazo, I know I'm using this mod of yours in the complete opposite way for which it was designed, but it's working very well. If I give myself a bit more of an altitude buffer, and maneuver the ship in anticipation of terrain changes, it keeps even 65-ton, kethane-filled helicopters from crashing into the deck. I did some testing with a rocket-powered VTOL on the Mun, flying it up and down some very steep craters, with drastic changes in elevation. I was moving at a pretty good clip, only 15 meters high, and it got close a few times, but still managed to keep it flying. This should be in every VTOL enthusiast's toolbox. Would you mind if I linked to it in my sig? A mod like this should not go unsung! Thanks! :)

Link to comment
Share on other sites

@Voculus: Great to hear it is working for you. You are almost using is as designed. :P

Really, expect for the high sideways speed your vessels are doing, this pretty much is what I designed it for. The height control started out as a "can't land here, let's slide sideways until we can" tool to keep you from crashing into the ground as you moved around if the ground was rising beneath you as you moved.

And go ahead and link it if you like, I'm just glad to see people are getting good use out of it.

D.

Link to comment
Share on other sites

By the way, I just wanted to show off the ship a little bit. It's been through about a dozen iterations, and is still being tweaked. Sorry the videos are su huge and take so long for the HD stream to buffer, but that's the price I pay for having three monitors. :sticktongue:

Link to comment
Share on other sites

Diazo,

I just noticed an interesting quirk with the last couple of versions of this plugin.

It used to be that your plugin would show the radar altitude and vertical rate of a Kerbal on EVA.

The last 23.5 version and the current .24 version no longer do that. They show the same ASL altitude as the stock display till you touch the ground then the altitude display switches to 0.

I went back and loaded an older version of the plugin from last Febuary and confirmed that it does show radar alt on EVA.

Also, are your version numbers going down? That file is named uploads-2014-02-VertVel161 while the current one seems to be version 1.2.

It's definatly an older plugin since it doesn't even have a button to go to the settings window.

I realize that this isn't a major feature of the plugin and only works on low gravity moons, but it was a nice little bonus.

Also, if I'm using the latest version of your Vertical Velocity controller is there any point in using your Landing Height plugin? Isn't that function also integrated into this plugin?

Link to comment
Share on other sites

@kerba fett: On the version numbers, it sounds like I may have gotten something messed up when I was updating my different mods for 0.24. Will check ASAP.

Kerbal on EVA: Odd, it sounds like the ray cast to determine height is not functioning correctly, will investigate.

Landing Height: Yes and no. The altitude displayed on the vertical velocity window (the one just above Fly to:) uses the same math as the Landing Height mod and displays the distance from bottom of ship to ground. However, the vertical velocity mod does not change the altimeter at the top of the screen, you need to install the landing height mod to change it's display.

Should have the next version out soon, I also need to fix the GUI formatting being overridden by other mods and I think the height control change last version broke the orbital drop feature.

D.

edit: Download in first post is correct as version 1.12a. The uploads-2014-02-VertVel161 file is the spaceport download that is version 1.6, but spaceport added an "upload number" after each file uploaded to guarantee unique file names which is where that 1 on the end came from.

Edited by Diazo
Link to comment
Share on other sites

Version 1.13 Release

Fix my UI settings so the UI settings from other mods can no longer bleed over and mess my windows up.

Fix height calculation so if the raycast fails, it displays the height to terrain for the vessel CoM rather then altitude from sea level.

Fix orbit drop mode so it is functional again. (I broke it in either version 1.9 or 1.10)

@Kerba fett: The height calculation raycast fix should correct the issue you reported with the Kerbal's height being reported as ASL.

D.

Link to comment
Share on other sites

Wow, quick response. Thanks for fixing that considering it's such a minor feature that most people probably don't use.

In my particular circumstance I like having the ASL display as well as the radar alt for use on the Mun. I often use an ion powered lander for point to point travel and it's got a low TWR. If I come up on a hill with much speed it doesn't have the thrust to climb over it. If I use the scansat map to find out the highest point on my route and stay above it there's no worries. For now I guess I'll hold off on the Landing Height plugin.

Link to comment
Share on other sites

With the advent of First Contract, I have even more need for a VTOL capable plane to collect the science from around kerbin.

TCA currently seems inoperable, but to be honest after some tests I did today with this mod and Davon's mod, I think ceding complete control of the VTOL aspect is potentially a simpler way to do it, and your code is already significantly refined in that area.

I *love* the directional control thing that draws a red line coming from your control pod - truly a step-change in usability.

However, I find the current DTC integration a bit lacking in the usability department, though this is mainly due to the setup involved with DTC.

Could you not add a setting to choose which Davon throttle to use, instead of defaulting to throttle 0?

I have some experience in KSP mod coding, and glancing at your code, is this line where you set the Davon Throttle ID? If I change that to 1, will it use daven throttle 1 instead?

BTW, is that a typo in the docs? By throttle 0 do you mean the default game throttle? DTC starts at 1.

Anyway, by defaulting to the first DTC throttle, that means I have to go and set up the jet engine each time in davon - map the controls etc.

If you allowed your mod to control davon (and ideally operate the axis via pure function calls - ie no keys needed to be bound in davon), then all I would need to do is set the VTOL engines to davon throttle X each time (a couple of clicks) and I am good to go. As it stands, DTC does not seem to recognize my vjoy stick, so setting it up so that my normal throttle controls the jet engines, and your mod handles VTOL takeoff / landing is problematic.

Also, is there maybe some way (via DTC?) we could control the desired vertical velocity with an axis or keys?

Link to comment
Share on other sites

@evilC: I've given some thought to integration with DTC but to keep the implementation straightforward, there are a few limitations present.

The biggest is that my Vertical Velocity mod controls the main throttle (the one next to the navball), in DTC, that is throttle 0. DTC adds 5 more throttles controlled by sliders on the screen, but for DTC, throttle 0 means controlled by the main throttle. (So DTC has 6 controllable throttles total.)

As it was, integrating with DTC was kind of a spur of the moment thing as I saw people in the DTC thread comment about my mod and to get it to where it is was about 15 minutes of coding.

Anything past this point starts to get more and more complex. The simplest addition would be to have my mod controlling a different Davon Throttle, but even that would require me to change from "Control KSP's main throttle" to "Control the specified DTC throttle" and the code for that would have to be written from scratch.

Which is why your comment about changing the line you linked in my GitHub won't work. If you change that from 0 to 1, my mod will calculate the thrust needed correctly, but it will then go ahead and set KSP's main throttle to that percentage, not set the DTC throttle to that percentage and so not maintain your velocity.

I am mulling some stuff like this over in my head, but I would have to work with DTC's developer on it and I'm waiting for the 0.24 furor to die down before I try to start collaborating on anything.

D.

Link to comment
Share on other sites

I don't understand why but this mod doesn't work, i don't even have a toolbar....

someone could help me?

If you don't have the Toolbar, the GUI should show itself when you press 'Z'.

The other possibility is that the files are not in the right place. In the .zip file that you download, there is a GameData folder. This should be merged with your KSP-Install\GameData folder so the mod's files end up at KSP-Install\GameData\Diazo\TWR1

If neither of those things fix it, can you please post the output_log.txt file so I can take a look please?

It is found at KSP-Install\KSP_Data\output_log.txt for 32bit and KSP-Install\KSP_Datax64\output_log.txt for 64 bit.

Let me know if that works for you,

D.

Link to comment
Share on other sites

Really?

I have not checked this one yet because I assumed since 0.23.5 to 0.24.0 was okay, 0.24.0 to 0.24.1 would be okay.

Is it all engines, or is it only engines with the ModuleEngineFX module (instead of just the ModuleEngine)?

Looking at the patch notes it looks like the FX modules got tweaked and I guess that broke something.

I'll push an update first thing tomorrow morning, I won't have time to do it tonight.

D.

Link to comment
Share on other sites

Thanks, Diazo. :D I'll see how it does with the stock engines. I rarely use them any more, so it never occured to me. :sticktongue:

EDIT: Yes, the stock engines are doing alright, and even some of the mod engines. If it helps, the part giving me problems is this Helicopter Rotor

Edited by Voculus
Link to comment
Share on other sites

Actually, Diazo, I'm not sure what the deal is. The 24.1 update broke as many mods as the 24.0 version, and a lot of things are not working right at all. Can't have any fun when nothing ever works. Not your fault. I think I'm going to give KSP a little break.

Link to comment
Share on other sites

Ok, I FINALLY figured out what the issue was. It's the modular fuel tanks mod, which I have promptly nuked. There was some error with the fuel weights and tank capacities, causing the engines, stock or mod, to rev up very high for what should have been heavy payloads, but were somehow actually only weighing in at a fraction of their real mass. Hope that makes sense. All is well, your mod is still awesome, and you're still in my last will and testament. :sticktongue:

Link to comment
Share on other sites

Glad to hear you figured it out.

Everything worked fine in my tests, although I did not specifically test the Helicopter Rotor you previously linked.

Are you still having any issues with this mod?

D.

Link to comment
Share on other sites

Everything is working great, Diazo. I want to really thank you for being so quick to fix stuff and being helpful. A lot of mod authors release something, then it breaks, and then they disappear. Supporting your product the way you do is a refreshing change!

Link to comment
Share on other sites

I'm not having a lot of success with this mod. It doesn't always work reliably, which is not a good thing when landing. The upper buttons always work. I can turn off velocity control, set it to zero and do the +1 and -1 increments just fine. The problem is with height control. Half of the time it never come on when it should.

I click the button to turn it on and enter my height to 1000(landing on the Mun) I had thrust warning, but the engines kicked on late and I dipped all the way down to 800 meters and had to climb back up to 1,000. This could have been disasterous if I was at a lower altitude. Later, I took off to search for a different biome. I was skimming the surface pretty fast and low, around 500 meters. I saw some large mountains approaching so I typed in 1000 and activated height control and the throttle barely reacted. Ended up crashing into the side of the mountain.

Another time I was descending and tried to use height control and it didn't even work at all. I entered the height and clicked the button. I watched as I neared the entered altitude and flew past it, almost crashing into the ground, if not for that zero velocity button.

This is a really cool feature, but its not very reliable enough or something is going wrong. It great fun doing suicide burns from orbit on low gravity moons. I just wish it wasn't such a gamble because you never know if its really activated or not.

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