Jump to content

[WIP][1.3] SolarSailNavigator v1.0.9


Recommended Posts

This is absolutely, stunningly amazing, I can't believe I just noticed this now! This reminds me of the (sadly now defunct) Orbit Manipulator... I will try to test this asap :)

A few questions if you don't mind: Is it currently possible to specify the engines that can employ the plugin with MM? I would love to use all those Near Future Propulsion engines with realistic thrust. Are there any limitations with regards to the engines that could be used currently? Thinking of more complicated things like VASIMRs for example... How far is this capable of operating in a planetary reference frame at the moment? Could it be used for an orbital insertion around a gas giant? Could any issues crop up with rescaled solar systems/RSS? If it is functional to a sufficient degree, the RO crowd should love this a lot as well.

Link to comment
Share on other sites

This is absolutely, stunningly amazing, I can't believe I just noticed this now! This reminds me of the (sadly now defunct) Orbit Manipulator... I will try to test this asap :)

Thank you. At the current moment, until KSP-CKAN updates, you will need to download the addon from Kerbalstuff or Github, and install Module Manager.

A few questions if you don't mind: Is it currently possible to specify the engines that can employ the plugin with MM? I would love to use all those Near Future Propulsion engines with realistic thrust. Are there any limitations with regards to the engines that could be used currently? Thinking of more complicated things like VASIMRs for example... How far is this capable of operating in a planetary reference frame at the moment? Could it be used for an orbital insertion around a gas giant? Could any issues crop up with rescaled solar systems/RSS? If it is functional to a sufficient degree, the RO crowd should love this a lot as well.

It should work with any engine that is patched to use the "PersistentControlled" module instead of "ModuleEngines". In the next version, it should just be "PersistentEngine", because I will be moving the navigation controls out of the engine part, so it can access all sails or persistent engines in the vessel. At the moment, the module only uses the engine that it is attached to. That's the only restriction I know of, unless a module modifies an engine in a way that's incompatible. I haven't tried making it work in planetary orbits, so there may be some unexpected behavior if you try. Planetary maneuvers are on my TODO list.

If you're just using the "PersistentThrust" features, and have the controls off, it should work in planetary orbits, you just won't get a trajectory preview. Combined with something like "Persistent Rotation", you could use time warp to raise/lower an orbit by matching the vessel rotation to the gas giant's surface.

One issue I currently have is keeping track of resource consumption other than propellant mass. For some reason, my solar electric test vehicle didn't seem to be balancing energy use by the ion engine with energy generation by the solar arrays correctly at high time warp levels. But, it kept following the trajectory, even if it dropped to 0 ElectricCharge on the batteries. I haven't figured out why that's happening.

Link to comment
Share on other sites

I haven't touched ion drives yet precisely because they're so buffed, and it looks like this fills that hole. Thanks!

You're welcome. Yeah, I figure they buffed the ion engines so much because the game is built around Kepler orbits and high thrust, short duration burns.

Link to comment
Share on other sites

Hmm... Do you have Module Manager installed? It's now required for patching the stock ion engine, which usually only shows thrust in kN.

yes, i have module manager installed (and a lot of other mods). maybe it display 0 kN because the thrust(0.25N=0.00025kN) is lower than 0.00kN?

to use your mod in an other referential than Kerbol, the difficulty is see will be to "cut" the burn in many pieces like this(clic for more, english subtittle):

TrDNesa.png

...in a friendly way, maybe by defining the final wanted orbit / time of each burn / number of burns, the "center" of those burns (Ap on the image) updated at each n+1 orbit.

it will also need to use the classic prograde/radial/... directions instead of "angle of cone/clock" for ion engines.

Edited by Skalou
Link to comment
Share on other sites

yes, i have module manager installed (and a lot of other mods). maybe it display 0 kN because the thrust(0.25N=0.00025kN) is lower than 0.00kN?

If the PersistentThrust module is loaded, and the ion engine is patched to use it, the GUI should have another "Thrust" display at the top, which shows it in everything from mN to kN. Note there's no "Show Controls" button, as this image is from a development version that doesn't have the navigation controls in the engine.

ion_engine_GUI.jpg

to use your mod in an other referential than Kerbol, the difficulty is see will be to "cut" the burn in many pieces like this(clic for more, english subtittle):

http://i.imgur.com/TrDNesa.png

