Commit 03d69ca0 authored by Kristin Berry's avatar Kristin Berry
Browse files

Fix merge conflicts again

parents 287d8bad 3fddf50e
Loading
Loading
Loading
Loading
+11 −12
Original line number Diff line number Diff line
@@ -7,18 +7,17 @@ platform:

configuration:
  - Release
  - Debug

environment:
  CSM_LIBRARY_PATH: C:\\Miniconda36-x64\lib
  CSM_INCLUDE_PATH: C:\\Miniconda36-x64\include

install:
  # - git submodule update --init --recursive
  # This pulls csm from conda
  # - cmd: call C:\\Miniconda36-x64\Scripts\activate.bat
  # - cmd: conda install -y -c usgs-astrogeology libcsm
  # - cmake .
  - git submodule update --init --recursive

before_build:
  - mkdir build
  - cd build
  
build_script:
  # - cmake --build . -- %MSBUILD_ARGS%
  - echo pass
  - cmake -G "Visual Studio 15 2017 Win64" -DBUILD_TESTS=OFF ..
  - cmake --build . --target ALL_BUILD --config Release


+9 −14
Original line number Diff line number Diff line
@@ -18,14 +18,15 @@ else()
			    PATH_SUFFIXES "csm"
			    PATHS $ENV{CONDA_PREFIX}/include/)
  find_library(CSM_LIBRARY csmapi PATHS $ENV{CONDA_PREFIX}/lib)
  
  message("--Found CSM Library: ${CSM_LIBRARY}")
  message("--Found CSM Include Directory: ${CSM_INCLUDE_DIR}")
endif(BUILD_CSM)

add_library(usgscsm SHARED
            src/UsgsAstroFramePlugin.cpp
            src/UsgsAstroPlugin.cpp
            src/UsgsAstroFrameSensorModel.cpp
            src/UsgsAstroLsPlugin.cpp
            src/UsgsAstroLsSensorModel.cpp
            src/UsgsAstroLsStateData.cpp)
            src/UsgsAstroLsSensorModel.cpp)

set_target_properties(usgscsm PROPERTIES
    VERSION ${PROJECT_VERSION}
@@ -42,7 +43,6 @@ target_include_directories(usgscsm
)

# Setup for GoogleTest

find_package (Threads)

target_link_libraries(usgscsm
@@ -50,16 +50,11 @@ target_link_libraries(usgscsm
                      gtest ${CMAKE_THREAD_LIBS_INIT})

if(WIN32)
  option(CMAKE_USE_WIN32_THREADS_INIT "using WIN32 threads" ON)
  option(gtest_disable_pthreads "Disable uses of pthreads in gtest." ON)
  install(TARGETS usgscsm
    RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR})
    install(DIRECTORY ${USGSCSM_INCLUDE_DIRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
  install(TARGETS usgscsm RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR})
else()
  install(TARGETS usgscsm
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
    install(DIRECTORY ${USGSCSM_INCLUDE_DIRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
  install(TARGETS usgscsm LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
install(DIRECTORY ${USGSCSM_INCLUDE_DIRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})


# Optional build or link against CSM
Compare ea22180f to c78dbba3
Original line number Diff line number Diff line
Subproject commit ea22180f46f86f4c95ade84ab81eb4477bdd8dd6
Subproject commit c78dbba3731432249a75db9fdd7415b292d46715
Compare e5e2ef7c to 2fe3bd99
Original line number Diff line number Diff line
Subproject commit e5e2ef7cd27cc089c1d8302a11970ef870554294
Subproject commit 2fe3bd994b3189899d93f1d5a881e725e046fdc2
+30 −15
Original line number Diff line number Diff line
@@ -9,6 +9,10 @@
#include "RasterGM.h"
#include "CorrelationModel.h"

#include <json.hpp>
using json = nlohmann::json;


class UsgsAstroFrameSensorModel : public csm::RasterGM {
  // UsgsAstroFramePlugin needs to access private members
  friend class UsgsAstroFramePlugin;
@@ -17,11 +21,19 @@ class UsgsAstroFrameSensorModel : public csm::RasterGM {
    UsgsAstroFrameSensorModel();
    ~UsgsAstroFrameSensorModel();


    bool isValidModelState(const std::string& stringState, csm::WarningList *warnings);
    bool isValidIsd(const std::string& stringIsd, csm::WarningList *warnings);

    virtual csm::ImageCoord groundToImage(const csm::EcefCoord &groundPt,
                                     double desiredPrecision=0.001,
                                     double *achievedPrecision=NULL,
                                     csm::WarningList *warnings=NULL) const;


    std::string constructStateFromIsd(const std::string& jsonIsd, csm::WarningList *warnings);
    void reset();

    virtual csm::ImageCoordCovar groundToImage(const csm::EcefCoordCovar &groundPt,
                                          double desiredPrecision=0.001,
                                          double *achievedPrecision=NULL,
@@ -316,7 +328,6 @@ protected:


  private:

    // Input parameters
    static const int m_numParameters;
    static const std::string m_parameterName[];
@@ -326,40 +337,43 @@ protected:
    std::vector<double> m_noAdjustments;
    std::vector<double> m_odtX;
    std::vector<double> m_odtY;

    static const int         _NUM_STATE_KEYWORDS;
    static const std::string _STATE_KEYWORD[];

    double m_transX[3];
    double m_transY[3];
    std::vector<double> m_transX;
    std::vector<double> m_transY;
    std::vector<double> m_spacecraftVelocity;
    std::vector<double> m_sunPosition;
    std::vector<double> m_ccdCenter;
    std::vector<double> m_iTransS;
    std::vector<double> m_iTransL;
    std::vector<double> m_boresight;
    double m_majorAxis;
    double m_minorAxis;
    double m_focalLength;
    double m_spacecraftVelocity[3];
    double m_sunPosition[3];
    double m_ccdCenter[2];
    double m_minElevation;
    double m_maxElevation;
    double m_line_pp;
    double m_sample_pp;
    double m_linePp;
    double m_samplePp;
    double m_startingDetectorSample;
    double m_startingDetectorLine;
    std::string m_targetName;
    std::string m_modelName;
    double m_ifov;
    std::string m_instrumentID;
    double m_focalLengthEpsilon;
    double m_originalHalfLines;
    std::string m_spacecraftName;
    double m_pixelPitch;
    double m_iTransS[3];
    double m_iTransL[3];

    double m_ephemerisTime;
    double m_originalHalfSamples;
    double m_boresight[3];
    int m_nLines;
    int m_nSamples;
    int m_nParameters;

    json _state;
    static const int         _NUM_STATE_KEYWORDS;
    static const int         NUM_PARAMETERS;
    static const std::string _STATE_KEYWORD[];

    csm::NoCorrelationModel _no_corr_model;

    double getValue(int index,const std::vector<double> &adjustments) const;
@@ -371,6 +385,7 @@ protected:
                                double xl, double yl,
                                double zl,
                                double& x,double& y, double&  z) const;

};

#endif
Loading