Jump to content

[0.17] [plugin+part] InterPlanetaryTransfer Calculator 0.1.1!


younata

Recommended Posts

Works for me...

... That's surprising. It'll get fixed sometime after I install mechjeb on here.

what. Ok, I have an idea for why that is. If I'm right, and I shouldn't be, then... wow. This may also solve the mechjeb confliction.

Edit: I can confirm that mechjeb messes with it. I'm attempting my fix.

Hey. guess what. that idea was correct.

Why the **** is there, like, no official documentation for the sdk?

Anyway, you can download the fix, and it should work. http://rachelbrindle.com/ksp/InterPlanetaryTransferCalc.zip same url as before.

Link to comment
Share on other sites

Im afraid this is horrendosly buggy. (is that a word?) first of all, when i hit show calculations, it doesent come up, but it looks like the menu is above it insted of bellow, therefor going off the screen. 2: when i hit f2 then f2 again, mechjeb was gone! it was there, but i couldnt see it! same with esc menu! at first i thought it was because of ISA mapsat, but nope.

Link to comment
Share on other sites

You mean this source?

Because it's totally linked to in the original post.

Also, I want to thank you for this, because I shamelessly borrowed some of your code. (for current phase and ejection angles)

Well, i was hoping that i could see other way of calculating it. Current code isn't perfect, because it assumes that orbits are circular. I use "orbitPercent" to measure planet position (LAN gives initial position, and percent indicates how far planet moved). But when orbit is elliptical, angles are different that expected. But online Calculator equations also cant handle that, so, hmmm ;).

Link to comment
Share on other sites

i have the same bug with the ui window

seems my console gets spammed with

building new possible targets list.

nullrefrenceexception: object refrence not set to an instance of an object

Edited by spl1nt
Link to comment
Share on other sites

This looks really great, but I think I'll hold off until the kinks are worked out. I'm a huge butt about giant un-closable windows. The servo dialogue in Damned Robotics for example, really bothered me.

I've been using the Olex calculator and an on-screen mouse-tracking protractor to calculate my transfers, but this would make it a lot easier, so I hope you keep improving this plugin. I use MechJeb as well and it wouldn't do any good to give you the same feedback as everyone else in the thread :B

Link to comment
Share on other sites

Well, i was hoping that i could see other way of calculating it. Current code isn't perfect, because it assumes that orbits are circular. I use "orbitPercent" to measure planet position (LAN gives initial position, and percent indicates how far planet moved). But when orbit is elliptical, angles are different that expected. But online Calculator equations also cant handle that, so, hmmm ;).

I'm aware it's not perfect. I don't know the math to make it handle more eccentric orbits. I welcome all patches. (This is part of why almost everything[0] required to build the plugin is on github, I am making **** as easy as possible for people to contribute.)

There are also probably bugs in the math code. I'm still not that familiar with c#, so there are probably bugs in it. (That said, there's a small python script in the repo that is correct). (If anyone who actually knows orbital mechanics were to look at this, I'm sure the quality of the results would improve drastically)

[0] I don't have monodevelop, or visual studio on there for obvious reasons. I'm also I don't have copies of the ksp specific dll's (both of these are legal reasons)

Link to comment
Share on other sites

Tried a Duna rendezvous using numbers from olex.

Despite several tries and an exact PPA I still end up undershooting. Could be an issue with this plugin's math.

Probably. I welcome patches, so if someone has a better way (or, if I made a stupid mistake (e.g. used a + instead of a *)), then I'll accept it.

Link to comment
Share on other sites

i have the same bug with the ui window

seems my console gets spammed with

building new possible targets list.

nullrefrenceexception: object refrence not set to an instance of an object

You are great. You just told me precisely what caused that bug. I wish all people who complained of bugs were like you AND ACTUALLY TOLD ME WHAT CAUSED IT.

I installed this mod and reinstalled it several times, but the part is still not showing up anywhere. What's up with that?
Also had this happen until I restarted KSP a few times... so many bugs :(

right, so there's a new version which removes some of the optimizations, but should be a bit more stable.

Also, bug reporting guidelines:

I need the following:

a) a screenshot of the bug.

B) what you did to cause it.

bug reports which are just "OMG, I USED THIS, AND STUFF DISAPPEARED." will be ignored.

Link to comment
Share on other sites

a) a screenshot of the bug.

http://imgur.com/F8xOX

Basically it deletes/hides all windows once I click on them. For testing purposes, I removed all other parts which add custom windows (mechjeb, ISAmapsat etc.), however the bug also occurs on standard windows (pause menu asf.). I'm using v0.04.

