Skip to content

Commit

Permalink
Add optics namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
200km committed Jul 20, 2024
1 parent aba36b1 commit f539e9b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/math_physics/optics/gaussian_beam_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include <cassert>
#include <math_physics/math/constants.hpp>

namespace optics {

GaussianBeamBase::GaussianBeamBase(double wavelength_m, double radius_beam_waist_m, double total_power_W)
: wavelength_m_(wavelength_m), radius_beam_waist_m_(radius_beam_waist_m), total_power_W_(total_power_W) {}

Expand Down Expand Up @@ -46,3 +48,5 @@ double GaussianBeamBase::CalcIntensity_W_m2(double distance_from_beam_waist_m, d
double intensity_W_m2 = peak_intensity_W_m2 * gaussian_dist;
return intensity_W_m2;
}

} // namespace optics
4 changes: 4 additions & 0 deletions src/math_physics/optics/gaussian_beam_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#include "../math/vector.hpp"

namespace optics {

/**
* @class GaussianBeamBase
* @brief Class to express gaussian beam laser
Expand Down Expand Up @@ -107,4 +109,6 @@ class GaussianBeamBase {
math::Vector<3> position_beam_waist_i_m_{0.0}; //!< Position of beam waist in the inertial frame [m] (Not used?)
};

} // namespace optics

#endif // S2E_LIBRARY_OPTICS_GAUSSIAN_BEAM_BASE_HPP_

0 comments on commit f539e9b

Please sign in to comment.