Skip to content

Commit

Permalink
Merge branch 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Smith committed Dec 14, 2022
2 parents 3ebe7d2 + 90ff35e commit 2d5aed0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
7 changes: 7 additions & 0 deletions externals/coda-oss/modules/c++/avx/include/avx/extractf.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
#define CODA_OSS_avx_extractf_h_INCLUDED_
#pragma once

// Not supported on GCC < 7.1; see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80322 (also 80323-80325)
#if ((__GNUC__) && (GCC_VERSION < 70100))
#pragma warning Disabling CODA AVX m256 support due to gcc compiler bug.
#else

#include <config/compiler_extensions.h>

#ifndef CODA_OSS_mm256_extractf_DEFINED_
Expand Down Expand Up @@ -54,4 +59,6 @@

#endif

#endif // gcc version checking

#endif // CODA_OSS_avx_extractf_h_INCLUDED_
20 changes: 11 additions & 9 deletions six/modules/c++/scene/source/ProjectionModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,22 +459,24 @@ math::linear::MatrixMxN<2, 2> ProjectionModel::slantToImagePartials(
mTimeCOAPoly(imageGridPoint.row, imageGridPoint.col);
const Vector3 rARP = mARPPoly(timeCOA);
const Vector3 vARP = mARPVelPoly(timeCOA);
const Vector3 imageGridPointECEF = imageGridToECEF(imageGridPoint);
Vector3 slantRange = imageGridPointECEF - rARP;
Vector3 slantRange = mSCP - rARP;
slantRange.normalize();
Vector3 slantNormal = math::linear::cross(slantRange, vARP);
Vector3 slantNormal = math::linear::cross(vARP, slantRange) * mLookDir;
slantNormal.normalize();
Vector3 slantAzimuth = math::linear::cross(slantNormal, slantRange);
slantAzimuth.normalize();

// Second, map image grid point to the slant plane and compute finite differences
const Vector3 refPoint = imageToScene(imageGridPoint, mSCP, slantNormal);
const types::RowCol<double> rangePerturb =
sceneToImage(imageGridPointECEF + delta * slantRange);
sceneToImage(refPoint + delta * slantRange);
const types::RowCol<double> azimuthPerturb =
sceneToImage(imageGridPointECEF + delta * slantAzimuth);
sceneToImage(refPoint + delta * slantAzimuth);
math::linear::MatrixMxN<2, 2> partials(0.0);
partials[0][0] = (imageGridPoint.row - rangePerturb.row) / delta;
partials[0][1] = (imageGridPoint.row - azimuthPerturb.row) / delta;
partials[1][0] = (imageGridPoint.col - rangePerturb.col) / delta;
partials[1][1] = (imageGridPoint.col - azimuthPerturb.col) / delta;
partials[0][0] = (rangePerturb.row - imageGridPoint.row) / delta;
partials[0][1] = (azimuthPerturb.row - imageGridPoint.row) / delta;
partials[1][0] = (rangePerturb.col - imageGridPoint.col) / delta;
partials[1][1] = (azimuthPerturb.col - imageGridPoint.col) / delta;
return partials;
}

Expand Down

0 comments on commit 2d5aed0

Please sign in to comment.