Stores parameters to calculate a planet's temperature at an arbitrary altitude. The way the temperature is calculated is divided in intervals, which can have constant temperatures, linear functions, or quadratic functions.
More...
|
bool | AddConstantStep (float limit, float K) |
| Used to add an extra constant interval. If this is the first interval, a minimum altitude of 0 will be considered, if limit is less than 0, a maximum altitude of 0 will be considered. More...
|
|
bool | AddInitialConstantStep (float min, float max, float K) |
| Used to add a constant interval as the initial one, providing equation coefficients More...
|
|
bool | AddInitialLinearStep (float temp1, float alt1, float temp2, float alt2) |
| Used to add a linear interval as the initial one, providing the interval's values More...
|
|
bool | AddInitialLinearStepEquation (float min, float max, float m, float b) |
| Used to add a linear interval as the initial one, providing rect parameters. More...
|
|
bool | AddInitialQuadraticStep (float min, float max, float A, float B, float C) |
| Used to add a quadratic interval as the initial one, providing equation coefficients More...
|
|
bool | AddLinearStep (float limit, float temp2) |
| Used to add an extra linear interval. If this is the first one, a minimum altitude of 0 will be considered, if limit is less than 0, a maximum altitude of 0 will be considered, the initial temperature in this case will be considered 0. More...
|
|
bool | AddQuadraticStep (float limit, float A, float B, float C) |
| Used to add an extra quadratic interval. If this is the first one, a minimum altitude of 0 will be considered, if limit is less than 0, a maximum altitude of 0 will be considered. More...
|
|
| TemperatureModel () |
|
Stores parameters to calculate a planet's temperature at an arbitrary altitude. The way the temperature is calculated is divided in intervals, which can have constant temperatures, linear functions, or quadratic functions.
Usage: Create a temperature model, then add intervals to it, example:
TemperatureModel Earth = new TemperatureModel(); Earth.addInitialLinearInterval(15,0,-45,12); Earth.addLinearInterval(); Earth.addConstantInterval(); Earth.addLinearInterval();
TemperatureModel.TemperatureModel |
( |
| ) |
|
|
inline |
bool TemperatureModel.AddConstantStep |
( |
float |
limit, |
|
|
float |
K |
|
) |
| |
|
inline |
Used to add an extra constant interval. If this is the first interval, a minimum altitude of 0 will be considered, if limit is less than 0, a maximum altitude of 0 will be considered.
- Parameters
-
limit | The limit of this interval, it has to be bigger than all previous limits |
K | Constant temperature value |
- Returns
- true if the interval was added correctly, false otherwise
bool TemperatureModel.AddInitialConstantStep |
( |
float |
min, |
|
|
float |
max, |
|
|
float |
K |
|
) |
| |
|
inline |
Used to add a constant interval as the initial one, providing equation coefficients
- Parameters
-
min | lowest altitude in the interval |
max | highest altitude in the interval |
K | Constant temperature value |
- Returns
bool TemperatureModel.AddInitialLinearStep |
( |
float |
temp1, |
|
|
float |
alt1, |
|
|
float |
temp2, |
|
|
float |
alt2 |
|
) |
| |
|
inline |
Used to add a linear interval as the initial one, providing the interval's values
- Parameters
-
temp1 | First temperature value |
alt1 | First altitude value |
temp2 | Second temperature value |
alt2 | Second altitude value |
- Returns
- true if the interval was added correctly, false otherwise
bool TemperatureModel.AddInitialLinearStepEquation |
( |
float |
min, |
|
|
float |
max, |
|
|
float |
m, |
|
|
float |
b |
|
) |
| |
|
inline |
Used to add a linear interval as the initial one, providing rect parameters.
- Parameters
-
min | lowest altitude in the interval |
max | greatest altitude in the interval |
m | slope of the rect's equation |
b | b of the y = mx+b rect's equation |
- Returns
- true if the interval was added correctly, false otherwise
bool TemperatureModel.AddInitialQuadraticStep |
( |
float |
min, |
|
|
float |
max, |
|
|
float |
A, |
|
|
float |
B, |
|
|
float |
C |
|
) |
| |
|
inline |
Used to add a quadratic interval as the initial one, providing equation coefficients
- Parameters
-
min | lowest altitude in the interval |
max | highest altitude in the interval |
A | (A)x^2 + Bx + C |
B | Ax^2 + (B)x + C |
C | Ax^2 + Bx + (C) |
- Returns
bool TemperatureModel.AddLinearStep |
( |
float |
limit, |
|
|
float |
temp2 |
|
) |
| |
|
inline |
Used to add an extra linear interval. If this is the first one, a minimum altitude of 0 will be considered, if limit is less than 0, a maximum altitude of 0 will be considered, the initial temperature in this case will be considered 0.
- Parameters
-
limit | The limit of this interval, it has to be bigger than all previous limits |
temp2 | Temperature value at the limit |
- Returns
- true if the interval was added correctly, false otherwise
bool TemperatureModel.AddQuadraticStep |
( |
float |
limit, |
|
|
float |
A, |
|
|
float |
B, |
|
|
float |
C |
|
) |
| |
|
inline |
Used to add an extra quadratic interval. If this is the first one, a minimum altitude of 0 will be considered, if limit is less than 0, a maximum altitude of 0 will be considered.
- Parameters
-
limit | The limit of this interval, it has to be bigger than all previous limits |
A | Quadratic coefficient of the equation y = Ax^2 + Bx + C |
B | Linear coefficient of the equation y = Ax^2 + Bx + C |
C | Constant coefficient of the equation y = Ax^2 + Bx + C |
- Returns
The documentation for this class was generated from the following file: