Skip to content

Commit

Permalink
Merge branch 'master' into develop/update-externals
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Smith committed Jul 29, 2022
2 parents f6ccf56 + fb37a1d commit 2c9d64c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
6 changes: 5 additions & 1 deletion six/modules/c++/six/source/NITFReadControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,11 @@ static std::vector<six::NITFImageInfo*> getImageInfos(six::Container& container)

// We will validate that we got a SIDD DES per image product in the
// for loop below
assert(container.getDataType() == DataType::DERIVED);
if (container.getDataType() != DataType::DERIVED)
{
throw except::Exception(Ctxt("Unrecognized Data Extension Segment")); // N.B. not assert(), calling code can catch an exception
}

std::vector<six::NITFImageInfo*> retval;
for (size_t ii = 0; ii < container.size(); ++ii)
{
Expand Down
15 changes: 12 additions & 3 deletions six/modules/c++/six/source/Utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1145,14 +1145,23 @@ void six::getErrors(const ErrorStatistics* errorStats,
if (components->ionoError)
{
const six::IonoError& ionoError(*components->ionoError);
errors.mIonoErrorCovar(0, 0) =
if (has_value(ionoError.ionoRangeVertical))
{
errors.mIonoErrorCovar(0, 0) =
math::square(value(ionoError.ionoRangeVertical));
errors.mIonoErrorCovar(1, 1) =
}
if (has_value(ionoError.ionoRangeRateVertical))
{
errors.mIonoErrorCovar(1, 1) =
math::square(value(ionoError.ionoRangeRateVertical));
errors.mIonoErrorCovar(0, 1) = errors.mIonoErrorCovar(1, 0) =
}
if (has_value(ionoError.ionoRangeVertical) && has_value(ionoError.ionoRangeRateVertical))
{
errors.mIonoErrorCovar(0, 1) = errors.mIonoErrorCovar(1, 0) =
value(ionoError.ionoRangeVertical) *
value(ionoError.ionoRangeRateVertical) *
value(ionoError.ionoRgRgRateCC);
}
}

if (components->tropoError)
Expand Down

0 comments on commit 2c9d64c

Please sign in to comment.