[Imagery] Update to be compatible with VIPER (#3744)

* heading, sun heading, and camera pan  are all absolute directions
* removing roll and pitch keys as they will not be necessary
* proofing against empty historical or realtime ids from config
* adding checks in imagerylayout for missing properties

Co-authored-by: Jamie Vigliotta <jamie.j.vigliotta@nasa.gov>
This commit is contained in:
David Tsay
2021-03-08 15:27:35 -08:00
committed by GitHub
parent bffe79ecbd
commit cfaaf6b1fe
6 changed files with 57 additions and 58 deletions

View File

@@ -73,7 +73,7 @@ export default class RelatedTelemetry {
await this._initializeHistorical(key);
}
if (this[key].realtime && this[key].realtime.telemetryObjectId) {
if (this[key].realtime && this[key].realtime.telemetryObjectId && this[key].realtime.telemetryObjectId !== '') {
await this._intializeRealtime(key);
}
}
@@ -82,7 +82,9 @@ export default class RelatedTelemetry {
}
async _initializeHistorical(key) {
if (this[key].historical.telemetryObjectId) {
if (!this[key].historical.telemetryObjectId) {
this[key].historical.hasTelemetryOnDatum = true;
} else if (this[key].historical.telemetryObjectId !== '') {
this[key].historicalDomainObject = await this._openmct.objects.get(this[key].historical.telemetryObjectId);
this[key].requestLatestFor = async (datum) => {
@@ -96,8 +98,6 @@ export default class RelatedTelemetry {
return results[results.length - 1];
};
} else {
this[key].historical.hasTelemetryOnDatum = true;
}
}