Specialization of ValueRange for orbital phase parameter.
More...
|
enum | PhaseType { MeanLongitude,
MeanAnomaly
} |
| Defines the parametrization of orbit size that is used.
|
|
enum | EpochType { GameStart,
Now
} |
| Defines the time at which the phase is measured.
|
|
enum | Distribution {
Uniform,
LogUniform,
Gaussian,
Normal,
Rayleigh,
Exponential,
Isotropic
} |
| Defines the type of probability distribution from which the value is drawn.
|
|
|
| PhaseRange (Distribution dist, PhaseType type=PhaseType.MeanAnomaly, EpochType epoch=EpochType.GameStart, double min=0.0, double max=1.0, double avg=0.0, double stddev=0.0) |
| Assigns situation-specific default values to the ValueRange. More...
|
|
PhaseType | getParam () |
| Returns the parametrization used by this ValueRange. More...
|
|
EpochType | getEpoch () |
| Returns the epoch at which the phase is evaluated. More...
|
|
| ValueRange (Distribution dist, double min=0.0, double max=1.0, double avg=0.0, double stdDev=0.0) |
| Assigns situation-specific default values to the ValueRange. More...
|
|
double | draw () |
| Generates a random number consistent with the distribution. More...
|
|
|
virtual void | parseAll () |
| Ensures that any abstract entries in the config file are properly interpreted. More...
|
|
static double | parseOrbitalElement (string rawValue) |
| Converts an arbitrary string representation of an orbital element to a specific value. More...
|
|
static double | getPlanetProperty (string planet, string property) |
| Returns the desired property of a known celestial body. More...
|
|
const string | planetFormat = "(?<planet>.+)" |
| Parse format for planet names. More...
|
|
const string | propFormat = "(?<prop>rad|soi|sma|per|apo|ecc|inc|(a|l)pe|lan|mn(a|l)0)" |
| Parse format for planet properties. More...
|
|
const string | planetProp = planetFormat + "\\s*\\.\\s*" + propFormat |
| Parse format for planets, with properties. More...
|
|
Distribution | dist |
| The probability distribution from which the value is drawn.
|
|
string | rawMin |
| Abstract string representation of min .
|
|
double | min |
| The minimum allowed value (not always used)
|
|
string | rawMax |
| Abstract string representation of max .
|
|
double | max |
| The maximum allowed value (not always used)
|
|
string | rawAvg |
| Abstract string representation of avg .
|
|
double | avg |
| The average value (not always used)
|
|
string | rawStdDev |
| Abstract string representation of stdDev .
|
|
double | stdDev |
| The standard deviation of the values (not always used)
|
|
Specialization of ValueRange for orbital phase parameter.
- Todo:
- I don't think that PhaseRange is a subtype of ValueRange in the Liskov sense... check!
Assigns situation-specific default values to the ValueRange.
- Parameters
-
[in] | dist | The distribution from which the value will be drawn |
[in] | type | The description of orbit position that is used |
[in] | epoch | The time at which the orbit position should be measured |
[in] | min,max | The minimum and maximum values allowed for distributions. May be unused. |
[in] | avg | The mean value returned. May be unused. |
[in] | stddev | The standard deviation of values returned. May be unused. |
- Postcondition
- The given values will be used by draw() unless they are specifically overridden by a ConfigNode.
- Exception Safety
- Does not throw exceptions
Returns the epoch at which the phase is evaluated.
- Returns
- The epoch at which the orbital position is specified
- Exception Safety
- Does not throw exceptions.
Returns the parametrization used by this ValueRange.
- Returns
- The orbit position parameter represented by this object.
- Exception Safety
- Does not throw exceptions.
The documentation for this class was generated from the following file: