spherical grid now works

This commit is contained in:
Elon
2019-06-18 09:54:20 -06:00
parent 6f8095f15c
commit 3fbe042250
2 changed files with 6 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
return {{
Type = "GenerateDebrisVolumeTask",
Dimensions = {32, 32, 64},
Dimensions = {20, 28, 28},
LowerDomainBound = {0, 0, 0},
UpperDomainBound = {1, math.pi, 2 * math.pi},
InputPath = "${SYNC}/url/satellite_tle_data_DebrisAll/files/allDebrisInOneTLE.txt",

View File

@@ -418,6 +418,7 @@ std::vector<glm::dvec3> getPositionBuffer(std::vector<KeplerParameters> tleData,
glm::dvec3 sphPos;
if( gridType == "Spherical"){
sphPos = cartesianToSphericalCoord(position);
if(sphPos.y < minTheta){
minTheta = sphPos.y;
}
@@ -445,6 +446,8 @@ std::vector<glm::dvec3> getPositionBuffer(std::vector<KeplerParameters> tleData,
LINFO(fmt::format("max phi: {} ", maxPhi));
LINFO(fmt::format("min theta: {} ", minTheta));
LINFO(fmt::format("min phi: {} ", minPhi));
return positionBuffer;
}
// std::vector<glm::dvec3> generatePositions(int numberOfPositions) {
@@ -499,10 +502,10 @@ int getIndexFromPosition(glm::dvec3 position, glm::uvec3 dim, float maxApogee, s
}
else if(gridType == "Spherical"){
if(position.y >= 3.141592){
if(position.y >= 3.1415926535897932384626433832795028){
position.y = 0;
}
if(position.z >= (2 * 3.141592)){
if(position.z >= (2 * 3.1415926535897932384626433832795028)){
position.z = 0;
}