Jump to content

[WIP][1.3] SolarSailNavigator v1.0.9


Recommended Posts

SolarSailNavigator is a new plugin (ALPHA: you have been warned) to navigate continuous thrust spacecraft with solar sails, ion engines, and similar propulsion systems. The goal of this plugin is to make solar sailing and continuous thrust engines a practical means of travel throughout the KSP solar system. The modules PersistentThrust and ModuleManager are required.

Solar_sail_controls.jpg

Ion_engine_controls.jpg

Ion_engine_navigation.jpg

The Module Manager plugin is now required. Download the zip file from the latest release, and unzip into KSP's GameData folder: https://github.com/bld/SolarSailNavigator/releases

Also available on CKAN

The source code and README file are available at: https://github.com/bld/SolarSailNavigator

Tutorials to walk you through the current features are at: https://github.com/bld/SolarSailNavigator/wiki/Tutorials

The current features are:

  • Command the attitude and throttle of a vessel during realtime and timewarp for long duration, continuous thrust missions
  • Lock the vessel attitude relative to a reference frame that rotates around the sun
  • Schedule multiple attitude and throttle maneuvers of specified duration in days and hours
  • Preview the future trajectory and the final orbit those attitude maneuvers produce
  • Select a target object, and see how far off you are at the end of the maneuver sequence
  • Use multiple persistent thrust engines and solar sails
  • Control all sails and persistent thrust engines from any command pod
  • Type in angles/throttle/days/hours
  • Change default control values on a per vessel basis for new command segments
  • Two reference frames available
    • Radial/Tangential/Normal with Cone/Clock/Flatspin angles
    • In-track/Cross-track/Normal with Flight-path-angle/Azimuth/Flatspin angles

Known issues and limitations

  • Really only supports trajectories orbiting the sun. Sailing around a planet or moon hasn't been tested, and tools to help navigate around a planet haven't been written.
  • Plotting trajectories is entirely manual, and is time consuming, especially if you are trying to accurately rendezvous with a target. It is suggested to have a backup high thrust propulsion system to close the gap. Future versions of SolarSailNavigator may have a "fine tuning" tool that takes your initial trajectory and hones in on the target orbit.
  • At high time warp, the ElectricCharge usage of an ion engine spacecraft has an error where stored energy drops (even to 0), even though energy production is high enough. The vessel keeps operating, and the propellant mass use works correctly.
  • Preview doesn't detect when the trajectory enters the sphere of influence of another body
  • Final orbit not drawn when parabolic or hyperbolic
  • Recalculate target line and error when new target is selected - toggle "Show Preview" to workaround
  • Some important convenience features are not implemented yet:
    • Automatically tune the trajectory to rendezvous with a target
    • Show start date/end date/duration in years/days/hours/secs
    • Check mass and resource use of persistent engines during command sequence against remaining
    • Check resource rate (e.g. Electric Charge) against vessel generating capacity
    • Update the vessel orbit state when you leave it to work on something else and come back ("Sails on Rails")

Changelog: see  https://github.com/bld/PersistentThrust/releases

Edited by mrsolarsail
Updated to work with KSP 1.3
Link to comment
Share on other sites

Looking very interesting! perhaps we can also adapt this for other low thrust propulsion methods

What do you think about the idea of putting the solar Engine in a separate Mod, since it's completely different from all KSPI engines which require a lot of power?

Edited by FreeThinker
Link to comment
Share on other sites

Thanks. Yes, I think it could be made to work with other low thrust, continuous propulsion. In addition to the force & orbit perturbation models, it would need a model of mass flow rate to correctly predict and apply the acceleration.

Do you mean the sail? It does work very differently, and didn't take much work to pull out as a standalone plugin. I am considering making the steering & navigation system standalone, so that the sail plugin only includes the force & orbit propagation model, and the control & navigation can be generalized to work with propellant-using low thrust systems.

Link to comment
Share on other sites

Ok, so you already riped out the solar sail? Great, then I can remove is from KSPI an revert to your mod when people want to use solar sails.

Say, could you help me modify the Magnetic Nozzle to create to create a continious acceleration like the Solar Sail. It can now generate Very High Isp. It should be enough to allow traveling to other solar systems

Edited by FreeThinker
Link to comment
Share on other sites

Looks good! I love the idea of having a huge surface able to transfer photon momentum to a payload. I just had a look trying to work out when the concept first surfaced (heh), turns out over 400 years ago. Time to try out my space legs and give this mod a whirl. Will work the whole Blackbeard thing in later :)

Link to comment
Share on other sites

