Jump to content

[1.12.x] Kerbulator: use your own math!


wmvanvliet

Recommended Posts

Is there anyway to formulate the vessel's inclination with the currently exposed global variables?

Without the vessel's inclination it's holding me back from creating more advanced maneuvers other than simple prograde and retrograde burns.

I found http://en.wikipedia.org/wiki/Orbital_inclination#Calculation and from there it goes deeper and deeper. Trigger warning: math-heavy :D

Has anyone done an "expected burnout altitude" formula?

Do you mean the burnout of a rocket motor or of a jet engine? The jet engine thing is quite easy, the rocket motor one is - in my head at least - much more complicated. Maybe there's a way to work around it if we know the application. ;-)

Edited by Crown
Avoiding douple-posts
Link to comment
Share on other sites

Do you mean the burnout of a rocket motor or of a jet engine? The jet engine thing is quite easy, the rocket motor one is - in my head at least - much more complicated. Maybe there's a way to work around it if we know the application. ;-)

This a kind of thing...

biCDm1K.png

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 months later...

New version: 0.32

Smoothed out a few things and added support for adding alarms if Kerbal Alarm Clock is installed.

- - - Updated - - -

Hi, I'm beginning to try new things, and I wanted to use the Kerbulator in the VAB, is there any way to enable it on that screen?

Thanks for the awesome work.

Kerbulator now works in any scene, not just in flight. It still doesn't give access to numbers related to your engines and fuel, but feel free to use it in the VAB.

Link to comment
Share on other sites

Is there anyway to formulate the vessel's inclination with the currently exposed global variables?

Without the vessel's inclination it's holding me back from creating more advanced maneuvers other than simple prograde and retrograde burns.

The inclination of a body (including your craft) is exposed as {body}.Inc

So the current inclination of the currently active craft is Craft.Inc

It was missing from the documentation about globals (fixed).

Link to comment
Share on other sites

wmvanvliet, found one issue with the latest version (0.32).

It works fine only when Toolbar is not installed. Tested on a clean KSP 1.02 (build 842) install, with or without Toolbar 1.7.9 (latest, compatible with that KSP version).

When Toolbar is installed, the stock Applauncher button does not show, no error is logged however. Toolbar allows to add the Kerbulator button (in each scene), but even when added, they don't show (to note, with Kerbulator button added to Toolbar, an error is logged about icon size mismatch, as Toolbar expects 24x24 instead of 38x38; but even if a correctly sized 24x24 kerbulator.png icon is made available, Toolbar still can't show it).

I have clear that Toolbar was supported by previous versions of Kerbulator, so even if it is no more stated so, some methods may still be in the code to allowToolbar to seize its button. Therefore, none shows on the Applauncher.

Given how large the user base is with Toolbar, this issue may seriously limit the use of Kerbulator. I would be happy to find a new version able to use both the Stock Applauncher or Toolbar (allowing users to select one).

Link to comment
Share on other sites

New version: 0.33, thanks to Diomedea.

1) Blizzy toolbar support is now fixed.

2) Kerbulator now saves functions at a different location

Okay listen up. When you install the update, all your functions will appear to be gone!

This is because Kerbulator now looks for them in a different location. Check the relevant doc entry and copy your functions to the new location.

Also consider adding the atan2(y,x) function. It's useful for calculating eccentric anomaly with regards to quadrants without using if else statements.

3) tan2 and tan2_rad functions are now build-in and work like their C# counterparts.

Link to comment
Share on other sites

I remember this mod from a while ago. Does it support giving the ship commands, like kOS does?

It doesn't provide any autopilot control. It's just a calculator that has access to the game's data. It can, however, create manuveur nodes and alarm clock alarms.

I think it is the perfect middle ground between flying everything manually and using an autopilot mod (either kOS or MachJeb). For example, I just spent all my weekend reading up on how to calculate the time to the ascending node for an orbital plane change script.

Link to comment
Share on other sites

I remember this mod from a while ago. Does it support giving the ship commands, like kOS does?

No.If you want to program your ship, there are better ways to go about it then using Kerbulator. Use kOS, or if it's going to be really math heavy, use KSPTOT as an interface to MATLAB.

Link to comment
Share on other sites

  • 2 weeks later...

can you explain a bit more about what you're trying to accomplish with this math software?

Generally, KSPTOT provides a bridge between KSP and Matlab. So if you want to transfer numbers from KSP to mathematical software, that would be one way to go.

