Skip to content

Commit

Permalink
Changed sun's direction from CCW -> CW (space-ros#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
jchaudhary21 authored and mkhansenbot committed Sep 9, 2024
1 parent cdf41f4 commit dc8ada7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_gz_plugins/src/DayLightManager/DayLightManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ void gz::sim::plugins::DayLightManager::Setup(gz::sim::EntityComponentManager &_
</model>
</sdf>
)");

// Insert sun_sphere model
gz::msgs::EntityFactory sunSphereSpawnEntity;
gz::msgs::Boolean sunSphereSpawnRes;
Expand Down Expand Up @@ -317,7 +317,7 @@ void gz::sim::plugins::DayLightManager::SetSunPosition()

// Update sun coordinates
this->_x_coordinate = this->_radius * cos(alpha) * cos(theta) + this->_x_bias;
this->_y_coordinate = this->_radius * cos(alpha) * sin(theta) + this->_y_bias;
this->_y_coordinate = this->_radius * cos(alpha) * -1* sin(theta) + this->_y_bias;
this->_z_coordinate = this->_radius * sin(alpha);

// Set new sun position
Expand Down

0 comments on commit dc8ada7

Please sign in to comment.