...in a friendly way, maybe by defining the final wanted orbit / time of each burn / number of burns, the "center" of those burns (Ap on the image) updated at each n+1 orbit.

it will also need to use the classic prograde/radial/... directions instead of "angle of cone/clock" for ion engines.

Good point. Calculating the preview trajectory could get pretty slow with a low acceleration vessel in planetary orbit. There are a number of ways I've been thinking of improving things. Like, automatic steering strategies that maximize a particular orbit element, and more efficient & accurate numerical integration of the future trajectory.

Link to comment
Share on other sites

the GUI should have another "Thrust" display at the top,

Right, sorry i didn't had my ees well open and maybe confused with the double display.

Calculating the preview trajectory could get pretty slow with a low acceleration vessel in planetary orbit. There are a number of ways I've been thinking of improving things. Like, automatic steering strategies that maximize a particular orbit element, and more efficient & accurate numerical integration of the future trajectory.

I'm sure you have really good ideas, i wish you will have the time to materialize them! :wink:

Link to comment
Share on other sites

I have released a new version with support for multiple sails and engines, and moves the navigation control into any command pod. See the first post for info.

Unfortunately, CKAN seems to be having trouble again installing the right directories from the .zip file I posted to Kerbal Stuff.

Edit: I pushed a fix which is on KSP-CKAN now.

Edited by mrsolarsail
Link to comment
Share on other sites

  • 5 weeks later...

I have posted v1.0.5 of SolarSailNavigator. Several big changes. Make sure to install PersistentThrust separately - it isn't in CKAN yet: https://kerbalstuff.com/mod/1147/PersistentThrust

Biggest changes are:

- PersistentThrust is now its own plugin

- In-track/Cross-track/Normal reference frame now available

- Change the default Frame/Angles/Throttle/Sail-on/Days/Hours for your navigator

- Type in angles/throttle/time or click +/- buttons

Edited by mrsolarsail
Link to comment
Share on other sites

Wow, this looks awesome! Definitely giving this a go.

Do you know if it's possible to spawn a stock orbit at the end point of your predicted continuous thrust trajectory to provide a rendezvous visualization in game? Perhaps something like a pseudo maneuver node.

In trying to fix a typo, looks like I deleted my post. Well done, ksp forum mobile interface. Above is what I remember from that post.

Link to comment
Share on other sites

Wow, this looks awesome! Definitely giving this a go.

Do you know if it's possible to spawn a stock orbit at the end point of your predicted continuous thrust trajectory to provide a rendezvous visualization in game? Perhaps something like a pseudo maneuver node.

In trying to fix a typo, looks like I deleted my post. Well done, ksp forum mobile interface. Above is what I remember from that post.

It will draw the final orbit on the map, and if you select a target it will draw a line between your end point and the target, as well as give the option to list the difference in final orbit elements. Is this what you were thinking of? I'm open to ideas on how to make rendezvous easier.

Link to comment
Share on other sites

It will draw the final orbit on the map, and if you select a target it will draw a line between your end point and the target, as well as give the option to list the difference in final orbit elements. Is this what you were thinking of? I'm open to ideas on how to make rendezvous easier.

That seems useful as I'm imagining it, do you have a tool to help determine launch windows, and delta V requirements? If so, fine tuning the rendezvous becomes much easier.

You could determine launch windows for a simple transfer iteratively give the vehicle by plotting the continuous burn assuming a circular to circular transfer, using that timing to get an approximate angular separation requirement, then re-calculating the trajectory for the elliptical to elliptical transfer.

It would definitely need to be on a per-vehicle basis, as twr will vary by vehicle design.

Doing this would also tell you the dv for the transfer.

Actually, for a full mission, you could string together a series of these, plan a burn start angle so you eject from your parent body at the right angle for the transfer, then plan the interplanetary burn, rendezvous burn. Hmm, an interesting challenge, I had a matlab script I wrote back in college that worked all this out at some point for the DAWN mission, I think. Got pretty close to their transfer time and trajectory IIRC.

Now, you've probably thought of all this before, I'll have to give some thought to how this would translate to an in-game tool the player could actually use to make transfers.

Link to comment
Share on other sites

That seems useful as I'm imagining it, do you have a tool to help determine launch windows, and delta V requirements? If so, fine tuning the rendezvous becomes much easier.

Not at the moment. Low thrust propulsion gives a lot of flexibility. Sometimes I build a trajectory where I coast at the beginning to help line things up. It's all manual right now.

