Jump to content

[WIP][1.3] SolarSailNavigator v1.0.9


Recommended Posts

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 did a quick read on your code searching something as trigonometric functions to see how you make the preview, but I could not find it.. If you have time, can you point me the code line and the file?

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

Nice page you have there. You are a solar sail fan or you work with something related?

In that tutorial is not mention how the solar sail move and how to realize the most basic maneuvers. I can try to make a resume if you want. About a realistic attifude control mode sound great, but not sure how much time would take to the sails to turn, those are days that may change severely your preditions.

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

Yeah I saw that in solar sails books, you can extract the same image from those, they have a better perspective were is easier to understand the reference frame.

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

Ok, so you use higher angles as a way to "throttle down" instead add 90o sections on the orbit?

I hope you can find moders willing to help you with the new parts or models that you may need in the future.

Take care.. Any thing that you need, ask.. Maybe I would not be able to help you, but we never know..

Link to comment
Share on other sites

I did a quick read on your code searching something as trigonometric functions to see how you make the preview, but I could not find it.. If you have time, can you point me the code line and the file?

The "PropagateOrbit" function (currently in SolarSailNavigator.cs) is what generates a preview segment. It calls "PerturbOrbit" repeatedly from the initial time (UT0) to the final time (UTf) to generate a sequence of intermediate orbits. "PerturbOrbit" is used by "OnFixedUpdate" each time step to increment the orbit velocity by the sail acceleration multiplied by the time step size (when in timewarp. In realtime, OnFixedUpdate calls "vessel.ChangeWorldVelocity" with the sail acceleration times the time step size. The only trig is in the attitude calculation (RTNFrame, SailFrameLocal, and SailFrame) that turn the Cone and Clock angles into a sail attitude.

Nice page you have there. You are a solar sail fan or you work with something related?

In that tutorial is not mention how the solar sail move and how to realize the most basic maneuvers. I can try to make a resume if you want. About a realistic attifude control mode sound great, but not sure how much time would take to the sails to turn, those are days that may change severely your preditions.

Thanks. I do on occasion work professionally on solar sails (when there's funding - which isn't often), and it's been a hobby for a long time. The tutorial has a long way to go. My goal is for a student to build up - incrementally - a physical intuition for how a sail reflects light and generates thrust, then go into steering and orbits. Yeah, attitude control can take hours to maneuver a realistic sail. I was just thinking of a demo mode. It's a small perturbation to longer trajectories. Makes sailing close to planets very difficult, though, where things happen a lot faster.

Yeah I saw that in solar sails books, you can extract the same image from those, they have a better perspective were is easier to understand the reference frame.

I have some more diagrams like the one I posted, I just need to clean them up. I do use a slightly different interpretation of "Clock" angle that I think makes a little more sense, where 0 degrees means in-orbit-plane rotations, and 90 degrees means out-of-plane.

Ok, so you use higher angles as a way to "throttle down" instead add 90o sections on the orbit?

Yes, or coasting. When time passes beyond the end of the attitude maneuver sequence, the sail automatically goes to 90 deg, so it stops changing the orbit.

I hope you can find moders willing to help you with the new parts or models that you may need in the future.

Take care.. Any thing that you need, ask.. Maybe I would not be able to help you, but we never know..

Yeah, there are definitely things I could use some help with. One is the lines I use to draw the preview. I got LineRenderer to work, though I'd prefer lines that are a constant width on the screen no matter what the zoom level, like the orbit lines in map view. I heard about VectorLine, but couldn't figure out how to get it to work. Are you familiar with that?

I would also like to figure out how to create more sail models. I made some in Blender with curved sails, and parts like steering vanes. I just need to follow a guide, I think, but if somebody wants to help me model, I'd appreciate it.

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.

I hope this can help with that task. With 3-body gravity (sun/planet/spacecraft or planet/moon/spacecraft), solar sails would even make interesting communications satellites themselves. The thrust of a sail can create "artificial Lagrange points" that do things like hover north or south of the natural Lagrange points, with visibility of the polar regions and all satellites in orbit. Here's an illustration of the Sun-Earth ones.

ALOs.png

Link to comment
Share on other sites

The "PropagateOrbit" function (currently in SolarSailNavigator.cs) is what generates a preview segment. It calls "PerturbOrbit" repeatedly from the initial time (UT0) to the final time (UTf) to generate a sequence of intermediate orbits. "PerturbOrbit" is used by "OnFixedUpdate" each time step to increment the orbit velocity by the sail acceleration multiplied by the time step size (when in timewarp. In realtime, OnFixedUpdate calls "vessel.ChangeWorldVelocity" with the sail acceleration times the time step size. The only trig is in the attitude calculation (RTNFrame, SailFrameLocal, and SailFrame) that turn the Cone and Clock angles into a sail attitude.

Hi mrsolarsail, I thought that maybe I could find an equation that might help you to plot the orbit prediction with less cpu, but I was wrong.

The equation that I remember works only for 2d spiral trajectories over a choosen ecliptic, but not all possible orbits works over a choosen eclipctic, in fact we can float over the polar region of the sun if we want.

The equation that I was mention was this:

http://ccar.colorado.edu/asen5050/projects/projects_2004/tetzlaff/

3.0 Background and Conceptual Development of Logarithmic Spiral Trajectories

But you know a lot more of this than me, so I doubt I will be able to help.

For those that wants to check the same function, "propagateOrbit" is in Preview.cs, perturbOrbit is at SolarSailNavigator.cs as is mention.

Thanks. I do on occasion work professionally on solar sails (when there's funding - which isn't often), and it's been a hobby for a long time. The tutorial has a long way to go. My goal is for a student to build up - incrementally - a physical intuition for how a sail reflects light and generates thrust, then go into steering and orbits. Yeah, attitude control can take hours to maneuver a realistic sail. I was just thinking of a demo mode. It's a small perturbation to longer trajectories. Makes sailing close to planets very difficult, though, where things happen a lot faster.

I found some papers that deal with solar sail navigation centered in planets. They are all kinda hard.

Also papers about how to calculate the best time launch to interplanetary transfers.

I have some more diagrams like the one I posted, I just need to clean them up. I do use a slightly different interpretation of "Clock" angle that I think makes a little more sense, where 0 degrees means in-orbit-plane rotations, and 90 degrees means out-of-plane.

Yeah that, and some intermediate tutorial resume about how a solar sails work.. The solar sail wiki page goes deep into details, it will be nice a quick resume to satisfy those with a small curiosity on the topic.

Some info to add to your solar sail part mod the day you make it, in case you want to leave this plugin for a more general purpose.

I will make a small tutorial so you have an idea of the things that a noob like me might find intesting for a first quick read.

That maybe helps you to make your solar sail introduction text.

Yeah, there are definitely things I could use some help with. One is the lines I use to draw the preview. I got LineRenderer to work, though I'd prefer lines that are a constant width on the screen no matter what the zoom level, like the orbit lines in map view. I heard about VectorLine, but couldn't figure out how to get it to work. Are you familiar with that?

I am not, sorry :(

I never code in C++ or any code oriented to object, with the PHP exception, but without much experience either.

There is a IRC channel that all ksp moders use. Try to ask there.

I only can help you with the appearance of your http://flightschool.solarsails.info/ page if I found time later.

Edit: I still dint test the new version, I wil try later.

Edited by AngelLestat
Link to comment
Share on other sites

Hi mrsolarsail, I thought that maybe I could find an equation that might help you to plot the orbit prediction with less cpu, but I was wrong.

The equation that I remember works only for 2d spiral trajectories over a choosen ecliptic, but not all possible orbits works over a choosen eclipctic, in fact we can float over the polar region of the sun if we want.

The equation that I was mention was this:

http://ccar.colorado.edu/asen5050/projects/projects_2004/tetzlaff/

3.0 Background and Conceptual Development of Logarithmic Spiral Trajectories

But you know a lot more of this than me, so I doubt I will be able to help.

For those that wants to check the same function, "propagateOrbit" is in Preview.cs, perturbOrbit is at SolarSailNavigator.cs as is mention.

You're very well read on the subject. Generally, you just need to numerically integrate the force equation of a sail. The logarithmic spiral is the rare case of an analytical solution. Unfortunately, it's not very useful. I think it would be an interesting exercise to use a rocket to start one and set the sail to the appropriate angle.

I found some papers that deal with solar sail navigation centered in planets. They are all kinda hard.

Also papers about how to calculate the best time launch to interplanetary transfers.

That's true. I was thinking of setting up some automatic modes like orbit raising to escape, orbit lowering to capture, inclination changes, circularization, etc. I need to work out the equations from those papers. It would work by calculating the optimal sail angle for maximizing the change in semimajor axis, inclination, eccentricity, etc. There are analytical solutions for those steering strategies.

Yeah that, and some intermediate tutorial resume about how a solar sails work.. The solar sail wiki page goes deep into details, it will be nice a quick resume to satisfy those with a small curiosity on the topic.

Some info to add to your solar sail part mod the day you make it, in case you want to leave this plugin for a more general purpose.

I will make a small tutorial so you have an idea of the things that a noob like me might find intesting for a first quick read.

That maybe helps you to make your solar sail introduction text.

I would really appreciate help developing the solar sail tutorial materials. For the next step in the flight school, I wanted to show how orbits work, and how the force on a sail changes them. Then, it would overlap with the KSP plugin.

- - - Updated - - -

I don't know if it's something you'd need to consider, but I want to be sure you're aware of the Persistent Rotation mod. I'd hate for it to be incompatible with this.

I have heard of the plugin, though I haven't tried it. It probably conflicts with SolarSailNavigator currently. I define a reference frame that rotates with the vessel as it orbits the sun, then forces the vessel to an attitude offset from that frame by the "cone" and "clock" angles. If Persistent Rotation let me define that same scenario, I could just use it. Another feature I'd like to have eventually is spinning sails, like IKAROS.

Link to comment
Share on other sites

I have heard of the plugin, though I haven't tried it. It probably conflicts with SolarSailNavigator currently. I define a reference frame that rotates with the vessel as it orbits the sun, then forces the vessel to an attitude offset from that frame by the "cone" and "clock" angles. If Persistent Rotation let me define that same scenario, I could just use it. Another feature I'd like to have eventually is spinning sails, like IKAROS.

It does let you keep orientation (by using SAS lock) relative to any given body including the sun. I'm not sure how stable it is over solar sailing time-frames, but you should check it out!

Link to comment
Share on other sites

It does let you keep orientation (by using SAS lock) relative to any given body including the sun. I'm not sure how stable it is over solar sailing time-frames, but you should check it out!

Thanks. I'll check it out.

- - - Updated - - -

Does anyone know what KSP uses to draw the orbit lines so they are the same width at any zoom level? Is it the Vectrosity VectorLine? I'm currently using LineRenderer, but would like something cleaner looking, like the game's orbit lines. I tried duplicating the Principia plugin's use of VectorLine, but it didn't appear on the map.

Link to comment
Share on other sites

  • 2 weeks later...

I have released a new version, v1.0.2-alpha, and updated the top post. The plugin now scales the line width to the camera distance, and lets you see how far off you are from a target object at the end of your maneuver sequence. I'll update the tutorials for the new feature.

Manually planning a rendezvous trajectory using low thrust is pretty difficult, because there are so many things to adjust (angles, times, number of maneuvers). You can get pretty close, but it may be a good idea to have a secondary propulsion system to close the gap. I plan on implementing an automatic system to fine tune the trajectory for precise rendezvous.

Link to comment
Share on other sites

This is an absolutely amazing mod. The entire solar sailing system is very well done. However, I can't use it in my career save like I want to because I would have to only control the solar sail probe for hundreds of days in a row while the rest of my agency falls apart. Are you planning to add the ability to use the sail on an unfocused vessel, at least when only interacting with the sun's SOI? With that feature, this mod would be one of my definite favorites in my career, but without that ability I don't even have an opportunity to use it.

Link to comment
Share on other sites

This is an absolutely amazing mod. The entire solar sailing system is very well done. However, I can't use it in my career save like I want to because I would have to only control the solar sail probe for hundreds of days in a row while the rest of my agency falls apart. Are you planning to add the ability to use the sail on an unfocused vessel, at least when only interacting with the sun's SOI? With that feature, this mod would be one of my definite favorites in my career, but without that ability I don't even have an opportunity to use it.

Thank you. That feature is on my todo list. The plugin currently saves the maneuver sequence, so I hope I can use that to update the orbit when you leave and return to the sail (or other low thrust propulsion system).

Link to comment
Share on other sites

  • 2 weeks later...

I suggest putting pictures on the original post if you can, it'd help people to know what it looks like before downloading it.

I'd also suggest adding a 'known bugs' section on the original post as well.

This seems like a really cool mod, I'll have to check it out.

Edit: It seems you do have a picture there but it isn't loading.

Edited by PortalGunner
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
I suggest putting pictures on the original post if you can, it'd help people to know what it looks like before downloading it.

I'd also suggest adding a 'known bugs' section on the original post as well.

This seems like a really cool mod, I'll have to check it out.

Edit: It seems you do have a picture there but it isn't loading.

Thanks for the feedback.

- - - Updated - - -

So can this be used for any constant thrust trajectory?

Sorry for the late response. I've been traveling a lot lately. I'm working on a version that splits the thrust from the navigation, and supports ion engines and similar low thrust rockets. You can follow the progress at: https://github.com/bld/PersistentThrust

- - - Updated - - -

Can you please please put this mod on CKAN?

Also, I might be doing a mod review video on this soon-ish.

Cool. It should be up on CKAN. I'm updating to the latest KSP version to see if the available sail plugin still works. I am making progress on a newer version that separates the thrust model (sail, ion engine, etc) from the navigation. I've been traveling and working a lot lately, and have had less time.

Link to comment
Share on other sites

Sorry for the late response. I've been traveling a lot lately. I'm working on a version that splits the thrust from the navigation, and supports ion engines and similar low thrust rockets. You can follow the progress at: https://github.com/bld/PersistentThrust

Neat, this all interests me for high thrust - high ISP designs as well such as Orion Nuclear Pulse Propulsion, or the Zubrin Nuclear Saltwater Rocket

Link to comment
Share on other sites

I updated the version of KSP to 1.0.4 on Kerbal Stuff after testing the plugin. I'm not sure if this will automatically update CKAN, which doesn't show the plugin at the moment. But, you can still get the latest SolarSailNavigator (1.0.2) at Kerbal Stuff and my Github.

- - - Updated - - -

Neat, this all interests me for high thrust - high ISP designs as well such as Orion Nuclear Pulse Propulsion, or the Zubrin Nuclear Saltwater Rocket

I think with the changes I'm making, it should be a simple matter of patching the engine part config file.

Link to comment
Share on other sites

  • 1 month later...

hi,

the C-KAN version is incomplete, there is only the folder "SolarSailNavigator" the "PersistantThrust" with parts and other stuff is missing.

after installing it by github, i gave it a try, Nice! thank you :)

the ion engine show 0 thrust is it normal? is it your plugin? no way to show the 0.25 N ?

however some suggestions:

-a button to show the start time in KSP time Years, Days,... (or RSS time)

- a way to manually enter the values for the "burn" times, angles, etc.. like Precise-Node or Pilot Assistant

Edited by Skalou
Link to comment
Share on other sites

hi,

the C-KAN version is incomplete, there is only the folder "SolarSailNavigator" the "PersistantThrust" with parts and other stuff is missing.

after installing it by github, i gave it a try, Nice! thank you :)

Thanks for letting me know. Seems CKAN only looked at the first folder (SolarSailNavigator) in the .zip file. I'll try putting both in a "GameData" folder and see if it works correctly.

the ion engine show 0 thrust is it normal? is it your plugin? no way to show the 0.25 N ?

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

however some suggestions:

-a button to show the start time in KSP time Years, Days,... (or RSS time)

- a way to manually enter the values for the "burn" times, angles, etc.. like Precise-Node or Pilot Assistant

Thanks. I appreciate suggestions on making this easier to use. I'll put those on my "TODO" list. Hopefully I'll have more time to improve the usability now that I have the basic functionality.

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