OHM SolarSailEx

OrbitHangar

Addon Comments
Joined
Apr 9, 2008
Messages
3,832
Reaction score
13
Points
0

Author: brianj

An experimental and extended version of the default Orbiter2010 Solar Sail.

Features attitude control using the steering paddles and extra data displayed on HUD.
Includes Earth-orbit test scenario, some development and operation notes, C++ code.

21 Jan 2011: Added attitude-hold functions for high time accelerations (attitude set mathematically by module) : max-prograde, max-retrograde, flux-relative, velocity-relative, escape strategy. 






DOWNLOAD
 

Izack

Non sequitur
Addon Developer
Joined
Feb 4, 2010
Messages
6,665
Reaction score
13
Points
113
Location
The Wilderness, N.B.
I get a CTD when entering cockpit view, with nothing unusual written to orbiter.log.

Code:
**** Orbiter.log
Build Aug 15 2010 [v.100815]
Timer precision: 6.98413e-008 sec
Found 0 joystick(s)
Devices enumerated: 4
Devices accepted: 3
==> RGB Emulation
==> Direct3D HAL
==> Direct3D HAL (Mobile Intel(R) 4 Series Express Chipset Family)
Module AtlantisConfig.dll .... [Build 100815, API 100815]
Module AtmConfig.dll ......... [Build 100815, API 100815]
Module DGConfigurator.dll .... [Build 100815, API 100815]
Module ScnEditor.dll ......... [Build 100815, API 100815]
Module OrbiterSound.dll ...... [Build ******, API 060425]
---------------------------------------------------------------
>>> WARNING: Obsolete API function used: oapiRegisterMFDMode
At least one active module is accessing an obsolete interface function.
Addons which rely on obsolete functions may not be compatible with
future versions of Orbiter.
---------------------------------------------------------------
Module ExtMFD.dll ............ [Build 100815, API 100815]
Module AttitudeMFD.dll ....... [Build ******, API 060425]
Module RWarpMFD.dll .......... [Build ******, API 060425]
Module ScreenCapture.dll ..... [Build ******, API 060425]
Module Rcontrol.dll .......... [Build 100815, API 100815]
Module WarpDriveMFD-Mk2.dll .. [Build 100808, API 100606]
Module AbsoluteKillrot.dll ... [Build ******, API 060425]

**** Creating simulation session
DirectDraw interface OK
Direct3D interface OK
Graphics: Viewport: Fullscreen 1366 x 768 x 32
Graphics: Hardware T&L capability: No
Graphics: Z-buffer depth: 32 bit
Loading 8816 records from star database
Module Sun.dll ............... [Build 100815, API 100815]
VSOP87(E) Sun: Precision 1e-006, Terms 554/6634
Module Mercury.dll ........... [Build 100815, API 100815]
VSOP87(B) Mercury: Precision 1e-005, Terms 167/7123
Module Venus.dll ............. [Build 100815, API 100815]
Module VenusAtm2006.dll ...... [Build 100815, API 100815]
VSOP87(B) Venus: Precision 1e-005, Terms 79/1710
Module Earth.dll ............. [Build 100815, API 100815]
Module EarthAtmJ71G.dll ...... [Build 100815, API 100815]
VSOP87(B) Earth: Precision 1e-008, Terms 2564/2564
Module Moon.dll .............. [Build 100815, API 100815]
ELP82: Precision 1e-005, Terms 116/829
Module Mars.dll .............. [Build 100815, API 100815]
Module MarsAtm2006.dll ....... [Build 100815, API 100815]
VSOP87(B) Mars: Precision 1e-005, Terms 405/6400
Module Phobos.dll ............ [Build ******, API 060425]
Module Deimos.dll ............ [Build ******, API 060425]
Module Galsat.dll ............ [Build 100217, API 100215]
Module Jupiter.dll ........... [Build 100815, API 100815]
VSOP87(B) Jupiter: Precision 1e-006, Terms 1624/3625
Module Io.dll ................ [Build 100217, API 100215]
Module Europa.dll ............ [Build 100217, API 100215]
Module Ganymede.dll .......... [Build 100217, API 100215]
Module Callisto.dll .......... [Build 100217, API 100215]
Module Satsat.dll ............ [Build ******, API 061227]
Module Saturn.dll ............ [Build 100815, API 100815]
VSOP87(B) Saturn: Precision 1e-006, Terms 2904/6365
Module Uranus.dll ............ [Build 100815, API 100815]
VSOP87(B) Uranus: Precision 1e-006, Terms 1827/5269
Module Miranda.dll ........... [Build ******, API 060425]
Module Ariel.dll ............. [Build ******, API 060425]
Module Umbriel.dll ........... [Build ******, API 060425]
Module Titania.dll ........... [Build ******, API 060425]
Module Oberon.dll ............ [Build ******, API 060425]
Module Neptune.dll ........... [Build 100815, API 100815]
VSOP87(B) Neptune: Precision 1e-006, Terms 391/2024
Finished initialising world
Module DeltaGlider.dll ....... [Build 100815, API 100815]
Module LuaInline.dll ......... [Build 100815, API 100815]
Module SolarSailEx.dll ....... [Build 100830, API 100606]
Finished initialising status
Finished initialising camera
Finished initialising panels
Finished setting up render state

