Jump to content

K2-D2


cfloutier

Recommended Posts

New version updated 

https://spacedock.info/mod/3325/K2-D2#changelog

v0.7.1 : important corrections

  • Rebuild with KSP v0.1.2.0 Assemblies
  • Landing : Correction for KSP v0.1.2.0, Landing Touchdown was no more detected.
  • Warp : Correction of WarpSpeed ratio.
  • Execute : Correction of the OverBurn.

Sorry for the troubles in previous version 

Edited by cfloutier
Link to comment
Share on other sites

  • 2 weeks later...

@cfloutier

I used K2-D2 for the first time today, specifically for the landing feature.  Oh my word is that awesome.

The one suggestion I have is that I wish we could select the landing site and have the tool do all the necessary burns (plane change, deorbit, landing) for us.  I did the plane change on deorbit, but when selecting land it literally just applied the brakes and landed where it was and not in the crater I was hoping for.

Other than that, this mod now makes my must-have list.

Link to comment
Share on other sites

Thanks a lot @Scarecrow71

You're right the landing just brake for the moment. and in many situation it burn too much dv for that.
There are much work to do to have a full control on the landing site.  But that's the fun of such a project.  I'll try in the future to configure the Maneuver like you described : plan change, deorbit and brake. 

 

Link to comment
Share on other sites

v0.8.0 !!!!

Features :

  • Lift v1 : UI is quite awfull, but it's working. It uses the KSP 2 SAS to turn in a proper direction during ascent burn

You choose in settings Start Altitude, Wanted Ap and the altitudes where to turn to 45° and 5°. All using ui and sliders. Not quite very UI friendly, I should add an ascent profile graph..

Once Ap is reached burn is stopped and you can finalize the orbit using Circle Tool. Not precise enough for the moment it can be improved too. I usually do a second circularize to fully finalize the Final Orbit.


  • Drone Flight v1 : Funny way to flight. very expensive in dv ....

Can Brake agains Surface Speed or in Vertical mode you can choose your V-Speed and fly on Moons. Still need improvements to remove horizontal speed, but really precise in playing with Vertical Speed and removing gravity.


Improvements :

  • many UI details : main Tabs, added separator, ToolTip position, chapters in settings. Big Work Here.
  • Added a progress bar during burn maneuvers.
  • Landing v3 : better than in previous version. added a TouchDown Button to force to start the final mode.

During Touch-Down the speed depends on altitude. There is no check of current TWR so, use slow mode for heavy landers. I'll adapt to vessel mass and power in future versions.


Fixes :

  • Correction of serious lags when Ui is opened (Int Fields and focus trouble)
  • Execute Node : added more precision options and warp options. The default values where corrected
  • Landing : use sea level if above ground :) and no U Turn facing the sky !
  • Circularize : Corrected the double coninc patches.

Know bugs :

  • Execute node does not work on multi nodes plans ! meaning if you programmed more than one maneuver the dv computed is totally weird....
  • Circularize can sometime create invalid node. please remove nodes and retry.
  • Sometime gizmos on the map are maintained. Or there are blinking pe and ap labels. F5 and F9 should fix the trouble

 

URL : https://spacedock.info/mod/3325/K2-D2#changelog

 

 

Edited by cfloutier
Link to comment
Share on other sites

It is incredible that you have managed to create this mod without any mod tools from Intercept Games - Kudos!!!

This is almost everything I would want from an autopilot, if you are taking suggestions then IMHO the only thing missing here are point in direction/heading (For Aeroplanes in atmosphere incl roll) and point at relative velocity marker for prograde and retrograde to make it easier to rendezvous and  dock. Obviously this mod is already more than essential to me but I figured I'd add my 2 cents :D Thank you again for all your work!

Link to comment
Share on other sites

Thanks @Jahulath

there are many many features that are missing. 

i'm working on autodocking. And the first phase is about brake at nearest point. So it would help rendezvous. 

if you open the debug mode you could see an attitude tab. It's a debug tool i used to create the lift pilot. 

you can choose heading and inclination. If you think ir's useful, i'll add it to default tabs.

I'm also working to enhance the drone mode. To stop horizontal speed while maintaining v speed.

Thanks again for the positive review 

Link to comment
Share on other sites

Hi. I've been working hard on FlightPlan and many ui fixes and clean up k2d2. 

I've added a warp to soi change tool.

Attitude tool will help planes to have a correct elevation and heading. 

And i've added a first step in killing horizontal speed. Not much for the moment it can be enhanced. 

I think i'll post an update next week. If the kerbal gods gives me the force.

 

 

Link to comment
Share on other sites