You could determine launch windows for a simple transfer iteratively give the vehicle by plotting the continuous burn assuming a circular to circular transfer, using that timing to get an approximate angular separation requirement, then re-calculating the trajectory for the elliptical to elliptical transfer.

It would definitely need to be on a per-vehicle basis, as twr will vary by vehicle design.

Doing this would also tell you the dv for the transfer.

Actually, for a full mission, you could string together a series of these, plan a burn start angle so you eject from your parent body at the right angle for the transfer, then plan the interplanetary burn, rendezvous burn. Hmm, an interesting challenge, I had a matlab script I wrote back in college that worked all this out at some point for the DAWN mission, I think. Got pretty close to their transfer time and trajectory IIRC.

Now, you've probably thought of all this before, I'll have to give some thought to how this would translate to an in-game tool the player could actually use to make transfers.

I do want eventually to implement an optimizer that will tune the angles/throttles/times to reach a destination. Starting with a circle-to-circle approximation is one way.An extension of that could include departure and arrival burns. It starts to look like the very expensive Systems Tool Kit (STK, formerly Satellite Tool Kit) that pros use. I am considering a general purpose simulator beyond the scope of continuous thrust propulsion to predict how an entire mission will look before launching, with the option to include some automatic tuning.

I've actually had pretty good luck manually building a trajectory that gets pretty close to a destination. This could be used as starting point for an automatic tuning algorithm. It helps to play with the attitude angle and times at different points of an orbit to see how they affect it, then try and close in on the target.

Link to comment
Share on other sites

Not at the moment. Low thrust propulsion gives a lot of flexibility. Sometimes I build a trajectory where I coast at the beginning to help line things up. It's all manual right now.

I do want eventually to implement an optimizer that will tune the angles/throttles/times to reach a destination. Starting with a circle-to-circle approximation is one way.An extension of that could include departure and arrival burns. It starts to look like the very expensive Systems Tool Kit (STK, formerly Satellite Tool Kit) that pros use. I am considering a general purpose simulator beyond the scope of continuous thrust propulsion to predict how an entire mission will look before launching, with the option to include some automatic tuning.

I've actually had pretty good luck manually building a trajectory that gets pretty close to a destination. This could be used as starting point for an automatic tuning algorithm. It helps to play with the attitude angle and times at different points of an orbit to see how they affect it, then try and close in on the target.

You know, I've often given thought to building something like STK myself, would be nice to plan the mission out in that fashion to give some nice design requirements up front. It'd be quite the undertaking, though. There's a reason that thing is so expensive.

Link to comment
Share on other sites

You know, I've often given thought to building something like STK myself, would be nice to plan the mission out in that fashion to give some nice design requirements up front. It'd be quite the undertaking, though. There's a reason that thing is so expensive.

General Mission Analysis Tool (GMAT) is an open source project by NASA that works very similarly to STK.

I was thinking about experimenting with a modified "Vessel" class that copies an existing spacecraft, and lets you apply events and commands at future times, updating the orbit, resources, and maybe even parts configuration as you go. At the very least, it would make calculating the fuel and ElectricCharge consumption for my navigator easier. The maneuvers in the Navigator would be just one type of future event that could be applied to the simulated vessel. There are other maneuver types I'd like to implement, like automatic orbit raising, in addition to fixed attitude/throttle/time commands.

- - - Updated - - -

Idea: calculate closest approach to target, then burn in a direction that minimizes the closest approach continuously.

Could probably borrow Sarbian's code from mechjeb

I'm looking at something similar, but with low thrust propulsion, you need to be less direct and calculate spacecraft commands to converge on the target orbit elements. There's some research into analytical methods (instead of iterative) that seem to work well. Lots of math. I hope to come up with something that's a bit more interactive than "click a button and let the computer solve it", and I think these will let you do that, by looking at what orbit elements are the furthest off:

Link to comment
Share on other sites

General Mission Analysis Tool (GMAT) is an open source project by NASA that works very similarly to STK.

I was thinking about experimenting with a modified "Vessel" class that copies an existing spacecraft, and lets you apply events and commands at future times, updating the orbit, resources, and maybe even parts configuration as you go. At the very least, it would make calculating the fuel and ElectricCharge consumption for my navigator easier. The maneuvers in the Navigator would be just one type of future event that could be applied to the simulated vessel. There are other maneuver types I'd like to implement, like automatic orbit raising, in addition to fixed attitude/throttle/time commands.

