Skip to content

Commit

Permalink
Fixed SolarLon to compute from Table if cube is spiceinited (#4418)
Browse files Browse the repository at this point in the history
* Updated solarLon to used table when spiceinited

* Updated truth data for CameraPointInfo

* Updated changelog

* Updated camdev test outputs
  • Loading branch information
amystamile-usgs authored Jun 2, 2021
1 parent c978036 commit 561e21e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ release.
- Fixed an arccos evaluating a double close to either 1, -1 when calculating the ground azimuth in camera.cpp. [#4393](https://github.com/USGS-Astrogeology/ISIS3/issues/4393)
- Fixed hist outputs to N/A when all DNs are special pixels. [#3709](https://github.com/USGS-Astrogeology/ISIS3/issues/3709)
- Fixed an Minimum|Maximum calculation error when comparing all equal data in the qview statstics tool. [#4433](https://github.com/USGS-Astrogeology/ISIS3/issues/4414)
- Fixed SolarLon to compute from Table if cube is spiceinited. [#3703](https://github.com/USGS-Astrogeology/ISIS3/issues/3703)

## [5.0.0] - 2021-04-01

Expand Down
4 changes: 2 additions & 2 deletions isis/src/base/objs/CameraPointInfo/CameraPointInfo.truth
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Group = GroundPoint
EphemerisTime = -182103311.79772 <seconds>
UTC = 1994-03-25T19:43:48.0166464
LocalSolarTime = 12.59760019772 <hour>
SolarLongitude = 129.01790468942 <DEGREE>
SolarLongitude = 129.01116499267 <DEGREE>

# Look Direction Unit Vectors in Body Fixed, J2000, and Camera Coordinate Systems.
LookDirectionBodyFixed = (-0.13147866432244, 0.010191826600814,
Expand Down Expand Up @@ -114,7 +114,7 @@ Group = GroundPoint
EphemerisTime = -182103311.79772 <seconds>
UTC = 1994-03-25T19:43:48.0166464
LocalSolarTime = 11.791629846611 <hour>
SolarLongitude = 129.01790468942 <DEGREE>
SolarLongitude = 129.01116499267 <DEGREE>

# Look Direction Unit Vectors in Body Fixed, J2000, and Camera Coordinate Systems.
LookDirectionBodyFixed = (-0.076075624316564, -0.015172515119546,
Expand Down
2 changes: 1 addition & 1 deletion isis/src/base/objs/Spice/Spice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1405,7 +1405,7 @@ namespace Isis {
return;
}

if (m_usingAle) {
if (m_usingAle || !m_usingNaif) {
double og_time = m_bodyRotation->EphemerisTime();
m_bodyRotation->SetEphemerisTime(et.Et());
m_sunPosition->SetEphemerisTime(et.Et());
Expand Down
8 changes: 4 additions & 4 deletions isis/tests/FunctionalTestsCamdev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ TEST_F(LineScannerCube, FunctionalTestCamdevDefault) {
stddev += oCubeStats->StandardDeviation();
}

EXPECT_NEAR(average/oCube.bandCount(), -3.3918738393628582e+306, 0.0000001);
EXPECT_NEAR(sum/oCube.bandCount(), 112847425994.19986, 0.0000001);
EXPECT_NEAR(stddev/oCube.bandCount(),-3.3918738393628582e+306, 0.0000001);
EXPECT_NEAR(validPixels/oCube.bandCount(), 11832.33962264151, 0.0000001);
EXPECT_NEAR(average/oCube.bandCount(), 9183553.1942929607, 0.0000001);
EXPECT_NEAR(sum/oCube.bandCount(), 112847454091.56306, 0.0000001);
EXPECT_NEAR(stddev/oCube.bandCount(), 11.299672545293422, 0.0000001);
EXPECT_NEAR(validPixels/oCube.bandCount(), 12064.188679245282, 0.0000001);
}
2 changes: 1 addition & 1 deletion isis/tests/FunctionalTestsCaminfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ TEST_F(DefaultCube, FunctionalTestCaminfoDefault) {
EXPECT_NEAR(geometry.findKeyword("IncidenceAngle"), 70.127983086993, 0.0001);
EXPECT_NEAR(geometry.findKeyword("NorthAzimuth"), 332.65918485196, 0.0001);
EXPECT_NEAR(geometry.findKeyword("OffNadir"), 9.9273765164008, 0.0001);
EXPECT_NEAR(geometry.findKeyword("SolarLongitude"), -1.7976931348623099e+308, 0.0001);
EXPECT_NEAR(geometry.findKeyword("SolarLongitude"), 294.73518830594998, 0.0001);
EXPECT_NEAR(geometry.findKeyword("LocalTime"), 7.7862975334032, 0.0001);
EXPECT_NEAR(geometry.findKeyword("TargetCenterDistance"), 4160.7294345949, 0.0001);
EXPECT_NEAR(geometry.findKeyword("SlantDistance"), 762.37204489156, 0.0001);
Expand Down
2 changes: 1 addition & 1 deletion isis/tests/FunctionalTestsCampt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ TEST_F(DefaultCube, FunctionalTestCamptDefaultParameters) {
EXPECT_NEAR( (double) groundPoint.findKeyword("EphemerisTime"), -709401200.26114, 1e-8);
EXPECT_PRED_FORMAT2(AssertQStringsEqual, groundPoint.findKeyword("UTC"), "1977-07-09T20:05:51.5549999");
EXPECT_NEAR( (double) groundPoint.findKeyword("LocalSolarTime"), 7.7862975330952, 1e-8);
EXPECT_NEAR( (double) groundPoint.findKeyword("SolarLongitude"), -1.7976931348623099e+308, 1e-8);
EXPECT_NEAR( (double) groundPoint.findKeyword("SolarLongitude"), 294.73518830594998, 1e-8);

EXPECT_NEAR( toDouble(groundPoint.findKeyword("LookDirectionBodyFixed")[0]), 0.43850176257802, 1e-8);
EXPECT_NEAR( toDouble(groundPoint.findKeyword("LookDirectionBodyFixed")[1]), 0.88365594846443, 1e-8);
Expand Down

0 comments on commit 561e21e

Please sign in to comment.