Represents the "remote sensing" information available for an IDiscoverable More...
Public Member Functions | |
DiscoveryInfo (IDiscoverable host, DiscoveryLevels level, double untrackedLifetime) | |
Initializes a Class C asteroid More... | |
DiscoveryInfo (IDiscoverable host, double untrackedLifetime) | |
Initializes a Class C asteroid, and assumes all properties are already known. More... | |
DiscoveryInfo (IDiscoverable host) | |
Initializes a Class C asteroid, and assumes all properties are already known. More... | |
static string | GetSignalStrengthCaption (double signal) |
Returns a text description of the signal strength More... | |
static string | GetSizeClassDescription (UntrackedObjectClass sizeClass) |
Returns long description of asteroid type More... | |
static string | GetSizeClassSizes (UntrackedObjectClass sizeClass) |
Returns asteroid size displayed in map view More... | |
double | GetSignalLife (double UT) |
Returns the fraction of the asteroid's unobservedLifetime that remains More... | |
double | GetSignalStrength (double UT) |
Returns amount of time remaining until the asteroid is lost, in units of referenceLifetime More... | |
bool | HaveKnowledgeAbout (DiscoveryLevels lvl) |
Function testing if an asteroid has a particular discovery level More... | |
void | Load (ConfigNode node) |
void | Save (ConfigNode node) |
void | SetLastObservedTime (double UT) |
Logs an asteroid observation More... | |
void | SetLevel (DiscoveryLevels level) |
Sets the level of knowledge the player has for the asteroid More... | |
void | SetReferenceLifetime (double time) |
Updates the reference lifetime More... | |
void | SetUnobservedLifetime (double time) |
Updates the time for which the asteroid can go untracked, preserving class invariants More... | |
void | SetUntrackedObjectSize (UntrackedObjectClass size) |
Updates the asteroid size More... | |
Public Attributes | |
KnowledgeItem< double > | distance |
Tracking station wrapper for IDiscoverable.RevealAltitude() More... | |
KnowledgeItem< string > | situation |
Tracking station wrapper for IDiscoverable.RevealSituationString() More... | |
KnowledgeItem< double > | speed |
Tracking station wrapper for IDiscoverable.RevealSpeed() More... | |
KnowledgeItem< float > | mass |
Tracking station wrapper for IDiscoverable.RevealMass() More... | |
KnowledgeItem< string > | type |
Tracking station wrapper for IDiscoverable.RevealType() More... | |
KnowledgeItem < UntrackedObjectClass > | size |
Tracking station wrapper for this.objectSize More... | |
KnowledgeItem< string > | trackingStatus |
Tracking station wrapper for Level? More... | |
KnowledgeItem< double > | signalStrengthPercent |
Tracking station wrapper for GetSignalStrength() More... | |
KnowledgeItem< string > | name |
Tracking station wrapper for IDiscoverable.RevealName() More... | |
KnowledgeItem< string > | signalStrengthLevel |
Tracking station wrapper for GetSignalStrengthCaption() More... | |
Properties | |
double | fadeUT [get, set] |
The time at which the asteroid is scheduled to be deleted More... | |
double | lastObservedTime [get, set] |
The time at which the asteroid was last tracked More... | |
DiscoveryLevels | Level [get, set] |
The asteroid's tracking state More... | |
UntrackedObjectClass | objectSize [get, set] |
The size class (A-E) of the asteroid More... | |
double | referenceLifetime [get, set] |
The time for which an asteroid can go untracked if it starts at full signal strength More... | |
double | unobservedLifetime [get, set] |
The time for which the asteroid can go untracked before it is deleted More... | |
Represents the "remote sensing" information available for an IDiscoverable
<invariant>this.fadeUT = this.lastObservedTime + this.unobservedLifetime</invariant>
DiscoveryInfo.DiscoveryInfo | ( | IDiscoverable | host, |
DiscoveryLevels | level, | ||
double | untrackedLifetime | ||
) |
Initializes a Class C asteroid
host | The vessel or celestial body to which this DiscoveryInfo applies |
level | The amount of knowledge for the asteroid |
untrackedLifetime | The amount of time the asteroid can remain untracked before disappearing |
DiscoveryInfo.DiscoveryInfo | ( | IDiscoverable | host, |
double | untrackedLifetime | ||
) |
Initializes a Class C asteroid, and assumes all properties are already known.
host | The vessel or celestial body to which this DiscoveryInfo applies |
untrackedLifetime | The amount of time the asteroid can remain untracked before disappearing |
DiscoveryInfo.DiscoveryInfo | ( | IDiscoverable | host | ) |
Initializes a Class C asteroid, and assumes all properties are already known.
host | The vessel or celestial body to which this DiscoveryInfo applies |
double DiscoveryInfo.GetSignalLife | ( | double | UT | ) |
Returns the fraction of the asteroid's unobservedLifetime that remains
UT | The time at which the signal life is measured |
GetSignalLife(t_discover) == 1.0 GetSignalLife(fadeUT) == 0.0
double DiscoveryInfo.GetSignalStrength | ( | double | UT | ) |
Returns amount of time remaining until the asteroid is lost, in units of referenceLifetime
UT | The time at which the signal strength is measured |
GetSignalStrength(t_discover) == unobservedLifetime / referenceLifetime GetSignalStrength(fadeUT) == 0.0
static string DiscoveryInfo.GetSignalStrengthCaption | ( | double | signal | ) |
Returns a text description of the signal strength
If signal is in [0.0, 0.2), returns "Very Weak"
If signal is in [0.2, 0.4), returns "Weak"
If signal is in [0.4, 0.6), returns "Average"
If signal is in [0.6, 0.8), returns "Good"
If signal is in [0.8, 1.0], returns "Strong"
static string DiscoveryInfo.GetSizeClassDescription | ( | UntrackedObjectClass | sizeClass | ) |
Returns long description of asteroid type
sizeClass | The asteroid type to label |
The asteroid class explanation printed on the tracking station's info panel.
"Class C Objects are about average-sized..."
If not a valid value of UntrackedObjectClass, returns "This seems to be a non-standard size class. Who knows what it'll look like?"
static string DiscoveryInfo.GetSizeClassSizes | ( | UntrackedObjectClass | sizeClass | ) |
Returns asteroid size displayed in map view
sizeClass | The asteroid type to label |
The asteroid class printed beneath an untracked asteroid.
"C (Medium)"
If not a valid value of UntrackedObjectClass, returns "???"
bool DiscoveryInfo.HaveKnowledgeAbout | ( | DiscoveryLevels | lvl | ) |
Function testing if an asteroid has a particular discovery level
lvl | The flag(s) whose presence must be tested. |
void DiscoveryInfo.Load | ( | ConfigNode | node | ) |
void DiscoveryInfo.Save | ( | ConfigNode | node | ) |
void DiscoveryInfo.SetLastObservedTime | ( | double | UT | ) |
Logs an asteroid observation
UT | The new time of last observation |
void DiscoveryInfo.SetLevel | ( | DiscoveryLevels | level | ) |
Sets the level of knowledge the player has for the asteroid
level | The flags representing the asteroid's exploration state |
void DiscoveryInfo.SetReferenceLifetime | ( | double | time | ) |
Updates the reference lifetime
time | Changes the scaling of signal strength. |
void DiscoveryInfo.SetUnobservedLifetime | ( | double | time | ) |
Updates the time for which the asteroid can go untracked, preserving class invariants
time | The maximum time to track the asteroid |
void DiscoveryInfo.SetUntrackedObjectSize | ( | UntrackedObjectClass | size | ) |
Updates the asteroid size
size | The asteroid class (A-E) |
KnowledgeItem<double> DiscoveryInfo.distance |
Tracking station wrapper for IDiscoverable.RevealAltitude()
Requires DiscoveryLevels.StateVectors
KnowledgeItem<float> DiscoveryInfo.mass |
Tracking station wrapper for IDiscoverable.RevealMass()
Requires DiscoveryLevels.Appearance
KnowledgeItem<string> DiscoveryInfo.name |
Tracking station wrapper for IDiscoverable.RevealName()
Requires DiscoveryLevels.Name
KnowledgeItem<string> DiscoveryInfo.signalStrengthLevel |
Tracking station wrapper for GetSignalStrengthCaption()
Always visible
KnowledgeItem<double> DiscoveryInfo.signalStrengthPercent |
KnowledgeItem<string> DiscoveryInfo.situation |
Tracking station wrapper for IDiscoverable.RevealSituationString()
Requires DiscoveryLevels.StateVectors
KnowledgeItem<UntrackedObjectClass> DiscoveryInfo.size |
Tracking station wrapper for this.objectSize
Always visible
KnowledgeItem<double> DiscoveryInfo.speed |
Tracking station wrapper for IDiscoverable.RevealSpeed()
Requires DiscoveryLevels.StateVectors
KnowledgeItem<string> DiscoveryInfo.trackingStatus |
Tracking station wrapper for Level?
Always visible
KnowledgeItem<string> DiscoveryInfo.type |
Tracking station wrapper for IDiscoverable.RevealType()
Requires DiscoveryLevels.Appearance
|
getset |
The time at which the asteroid is scheduled to be deleted
|
getset |
The time at which the asteroid was last tracked
Stored in persistence file
|
getset |
The asteroid's tracking state
Stored in persistence file as state
|
getset |
The size class (A-E) of the asteroid
Stored in persistence file as size
|
getset |
The time for which an asteroid can go untracked if it starts at full signal strength
Alternate definition: the time needed for the signal strength to fall by 1 unit.
Always equals 86400 × ScenarioDiscoverableObjects.maxUntrackedLifetime. For the default spawn settings, this is 1728000 seconds, or 20 Earth days.
Stored in persistence file as refTime
|
getset |
The time for which the asteroid can go untracked before it is deleted
Stored in persistence file as lifetime