- - - Updated - - -

I'm looking at something similar, but with low thrust propulsion, you need to be less direct and calculate spacecraft commands to converge on the target orbit elements. There's some research into analytical methods (instead of iterative) that seem to work well. Lots of math. I hope to come up with something that's a bit more interactive than "click a button and let the computer solve it", and I think these will let you do that, by looking at what orbit elements are the furthest off:

Excellent, looking forward to it!

In the more near term, did some tinkering last night, and have a couple of questions. For some context, I'm hoping to deploy this as one of our recommended mods for Realism Overhaul.

One thing that's going to present some difficulty is the custom engine module you use, especially since we're already juggling a few other types. I believe near future propulsion uses one, and real fuels uses one as well, though that's less important overall, since this use case trumps the real fuels use case IMO. However, I'll have to talk to NathanKell about adding support for Persistent Engines to RealFuels engine configs, so we can have multiple fuel configs for our ion engines.

So far, no feature requests! We're doing well!

The next thing on my list is compatibility with near future's custom engine modules. To replicate some realistic engine behaviors, he coded up some adjustable-on-the-fly engine modules, which is very cool, but breaks compatibility with persistent thrust. In the near term, we can just force those to use persistent engine, but long term I'd love to either see that supported, or somehow change the engine modules around.

Finally, I'm having a terrible time getting consistent power draw from my engines. Probably me doing something dumb, but in the VAB it claims a draw of 2.3 (modelling NSTAR) , in orbit it claims 3.9, and in time warp it was claiming something like 0.6. Is there an easy way to quantify power draw that you're aware of?

Finally finally, if you like I can polish off your CKAN install files, I built most of the install files for realism overhaul and it's associated mods, so I can say I have a little experience.

Thanks for the awesome mod, this is going to be great, can't wait to fly some proper low thrust trajectories!

Link to comment
Share on other sites

Excellent, looking forward to it!

In the more near term, did some tinkering last night, and have a couple of questions. For some context, I'm hoping to deploy this as one of our recommended mods for Realism Overhaul.

One thing that's going to present some difficulty is the custom engine module you use, especially since we're already juggling a few other types. I believe near future propulsion uses one, and real fuels uses one as well, though that's less important overall, since this use case trumps the real fuels use case IMO. However, I'll have to talk to NathanKell about adding support for Persistent Engines to RealFuels engine configs, so we can have multiple fuel configs for our ion engines.

So far, no feature requests! We're doing well!

The next thing on my list is compatibility with near future's custom engine modules. To replicate some realistic engine behaviors, he coded up some adjustable-on-the-fly engine modules, which is very cool, but breaks compatibility with persistent thrust. In the near term, we can just force those to use persistent engine, but long term I'd love to either see that supported, or somehow change the engine modules around.

Finally, I'm having a terrible time getting consistent power draw from my engines. Probably me doing something dumb, but in the VAB it claims a draw of 2.3 (modelling NSTAR) , in orbit it claims 3.9, and in time warp it was claiming something like 0.6. Is there an easy way to quantify power draw that you're aware of?

Finally finally, if you like I can polish off your CKAN install files, I built most of the install files for realism overhaul and it's associated mods, so I can say I have a little experience.

Thanks for the awesome mod, this is going to be great, can't wait to fly some proper low thrust trajectories!

Thanks for all the feedback. I split PersistentThrust into its own mod and forum, so I'll post my comments over there: http://forum.kerbalspaceprogram.com/threads/133735-WIP-1-0-4-PersistentThrust-v1-0-3-alpha

Link to comment
Share on other sites

  • 1 month later...

Greetz and Thanks ...

First a question on the tutorial. Do I orient the sail so I am looking from the backside (anti-pro grade) of the sail directly at the Sun and have it centered (on all axis) and then set cone to 0 degrees, set then time and lock attitude? This is a point of maximum force on he sail and acceleration. I see that in the numbers.

Secondly, when you say "command", is the sail supposed to orient in real time as I adjust the cone +- 90 or the clock +- 90? If this so, I am not seeing any kind of sail reorientation occur, even if I time forward. I do see that acceleration persists so that is kewl, it's that I can't seem to get the control GUI to orient the sail real time or planned. I also cannot preview on the map. I can't see a predicted orbit (just flashing on occasion from my icon in whatever the select orbit color is), but I do get final element results. They don't seem to matched or at least they are showing the persistent calculation.