Telemachus dumps out KSP numbers as a web service.

Adding a "save to csv" button seems a really weird thing to add to Kerbulator... but maybe you have a very cool and valid use case.

Link to comment
Share on other sites

It works just fine, I have been looking into Kerbulator but couldn't use it cuz of toolbar, finally a good tool to make me use less Mechjeb.

As to say for realism, the RKK Soyuz TMA has docked only once to ISS out of countless missions. They always use autopilot in space and when they don't 3 pilots will work together to execute maneuver each controlling an axis gimbal, most of the times everything is done automatically by the crafts computer but the numbers are always inserted by engineers at mission control.

A combination of Mechjeb and Kerbulator really gave a new flavour to my space program, even though I know that mechjeb won't miss it's target, I try to use Kerbulator to verify If i could have done the maneuver by myself and the next time I do it without mechjeb.

With all the other tools, you're up to pen and paper and once you start deploying some EPL, station science and remote tech stuff for long ranges, you kinda dont want to calculate all the circularization of your 150 payload deployment missions :P

Anyhow thank you for this tool it is most useful and actually gave me the motivation to get into maths whitchcraft.

Now I just have to spend the next 3 years of my life playing KSP to figure out how to navigate probes without propulsion like JPL with Cassini and Juno :P

Edited by Comatorium420
Link to comment
Share on other sites

  • 1 month later...
any chance of getting either custom input or craft data like mass and current engine stats? Specifically, this would be great for me to use to calculate my burn times from within KSP without needing to use Google on the side-monitor. But currently I have to constantly edit the function to change the craft mass and delta-v

I'll create an issue for it in Github. My aim is to enable access to any and all numbers in the GUI, that means engine stats, mass, and fuel levels as well.

I would(will) abandon KER if(when) this gets implemented. Engineer is a nice tool to have, but a lot of the numbers it gives me, I don't look at. I'd rather put in the math myself to figure out only the numbers I want to know as I need them. Other than that, I love the idea of the mod and the DIY-ness of it. I'll definitely be using this on my next stock-system game (since I assume RSS will break all the planet-oriented variables).

Good luck with the continued development of this plugin, and thanks for all your work so far!

Link to comment
Share on other sites

I assume RSS will break all the planet-oriented variables

Actually... could you give Kerbulator a try with RSS? I think it should work. All globals such as the names of the planets and moons are drawn from the internal "Flightglobals.Bodies" variable, which should now contain "Earth", "Moon", etc. Only the "Sun" is renamed to "Kerbol" (a renaming I should actually remove).

Same story with outer planets mod... it *should* work... but I never tested it.

Link to comment
Share on other sites

Actually... could you give Kerbulator a try with RSS? I think it should work. All globals such as the names of the planets and moons are drawn from the internal "Flightglobals.Bodies" variable, which should now contain "Earth", "Moon", etc. Only the "Sun" is renamed to "Kerbol" (a renaming I should actually remove).

Same story with outer planets mod... it *should* work... but I never tested it.

Huh. Well sure I'll slap it on my install this afternoon and see what happens. If it works I may have to try a game where I don't create maneuver nodes by hand.

Link to comment
Share on other sites

Initial reports say yes, Kerbulator is RSS-compatible! I don't have a lot of time because some things came up, so I just did a basic test for Mars' mass. Here is the result. I don't know the mass of Mars off the top of my head, but I assume this is what NathanKell says it is*. One thing I wanted to check (and will check once I get more time) is getting data about Earth. I remember reading on the RSS github that KSP requires the home planet to have Kerbin as an internal name for anything to work. So I'm wondering if, when specifically calling values for Earth, you would need to refer to it as Kerbin or if it would use Earth, as it's seen in the GUI. I was planning on testing this too really quick-like, but I got ahead of my self and quit out of the game after taking that screenshot, and when the game takes 7-10 minutes to boot because of my potato laptop...

*After a very quick google, it looks like the value Kerbulator popped out is 2 powers of ten higher than Wikipedia's, but it's 8 powers of ten higher than Duna's, so I assume the number discrepancy is probably between RSS and Wikipedia, and Kerbulator isn't messing anything up.

Link to comment
Share on other sites

Probably my final update on the RSS stuff- using Earth gives results, and Kerbin gives an error. The only thing that causes problems is the sun- you have to use Kerbol to get numbers from it, but if you've got that rename coded in, that's not surprising.

Hope this helps somehow! Good luck moving onward with this mod!

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