Skip to content

Latest commit

 

History

History
251 lines (249 loc) · 12.2 KB

File metadata and controls

251 lines (249 loc) · 12.2 KB

Modularize functions [7/7]

steering during timewarp so it can be used elsewhere, e.g. ion engines

manual navigation

check if spacecraft in sun

sail force calculation

sail EOM

sail EOM propagation

SailFrame

Make a low thrust navigation tool for any low thrust propulsion, sail, ion engine, etc [2/2]

Propulsion part module

Force model

Realtime propagation

Time warp propagation

On/off & throttle controls

Separate navigation module that is applied to low thrust parts

Steering and preview tacked on to low thrust

Use patched config files to apply?

Calculate mass use for reaction thrusters

Save trajectory and mass prediction to persistant variables

Update vessel orbit and mass when returning to them

Evaluate Persistent Rotation for use as attitude control

Locks current attitude with respect to a planet.

Need a way to specify angles and a schedule of future attitude changes

May want more reference frame options than to a planet.

Want to specify numbers relative to those reference frames.

Possibly, upgrade persistent rotation with these options?

Then, the navigation tool needs to access PersistentRotation to update the attitude.

Make preview work for persistent thrust engines [5/5]

Preview trajectory

Final orbit

Line to target

Orbit element difference with target

Find & fix remaining bug of undefined variable

target line object was null

Move PersistentThrust plugin into SolarSailNavigator [2/2]

Put source in sub-folder with KSPI license

Update Makefiles

Draw target line when target selected, not just when preview first calculated

Test that propagation matches prediction for engines

Update targeting line and error when target selected

Toggle buttons to show [4/4]

Final orbit elements

Final orbit elements error with target

Final orbit

Preview

Draw trajectory segment when throttle is 0

Make “Navigation”, “Preview”, and “Controls” work for both sails and engines

Put navigator into a part that queries the vessel for persistent thrust parts

Only allow showing of controls when sails and engines are found.

Add flatspin control

Solar panels mounted in a particular way may not get any sunlight during maneuvers

In preview, only calculate thrust of engines that aren’t shutdown

Add “Sail On” control setting to deploy / retract all sails on the vessel for that segment [3/3]

Add controls to Control and Navigator objects

Make work during realtime and warp sailing

Make work in preview calculation

Test preview for multiple sails/engines [3/3]

Engines

Sails

Sails and engines

Test realtime and timewarp functionality for multiple sails & engines [3/3]

Sails

Engines

Sails and engines

Patch pods with the navigator module [2/3]

Patched all command pods

If engine enabled and operational but not staged, OnFixedUpdate() doesn’t run

Add to PersistentEngine: [KSPField(isPersistant = true)] bool IsForceActivated;

public override void OnUpdate() { // exisiting code

if (!IsForceActivated && isEnabled && isOperational) { IsForceActivated = true; part.force_activate(); } }

Pass “Control” object instead of individual parameters to Preview.Propagate

ThrustPersistent should use engine’s finalThrust to be correct

Move PersistentThrust to its own module [3/3]

Move PersistentThrust

Update SolarSailNavigator to use PersistentThrust in new location

Move TODO items for PersistentThrust out of SolarSailNavigator

Limit throttle to 1 (100%)

Space needed between GUILines to distinguish lines

Color too high & small. Should be centered with other GUILine elements.

Create “Frame” class to store info on reference frame e.g. name and name of Euler angles [14/14]

Create Frame class

Names of Euler angles

Angles

Function of orbit, UT, and angles to generate spacecraft quaternion

Use Frame class parameters in Controls instead of hard coded values

Persistent values in Navigator for generic “angles” instead of cone/clock/flatspin

Persistent values in Navigator for “frames”

Load & save to “angles” and “frames”

“Control” constructor should use “angles”

“Control” object should have “angles” instead of cone/clock/flatspin

GUIAngle instead of GUICone/Clock/Clatspin

Show which frame is in use

Button to popup window to select frame

Popup window

Popup window with buttons of which frame to use

Buttons change frame

Buttons call Controls.Update

Use methods in PersistentEngine to calculate mass & deltaV

Put frame GUI window into its own class

Navigator default settings [4/4]

Add defaults to Navigator persistent variables

Use defaults from Navigator persitent variables

GUI window & class to fill out settings

Reference frame and angles

Require navigation instruments [0/3]

Sun sensor (for sail)

Star tracker

Radio

Allow staging events in command sequence to e.g. separate a sail and run an ion engine

Manual sail navigation [17/24]

Propagate trajectory XX days ahead at current attitude

Draw start and end points

Collect intermediate points

Draw points along trajectory

Classes for controls and previews

Make non-array control persistant

Add additional steering/duration segments [2/2]