Config options:
Code:
; === ORBITER Master Configuration File ===

EchoAllParams = FALSE

; === Subdirectory locations
ConfigDir = .\Config\
MeshDir = .\Meshes\
TextureDir = .\Textures\
HightexDir = .\Textures2\
ScenarioDir = .\Scenarios\

; === Logical parameters ===
DamageModel = 1
InstrumentUpdateInterval = 0.1
ShutdownMode = 1

; === Physics engine ===
DistributedVesselMass = TRUE
NonsphericalGravitySources = TRUE
RadiationPressure = TRUE
LinPropStages = 4
LinPropStage0 = 2 0.5
LinPropStage1 = 4 20
LinPropStage2 = 6 100
LinPropStage3 = 8
AngPropStages = 4
AngPropStage0 = 2 1 0.0174533
AngPropStage1 = 4 10 0.0698132
AngPropStage2 = 6 100 0.174533
AngPropStage3 = 8
AngPropSubsampling = 100 0.349066
AngPropLimits = 0.523599 62.8319

; === Visual parameters ===
AmbientLevel = 6
EnableCloudShadows = TRUE
EnableSpecularRipples = TRUE
EnableLocalLights = TRUE
StarPrm = 0 6.5 0.1 1
Planetarium = 7160
Bodyforces = 60 1 1
CoordinateAxes = 4 1 1

; === Camera parameters ===

; === Joystick parameters ===
JoystickIndex = 0 ; (disabled)
JoystickThrottleAxis = 2
JoystickThrottleSaturation = 9500
JoystickDeadzone = 2500

; === Demo parameters ===

; === Record/play parameters ===

; === Font parameters ===

; === Device settings ===
DeviceIndex = 1 ; do not edit manually
ModeIndex = 13 ; do not edit manually
Fullscreen = TRUE
FullscreenPageflip = FALSE
WindowWidth = 1366
WindowHeight = 768

; === Multiplayer parameters ===

; === Misc ===
LPadRect = 673 119 1179 628
; === Active plugin list ===
ACTIVE_MODULES
  ScnEditor
  OrbiterSound
  ExtMFD
  AttitudeMFD
  ScreenCapture
  TransX
END_MODULES

Something to do with the additional HUD data?
 

BrianJ

Addon Developer
Addon Developer
Joined
Apr 19, 2008
Messages
1,701
Reaction score
927
Points
128
Location
Code 347
Hi Izack,
blimey! You're pretty quick off the mark :-D Thanks for checking it out anyway.

Do you mean you get a CTD when you open the scenario? (since it starts in cockpit view). It could be the extra HUD stuff.

Does Orbiter render the cockpit view before the CTD?

Anyone else get the same problem?

Thanks,
Brian
 

Izack

