IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 794e6426 authored by André Schmidt's avatar André Schmidt Committed by ralfulrich
Browse files

small corrections

parent 9be34b59
No related branches found
No related tags found
1 merge request!404adding Geomagnetic Models
......@@ -149,8 +149,8 @@ namespace corsika {
p.h = p.h + (year - epoch) * p.dh;
if (next_Epoch != 0) {
ParameterLine next_p = parameters_[next_Epoch][j];
p.g = p.g + (next_p.g - p.g) * (year - epoch) / (next_Epoch - epoch);
p.h = p.h + (next_p.h - p.h) * (year - epoch) / (next_Epoch - epoch);
p.g = p.g + (next_p.g - p.g) * (year - epoch) / (double(next_Epoch) - epoch);
p.h = p.h + (next_p.h - p.h) * (year - epoch) / (double(next_Epoch) - epoch);
}
legendre = pow(-1, p.m) * std::assoc_legendre(p.n, p.m, sin(lat_sph));
......
......@@ -104,7 +104,7 @@ TEST_CASE("UniformMagneticField w/ Homogeneous Medium") {
MagneticFieldVector Earth_B_4 = igrf.getField(2012, 0_km, 0, -120);
CHECK(Earth_B_1.getX(gCS) / 1_nT == Approx(5821).margin(0.5));
CHECK(Earth_B_1.getY(gCS) / 1_nT == Approx(-14796).margin(0.5));
CHECK(Earth_B_1.getZ(gCS) / 1_nT == Approx(497756).margin(0.5));
CHECK(Earth_B_1.getZ(gCS) / 1_nT == Approx(49776).margin(0.5));
CHECK(Earth_B_2.getX(gCS) / 1_nT == Approx(2957).margin(0.5));
CHECK(Earth_B_2.getY(gCS) / 1_nT == Approx(-1014).margin(0.5));
CHECK(Earth_B_2.getZ(gCS) / 1_nT == Approx(-57610).margin(0.5));
......
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