Looks good! I love the idea of having a huge surface able to transfer photon momentum to a payload. I just had a look trying to work out when the concept first surfaced (heh), turns out over 400 years ago. Time to try out my space legs and give this mod a whirl. Will work the whole Blackbeard thing in later :)

Cool! Let me know how it works for you.

Link to comment
Share on other sites

It would not only be nice for solar sails, but also other low propulsion methods. The problem however is much harder that it seems because it will need to take in account external forces that effect the ship. Fortunatly sor solar ships, this is only the Sun and the angle towards it. For electric engines it becomes muc harder as you need to get the power from somewhere.

Link to comment
Share on other sites

It would not only be nice for solar sails, but also other low propulsion methods. The problem however is much harder that it seems because it will need to take in account external forces that effect the ship. Fortunatly sor solar ships, this is only the Sun and the angle towards it. For electric engines it becomes muc harder as you need to get the power from somewhere.

Shouldn't be that difficult. While in interplanetary space there isn't anything to block your sunlight. And RTG's are independent of your trajectory.

Anyway, very interesting little mod. I really hope you'll get ion engines to work though, looking forward to a realistic ion engine mission.

Link to comment
Share on other sites

This is literally the problem with navigating using a solar sail that I was thinking about when considering attempting to make such a craft. Unattended navigation, however, is going to be a must... or at least the ability to track how long it has been since the last time the craft was referenced (either by switching to it or loading its on-rails position) and updating its position based on where it should be. Ideally you would set up a transfer using the sails and then go do something else while the solar winds push your craft to the spot you want. Of course, deploying and retracting the sails should be done in person. Same for ion engine crafts, where the only thing that should be happening unattended is the thrust, but any modification to the thrust level should be done in person. At least, that's my thought process.

If that can't be achieved, I'd settle for the craft being able to continue with the maneuver while I am focused on another nearby craft so that I can control a larger formation of vessels all making use of sails for maneuvering colony modules ahead of the crewed mission.

Finally, way down the line, this would be an awesome add-on for mechjeb to let its auto-calculation control where and when the sails need to be used to get the craft to a specific location.

Link to comment
Share on other sites

This is literally the problem with navigating using a solar sail that I was thinking about when considering attempting to make such a craft. Unattended navigation, however, is going to be a must... or at least the ability to track how long it has been since the last time the craft was referenced (either by switching to it or loading its on-rails position) and updating its position based on where it should be. Ideally you would set up a transfer using the sails and then go do something else while the solar winds push your craft to the spot you want. Of course, deploying and retracting the sails should be done in person. Same for ion engine crafts, where the only thing that should be happening unattended is the thrust, but any modification to the thrust level should be done in person. At least, that's my thought process.

If that can't be achieved, I'd settle for the craft being able to continue with the maneuver while I am focused on another nearby craft so that I can control a larger formation of vessels all making use of sails for maneuvering colony modules ahead of the crewed mission.

Finally, way down the line, this would be an awesome add-on for mechjeb to let its auto-calculation control where and when the sails need to be used to get the craft to a specific location.

Interesting point. To produce the preview, I'm already calculating in advance where the sail should be. By saving the preview data to persistent variables, it could be used to update the orbit when you focus back on it.

I have experience using numerical optimization to calculate the sail angles & times to target a desired orbit, like gradient methods and genetic algorithms. So, I plan on adding that feature. Manually plotting a course that gets you close can serve as a starting point.

Link to comment
Share on other sites

Hi mrsolarsail..

First let me said that I support this in a 100%, I was waiting the right momement to make a request for a mod like this since long time. This was like a free wish.

Second: thanks for a standalone app for solar sails.

Third: thanks for try a new control trajectory special for sails.

I could not test it very well, I am using the official KSP version updated without mods, only the solar sail mod.. After play a little bit with your controls. The game crash, maybe is a personal issue, I dont know yet. I already try this 3 times, always the same crash outcome. So still I dont understand very well the controls and your system.

So sorry if I will suggest something that you already solve it in a simple way.

The first time I try the interstellar solar sail (which I install only for solar sails), I was able to achieve planet encouters after hard but without enoght accuracy.

Then I realized that the maneuver node it confuse much more than help. We need a special maneuver node for solar sails.

Normal

manuver_node_cartesian.jpg

Solar Sails

manuver_node_sail.jpg

Those are the only directions in which we can accelarate, in a polar coordinate system, where the current amount set for each direction it counts as time at certain angle, showing the prediction orbit, after all corrections it will give us a maneuver marker on the navball, it will be nice an option to keep the sail pointing to the maneuver marker in time warp.