Controls and segments as arrays

buttons to add/remove segments

Show orbit at end of segments

Make control history persistant

Cone angles

Clock angles

Durations

Warp factors

Update preview when controls updated [2/2]

Add toggle button to show preview or not

Calculate when controls updated

Add/remove controls anywhere in sequence [4/4]

Turn “controls” parameter of Controls class into a List<Control>

INS/DEL buttons on each GUILine

INS/DEL buttons deletes or inserts a new Control in the Controls.controls list at that point

“Add” button at end

Other time unit choices [2/4]

Days [2/2]

+/-

+/- 10

Hours [1/1]

+/-

Minutes

Seconds

Allow +/-180 deg cone angles

Draw fewer segments in preview

Condition to sample? Period of orbit0, divide by 360, sample when elapsed time exceeds?

Or… calculate period with each new perturbed orbit

Divide by 360

Check if that much time has passed since last sampling?

Pre-calculate line render points of sail trajectory

Make preview line width scale to zoom (or fixed screen width ala VectorLine)

Select target body [6/8]

Draw line to target from closest approach

Show duration from now to closest approach

Show distance at closest approach

Convert distance based on magnitude (m, km, Gm)

Show speed difference at closest approach

Convert speed based on magnitude (m/s, km/s)

Show if distance inside SOI

Show if speed indicates capture?

Is this even possible?

Improve propagation accuracy

Currently multiplies acceleration by time step size and adds to velocity

Could integrate for one time step using Runge Kutta

Initial time calculation

Currently need to manually click “Set to Now”

Make control GUI fields fixed width

Draw mini sails at points along map to show attitude

Warp button to execute sequence?

Currently use MechJeb’s WarpHelper

Internal NextClosestApproach

Simply calculating vector to target at end of command sequence

Automatically calculate warp based on duration of segment instead of manual selection

To avoid killing KSP by calculating too many time steps

Currently just using maximum time warp step size

Make final orbit render for parabolic/hyberbolic orbits [0/2]

Currently renders for the period of the orbit

Check if orbit.E < 0, and render for orbit period

Check if orbit.E >= 0, and calculate time to SOI departure for render time

Is that orbit.UTsoi?

Make sail deployment a staged event that can only happen once

Automatic navigation

Using manual navigation as initial guess, perform local optimization (e.g. gradient) to calculate cones/clocks/durations

Orbital rendezvous

Select target

Specify number of control nodes

Optimal control method runs behind scenes to generate angle/time profile

Allow execution of steering strategy

Locally optimal steering strategies

Maximize rate of change of one orbit element or combination of elements

Planet centered sailing control laws [0/7]

Orbit element control laws. See:

SMA

rp

ecc

ra

Inclination

AoP

Blended?

Sails on Rails [0/3]

Problem

When you leave one spacecraft and go elsewhere, KSP updates the position and velocity based on the Kepler orbit of the spacecraft. We need to update the orbit, position, and velocity of a persistent thrust spacecraft with active navigator control based on the predicted trajectory.

Update orbit/pos/vel from Navigator preview?

Propagate orbit outside of spacecraft focus?

Show preview on map outside of spacecraft focus?

Resize window when objects & text removed (e.g. when preview or target deselected)

Show mass consumption for flight profile

Show mass consumption remaining

Warn when mass consumption exceeds remaining

Warn when future power usage of navigation plan exceeds vessel’s generation ability

Show time remaining of sequence (startTime - currentTime + duration)

In preview, use alignment of sails and engines - don’t just assume they are aligned in the correct direction with the “up” vector. [0/2]

Examine part.transform.up vector and compare to calculated thrust vector

Use as thrust direction vector

Preview doesn’t detect if another body’s SOI will be entered on the current trajectory [0/2]

Detect SOI intersection

Propagate trajectory around body’s SOI?

Recalculate target line & error when new target selected

Chooser to select which sails and engines to use in this time segment

Trajectory not redrawn with new segment when “Add” button clicked

Toggle “Show Preview” to redraw

Toolbar to Show/Hide controls instead of right-clicking on control module

Final orbit line can obscure trajectory line

Allow manually entering control numbers (angles/times) [3/4]

Angles

Throttle

Times

Parse time string (e.g. 200d3h23s)

Show Start Time in years/days/hours/seconds or Real Solar System time

“Add” or “INS” buttons should copy values from last (Add) or selected (INS) control [0/2]

When “Add” clicked, copy values from last control

When “INS” clicked, copy valued from the corresponding control

After adding or inserting a new control, clicking the frame button creates an empty window. Quiting to the space center and clicking the frame button works as usual.

Check if another controller is locked, prevent locking, and show an error message.

Prevent two controllers from fighting each other