I'm running KSP 1.0.5 in two different test installs, one 32 bit the other 64. I've done every version combination of solarsailnavigator and persistent-thrust to no avail. Both of these installs are the bare minimum to try and figure this out....

My base playground in both 32/64 is the following:

KSP 1.0.5

Module Manager 2.6.13

Mechjeb 2.5.4.0

Haystack 0.4.1.0 (Haystack isn't supposed to have any relationships, but I can't a button without toolbar 1.7.10

Hyperedit 1.4.1

Ultimately I want to use Interstellar Extended most importantly, followed closely by Near Future. Of course I dived right installing until I ran into this issue.. tried going backwards and stuff. Then finally started clean with the two above playgrounds... still the same issues.

Anyway, I hope this helps some. I've never been able to play with solar sailing type sims other than GMAT and that is too antiseptic among other issues.

~K

Link to comment
Share on other sites

[quote name='Kreole']Greetz and Thanks ...

First a question on the tutorial. Do I orient the sail so I am looking from the backside (anti-pro grade) of the sail directly at the Sun and have it centered (on all axis) and then set cone to 0 degrees, set then time and lock attitude? This is a point of maximum force on he sail and acceleration. I see that in the numbers.

Secondly, when you say "command", is the sail supposed to orient in real time as I adjust the cone +- 90 or the clock +- 90? If this so, I am not seeing any kind of sail reorientation occur, even if I time forward. I do see that acceleration persists so that is kewl, it's that I can't seem to get the control GUI to orient the sail real time or planned. I also cannot preview on the map. I can't see a predicted orbit (just flashing on occasion from my icon in whatever the select orbit color is), but I do get final element results. They don't seem to matched or at least they are showing the persistent calculation.

I'm running KSP 1.0.5 in two different test installs, one 32 bit the other 64. I've done every version combination of solarsailnavigator and persistent-thrust to no avail. Both of these installs are the bare minimum to try and figure this out....

My base playground in both 32/64 is the following:

KSP 1.0.5
Module Manager 2.6.13
Mechjeb 2.5.4.0
Haystack 0.4.1.0 (Haystack isn't supposed to have any relationships, but I can't a button without toolbar 1.7.10
Hyperedit 1.4.1

Ultimately I want to use Interstellar Extended most importantly, followed closely by Near Future. Of course I dived right installing until I ran into this issue.. tried going backwards and stuff. Then finally started clean with the two above playgrounds... still the same issues.

Anyway, I hope this helps some. I've never been able to play with solar sailing type sims other than GMAT and that is too antiseptic among other issues.

~K[/QUOTE]

Thanks for the feedback. Do your controls have a "Lock Attitude" toggle button? If this is active, the sail should follow the controls. You also want to click "Set to Now" button when starting a new command sequence, to reset the start time to the current KSP time.

A positive "Cone" angle will tilt the sail so the sunlight bounces off of the sail to the left, if you're looking through the sail at the sun. The reflected sunlight will act like rocket exhaust to boost the orbit. A negative cone angle will reflect the light to the right, pushing against the orbit and shrinking it. Hope this makes sense. Once you get the hang of the controls, you can switch to "Map" view and see how different sail angles for different durations affect the future trajectory (check the "Show preview" toggle button).
Link to comment
Share on other sites

Hey Solar, thx for the reply.

Yes, I have the lock attitude button and I can engage it. What I don't understand is that if after I lock the attitude, as I adjust the cone and clock angles, should I be seeing the sail move about the cone/clock in real time? If so, I am not. I can manually move the sail with SAS manuevers but not with the sail gui. I can also see the sail responding to solar wind over time, so I can fly her, just not with the command sequence.

When I input a command sequence, lock the attitude and then hit the set to now button... when I preview I do not see any of the orbit portions in their respective color for each command sequence. I just see the current orbit.

I've been working on my station for a while, so I'll play some more with it this weekend. If it's working for you guys, then I must have dinked something somewhere.... :(
Link to comment
Share on other sites

[quote name='NotAgain']Where do you get solar sails anyway?[/QUOTE]

Along with Solar Sail Navigator found at the top of this forum page, you'll need the SM-Solar-Sail-MK2 part which comes in the [URL="http://forum.kerbalspaceprogram.com/threads/133735-WIP-1-0-5-PersistentThrust-v1-0-4-alpha"]Persitant Thrust Mod[/URL]
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...