We can add other maneuver nodes over the predictions.

I imagine you already have the math to make orbit predictions, in case you dont, I can search it and attach the link, I saw it before. Is a formula that works in polar coordinates which has into account the time, angle, gravity , etc. Drawing the trajectory spiral in 3d.

Tell me a little more about your system. You will notice that almost all solar sails post in this forum are mines XD

Ok I see the info in the github :)

Edited by AngelLestat
Link to comment
Share on other sites

It would not only be nice for solar sails, but also other low propulsion methods. The problem however is much harder that it seems because it will need to take in account external forces that effect the ship. Fortunatly sor solar ships, this is only the Sun and the angle towards it. For electric engines it becomes muc harder as you need to get the power from somewhere.

If the sail foil of the solar sail is made of or covered with thin film solar cells a lot of electric power would

be available for electric thrusters. The sail would not alone be used for propulsion but also for energy harvesting.

The large surface of a solar sail spacecraft could generate more energy than todays satellites have available for operation. Though the loss of reflection through solar cells could cut the solar radiation force, which propells the sail, almost in half.

Link to comment
Share on other sites

The idea of this mod sounds brilliant, three questions:

- Does this add/plan to add solar sails, or just a way solar sails can operate?

- Does this work for other low-thrust propulsion methods (for example, does it make a 10-hour burn practical?)

- Atomic rocket's engine list has a large section on solar sails, have you looked at that?

Link to comment
Share on other sites

Awesome mod effort!

- Does this add/plan to add solar sails, or just a way solar sails can operate?

- Does this work for other low-thrust propulsion methods (for example, does it make a 10-hour burn practical?)

- Atomic rocket's engine list has a large section on solar sails, have you looked at that?

Pretty sure yes to all three, at least eventually.

Link to comment
Share on other sites

Awesome mod effort!
The idea of this mod sounds brilliant, three questions:

- Does this add/plan to add solar sails, or just a way solar sails can operate?

- Does this work for other low-thrust propulsion methods (for example, does it make a 10-hour burn practical?)

- Atomic rocket's engine list has a large section on solar sails, have you looked at that?

Pretty sure yes to all three, at least eventually.

Would this also support Dusty Plasma Sails?

Link to comment
Share on other sites

Would this also support Dusty Plasma Sails?

Only clean plasma sails. Dusty ones will require an add-on that is specifically built to handle the dusty nature of the dusty plasma sails. I would recommend cleaning them before use in any case.

Link to comment
Share on other sites

I am a long time ksp-interstellar player but did not try solar sails before. I am seriously considering it now. It would be great for those sat positioning missions and relays for remote tech through the solar system.

Link to comment
Share on other sites

Ok I tested one more time and it works fine, maybe I had a memory issue the last time.. not sure why because I dint have any other mod. Maybe other software running at the same time or long time without restarting the PC.

Mod: I like the predictions and how easy is now to make spirals towards sun. The only thing that I dont like, is that it does not help to a newbie to understand the physsics behind solar sails, because it does all automatic and it does not show the right angles in the navball. For me is not as intuitive as it will be to work with a real modify maneuver node and a way to force the sail ship to rotate following the right angle. But there are also good things about your way.

One advice, the angle thing is confusing.. There is not point to have angles beyond 45o degress, because even if you reduce your normal acceleration vector, you also reduce your prograde or retrograde vector, which does not help in nothing.

Would this also support Dusty Plasma Sails?

I read about this some years back but I never understood it very well, I was not sure how they wanna accomplish all that. Now I read a new power point presentation that explain in more detail how it will works. Its seems solid, it deserve more attention and money for its research.

For those who still never hear about it:

http://www.rbsp.info/rbs/PAPER/STAIF02/index.html

About how to include this to KSP.. mmm not sure.. that is a work for an expert moder.

The current solar sail part used, due its acceleration force 1.3N, It should have 400meters X 400meters = 160000 m2

If we take that at 1au (kerbin distance from kerbol) we have 1360w/m2, then it give us:

F = 2P/c --> 2*217600000/300000000 = 1.3N

Of course KSP cant deal with such higher scales, so is all 1/10 --> 40m X 40m sail, the dimentions that seems to apply in the model part. But the mass is 1T, which it fix with the current mass of a real solar sail of 400m*400m using current solar sails materials as the Sunjammer, which is a density of 6g/m2 (including support structure) * 160000 = 1 metric tonne.

It will be nice to have different solar sails technologies, this will provide different densities and max temperature parameters.

