mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-23 20:50:59 -05:00
getting min perigee and max apogee
This commit is contained in:
@@ -147,6 +147,25 @@ namespace openspace {
|
||||
2044, 2048, 2052, 2056
|
||||
};
|
||||
|
||||
void calculateMaxApoAndMinPeri(std::vector<KeplerParameters> fileVector){
|
||||
//int n = fileVector.size();
|
||||
double maxApogee = 0;
|
||||
double minPerigee = 5000;
|
||||
for (const auto& dataElement : fileVector){ //(int i=0 ; i < n ; ++i ) {
|
||||
double ph = dataElement.semiMajorAxis * (1 - dataElement.eccentricity);
|
||||
double ah = dataElement.semiMajorAxis *(1 + dataElement.eccentricity);
|
||||
|
||||
if (ph < minPerigee)
|
||||
minPerigee = ph;
|
||||
|
||||
if (ah > maxApogee)
|
||||
maxApogee = ah;
|
||||
}
|
||||
LINFO(fmt::format("Min Perigee: {} ", minPerigee));
|
||||
LINFO(fmt::format("Max Apogee: {} ", maxApogee));
|
||||
|
||||
}
|
||||
|
||||
// Count the number of full days since the beginning of 2000 to the beginning of
|
||||
// the parameter 'year'
|
||||
int countDays(int year) {
|
||||
@@ -572,6 +591,10 @@ void RenderableSatellites::readTLEFile(const std::string& filename) {
|
||||
|
||||
} // !for loop
|
||||
file.close();
|
||||
|
||||
// get max apergee and min perigee
|
||||
calculateMaxApoAndMinPeri(_TLEData);
|
||||
|
||||
}
|
||||
/*
|
||||
RenderableSatellites::~RenderableSatellites() {
|
||||
|
||||
+2
-2
@@ -6,13 +6,13 @@
|
||||
-- occurs in a single window, a fisheye projection, or a dome cluster system
|
||||
|
||||
-- A regular 1280x720 window
|
||||
SGCTConfig = sgct.config.single{}
|
||||
-- SGCTConfig = sgct.config.single{}
|
||||
|
||||
-- A regular 1920x1080 window
|
||||
-- SGCTConfig = sgct.config.single{1920, 1080}
|
||||
|
||||
-- A windowed 1920x1080 fullscreen
|
||||
-- SGCTConfig = sgct.config.single{1920, 1080, border=false, windowPos={0,0}, shared=true, name="WV_OBS_SPOUT1"}
|
||||
SGCTConfig = sgct.config.single{1920, 1080, border=false, windowPos={0,0}, shared=true, name="WV_OBS_SPOUT1"}
|
||||
|
||||
-- A 1k fisheye rendering
|
||||
-- SGCTConfig = sgct.config.fisheye{1024, 1024}
|
||||
|
||||
Reference in New Issue
Block a user