Hi, thank you so much for adding the Attitude control and a smash of other features! I'm a bit bleary on how it is all intended to work though, I see that I have two sliders, heading and attitude, heading needs to be 90 degrees for a standard takeoff. I'm unclear about the way Attitude is supposed to be working though, is 0 degrees a flat flight where 90 degrees is facing directly up? When I was testing it didn't seem to work as I thought (I might need to make a test rig rather than a plane to be honest) so if you would clarify how you see it working it would probably help me a lot.

One other thing, sliders are lovely for "at some kilometers start your turn" as we did in MJ but a couple of degrees works out to be quite a lot when you reach orbit and elevation could be the difference between reaching that orbit or not for an SSTO. Any chance of a text entry to do this?

 

I still can't believe these tools are being made already, thank you again!

Link to comment
Share on other sites

You're right attitude is not quite useful for the moment. I'm trying to enhance the interface by having booth an efitor field for elevation and small buttons to get up or down by little steps. 

To take off with rocket you'd prefer to use the lift tool. It is not perfect but it is closer to what mech jeb ascent profile was. I still have to continue working on it. Especially on moons. 

Thanks @Jahulathfor the try and feedback. It's always a pleasure. 

And i really need to write a good documentation :blush:

Link to comment
Share on other sites

@cfloutier I think you undersell the Attitude tool, I just flew something like a fighter jet into stable orbit and back to splashdown just east of KSC using it for all in air flight manoeuvres bar a little bit of roll adjustment!

I would say brilliant and exactly what I needed, it's like old mechjeb so seriously limit your flaps to prevent wobbling and strap in for the ride. Now if I could just understand the lock and reset buttons...

Honestly a must have, I'll be able to utilize SSTOs thanks to you.

Link to comment
Share on other sites

Cool @Jahulath

so you'll be glad to see new attitude page ui

 

image.png

The elevation use both slider, editor field and adjust buttons. 

As elevation need real precision I ve tried to make the best UI experiments to see how. To be quick and very precise

The heading is still a simple slider. I'll try to make a better thing later. It have to loop as south. And make it quite tricky to code

image-2.png

And I've added a first warp tool. A really missing feature in current Ksp version 

 

It will be released after a good testing phase

Next week I think.

Link to comment
Share on other sites

Nice! I love the steps in elevation and by the looks of it you made it positive rather than negative :)

If changing the heading UI is a PITA (and I can see how it might be) then perhaps consider setting the end of the bar to be exactly east so for a perfect easterly heading one only has to pull the slider until it stops? If the scale starts at 90.01 east and finishes at 90.00 east you will make it really easy to set up 99.99% of launches but still have the choice if you need to get somewhere difficult like an ISS orbit or retrograde... I cannot praise this mod enough tbh.

Edited by Jahulath
Mispell
Link to comment
Share on other sites

new 0.9.0 version is in SpaceDock

https://spacedock.info/mod/3325/K2-D2#info

v0.9.0

Features :

  • Added function to the open api : StopFlyNode and IsFlyNodeRunning. giving the ability to stop node execution

  • Warp : added a little Warp to SOI Tool

  • Attitude : Enhanced the Attitude controller. Is is now not only in debug mode and have a more stable way to select the direction. can be very useful for planes.

  • Lift : direction is back in main page

Improvements :

  • bew UI textures for Tabs & button
  • new KTools Ui made for FlightPlan
  • Added Repeat Buttons for attitude selection
  • Added new version of editor fields : the value is validated only when Enter/Return is pressed. the yellow color mean than it is not yet used. No more value changes on the fly cause it could crash the vessel if wrong input were typed.

  • Drone : a small Kill H-Speed tool for final precise landing.

  • Altitude Control rather than V-Speed only

Fixes :

  • many little fixes when loading scene (Less NPE)
Edited by cfloutier
Link to comment
Share on other sites

  • 1 month later...

new 0.9.3 version is in SpaceDock

https://spacedock.info/mod/3325/K2-D2#info

v0.9.3

Fix :

  • rebuild for KSP2 v1.3.0
  • small UI fixes

Features:

  • Lift : added a full curve rendering of the ascent profile.

Blue color represent the atmosphere height and white the atmosphere density. Green line is the current vessel's altitude, greys are controled altitudes and cyan the end of atm

 

And i've forgotten the 0.9.2 and 0.9.1 updates

v0.9.2

Fixes : typos and repeat buttons error.

Reupload for ckan.

v0.9.1

Improvements :

== New UI library tools ==

a huge work have been made there !

  • a new Heading selection control. It is an interactive horizontal compass.

You can use it in Attitude ans Lift pages

  • New Fonts, and overall better font rendering and text alignment,
  • All Editor Field : the value is sent to the mech, only if enter key is pressed or focus is changed. It avoid sending a wrong value while typing it ( It could be dangerous during flight)

Yellow : not validated yet, Red : Invalid value, it will be replaced on enter, White : not focused

  • Use of repeat button to fine adjust on each control that would need it

Features:

Drone new UI and options :

  • You can choose between Altitude or V-Speed control.
  • Values are more precises using repeat buttons, text field and a slider at the same time.
  • Rool toward current speed direction. It make it easier to control.
  • New UI Infos

Try the drone pilot it is more precise than ever

Attitude Pilot :

  • like the drone pilot use of repeat buttons, text field and a slider for the elevation.
  • Added the Compass controler for the heading

 

On 5/10/2023 at 3:59 PM, Jahulath said:

Nice! I love the steps in elevation and by the looks of it you made it positive rather than negative :)

If changing the heading UI is a PITA (and I can see how it might be) then perhaps consider setting the end of the bar to be exactly east so for a perfect easterly heading one only has to pull the slider until it stops? If the scale starts at 90.01 east and finishes at 90.00 east you will make it really easy to set up 99.99% of launches but still have the choice if you need to get somewhere difficult like an ISS orbit or retrograde... I cannot praise this mod enough tbh.

The Attitude pilot is more precise than before, it still need a roll correction but it can be really useful for long travels using planes

Qv6kuNQ.png

The last version include an ascent profile curve like it was in mechjeb

Edited by cfloutier
fix misformating
Link to comment
Share on other sites

One thing that sucks with rovers is that the same keys used for accelerate/decelerate (w and s)are also used to pitch up and down.

Mechjeb in KSP1 was brilliant... I'd designed a light, high-speed rover equipped with RCS that between the ASS and Rover dialogs I was able to just set running for rapid traversal of terrain regardless of "Oh no, them Dukes are up to it again" moments.... Wondering if you have an autopilot for rovers in your (rapidly expanding... sorry 'bout that) to-do list.

(Definitely a lower priority than the docking assist though...   )

Edited by Cable Guy
Link to comment
Share on other sites

I've got a quite long todo list for K2-D2 i'm not sure i'll reach each point with success. but ill try

  • Docking assist
  • auto stage
  • use of UITK
  • correction of speed direction during lift 
  • roll correction during attitude pilot (for planes)
  • and rover assist then :)
     
Link to comment
Share on other sites

Are you working to include roll correction (to align docking ports to an angle) in the docking mod similar to MechJeb? While not critical it would be handy for making stations that have an aesthetic form (so could possibly be added in a later version if you're not). 

Edit: by the way I freaking LOVE the lift function. 

Edited by Cable Guy
Link to comment
Share on other sites

  • 3 weeks later...
On 7/8/2023 at 6:47 AM, Cable Guy said:

Are you working to include roll correction (to align docking ports to an angle) in the docking mod similar to MechJeb? While not critical it would be handy for making stations that have an aesthetic form (so could possibly be added in a later version if you're not). 

Edit: by the way I freaking LOVE the lift function. 

Thanks a lot. Yes I've already added the roll alignement for docking. It's still a work in progress and it will take some time cause I've not much time to code those days. 

Thanks for the enthusiasm

 

Link to comment
Share on other sites

  • 1 month later...

@cfloutier When braking for landing, does it give separate consideration to vertical velocity from horizontal velocity or is it just trying to null out the velocity vector as a whole? 

(A use case would be an Apollo style lunar module 'shallow' descent where maybe 90% of the thrust is cancelling horizontal velocity and the remainder used to manage descent velocity)

Link to comment
Share on other sites

  • 3 weeks later...

@Starwaster for the moment it just try to lower whole speed.
A ratio is used to compute speed depending on altitude. It is always facing retro speed direction . 

A better approach would have been to tring to remove horizontal speed by changin the attitude of the vessel. the drone mode have got such a possibility and I will add this optionnal feature to the landing pilot. it could avoid trouble when the horizontal speed is really high  

anyway : a new version of K2-D2 is available with a first draft of the docking pilot.

First draft because  the UI is awfull and there are meny missing features but it can help a lot your final approch by automatically rotating the vessel in the dock direction and centering to the proper approach line

 

Link to comment
Share on other sites

56 minutes ago, cfloutier said:

for the moment it just try to lower whole speed.
A ratio is used to compute speed depending on altitude. It is always facing retro speed direction . 

A better approach would have been to tring to remove horizontal speed by changin the attitude of the vessel. the drone mode have got such a possibility and I will add this optionnal feature to the landing pilot. it could avoid trouble when the horizontal speed is really high  

I wrote something for MJ2 that I never committed that tapped into the suicide burn timer and pitch up enough to spread the necessary burn over the entire estimated time to impact/landing.  (player can input a margin to add to the timer if the lander doesn't seem to be  pitching up enough). It relied on calculations already being performed by MJ. Could something similar be useful here?

Quote

anyway : a new version of K2-D2 is available with a first draft of the docking pilot.

First draft because  the UI is awfull and there are meny missing features but it can help a lot your final approch by automatically rotating the vessel in the dock direction and centering to the proper approach line

Can't wait to try it!

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