Also it will be nice to include a Dusty Plasma Sails as you said, it will have a density of 0.01 g/m2 with a reflectivity of 1%, this increase just the particle effect scale, (as a magnetosphere), the model it will be like just a wire loop where the dust is injected to inflate the plasma. I dont know much about modding, but it represent some issues about graphics, cpu performance and how accurate you mimic the physsics.

Maybe the solar wind effect can be avoid it.

Edited by AngelLestat
Link to comment
Share on other sites

Ok I tested one more time and it works fine, maybe I had a memory issue the last time.. not sure why because I dint have any other mod. Maybe other software running at the same time or long time without restarting the PC.

Mod: I like the predictions and how easy is now to make spirals towards sun. The only thing that I dont like, is that it does not help to a newbie to understand the physsics behind solar sails, because it does all automatic and it does not show the right angles in the navball. For me is not as intuitive as it will be to work with a real modify maneuver node and a way to force the sail ship to rotate following the right angle. But there are also good things about your way.

One advice, the angle thing is confusing.. There is not point to have angles beyond 45o degress, because even if you reduce your normal acceleration vector, you also reduce your prograde or retrograde vector, which does not help in nothing.

I've had a busy couple of days, so I'll work through the feedback one at a time. I'm glad you got it to work, and thank you for the feedback. The preview calculates a lot of intermediate orbits, which may be why you had problems. I need to sample & save fewer of them, which should reduce the calculations and memory used when redrawing the preview.

I have a companion project called the Solar Sail Flight School to explain the physical principals of solar sailing. I agree that this plugin assumes a lot of knowledge in its current form. It's similar to how professionals plot trajectories. What do you think about adding some tutorial features, like I have in the flight school? A realistic attitude control mode, with solar torque, is another possibility. http://flightschool.solarsails.info

I'm working on some illustrations to explain the reference frames and angles. The "Cone" and "Clock" angle are common terms used by pros. They are relative to the frame described here (though, mine are a little different). "Clock" rotates about the position vector of the sail from the sun. "Cone" then rotates about the orbit normal vector (after it's been rotated by the "Clock". I'll add more illustrations soon. https://github.com/bld/SolarSailNavigator/wiki/Reference-Frames

RTNFrame.png

I like to allow up to 90 degrees Cone angle, because it lets you "turn off" the sail without retracting it. When building trajectories, you want to flexibility to dramatically reduce thrust, so that you end up in the right place. The example trajectory I have in the tutorial goes up to 75 degrees cone angle. https://github.com/bld/SolarSailNavigator/wiki/Tutorial%3A-Trajectory-planning

Link to comment
Share on other sites

If the sail foil of the solar sail is made of or covered with thin film solar cells a lot of electric power would

be available for electric thrusters. The sail would not alone be used for propulsion but also for energy harvesting.

The large surface of a solar sail spacecraft could generate more energy than todays satellites have available for operation. Though the loss of reflection through solar cells could cut the solar radiation force, which propells the sail, almost in half.

Good point. I think it's like allocating mass to payload, which slows the sail down, but lets you do useful things with it. If you devote a fraction of the sail's substantial area to photovoltaics, you can generate a lot of power to do something useful with. Japan's IKAROS solar sail tested thin film PV cells embedded in the sail. They plan on building a 2nd generation craft, and the PV cells will power ion engines that will serve as a 2nd stage to rendezvous with Jupiter and the Trojan asteroids. Sails have good thrust by themselves close to the sun, and use no propellant. Out at Jupiter, their thrust is very low (~1/27th), but the solar power over a large array is still high enough for ion engines.

I think it would be very interesting to add options features like hybrid solar sails / solar power arrays. Any large, lightweight spacecraft turns into a solar sail - whether you want it to or not.

- - - Updated - - -

The idea of this mod sounds brilliant, three questions:

- Does this add/plan to add solar sails, or just a way solar sails can operate?

- Does this work for other low-thrust propulsion methods (for example, does it make a 10-hour burn practical?)

- Atomic rocket's engine list has a large section on solar sails, have you looked at that?

- This includes a solar sail part, with integrated navigation tool. I'm probably going to separate it, though, so you can apply the navigation tool to any low thrust part, like sails and ion engines.

- Not yet.

- Could you post a link to Atomic rocket's engine list? I'm not familiar with it.

- - - Updated - - -

Awesome mod effort!

Pretty sure yes to all three, at least eventually.

Thank you!

- - - Updated - - -

Would this also support Dusty Plasma Sails?

Not yet, but I'd like to make it work for any low thrust propulsion system.

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