Skip to content

Commit

Permalink
Update to CSM-3.0.4 (#563)
Browse files Browse the repository at this point in the history
* Update ReleaseNotes.md

* csm-3.0.3.3 -> csm-3.0.4

* restore custom CSM changes

* trying to minimize diffs
  • Loading branch information
J. Daniel Smith authored Jun 21, 2022
1 parent 2306d57 commit f06eaa5
Show file tree
Hide file tree
Showing 56 changed files with 118 additions and 117 deletions.
4 changes: 4 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

# SIX Release Notes

## Version 3.1.??; ??? ??, 2022
* Support `OTHER.*` polarization values in XML from SIDD 3.0/SICD 1.3
* Updated to [CSM 3.0.4](https://github.com/ngageoint/csm/releases/tag/v3.0.4).

## Version 3.1.11; May 13, 2022
* Lastest [coda-oss](https://github.com/mdaus/coda-oss) and [nitro](https://github.com/mdaus/nitro) (updates from **master**, no new releases)
* Fix bug in XML serializaton where `double`s were given a class of `xs::double` (two `:`s) instead of `xs:double`.
Expand Down
108 changes: 54 additions & 54 deletions six/projects/csm/csm.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,28 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClInclude Include="external\csm-3.0.3.3\BundleGM.h" />
<ClInclude Include="external\csm-3.0.3.3\BytestreamIsd.h" />
<ClInclude Include="external\csm-3.0.3.3\CorrelationModel.h" />
<ClInclude Include="external\csm-3.0.3.3\csm.h" />
<ClInclude Include="external\csm-3.0.3.3\csmPointCloud.h" />
<ClInclude Include="external\csm-3.0.3.3\Ellipsoid.h" />
<ClInclude Include="external\csm-3.0.3.3\Error.h" />
<ClInclude Include="external\csm-3.0.3.3\FourParameterCorrelationModel.h" />
<ClInclude Include="external\csm-3.0.3.3\GeometricModel.h" />
<ClInclude Include="external\csm-3.0.3.3\Isd.h" />
<ClInclude Include="external\csm-3.0.3.3\LinearDecayCorrelationModel.h" />
<ClInclude Include="external\csm-3.0.3.3\Model.h" />
<ClInclude Include="external\csm-3.0.3.3\ModelIdentifier.h" />
<ClInclude Include="external\csm-3.0.3.3\MultiNitfIsd.h" />
<ClInclude Include="external\csm-3.0.3.3\NitfIsd.h" />
<ClInclude Include="external\csm-3.0.3.3\Plugin.h" />
<ClInclude Include="external\csm-3.0.3.3\PointCloudGM.h" />
<ClInclude Include="external\csm-3.0.3.3\PointCloudIsd.h" />
<ClInclude Include="external\csm-3.0.3.3\RasterGM.h" />
<ClInclude Include="external\csm-3.0.3.3\SettableEllipsoid.h" />
<ClInclude Include="external\csm-3.0.3.3\Version.h" />
<ClInclude Include="external\csm-3.0.3.3\Warning.h" />
<ClInclude Include="external\csm-3.0.4\BundleGM.h" />
<ClInclude Include="external\csm-3.0.4\BytestreamIsd.h" />
<ClInclude Include="external\csm-3.0.4\CorrelationModel.h" />
<ClInclude Include="external\csm-3.0.4\csm.h" />
<ClInclude Include="external\csm-3.0.4\csmPointCloud.h" />
<ClInclude Include="external\csm-3.0.4\Ellipsoid.h" />
<ClInclude Include="external\csm-3.0.4\Error.h" />
<ClInclude Include="external\csm-3.0.4\FourParameterCorrelationModel.h" />
<ClInclude Include="external\csm-3.0.4\GeometricModel.h" />
<ClInclude Include="external\csm-3.0.4\Isd.h" />
<ClInclude Include="external\csm-3.0.4\LinearDecayCorrelationModel.h" />
<ClInclude Include="external\csm-3.0.4\Model.h" />
<ClInclude Include="external\csm-3.0.4\ModelIdentifier.h" />
<ClInclude Include="external\csm-3.0.4\MultiNitfIsd.h" />
<ClInclude Include="external\csm-3.0.4\NitfIsd.h" />
<ClInclude Include="external\csm-3.0.4\Plugin.h" />
<ClInclude Include="external\csm-3.0.4\PointCloudGM.h" />
<ClInclude Include="external\csm-3.0.4\PointCloudIsd.h" />
<ClInclude Include="external\csm-3.0.4\RasterGM.h" />
<ClInclude Include="external\csm-3.0.4\SettableEllipsoid.h" />
<ClInclude Include="external\csm-3.0.4\Version.h" />
<ClInclude Include="external\csm-3.0.4\Warning.h" />
<ClInclude Include="external\vts_301_0\include\constants.h" />
<ClInclude Include="external\vts_301_0\include\SMManager.h" />
<ClInclude Include="external\vts_301_0\include\tinyxml.h" />
Expand All @@ -57,22 +57,22 @@
<ClInclude Include="pch.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="external\csm-3.0.3.3\BundleGM.cpp" />
<ClCompile Include="external\csm-3.0.3.3\CorrelationModel.cpp" />
<ClCompile Include="external\csm-3.0.3.3\csmPointCloud.cpp" />
<ClCompile Include="external\csm-3.0.3.3\Ellipsoid.cpp" />
<ClCompile Include="external\csm-3.0.3.3\FourParameterCorrelationModel.cpp" />
<ClCompile Include="external\csm-3.0.3.3\GeometricModel.cpp" />
<ClCompile Include="external\csm-3.0.3.3\Isd.cpp" />
<ClCompile Include="external\csm-3.0.3.3\LinearDecayCorrelationModel.cpp" />
<ClCompile Include="external\csm-3.0.3.3\ModelIdentifier.cpp" />
<ClCompile Include="external\csm-3.0.3.3\MultiNitfIsd.cpp" />
<ClCompile Include="external\csm-3.0.3.3\Plugin.cpp" />
<ClCompile Include="external\csm-3.0.3.3\PointCloudGM.cpp" />
<ClCompile Include="external\csm-3.0.3.3\PointCloudIsd.cpp" />
<ClCompile Include="external\csm-3.0.3.3\RasterGM.cpp" />
<ClCompile Include="external\csm-3.0.3.3\SettableEllipsoid.cpp" />
<ClCompile Include="external\csm-3.0.3.3\Version.cpp" />
<ClCompile Include="external\csm-3.0.4\BundleGM.cpp" />
<ClCompile Include="external\csm-3.0.4\CorrelationModel.cpp" />
<ClCompile Include="external\csm-3.0.4\csmPointCloud.cpp" />
<ClCompile Include="external\csm-3.0.4\Ellipsoid.cpp" />
<ClCompile Include="external\csm-3.0.4\FourParameterCorrelationModel.cpp" />
<ClCompile Include="external\csm-3.0.4\GeometricModel.cpp" />
<ClCompile Include="external\csm-3.0.4\Isd.cpp" />
<ClCompile Include="external\csm-3.0.4\LinearDecayCorrelationModel.cpp" />
<ClCompile Include="external\csm-3.0.4\ModelIdentifier.cpp" />
<ClCompile Include="external\csm-3.0.4\MultiNitfIsd.cpp" />
<ClCompile Include="external\csm-3.0.4\Plugin.cpp" />
<ClCompile Include="external\csm-3.0.4\PointCloudGM.cpp" />
<ClCompile Include="external\csm-3.0.4\PointCloudIsd.cpp" />
<ClCompile Include="external\csm-3.0.4\RasterGM.cpp" />
<ClCompile Include="external\csm-3.0.4\SettableEllipsoid.cpp" />
<ClCompile Include="external\csm-3.0.4\Version.cpp" />
<ClCompile Include="external\vts_301_0\source\compareParam.cpp" />
<ClCompile Include="external\vts_301_0\source\recordLog.cpp" />
<ClCompile Include="external\vts_301_0\source\SensorModelThreadSafe.cpp" />
Expand All @@ -92,20 +92,20 @@
<ClCompile Include="source\SIXSensorModel.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="external\csm-3.0.3.3\Doxyfile" />
<None Include="external\csm-3.0.3.3\LICENSE" />
<None Include="external\csm-3.0.3.3\Makefile" />
<None Include="external\csm-3.0.3.3\Makefile.linux" />
<None Include="external\csm-3.0.3.3\Makefile.linux64" />
<None Include="external\csm-3.0.3.3\Makefile.linuxIA64" />
<None Include="external\csm-3.0.3.3\Makefile.sgi" />
<None Include="external\csm-3.0.3.3\Makefile.solaris" />
<None Include="external\csm-3.0.3.3\Makefile.solaris-stlport" />
<None Include="external\csm-3.0.3.3\Makefile.solaris64" />
<None Include="external\csm-3.0.3.3\Makefile.solaris64-stlport" />
<None Include="external\csm-3.0.3.3\Makefile.solaris86" />
<None Include="external\csm-3.0.3.3\Makefile.win32" />
<None Include="external\csm-3.0.3.3\README" />
<None Include="external\csm-3.0.4\Doxyfile" />
<None Include="external\csm-3.0.4\LICENSE" />
<None Include="external\csm-3.0.4\Makefile" />
<None Include="external\csm-3.0.4\Makefile.linux" />
<None Include="external\csm-3.0.4\Makefile.linux64" />
<None Include="external\csm-3.0.4\Makefile.linuxIA64" />
<None Include="external\csm-3.0.4\Makefile.sgi" />
<None Include="external\csm-3.0.4\Makefile.solaris" />
<None Include="external\csm-3.0.4\Makefile.solaris-stlport" />
<None Include="external\csm-3.0.4\Makefile.solaris64" />
<None Include="external\csm-3.0.4\Makefile.solaris64-stlport" />
<None Include="external\csm-3.0.4\Makefile.solaris86" />
<None Include="external\csm-3.0.4\Makefile.win32" />
<None Include="external\csm-3.0.4\README" />
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
Expand Down Expand Up @@ -154,7 +154,7 @@
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<ForcedIncludeFiles>pch.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>$(ProjectDir)include\;$(ProjectDir)external\vts_301_0\include\;$(ProjectDir)external\csm-3.0.3.3\;$(SolutionDir)six\modules\c++\six.sidd\include;$(SolutionDir)six\modules\c++\six.sicd\include;$(SolutionDir)six\modules\c++\six\include;$(SolutionDir)six\modules\c++\scene\include;$(SolutionDir)externals\nitro\modules\c\nrt\include\;$(SolutionDir)externals\nitro\modules\c\nitf\include\;$(SolutionDir)externals\nitro\modules\c++\nitf\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\include\</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)include\;$(ProjectDir)external\vts_301_0\include\;$(ProjectDir)external\csm-3.0.4\;$(SolutionDir)six\modules\c++\six.sidd\include;$(SolutionDir)six\modules\c++\six.sicd\include;$(SolutionDir)six\modules\c++\six\include;$(SolutionDir)six\modules\c++\scene\include;$(SolutionDir)externals\nitro\modules\c\nrt\include\;$(SolutionDir)externals\nitro\modules\c\nitf\include\;$(SolutionDir)externals\nitro\modules\c++\nitf\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\include\</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
<EnforceTypeConversionRules>true</EnforceTypeConversionRules>
Expand All @@ -181,7 +181,7 @@
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(ProjectDir)include\;$(ProjectDir)external\vts_301_0\include\;$(ProjectDir)external\csm-3.0.3.3\;$(SolutionDir)six\modules\c++\six.sidd\include;$(SolutionDir)six\modules\c++\six.sicd\include;$(SolutionDir)six\modules\c++\six\include;$(SolutionDir)six\modules\c++\scene\include;$(SolutionDir)externals\nitro\modules\c\nrt\include\;$(SolutionDir)externals\nitro\modules\c\nitf\include\;$(SolutionDir)externals\nitro\modules\c++\nitf\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\include\</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)include\;$(ProjectDir)external\vts_301_0\include\;$(ProjectDir)external\csm-3.0.4\;$(SolutionDir)six\modules\c++\six.sidd\include;$(SolutionDir)six\modules\c++\six.sicd\include;$(SolutionDir)six\modules\c++\six\include;$(SolutionDir)six\modules\c++\scene\include;$(SolutionDir)externals\nitro\modules\c\nrt\include\;$(SolutionDir)externals\nitro\modules\c\nitf\include\;$(SolutionDir)externals\nitro\modules\c++\nitf\include\;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include\;$(SolutionDir)externals\coda-oss\install-$(Configuration)-$(Platform).$(PlatformToolset)\include\</AdditionalIncludeDirectories>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
Expand Down
17 changes: 0 additions & 17 deletions six/projects/csm/external/csm-3.0.3.3/Makefile.sgi

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// Date Author Comment
// ----------- ------ -------
// 06-Aug-2016 Krinsky Initial Coding
// 03-Sep-2021 SCM Use cmath.
//
//#############################################################################

Expand All @@ -21,7 +22,7 @@
#endif

#include "Ellipsoid.h"
#include <math.h>
#include <cmath>

namespace csm
{
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
// 20-Dec-2012 JPK Fixed bug in constructor.
// 18-Feb-2013 JPK Removed getNumCorrelationParameterGroups,
// now provided on base class.
// 03-Sep-2021 SCM Removed IRIX support.
//
// NOTES:
// Refer to FourParameterCorrelationModel.h for more information.
Expand All @@ -32,13 +33,9 @@
#include "FourParameterCorrelationModel.h"
#include "Error.h"

#ifdef IRIXN32
#include "math.h"
#else
#include <cmath>
using std::exp;
using std::fabs;
#endif

namespace csm {

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
// 30-Oct-2012 SCM Renamed to Isd.h
// 06-Dec-2012 JPK Used CSM_UNKNOWN instead of "UNKNOWN"
// 17-Dec-2012 BAH Documentation updates.
// 03-Sep-2021 SCM Added FRAME_INDEX_PARAM and define checks.
//
// NOTES:
//
Expand Down Expand Up @@ -151,10 +152,21 @@ inline void Isd::addParam(const std::string& name, const std::string& value)
theParameters.insert(val);
}

#ifndef IMAGE_ID_PARAM
#define IMAGE_ID_PARAM "IMAGE_ID"
#endif
#ifndef IMAGE_INDEX_PARAM
#define IMAGE_INDEX_PARAM "IMAGE_INDEX"
#endif
#ifndef FRAME_INDEX_PARAM
#define FRAME_INDEX_PARAM "FRAME_INDEX"
#endif
#ifndef LOGICAL_INDEX_PARAM
#define LOGICAL_INDEX_PARAM "LOGICAL_INDEX"
#endif
#ifndef MODEL_NAME_PARAM
#define MODEL_NAME_PARAM "MODEL_NAME"
#endif

} // namespace csm

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
// 20-Dec-2012 JPK Fixed bug in constructor.
// 18-Feb-2013 JPK Removed getNumCorrelationParameterGroups,
// now provided on base class.
// 03-Sep-2021 SCM Removed IRIX support.
//
// NOTES:
// Refer to LinearDecayCorrelationModel.h for more information.
Expand All @@ -29,13 +30,9 @@
#include "LinearDecayCorrelationModel.h"
#include "Error.h"

#ifdef IRIXN32
#include "math.h"
#else
#include <cmath>
using std::exp;
using std::fabs;
#endif

namespace csm {

Expand Down Expand Up @@ -160,14 +157,15 @@ double LinearDecayCorrelationModel::getCorrelationCoefficient(

// compute the value of the correlation coefficient
const Parameters& cp = theCorrParams[cpGroupIndex];
const size_t size = cp.theInitialCorrsPerSegment.size();

const double adt = fabs(deltaTime);
double prevCorr = cp.theInitialCorrsPerSegment[0];
double prevTime = cp.theTimesPerSegment[0];

double correlation = prevCorr;

for(size_t s = 1; s < cp.theInitialCorrsPerSegment.size(); ++s)
for(size_t s = 1; s < size; ++s)
{
const double corr = cp.theInitialCorrsPerSegment[s];
const double time = cp.theTimesPerSegment[s];
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -251,15 +251,15 @@ class CSM_EXPORT_API RangeList
// valid step size is specified.
//<
Data theMinimum;
//> This data member represents the minimum value assoicated with the
//> This data member represents the minimum value associated with the
// current range.
//<
Data theMaximum;
//> This data member represents the maximum value assoicated with the
//> This data member represents the maximum value associated with the
// current range.
//<
Data theStep;
//> This data member represents the step size assoicated with the
//> This data member represents the step size associated with the
// current range.
//<
bool theMinInclusive;
Expand Down Expand Up @@ -333,7 +333,7 @@ class CSM_EXPORT_API RangeList
//<

~RangeList() {}
//> This is the destuctor
//> This is the destructor
//<

void addRange(const Range& argRange) {theRanges.push_back(argRange);}
Expand All @@ -347,7 +347,7 @@ class CSM_EXPORT_API RangeList
private:

std::vector<Range> theRanges;
//> this data member represents the set of Ranges own by the current
//> this data member represents the set of Ranges owned by the current
// MICRangeList.
//<
};
Expand All @@ -365,7 +365,7 @@ typedef MIComponentDescMap::value_type MIComponentDesc;

//*****************************************************************************
// ModelIdentifier
//> This class holds a set of "Components" which are intented to uniquely
//> This class holds a set of "Components" which are intended to uniquely
// identify a specific Model within a "bundle" of models.
//<
//*****************************************************************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class CSM_EXPORT_API PointCloudIsd : public Isd
//<

void setFileHeader(const std::string& head) { theFileHeader = head; }
//> This method sets the file header. The interprtation of the header
//> This method sets the file header. The interpretation of the header
// depends upon the format setting.
//<

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ This is the Community Sensor Model base interface library.

Compilation
-----------
The CSM library can be compiled on Linux (tested on RHEL5) i386, x86_64, or IA-64, Solaris Sparc (32 or 64 bit, with or without the "stlport" mode) and x86, and Windows. Use the appropriate Makefile when building. For example:
The CSM library can be compiled on Linux (tested on RHEL5) i386, x86_64, or IA-64, Solaris SPARC (32 or 64 bit, with or without the "stlport" mode) and x86, and Windows. Use the appropriate Makefile when building. For example:

make -f Makefile.linux64 all install clean

By default, the built files are placed in an architecture subdirectory in the build area. This allows multiple architectures to be built. To specify a different intallation directory, set the INSTDIR make variable:
By default, the built files are placed in an architecture subdirectory in the build area. This allows multiple architectures to be built. To specify a different installation directory, set the INSTDIR make variable:

make -f Makefile.linux64 all install clean INSTDIR=/path/to/csm3/install/dir

Expand All @@ -15,6 +15,6 @@ Compiling makes a 'csmapi' shared library (libcsmapi.so.3.0.3 on UNIX, csmapi.dl

Windows
-------
Windows compliation requires the use of Cygwin to provide tools like 'make' and 'perl'. You should also be sure that Microsoft's Visual C++'s "cl.exe" is in your $PATH and that $INCLUDE and $LIB are set appropriately. When compiling on Windows, the "all" target does not do the right thing. Instead build with:
Windows compilation requires the use of Cygwin to provide tools like 'make' and 'perl'. You should also be sure that Microsoft's Visual C++'s "cl.exe" is in your $PATH and that $INCLUDE and $LIB are set appropriately. When compiling on Windows, the "all" target does not do the right thing. Instead build with:

make -f Makefile.win32 csmapi.dll install clean
Loading

0 comments on commit f06eaa5

Please sign in to comment.