Jump to content

VTOL project - need coding and maths help


Recommended Posts

I would like to see feasible four-point horizontally-oriented VTOL (Osprey style) for non-perfectly balanced craft in KSP

At the moment, even if your craft is perfectly balanced it is problematic - the best solution I have found is the Throttle Steering mod - this is capable of setting individual thrust levels per engine and also using control inputs to control these levels to let you steer like RCS. When combined with ASAS and RCS (Not thrusters, just RCS mode being on) it can keep an uneven craft in a stable condition, though it over-corrects some.

Personally, I reckon even the level of control that gives is maybe good enough, at least to explore some concepts.

However, there is one minor niggle:

When using a forward-facing, plane style craft (Say with the B9 VTOL engines that can rotate), the retrograde/prograde vectors are going to be up and down, not forward and back. So if coming in for a VTOL landing with a dropship, you either have to land vertically like a rocket, eyeball it or switch control to an up-facing pod, but this then changes the control style, ruining the experience.

Now I can code to a degree, although my only experience with ksp coding was fixing the orbital construction mod, however the problem was not version compatibility, it was optimization (calculating values every tick not using static var) and usability issues (author didn't seem to grasp quirky nature of UI coding) so whilst I am lacking in ksp experience and maths knowledge, I feel that with a little outside experience I can put something together, or assist someone else putting it together by doing some of the grunt work.

For now, I am just proposing taking whatever we can from wherever we can to cobble some ideas together. If we get to a point where we feel a release is merited, then we may have to obtain permission from authors to redistribute or create our own assets, but for now using Throttle Steering and the B9 VTOL engines as a testbed seem like the smart move.

So all that leaves for the moment is the navball mod. I reckon for someone with the right experience, some basic code that just moves the prograde/retrograde markers by 90deg (or inserts some other marker) would be a 5 min job.

Slightly more advanced would be to make the icon follow the current orientation of the B9 VTOL engines. However, if I were provided with a function to insert an icon at an (x) degree offset to the actual prograde as a solution to the previous problem, I could possibly rig this up myself.

In parting, and to whet your appetites for what could be, I leave you with this:

(And yes, I know the orbital physics are all wrong but it is arguably one of the coolest scenes ever, plus B9 has a rear loading ramp like in the film)

Link to comment
Share on other sites

Save for a distinct lack of a deceleration burn kinda ruining that video for me, it was cool. I'm definitely interested in this, and would love to see an XCom style drop-ship or Halo's Pelican in game.

I'm not entirely clear what you're stuck on from your post, but I think I can help; it's a fairly straightforward problem before you add in pivoting engines and thrust vectoring. I think it just boils down to solving a system of (linear?) equations with a throttle value for each engine, multiplied along its thrust transform.

I believe you describe a subset of this problem here, just for bigger engines: http://forum.kerbalspaceprogram.com/showthread.php/28044-WIP-Analytical-RCS-thrust-balancing

Edited by FireStormOOO
added link to similar thread
Link to comment
Share on other sites

Yes, what you are describing is a subset of what my project (referenced above) is aiming to achieve. The next release (soon) is going to include VTOL support for arbitrary static engine layouts and configurations. Eventually I will add gimbal support and rotating engine support.

BTW, my plugin does not "guess" the thrusts required, like standard RCS and Throttle Steering. It calculates them exactly. So there is no overcompensation.

Save for a distinct lack of a deceleration burn kinda ruining that video for me, it was cool. I'm definitely interested in this, and would love to see an XCom style drop-ship or Halo's Pelican in game.

I'm not entirely clear what you're stuck on from your post, but I think I can help; it's a fairly straightforward problem before you add in pivoting engines and thrust vectoring. I think it just boils down to solving a system of (linear?) equations with a throttle value for each engine, multiplied along its thrust transform.

With static engines, it is a linear system. With rotating/gimballing engines, it can be approximated by a linear system. And yes, one of my motivations is the Pelican. Though I am also quite keen to have bases that are constructed in orbit then set down to the surface of the Mun with precision control of detachable engines. The possibilities are endless.

Edited by ZRM
Link to comment
Share on other sites

With static engines, it is a linear system. With rotating/gimballing engines, it can be approximated by a linear system. And yes, one of my motivations is the Pelican. Though I am also quite keen to have bases that are constructed in orbit then set down to the surface of the Mun with precision control of detachable engines. The possibilities are endless.

Oh I'm going to love this. Don't get me wrong, that existing throttle steering plugin has been a godsend, but this... *drools slightly*

Link to comment
Share on other sites

I've been thinking about your ideas relating to the navball. I think the ideal solution would be to not cannibalise the navball for a purpose it was not intended for, but instead add additional displays to the UI, for example showing the RADAR horizontal ground velocity measurements as a vector on a grid, along with landing site and orientation coordinates. If this is made as a display prop in the IVA, I think it would be cool if it is green and flickering slightly, to mimic a cathode ray tube and give off that Kerbal low-tech feel.

Edited by ZRM
Link to comment
Share on other sites

I've been thinking about your ideas relating to the navball. I think the ideal solution would be to not cannibalise the navball for a purpose it was not intended for, but instead add additional displays to the UI, for example showing the RADAR horizontal ground velocity measurements as a vector on a grid, along with landing site and orientation coordinates. If this is made as a display prop in the IVA, I think it would be cool if it is green and flickering slightly, to mimic a cathode ray tube and give off that Kerbal low-tech feel.

I disagree. The navball was 100% intended for this purpose - that is why you land a rocket by keeping the direction indicator inside the retrograde indicator.

The only reason we cannot use this for VTOL craft is because "forwards" is offset at 90deg from the thrust vector, so the pro/retro indicators are out of sight at the top and bottom of the navball.

I like the idea of a special display tho

Link to comment
Share on other sites

  • 2 weeks later...

The only reason we cannot use this for VTOL craft is because "forwards" is offset at 90deg from the thrust vector, so the pro/retro indicators are out of sight at the top and bottom of the navball.

You know you can choose where you control the craft from and the navball changes? As long as your pod is a suitable 90 degrees from your engines it should be fine without any changes...

This is very useful when docking with some 90 degree angled port, for example.

Maybe by default the engine 'gimbals' point it 90 degrees out ready for take off on launch? you can cobble an orientation from the down vector and some arbitrary planar direction... or do something much better where the engine pivot transform is rotated about an axis to point straight down.

Also, the problem with exact calculations and Unity physics in my experience is the integration and quantisation - analytic solutions always have small 'rounding errors' as a result of this. I can imagine it being difficult to avoid wobbling altogether although the scale of this effect might be completely unrelated to the current wobbling with asas...

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