Here is what the output_log.txt says about the NullReferenceException:

(Filename: Line: -1)

NullReferenceException: Object reference not set to an instance of an object

at InterPlanetaryTravelCalculator.WindowGUI (Int32 windowID) [0x00000] in <filename unknown>:0

at UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID) [0x00000] in <filename unknown>:0

at UnityEngine.GUI+_Window.Do () [0x00000] in <filename unknown>:0

at UnityEngine.GUI.EndWindows (UnityEngine.IDList idlist) [0x00000] in <filename unknown>:0

at UnityEngine.GUIUtility.EndGUI (Int32 doLayout, Int32 doWindows, UnityEngine.IDList idlist) [0x00000] in <filename unknown>:0

And so on...

B) what you did to cause it.

Clicked on the little "toggle calculation button".

Keep working on it, it will be a great plugin and I shall gift you my firstborn, once you release a stable version.

Link to comment
Share on other sites

http://imgur.com/F8xOX

Basically it deletes/hides all windows once I click on them. For testing purposes, I removed all other parts which add custom windows (mechjeb, ISAmapsat etc.), however the bug also occurs on standard windows (pause menu asf.). I'm using v0.04.

Here is what the output_log.txt says about the NullReferenceException:

Clicked on the little "toggle calculation button".

Keep working on it, it will be a great plugin and I shall gift you my firstborn, once you release a stable version.

I think I have a fix. (honestly, I cannot replicate this, but it happens enough times to others that I'm just going through and trying to fix all possible causes.)

I'm not going to do a release until this is fixed. You can download my current working version on github: https://github.com/younata/InterPlanetaryTravelCalculator/blob/master/KSP/Plugins/InterPlanetaryTravelCalculator.dll?raw=true

If this is still not working, then I'm fairly certain it's an issue with my window_id. (seriously, there is, like, no documentation for the ksp api, I blame this for every possible error.)

Link to comment
Share on other sites

I figured out how to replicate the bug. (start the ship from the vehicle assembly building, not resume a flight. derp on my behalf)

After cleaning up the code quite a bit, I realized that I wasn't adding any checking to make sure that the current vessel wasn't null. I did that, and it went away. I'm fairly certain that it's now stable enough to increment the minor version number to 0.1.0... so, I'm doing that.

Link to comment
Share on other sites

If you're having trouble with the Interplanetary Calculator, you might want to check out the, uh, "competing" Protractor mod. He mad some major GUI overhauls and it now supports not only the planets, but also the moons (and any other future bodies) in the game: http://kerbalspaceprogram.com/forum/showthread.php/21544-Plugin-Part-17-Protractor-Planetary-Lunar-Rendezvous-Mod

Link to comment
Share on other sites

If you're having trouble with the Interplanetary Calculator, you might want to check out the, uh, "competing" Protractor mod. He mad some major GUI overhauls and it now supports not only the planets, but also the moons (and any other future bodies) in the game: http://kerbalspaceprogram.com/forum/showthread.php/21544-Plugin-Part-17-Protractor-Planetary-Lunar-Rendezvous-Mod

This is the thread for OP's plugin, invading other addons' threads to promote other addons is considered very rude.

Link to comment
Share on other sites

^well that's just rude

Also it's working perfectly for me now. thanks! I would like to make a request, make the info shown modifiable via text file. I would love to just see current phase angles. but no biggie.

Whoo. Good to know I'm appreciated.

Yeah, sure, people can put together requests for 0.2

Here's my current thoughts:

- improve math (eccentric (not circular) orbits, inclination, etc.)

- get the window to disappear when the game is paused.

- info shown configurable. (as per your request)

Link to comment
Share on other sites

I have a new weird bug, when I have the window (calculations) open and leave kerbin orbit it freezes/ locks up the screen and makes windows invisible again. And I also agree with improving the math, it would be nice to know the proper inclination and things like that. Keep up the hard work.

Younata if your interested I can model you a part if you would like. Let me know.

Link to comment
Share on other sites

I have a new weird bug, when I have the window (calculations) open and leave kerbin orbit it freezes/ locks up the screen and makes windows invisible again. And I also agree with improving the math, it would be nice to know the proper inclination and things like that. Keep up the hard work.

Younata if your interested I can model you a part if you would like. Let me know.

The temporary solution is to keep it closed so long as you're in kerbol orbit (so long as you're orbiting the sun, just don't show calculation)

I would love to have a part modeled for this!

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