Non sequitur
Addon Developer
Joined
Feb 4, 2010
Messages
6,665
Reaction score
13
Points
113
Location
The Wilderness, N.B.
The included scenario crashes before anything is rendered. Changing the camera line in the scenario to external mode or spawning a SolarSailEX in another scenario will not crash Orbiter until the vessel is selected and I press F8, when it immediately hangs for a few seconds before crashing, without rendering the HUD. Everything else about the vessel functions normally, as far as I can tell (RCS paddles, radiation pressure, etc.)

The rotation control is something else. Very interesting to manoeuvre!
 

BrianJ

Addon Developer
Addon Developer
Joined
Apr 19, 2008
Messages
1,701
Reaction score
927
Points
128
Location
Code 347
Hmmm.
I'll be recompiling the solarsailex .dll module for the latest Orbiter patch in the next couple of days, so maybe that will sort out the problem.

In the meantime, you can try running the add-on in a clean installation of Orbiter2010(100606) - there may be a conflict with another add-on somewhere.

Since nobody else is reporting a CTD, it may be something specific to your computer system - what OS/graphic card/Orbiter version are you using?

Thanks,
Brian

PS Yes, the attitude control was quite interesting to think about. The way I have implemented it is about the simplest way I can think of doing it, but I reckon there are more efficient and subtle ways to set it up(especially for the Roll control). I'll be looking at this for future versions. Any ideas/suggestions welcome :)
 

BrianJ

Addon Developer
Addon Developer
Joined
Apr 19, 2008
Messages
1,701
Reaction score
927
Points
128
Location
Code 347
Updated version for Orbiter2010-P1 now on OrbitHangar.
 

Izack

Non sequitur
Addon Developer
Joined
Feb 4, 2010
Messages
6,665
Reaction score
13
Points
113
Location
The Wilderness, N.B.
Downloaded recompile; Problem solved. Thank you very much. :)

As with most of your addons, I'm sure this will provide me with countless hours of challenge and fun. Keep up the good work!
 

Frogisis

innn spaaaaace...ace...ace...!
Addon Developer
Joined
Aug 13, 2008
Messages
185
Reaction score
0
Points
31
Location
Chicago
Website
www.frogisis.com
This is so cool - I was really surprised by how fast it starts to turn once you move the paddles.

I really hope people take notice of this addon so someone has the incentive to put together an actual solar sail "ship." We can't let the Arrow freighter have all the fun. Imagine coming up to the payload area to dock and seeing the sail stretch for miles in every direction...
 

Izack

Non sequitur
Addon Developer
Joined
Feb 4, 2010
Messages
6,665
Reaction score
13
Points
113
Location
The Wilderness, N.B.
This is so cool - I was really surprised by how fast it starts to turn once you move the paddles.

I really hope people take notice of this addon so someone has the incentive to put together an actual solar sail "ship." We can't let the Arrow freighter have all the fun. Imagine coming up to the payload area to dock and seeing the sail stretch for miles in every direction...
With glorious texture flickering...:facepalm:
 

BrianJ

Addon Developer
Addon Developer
Joined
Apr 19, 2008
Messages
1,701
Reaction score
927
Points
128
Location
Code 347
I was really surprised by how fast it starts to turn once you move the paddles

Actually, the mass and inertia is still too small for a realistic vessel of this size.

The SolarSailEx area is ~785000m^2
Current materails for solar sail film range from 3g/m^2 to 12g/m^2

So mass(for the sail only) should be between 2355kg to 9420kg

Moments of inertia (for the sail only) should be more like
41500 41500 83000

You can change the values in the solarsailex.cfg file, e.g.
Code:
Mass = 3000kg
Inertia = 41500 41500 83000
and see how the performance changes.

It would be nice to have some kind of navigation tool for solar sailing in Orbiter. The following site contains a lot of interesting information about solar sails and has a rather fun Java simulation, together with some C++ code for a DOS version:
http://www.u3p.net

In the Java simulation the user can input the Sail->Sun angle and see the resulting trajectory - it would be cool to have an MFD that worked something like that. I'd have a go at making an MFD but I'm not sure if my programming skills are up to it - anyone else interested in making a SolarSailNavigationMFD?

