Skip to content

bld/SolarSailNavigator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SolarSailNavigator (Alpha)

This is a developmental release of a solar sail and low thrust engine navigation plugin for Kerbal Space Program (KSP, http://www.kerbalspaceprogram.com). Plot the course of a spacecraft pushed by the pressure of sunlight or a continuous thrust engine (e.g. ion engines). Unlike chemical rockets, solar sails and continuous thrust engines apply a small amount of thrust throughout the trajectory, gradually changing the orbit until reaching their destination. This plugin shows the future path your vessel will take so you can plan transfer trajectories.

The plugin includes the Navigator module, which adds controls to any command pod to schedule the steering and throttle of the vessel, show what the future trajectory will look like, and show how close the vessel gets to a target at the end of the command schedule. The navigation system (everything outside PersistentThrust) is licensed under the LGPL (see LICENSE.txt)

For the source code, go to: https://github.com/bld/SolarSailNavigator

This plugin adds critical features needed to navigate a solar sail or continuous thrust engine spacecraft:

  1. Set the vessel attitude to a reference frame that rotates with with the vessel as it orbits the sun. Specify two angles to point the sail, throttle, and duration. Add as many angle/angle/throttle/time maneuvers as you like to make a maneuver schedule. Time warp ahead, and the plugin will set the vessel’s attitude and throttle. WARNING: Not recommended for planet centered orbits yet. The current steering strategy is really geared towards the center of gravity and sunlight being the same.
  2. Preview the future trajectory and what the final orbit looks like in map mode, so you can try to plot a trajectory to a planet or other destination. Select a target and see how far off course you will be at the end of the command sequence. Warp ahead, and watch the sail follow your planned trajectory. The preview updates automatically as you change the command schedule.
  3. Use multiple solar sails and persistent thrust engines. Use the “Use Sail” toggle to retract or deploy a sail for a segment. Set the throttle to 0 to disable any engines.

Usage

Tutorial

See: https://github.com/bld/SolarSailNavigator/wiki/Tutorials

Building a solar sail spacecraft

In the Vehicle Assembly Building (VAB), look in the “Engines” section for the “Solar Sail” part. The default orientation of the solar sail part has the back (night) side of the sail pointing upwards, and the front (sunlit) side facing down, so plan accordingly. When the sail is deployed, it can shade the solar panels. You alse need to be able to point the spacecraft in a variety of different directions to control where it thrusts. So, put survival solar panels that can get light in all directions - front, back, sides, up, down. Though, as we’ll see later, this plugin doesn’t need power to change attitude and get power if you run out. But, that’s cheating.

You can deploy the sail on the launch pad to see how it will look. DON’T lock the attidue on the pad, unless you like explosions.

Part GUI

Right clicking on a solar sail or persistent thrust engine will show thrust, acceleration, and resource consumption (engine only). The sail has a “Deploy Sail” button that will make the sail extend or retract, and enable or disable it.

Command pod GUI

A “Show Navigator Controls” button will display the navigation tool window.

Controls

Lock Attitude

There is a “Lock Attitude” toggle button. Clicking this will cause the attitude maneuver profile to be executed, forcing the vessel to the specified attitude, and setting the throttle (for the ion engine). This is needed to hold the attitude and throttle during time warp.

Start Time

This shows the time that the attitude maneuvers begin in Universal Time (UT) seconds. Click the “Set to Now” button to reset the start time to now. Do this if you are starting a new sequence.

Reference frames

The sail attitude is controlled relative to a reference frame that rotates with the vessel as it travels around the sun. There are currently two frames available.

Radial/Tangential/Normal
  • X: from the sun to the sail (radial, “R”)
  • Y: perpendicular to R, lying in the orbit, in the direction of the orbit rotation (tangential, “T”)
  • Z: perpendicular to the orbit plane (normal, “N”)

The three RTN angles are:

Cone (angle the vessel points off of the radial / sun vector).

The “Cone” angle is the angle between the sun and the line perpendicular to the surface of the sail (sail “normal” vector). As the sail tilts away from the sun, the reflected light will start generating thrust perpendicular to the sun-sail line. This is useful for thrusting with the orbit velocity to sail away from the sun, or against the velocity to tack closer to the sun. At 0 degrees, the sail faces directly at the sun. At 90 degrees, the sail is edge on to the sun, which effectively turns the sail off. This is the rotation about the Z axis, after the clock angle has been applied.

Clock (rotation around the radial / sun vector)

The “Clock” angle is the rotation around the sun-sail line (X or R in the RTN frame). It lets you direct the solar force above or below the orbit plane to change the orbit inclination. If the clock angle is 0 degrees, the cone angle tilts the sail within the orbit plane. At +/-90 degrees, the cone angle tilts the sail out of the orbit plane.

Flatspin (rotation about the vessel’s “up” vector)

The “Flatspin” angle is the rotation about the spacecraft’s local up/down axis. Use this to, for example, make sure the solar panels are oriented to collect power during maneuvers.

In-track/Cross-track/Normal
  • X: velocity vector (in-track “I”)
  • Y: perpendicular to the velocity vector, in the orbit plane, and pointing inside the orbit (cross-track “C”)
  • Z: perpendicular to the orbit plane (normal, “N”)

The three ICN angles are:

Flight path angle (angle away from the velocity vector)
Azimuth (rotation around the velocity vector)
Flatspin (rotation around the vessel’s “up” vector)

Throttle

The throttle (for continuous thrust engines) will set the vessel throttle to the specified level from 0.00 to 1.00 in 0.05 increments for the duration of the command segment.

Use Sail

The “Use Sail” toggle button indicates whether to deploy or retract all sails on the vessel for this segment.

Days & Hours

This is the time to perform the attitude maneuver. Click +/- to add/subtract one day, and +10/-10 to add/subtract 10 days. Click +/- next to “Hours” fine tune the duration.

Color

This shows the color of this attitude maneuver segment on the trajectory preview in map mode.

Frame

Click the button with the name of the current frame to change it to a different one. Click the new frame in the popup window.

Insert / Delete

Insert a new control before this one (INS), or delete this control (DEL).

Add

Add a new control to the end of the list.

Final Orbit Color

This shows the color of the final orbit, which is drawn in the preview.

Total

Total seconds of the entire attitude maneuver sequence.

Preview

The “Show Preview” button makes the plugin calculate and render the future trajectory in map mode. The trajectory will be recalculated and drawn whenever you change the angles, throttle, durations, or number of maneuvers. This lets you incrementally change parameters and see the effect on the trajectory. Once you’ve built an attitude maneuver sequence that puts your final orbit where you want to go, increase the time warp and watch the sail follow your trajectory. It will turn the sail to 90 degrees and stop sailing once completed.

Final Orbit

Select “Show Final Orbit” to draw the final orbit on the map. Select “Show Final Elements” to see the orbit elements of the final orbit.

Target

Select an object as a target in the map, and a line will be drawn between the end of your trajectory and the closest approach to the target. Select “Show Target Error” to see, in numbers, the distance and velocity to the target, and the difference in your final orbit elements with the target.

Required Plugins

Module Manager

Module Manager is required to patch the ion engine part to use all the features of this plugin, and adjust the thrust to realistic levels.

PersistentThrust

The PersistentThrust plugin is needed to calculate the thrust, delta-V, and resource consumption of the vessel. It is now a separate plugin available at: https://github.com/bld/PersistentThrust

Helpful Plugins

MechJeb

The Mechanical Jeb plugin (http://mechjeb.com) includes a tool called “Warp Helper” that helps in executing the attitude maneuver sequence. In the “Warp to” dropdown, select “Time”. In the “Warp for” field, type in the total duration, with “s” at the end for seconds. Leave “Lead time” at 0s. Click “Warp” and watch it follow the trajectory, returning to realtime and 90 degrees at the end.

Known Problems and Limitations

See ISSUES.org and TODO.org

Wish List

Also see TODO.org for items tagged WISHLIST

More sail models

One refinement that would make the current sail model more realistic is to add more triangles to make it curved and billow away from the sun.

Real sail designs like:

  • IKAROS, the first solar sail, currently in orbit between Venus and Earth
  • LightSail, the Planetary Society’s cubesat solar sail, with launches in May, 2015 and in 2016

Sail concepts like

  • Sunjammer (cancelled NASA solar sail test flight)
  • Giant interplanetary sails like the Halley Rendezvous designs
  • Ultrasail heliogyro
  • Large, ultralight Interstellar Probe sail
  • Giant interstellar laser-driven sails

Automated navigation

Manually building maneuver sequences can get you pretty close to your destination. But, because of the near infinite variability of how to steer a sail along the path to your destination and slow accumulation of sail thrust, it can be difficult to reach it with any accuracy - like rendezvous and orbital capture. For the moment, you may want a secondary propulsion system to close the gap.

Professional solar sailors use numerical optimization algorithms to calculate sail attitude vs. time for them. Manual sail planning can be a good start for some algorithms, like gradient methods, which will bring the sail in tight and accurate.

Automatic planetary & sun-centered sailing

There are simpler ways to automate sailing than the automated navigation. There are steering strategies, for example, to maximize/minimize the change in orbit elements for doing things like:

  • Raising / escape
  • Lowering / capture
  • Inclination changes
  • Precess an orbit
  • Circularize / increase eccentricity

Realism

Real solar sails have a number of complex limitations that affect how they sail.

Deployment

Real sails are too fragile to stow again after deployment. Realistically, deployment could be a one time staged event.

Pointing away from the sun

Some sail designs are naturally stable and have trouble pointing all the way to 90 degrees. Limitations on how far away from the sun a sail can point make life interesting for sail navigators.

Attitude control

Real sails use the torque of sunlight to steer. It would be interesting exercise to have the sail slow down the time warp and use special sail steering hardware to change attitude - slowly.

  • Steering vanes
  • Move the center of mass
  • Thin film reflective control devices (used by IKAROS)

Real sails have massive moments of inertia, which make traditional control by reaction wheels and RCS thrusters difficult.

Spinning sails

IKAROS spun to hold the sail flat instead of using structural booms.

Imperfect reflection

Real sails don’t reflect light like a perfect, flat mirror. They are curved, with wrinkles, and sail film that absorbs and scatters light. The direction of thrust on a sail is affected by these factors. Also, a non-flat sail will still present some area to the sun at 90 degrees and produce a little thrust.

TweakScale

Get this plugin working with the sail to fly larger & smaller sails by scaling the surface area (square scale change).