Skip to content

Commit

Permalink
Convert location coordinates to geodetic instead of cartesian
Browse files Browse the repository at this point in the history
Closes: #1557
  • Loading branch information
375gnu committed Aug 4, 2023
1 parent f5a5307 commit 6f5b8d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/celengine/solarsys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Location* CreateLocation(const Hash* locationData,
Location* location = new Location();

auto longlat = locationData->getSphericalTuple("LongLat").value_or(Eigen::Vector3d::Zero());
Eigen::Vector3f position = body->planetocentricToCartesian(longlat).cast<float>();
Eigen::Vector3f position = body->geodeticToCartesian(longlat).cast<float>();
location->setPosition(position);

auto size = locationData->getLength<float>("Size").value_or(1.0f);
Expand Down

0 comments on commit 6f5b8d2

Please # to comment.