Drew Kerman Posted February 17, 2015 Share Posted February 17, 2015 However, I still haven't figured out the more basic orbital question: how can I determine when one planetary body is crossing through the plane of a second planetary body?I like to let MA do the work for me. Use the Rendezvous Maneuver Sequencer to get the starting orbit of the body (copy to clipboard), delete it from the bodies.ini file (make a backup of course) reload the bodies.ini file then open MA and paste the orbital data into the Initial State. Now just do with it what you will. In your case, the Graphical Analysis tool would be helpful. Quote Link to comment Share on other sites More sharing options...
bk2w Posted February 17, 2015 Share Posted February 17, 2015 (edited) Could the issue be that the definition of a day (in seconds) is different between the two? That would dictate how your flight time bounds (in units of days) are interpreted.A Kerbin day is 21600 seconds, and an Earth day is 86400 seconds. Could this be the problem?Rechecking, I see that the Flight Bounds are the same elapsed time, i.e. the number of "days" in Kerbin Time is 4x the number of days in Earth Time.-bk2w Edited February 17, 2015 by bk2w Quote Link to comment Share on other sites More sharing options...
bk2w Posted February 17, 2015 Share Posted February 17, 2015 I like to let MA do the work for me. Use the Rendezvous Maneuver Sequencer to get the starting orbit of the body (copy to clipboard), delete it from the bodies.ini file (make a backup of course) reload the bodies.ini file then open MA and paste the orbital data into the Initial State. Now just do with it what you will. In your case, the Graphical Analysis tool would be helpful.A capital idea! That approach let me plot out the Latitude over Longitude for both Spaceship Eve and Spaceship Moho, as well as Latitude over Time for Eve. Compare the Latitude plots to locate the line of nodes visually and identify the latitude of crossing, then look up in the time date for the when Eve is nearest that latitude. That identifies the times to within less than 6000 seconds. Interpolate the points, and I can get an estimate that should be accurate to within a few hundred seconds.Specifically, Eve descends through Moho's orbit at time ~3936400 seconds UT and latitude 1.9909° N Latitude. Eve ascends through Moho's orbit at time ~6799500 seconds UT and 1.9909° S latitude. Later nodes occur every 5657995 seconds. These closely align with my eyeballed numbers, as well.All of which brings me to 15252390 seconds UT, which is when Eve descends through Moho's orbit and can be reached in a 2.6km/s transfer. I'm sure there are later transfers that could be more efficient and reach Eve at its nodes with Moho, but this was simply the first one that showed up as anything resembling possible.Thanks for the tip, Gaiiden!-bk2w Quote Link to comment Share on other sites More sharing options...
Drew Kerman Posted February 17, 2015 Share Posted February 17, 2015 Wait, if you were looking to get from Moho to Eve why didn't you just look for a transfer window via KSPTOT? Generally that takes place at periods where inclination is as small as possibleInterpolate the points, and I can get an estimate that should be accurate to within a few hundred seconds.You need to go around and click/right-click/middle-click everything for all the tools in the graph windows. Lots of cool stuff hidden there. For example, with the Data Cursor tool selected, right-click and choose the Mouse Position selection style and you will be able to zoom in (using the zoom tool) and get specific X/Y values to many significant digits. Didja know you can alt-click to set multiple data cursors? Quote Link to comment Share on other sites More sharing options...
bk2w Posted February 17, 2015 Share Posted February 17, 2015 Wait, if you were looking to get from Moho to Eve why didn't you just look for a transfer window via KSPTOT? Generally that takes place at periods where inclination is as small as possibleI did, but due to a bug (see above) I was getting really weird and unattainable sequences. A lot of this effort is to dig into the mechanism used by metaphor (detailed here and here) to get from LKO to LMO in about 2.9k/ms.-bk2w Quote Link to comment Share on other sites More sharing options...
Arrowstar Posted February 18, 2015 Author Share Posted February 18, 2015 I did, but due to a bug (see above) I was getting really weird and unattainable sequences. A lot of this effort is to dig into the mechanism used by metaphor (detailed here and here) to get from LKO to LMO in about 2.9k/ms.-bk2wI guess I don't understand what the bug is still. Have you tried modifying the transfer durations any? The only duration numbers that get put into the algorithm are the flight durations * the number of seconds in a day, so it should be really straight forward... Quote Link to comment Share on other sites More sharing options...
bk2w Posted February 18, 2015 Share Posted February 18, 2015 I guess I don't understand what the bug is still. Have you tried modifying the transfer durations any? The only duration numbers that get put into the algorithm are the flight durations * the number of seconds in a day, so it should be really straight forward...I suspect the problem lies with helper_methods/astrodynamics/lambert.mex. I believe the source code is expecting the time of flight to be expressed in Earth days. If you're passing in the number of Kerbin days, you'll get very weird answers.-bk2w Quote Link to comment Share on other sites More sharing options...
ForeverPig Posted February 20, 2015 Share Posted February 20, 2015 Is there a way to add other planets to the flyby sequencer? It would come in handy for those mods that add planets beond Eeloo's orbit. Quote Link to comment Share on other sites More sharing options...
Arrowstar Posted February 20, 2015 Author Share Posted February 20, 2015 I suspect the problem lies with helper_methods/astrodynamics/lambert.mex. I believe the source code is expecting the time of flight to be expressed in Earth days. If you're passing in the number of Kerbin days, you'll get very weird answers.-bk2wOkay, I'll investigate. Thanks!Is there a way to add other planets to the flyby sequencer? It would come in handy for those mods that add planets beond Eeloo's orbit.Yes, you can load a bodies.ini file containing the relevant planetary information with the File menu on the main KSP TOT GUI (with the porkchop plot). Quote Link to comment Share on other sites More sharing options...
Snoman314 Posted February 22, 2015 Share Posted February 22, 2015 Actually, could you try this new build of KSP TOT? Let me know if it works for you.https://dl.dropboxusercontent.com/u/29126891/KSPTOT_v122_prerelease1.zipWoohoo! It works! (Sorry, but I wasn't able to try it until now.)Anything I should be wary of with that pre-release version, or should I go ahead and start using it? Quote Link to comment Share on other sites More sharing options...
Arrowstar Posted February 22, 2015 Author Share Posted February 22, 2015 No worries, the pre-release is safe to use. Quote Link to comment Share on other sites More sharing options...
Snoman314 Posted February 23, 2015 Share Posted February 23, 2015 No worries, the pre-release is safe to use. Cool, thanks. I have been, and it's made everything go much smoother. I guess in hindsight that every time I tried to optimise a mission that had SOI changes in (relatively) rapid succession, the optimiser would have been crapping out. I've been messing with this sort of mission profile for a while and hadn't been able to figure out why it just wouldn't work. I'm glad I finally posted about it! Quote Link to comment Share on other sites More sharing options...
BruceKnowles Posted February 24, 2015 Share Posted February 24, 2015 (edited) Hmm, the new version is giving me the following error when I try to run it. v1.2.0 seemed to be running fine before I tried v1.2.1http://i.imgur.com/qqojNGT.png?1Hi,I have not seen a response to this request for info yet, although I note that Snoman314 has resolved his problem. I have the same issue with the executable linked in message 1223.Please advise.I notice that this is a wrapped RAR archive. Is it possible to extract this archived directory structure as is and then just run from there?If not, do any registry entries need to be created manually? <and so forth..>Thanks in advance. Edited February 24, 2015 by BruceKnowles Quote Link to comment Share on other sites More sharing options...
Arrowstar Posted February 25, 2015 Author Share Posted February 25, 2015 Can you just try running it again? Maybe restart you computer first? Quote Link to comment Share on other sites More sharing options...
Snoman314 Posted February 28, 2015 Share Posted February 28, 2015 Yeah mine just started working after a while. I don't remember even rebooting. I think I just watched some TV and then tried again. Worked ever since. Quote Link to comment Share on other sites More sharing options...
BruceKnowles Posted February 28, 2015 Share Posted February 28, 2015 Waddya know.... today this program starts up... possibly because I have indeed performed a reboot after a windows update.Thanks all. Quote Link to comment Share on other sites More sharing options...
bk2w Posted March 3, 2015 Share Posted March 3, 2015 Arrowstar,Found a simple bug in the Rendezvous Sequencer: Using the Sun as the central body gets an error message of "Nonlinear constraint function is undefined at initial point. Fmincon cannot continue.". I tracked this down to the optimizer not liking 'Inf' as a return value from rendezvousNonlconFun(), which in turn comes from 'Inf' being returned by getSOIRadius(). I can get by this by editing getSOIRadius() to return something really big like 1e99 instead of Inf.Oh yeah, and they finally rolled out R2014b and I'm giving KSPTOT a workout.-Bk2w Quote Link to comment Share on other sites More sharing options...
Drew Kerman Posted March 4, 2015 Share Posted March 4, 2015 hopefully a small request Arrowstar - could it be possible to have MA handle a state in which Kerbin does not exist? If I delete Kerbin from my bodies.ini file (so I can directly model it in MA) then MA refuses to load since the default state is around Kerbin and it can't find it. Quote Link to comment Share on other sites More sharing options...
Snoman314 Posted March 7, 2015 Share Posted March 7, 2015 Looks like I managed to come up with another crazy mission profile that broke the mission architect's SOI transition code:Here's the mission file:https://drive.google.com/file/d/0BxfgbiRB-sRrTzhwTy1zbEhacG8/view?usp=sharingBasically It won't plot the orbit any further than the transition out of Kerbin's SOI. I'm trying to set up a burn to Eeloo at approx 5km/s. It was working at around 2km/s.I'm using the v1.2.2 files from the other day. Quote Link to comment Share on other sites More sharing options...
Snoman314 Posted March 7, 2015 Share Posted March 7, 2015 Hmm, in hindsight it might be having trouble finding apoapsis of the sun because I've actually set up an escape trajectory, that said I also get the same problem when I try to coast to say, 120 degrees true anomaly. Quote Link to comment Share on other sites More sharing options...
bk2w Posted March 7, 2015 Share Posted March 7, 2015 Hmm, in hindsight it might be having trouble finding apoapsis of the sun because I've actually set up an escape trajectory, that said I also get the same problem when I try to coast to say, 120 degrees true anomaly.If you're on an escape trajectory, it's most likely hyperbolic, which means theres a range of angles on either side of 180 true anomaly that simply don't exist for that orbit. In other words, your escape orbit may never reach 120 degree true anomaly in addition to not having an apoapsis.-bk2w Quote Link to comment Share on other sites More sharing options...
Snoman314 Posted March 8, 2015 Share Posted March 8, 2015 If you're on an escape trajectory, it's most likely hyperbolic, which means theres a range of angles on either side of 180 true anomaly that simply don't exist for that orbit. In other words, your escape orbit may never reach 120 degree true anomaly in addition to not having an apoapsis.-bk2wI'll check, but I think I couldn't even get say, 5 degrees. Quote Link to comment Share on other sites More sharing options...
Snoman314 Posted March 8, 2015 Share Posted March 8, 2015 Oh OK, yeah you're right. If I get a smaller true anomaly that is after the departure from Kerbin, it works fine. If I try to set a true anomaly that would be beyond a certain distance from the sun, then it craps out. So looks like it's just user error after all. Quote Link to comment Share on other sites More sharing options...
JoeGood Posted March 8, 2015 Share Posted March 8, 2015 (edited) Hey Arrowstar I'm trying really hard to use this tool, I can see it might be really helpful if properly used (great job!). I was wondering if there are more tutorials (I already read the kerbin-duna and the kerbin-tylo one) to better understand some functions I still can't figure out. Also, how do i open the .mat example files in the folder? Do i need to have matlab or is there another way? Thanks.EDIT: I just had to load them from the MA itself, shame on me Still, if there are more tutorials out there, let me know! Edited March 8, 2015 by JoeGood Quote Link to comment Share on other sites More sharing options...
Drew Kerman Posted March 8, 2015 Share Posted March 8, 2015 there aren't really any more tutorials. Just spend time trying to do what you want to do and then when you can't do it come here with a good explanation of what you're trying to do and Arrowstar (and me and some others experienced with it) will point you in the right direction and you'll just eventually pick it up as you go along. Worked for me, at least Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.