Jump to content

[1.8.x, 1.9.x, 1.10.x] Solar Cycle Simulator Updated


linuxgurugamer

Recommended Posts

Originally written by @Whitecat106, then updated by @Papa_Joe, I've taken this under my wing in order to support the Orbital Decay mod I'm also adopting.

@Papa_Joe's thread here: https://forum.kerbalspaceprogram.com/index.php?/topic/175617-*

@Whitecat106's thread here:  https://forum.kerbalspaceprogram.com/index.php?/topic/138281-1

 

Note:  This mod now has dependencies:

 

This plugin simply generates and tracks the constantly changing solar cycles of the sun, this can be used in conjunction with RSS or a Stock game.

gIl0ITt.png

 

This however is more of a tool for modders than an actual plugin, installed on its own it will simply track and display information on the solar cycle in the Tracking Station, but together with some programming skills a mod maker could create accurate (realistic) solar flare, coronal mass ejection, solar storm or other interesting solar activity based plugins.

For Players:

Simply download the pack and install the GameData folder into your GameData directory; remember this does not add much apart from a small tracking station UI! (It is also a dependency of Orbital Decay).

For Mod Makers:

Download the pack from the link above and install into your GameData directory, remember that this pack will be a dependency of any mods you create using it, so ensure you provide a link to this page for the latest release. You can include the latest version of this plugin as a reference in your C# development project, from this you will be able to access the following functions: (limited at the moment I know, but bear with me and I will add some more!) The following can be retrieved by using for example:

SCSManager.FetchCurrentF107()

or

SCSManager.FetchCurrentAp()

 

Here are the available functions:

Spoiler

public static double FetchCurrentF107()
{
        string Temp = FetchCurrentCycle().GetValue("CurrentF107");
        double F107 = double.Parse(Temp);
        return F107;
}

public static double FetchCurrentAp()
{
        double Ap = double.Parse(FetchCurrentCycle().GetValue("CurrentAp"));
        return Ap;
}

public static double FetchAverageF107()
{
    double F107 = 0.0;
    double F1071 = double.Parse(FetchCurrentCycle().GetValue("MaxF107"));
    double F1072 = double.Parse(FetchCurrentCycle().GetValue("MinF107"));
    F107 = (F1071 + F1072) / 2;
    return F107;
}

public static double FetchAverageAp()
{
    double Ap = 0.0;
    double Ap1 = double.Parse(FetchCurrentCycle().GetValue("MaxAp"));
    double Ap2 = double.Parse(FetchCurrentCycle().GetValue("MinAp"));
    Ap = (Ap1 + Ap2) / 2;
    return Ap;
}

public static double FetchCurrentIPMF()
{
    double IPMF = double.Parse(FetchCurrentCycle().GetValue("CurrentIPMF"));
    return IPMF;
}

public static double FetchCurrentIrradiance()
{
    double Irradiance = double.Parse(FetchCurrentCycle().GetValue("CurrentIrradiance"));
    return Irradiance;
}

public static double FetchCurrentSunSpots()
{
    double SunSpots = double.Parse(FetchCurrentCycle().GetValue("CurrentSunSpots"));
    return SunSpots;
}

 

 

Availability

Available via CKAN

Edited by linuxgurugamer
Link to comment
Share on other sites

  • 2 years later...
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...