IAP GITLAB

Skip to content
Snippets Groups Projects
Commit c02a20b3 authored by ralfulrich's avatar ralfulrich
Browse files

style

parent e7cc856e
No related branches found
No related tags found
1 merge request!404adding Geomagnetic Models
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
namespace corsika { namespace corsika {
inline GeomagneticModel::GeomagneticModel(Point const& center, inline GeomagneticModel::GeomagneticModel(Point const& center,
std::string const& dataFile) std::string const& dataFile)
: center_(center) { : center_(center) {
// Read in coefficients // Read in coefficients
...@@ -73,8 +73,7 @@ namespace corsika { ...@@ -73,8 +73,7 @@ namespace corsika {
int iEpoch = int(epoch); int iEpoch = int(epoch);
if (parameters_.count(iEpoch) != 0) { if (parameters_.count(iEpoch) != 0) {
throw std::runtime_error( throw std::runtime_error("GeomagneticModel input file has duplicate Epoch. Fix.");
"GeomagneticModel input file has duplicate Epoch. Fix.");
} }
parameters_[iEpoch] = std::vector<ParameterLine>(nPar); parameters_[iEpoch] = std::vector<ParameterLine>(nPar);
...@@ -89,9 +88,9 @@ namespace corsika { ...@@ -89,9 +88,9 @@ namespace corsika {
} }
inline MagneticFieldVector GeomagneticModel::getField(double const year, inline MagneticFieldVector GeomagneticModel::getField(double const year,
LengthType const altitude, LengthType const altitude,
double const latitude, double const latitude,
double const longitude) { double const longitude) {
int iYear = int(year); int iYear = int(year);
int iEpoch = 0; int iEpoch = 0;
...@@ -185,7 +184,8 @@ namespace corsika { ...@@ -185,7 +184,8 @@ namespace corsika {
magneticfield[2] * cos(lat_sph - lat_geo); magneticfield[2] * cos(lat_sph - lat_geo);
return MagneticFieldVector{center_.getCoordinateSystem(), magneticfield_geo[0] * 1_nT, return MagneticFieldVector{center_.getCoordinateSystem(), magneticfield_geo[0] * 1_nT,
magneticfield_geo[1] * -1_nT, magneticfield_geo[2] * -1_nT}; magneticfield_geo[1] * -1_nT,
magneticfield_geo[2] * -1_nT};
} }
} // namespace corsika } // namespace corsika
\ No newline at end of file
Subproject commit cfcd301fefa951d04d259cbd8866ce855e20fd0c Subproject commit dd4f4dcf325b40f76bb7e60bf61e77ebf99fa098
Subproject commit eded833608bbc6845f9d7e2af4e151683f27818f Subproject commit c42a119ea1dc5053cb748994a9d8a4561f2206d5
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment