mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-07 20:09:58 -05:00
divide signal case 'both' into an up and downlink
This commit is contained in:
@@ -65,18 +65,30 @@ namespace openspace {
|
||||
}
|
||||
else if (structSignal.direction == "downlink") {
|
||||
structSignal.startTimeExtension = structSignal.lightTravelTime;
|
||||
}
|
||||
}// if we have both an uplink and a downlink, handle these like two different signals
|
||||
else if (structSignal.direction == "both") {
|
||||
// handle ordinary signal like uplink
|
||||
structSignal.endTimeExtension = structSignal.lightTravelTime;
|
||||
structSignal.startTimeExtension = structSignal.lightTravelTime;
|
||||
structSignal.direction = "uplink";
|
||||
// Make an extra downlink
|
||||
SignalManager::Signal structSignal2;
|
||||
structSignal2.dishName = structSignal.dishName;
|
||||
structSignal2.spacecraft = structSignal.spacecraft;
|
||||
structSignal2.endTime = structSignal.endTime;
|
||||
structSignal2.startTime = structSignal.startTime;
|
||||
structSignal2.direction = "downlink";
|
||||
structSignal2.lightTravelTime = 71397.6659308273;
|
||||
structSignal2.startTimeExtension = structSignal.lightTravelTime;
|
||||
|
||||
//Add extra signal to vector of signals
|
||||
signalData.signals.push_back(structSignal2);
|
||||
}
|
||||
//Add signal to vector of signals
|
||||
signalData.signals.push_back(structSignal);
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
LERROR(fmt::format("Error in json object number {} while reading signal data file '{}'", objectCounter, filename));
|
||||
}
|
||||
|
||||
//Add signal to vector of signals
|
||||
signalData.signals.push_back(structSignal);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -378,7 +378,7 @@ void RenderableSignals::pushSignalDataToVertexArray(SignalManager::Signal signal
|
||||
_vertexArray.push_back(color.g);
|
||||
_vertexArray.push_back(color.b);
|
||||
_vertexArray.push_back(color.a);
|
||||
// Todo: handle case "both"
|
||||
|
||||
if (signal.direction == "uplink") {
|
||||
_vertexArray.push_back(0.0);
|
||||
}
|
||||
@@ -396,7 +396,6 @@ void RenderableSignals::pushSignalDataToVertexArray(SignalManager::Signal signal
|
||||
_vertexArray.push_back(color.b);
|
||||
_vertexArray.push_back(color.a);
|
||||
|
||||
// Todo: handle case "both"
|
||||
if (signal.direction == "downlink") {
|
||||
_vertexArray.push_back(0.0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user