Cheers,
Brian
 

Frogisis

innn spaaaaace...ace...ace...!
Addon Developer
Joined
Aug 13, 2008
Messages
185
Reaction score
0
Points
31
Location
Chicago
Website
www.frogisis.com
With glorious texture flickering...:facepalm:

Does anybody have any idea what causes that? One of my addons, a big space colony, flickers like that at certain ranges, and I have no idea how to even begin to fix it.

I imagine any future solar sail addons would have to deal with this as well, since they'd have to be enormous to haul around the kinds of payloads that would make them fun to fly.
 

Izack

Non sequitur
Addon Developer
Joined
Feb 4, 2010
Messages
6,665
Reaction score
13
Points
113
Location
The Wilderness, N.B.
Does anybody have any idea what causes that? One of my addons, a big space colony, flickers like that at certain ranges, and I have no idea how to even begin to fix it.

I imagine any future solar sail addons would have to deal with this as well, since they'd have to be enormous to haul around the kinds of payloads that would make them fun to fly.
I'm not sure...would reducing the size of the textures help? That might work for something like a solar sail, which doesn't need much detail. I think there is a limit to how large the total textures in Orbiter can be.

The space colony looked much better flickering-wise in Orbiter 2006 than it does in 2010 (It's nearly unuseable sometimes, especially if there is a planet in the background.) Maybe because of larger planet textures...? I'm at a loss. :shrug:
 

Frogisis

innn spaaaaace...ace...ace...!
Addon Developer
Joined
Aug 13, 2008
Messages
185
Reaction score
0
Points
31
Location
Chicago
Website
www.frogisis.com
That's weird... I'm using 2010 P1, and the flicker is reduced a lot for me, only appearing at point blank range and again about 400km out. Diffr'nt strokes, I guess.

I'll try reducing the size of the textures and see if that does anything. Good point about the detail required for a solar sail and how a lot of that could be fudged since it's not a part of the ship you'd really be getting close to. I wanted the colonies to look nice since people would obviously be getting close to them, but that's neither here nor there if they're constantly pulling a Heisenberg on you.
 

Wishbone

Clueless developer
Addon Developer
Joined
Sep 12, 2010
Messages
2,421
Reaction score
1
Points
0
Location
Moscow
Love the idea (you may have guessed as much from my nickname...), will check out the code and see what can be done navigation-wise (in other words right now in SolarSailEx I'm up a creek w/o a paddle)

EDIT: looking up the code will take a bit more than I expected - no Shockwave at the PC I'm using now :(

EDIT #2: Whatever the PMIs are, paddles have to be continuously controlled to achieve desired torque (to end the roll and then to maintain a given attitude). By the way, my attempt to steer it from the Lua console ended in a CTD... pretty sure I got the arguments wrong.
 
Last edited:

Wishbone

Clueless developer
Addon Developer
Joined
Sep 12, 2010
Messages
2,421
Reaction score
1
Points
0
Location
Moscow
Think that having to control paddles is slightly inconvenient. Currently I use Sceneditor to vary attitude to get the most Prograde and outward force. Maybe the process can be automated (with conjugate gradient maximization of the rate of growth of SMa), and only after that can we think of using paddles to get to that attitude. Just my 2 cents.

---------- Post added at 11:26 AM ---------- Previous post was at 06:45 AM ----------

Wonder if a GaAs solar panel and a CMG would be better for attitude control... (how much do they add to the mass? - a CMG is 28 kg, how large a panel and the joint should be to get 150 W)
 

SolarStorm

New member
Joined
Aug 12, 2010
Messages
31
Reaction score
0
Points
0
Location
Sydney
I realise the benefits of solar sails, but the part that always confuses me is this: once you move out to wherever you want to go, how do you get back? Ships tack to move against the wind, but last time I checked, fluid mechanics (specifically aerodynamics) and electromagnetics (specifically photonics) are completely different.
Are solar sails just one-way craft or is there some way to fly them back to earth?
 

BrianJ

Addon Developer
Addon Developer
Joined
Apr 19, 2008
Messages
1,701
Reaction score
927
Points
128
Location
Code 347
I realise the benefits of solar sails, but the part that always confuses me is this: once you move out to wherever you want to go, how do you get back? Ships tack to move against the wind, but last time I checked, fluid mechanics (specifically aerodynamics) and electromagnetics (specifically photonics) are completely different.
Are solar sails just one-way craft or is there some way to fly them back to earth?
Depending on the attitude of the sail with regard to the Sun, you can boost or reduce your orbit. See this .pdf (particularly the diagram at top of p.4)
http://intrance.org/paper/200408_Providence_Dachwald_Sail.pdf

or have a play around with the Java Applet solar-sail trajectory simulation on this site
http://www.u3p.net

Cheers,
Brian

---------- Post added at 05:01 PM ---------- Previous post was at 04:31 PM ----------

Love the idea (you may have guessed as much from my nickname...), will check out the code and see what can be done navigation-wise (in other words right now in SolarSailEx I'm up a creek w/o a paddle)

EDIT: looking up the code will take a bit more than I expected - no Shockwave at the PC I'm using now
Some kind of navigation tool would be great! I hope you can get somewhere with it.

EDIT #2: Whatever the PMIs are, paddles have to be continuously controlled to achieve desired torque (to end the roll and then to maintain a given attitude). By the way, my attempt to steer it from the Lua console ended in a CTD... pretty sure I got the arguments wrong.
I'm totally ignorant of how Lua interfaces with vessel .dll's, but I tried not to change any of Martin's original code, so if Lua works with the original SolarSail, it should work with SolarSailEx.

Think that having to control paddles is slightly inconvenient. Currently I use Sceneditor to vary attitude to get the most Prograde and outward force. Maybe the process can be automated (with conjugate gradient maximization of the rate of growth of SMa), and only after that can we think of using paddles to get to that attitude. Just my 2 cents.
Would be very cool to have some kind of attitude autopilot.

Like low-thrust ion drive spacecraft, solar-sail missions to other planets can be quite long duration. So, I was thinking of implementing a "high time acceleration attitude-hold" function (for use with time accel >100x), similar to those I did for Smart-1 or Dawn add-ons (required attitude is calculated and set mathematically). I reckoned a "maintain sun-angle" function, together with "maintain maximum prograde/retrograde thrust angle" functions, would be useful.

A more sophisticated/elegant/realistic solution would be most welcome!


Wonder if a GaAs solar panel and a CMG would be better for attitude control... (how much do they add to the mass? - a CMG is 28 kg, how large a panel and the joint should be to get 150 W)
Sorry - whats a "GaAs solar panel" and a "CMG" ? :)

Cheers,
Brian
 

Wishbone

Clueless developer
Addon Developer
Joined
Sep 12, 2010
Messages
2,421
Reaction score
1
Points
0
Location
Moscow
GaAs - Gallium Arsenide, always trying to get the most power from a square foot. CMG - control moment gyros, the 28 kilo figure was lifted off Honeywell sales sheet (M50 Control moment gyroscope for poor scientists). CMGs could be the solution for attitude control if it weren't for the fact that a solar sail is pretty much flexible, and would kinda flap around if torque were applied in the "boat". Having more paddles (six) with continuous control would fit the need perfectly IMHO.

I added the dSMa/dt (increase in semi-major axis per second) output to my Precession MFD (re-compiled for the 1st time for 2010-P1), while it's nice for Buck Rodgers spacesailing, looks like I'll have to use vector maths to get the best attitude at a given point in the orbit.

One more thing: how does your SolarSailEx react to NaNs - I get it to hang Orbiter sometimes at scenario startup, sounds like you have a division by zero somewhere in the code.

---------- Post added at 05:57 PM ---------- Previous post was at 05:37 PM ----------

I realise the benefits of solar sails, but the part that always confuses me is this: once you move out to wherever you want to go, how do you get back? Ships tack to move against the wind, but last time I checked, fluid mechanics (specifically aerodynamics) and electromagnetics (specifically photonics) are completely different.
Are solar sails just one-way craft or is there some way to fly them back to earth?

SolarStorm (a great nick BTW), the idea is to turn the sail parallel to the wind and radiation in certain parts of the (circular, perhaps) orbit and to turn it for maximum semi-major axis increase in other parts of the orbit. Thus you can hope to manage the argument of perigee (or ejection point), and afterwards do only the acceleration thing throughout the non-shadowed portions of the flight. I would assume that solar sailing should be as autonomous as possible because of time delays and attitude uncertainties, and take many orbits from start to ejection into the transfer trajectory.
 

BrianJ

Addon Developer
Addon Developer
Joined
Apr 19, 2008
Messages
1,701
Reaction score
927
Points
128
Location
Code 347
GaAs - Gallium Arsenide, always trying to get the most power from a square foot. CMG - control moment gyros, the 28 kilo figure was lifted off Honeywell sales sheet (M50 Control moment gyroscope for poor scientists).
Ah! Thanks.

CMGs could be the solution for attitude control if it weren't for the fact that a solar sail is pretty much flexible, and would kinda flap around if torque were applied in the "boat".
Perhaps a structure like two SolarSailEx's stuck nose-to-nose, with a central hub for payload/attitude control gyros, could have the necessary stiffness to use gyros? (without having to make the superstructure too bulky).

Having more paddles (six) with continuous control would fit the need perfectly IMHO.
Two more paddles, on the Z-axis? Sounds sensible.If I make a new solar sail from scratch I'll think about that.


I added the dSMa/dt (increase in semi-major axis per second) output to my Precession MFD (re-compiled for the 1st time for 2010-P1), while it's nice for Buck Rodgers spacesailing, looks like I'll have to use vector maths to get the best attitude at a given point in the orbit.
I don't know if this is what you mean by "best attitude", or if it's any help, but it looks to me (from observations of SolarSailEx) that the optimum attitude for increasing SMa is when the sail plane bisects the angle between the prograde vector and the Sun direction vector.

Similarly, optimum attitude to reduce SMa is when solar sail plane bisects the angle between the retrograde vector and Sun direction vector.

I haven't checked the maths on this though. Anyone care to prove it correct or incorrect?

One more thing: how does your SolarSailEx react to NaNs - I get it to hang Orbiter sometimes at scenario startup, sounds like you have a division by zero somewhere in the code.
Never underestimate my ignorance of acronyms(or anything else for that matter) - What's a "NaN" ?

By "hang" - do you mean a CTD? Could you post a scenario that causes the problem?

I think I initialised all the variables properly, and I think the trig functions I use (for setting the paddle positions etc) shouldn't return "undefined" results but I'll have another look next time I get a chance.

Thanks,
Brian
 

Wishbone

Clueless developer
Addon Developer
Joined
Sep 12, 2010
Messages
2,421
Reaction score
1
Points
0
Location
Moscow
NaN is not a number, can be QNaN (quiet) can be SNaN (screaming, ok, signalling :) ) - what you get from a square root off a negative argument, arcsin(x), x>1, etc. I'll try to post the screenie as soon as I get to the PC, the whole hud is filled with NaNs and Martin's Orbit HUD shows RAD and Speed equal to exactly 1 (no decimal point).

Re: optimum attitude - the thing is while I don't care about plane-change component of solar pressure others may do. The prograde component is the most efficient, but we can also use the outward component to raise the orbit, so I'll have a look at whatever books/tech reports out there (especially Vulpetti 2008)... Please note that the magnitude of the velocity vector may matter as well...

On nose-to-nose sailing :) - not sure at all. The IKAROS solar sail AFAIK uses special panels that can be made transparent by applying voltage, so you won't even need mechanical paddle drives. If these panels can be made durable, that is.

---------- Post added at 07:34 PM ---------- Previous post was at 07:25 PM ----------

Rethinking the paddles vs. LEDs vs. CMGs - paddles are probably the easiest way, with +Z and -Z added for controllability. The design choice depends on the angular speed required for the maximum maneuverability phase - which happens to come at periapsis.

Would be nice to see thermal constraints implemented for a future solar flyby :)
 
Top