-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace cspice calls with spiceql and add api accessor function #5545
Draft
AustinSanders
wants to merge
71
commits into
DOI-USGS:dev
Choose a base branch
from
AustinSanders:web_spice_calls
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 37 commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
e7ea906
Added findspiceql to build system
AustinSanders cb14607
Added spiceql
AustinSanders 972f7ef
Initial isis/spiceql wrapped functions
AustinSanders 247a80e
added todo
AustinSanders 0886b15
merge dev
AustinSanders 8b76f4f
Replaced apollopaninit cspice calls with spiceql
AustinSanders 5e09e3e
Updated local spice calls with searchkernels=true
AustinSanders 3a3bb84
Replaced voyager2isis cspice calls with spiceql calls
AustinSanders 75b0c53
Replaced vikcal calparameters cspice calls with spiceql calls
AustinSanders 3915b69
Updated rosvirtis2isis cspice calls with spiceql calls
AustinSanders aa1c94b
Replaced newhorizons cspice calls with spiceql calls
AustinSanders 394db88
Replaced lronaccal cspice calls with spiceql calls
AustinSanders 79ab710
Replaced chan1m32isis cspice calls with spiceql calls
AustinSanders e563133
Replaced gllssical cspice calls with spiceql calls
AustinSanders 5177066
Replaced lrowaccal cspice calls with spiceql calls
AustinSanders ead2f55
Replaced amicacal cspice calls with spiceql calls
AustinSanders 2a4930e
Replaced hicalconf cspice calls with spiceql calls
AustinSanders e2494b5
Add spiceql to environment
AustinSanders b2df938
Replaced mical cspice calls with spiceql calls
AustinSanders 5585fe7
Replaced moccal cspice calls with spiceql calls
AustinSanders b982070
Replaced moclabels cspice calls with spiceql calls
AustinSanders a0ba457
Replaced ctxcal cspice calls with spiceql calls
AustinSanders ab42c15
Replaced hijitcube cspice calls with spiceql calls
AustinSanders d1a8efe
Replaced sumfinder cspice calls with spiceql calls
AustinSanders 320c937
Removed unused variables and added TODO
AustinSanders 6014f91
Replaced hicrop cspice calls with spiceql calls
AustinSanders 8fc3505
Added mission map
AustinSanders c98fa01
Updated getTargetStates vector to include velocities
AustinSanders a6c8f66
Replaced mdiscal cspice calls with spiceql calls
AustinSanders 8734993
Removed unused variables
AustinSanders 38e0184
Removed test couts
AustinSanders a66a37e
Added uri encoding function
AustinSanders 2cb1164
Converted shadow cspice calls to spiceql calls
AustinSanders 5e7c7fd
Converted spiceql ettosclk call to upstream version
AustinSanders 19920c7
Removed useweb argument in favor of isis preference
AustinSanders e7e38fe
Changed functions with large param lists to POST
AustinSanders d3ec45e
Added useweb argument
AustinSanders 2d2f21c
trigger build
chkim-usgs 897fdd7
Capitalize SpiceQL
chkim-usgs 70281f8
Update spiceql path_suffix
chkim-usgs 9c49f15
Update spiceql library name
chkim-usgs 67f7a6a
Change SpiceQL.h to spiceql.h
chkim-usgs 7474fb2
Remove KernelPool
chkim-usgs 579bb2b
Remove KernelPool
chkim-usgs f43f45d
Remove KernelPool in shadow
chkim-usgs dd4c67d
Remove false bools in apollopaninit
chkim-usgs 8f4c340
Movie Isis import to top
chkim-usgs aef3de8
Replace furnsh_c with load
chkim-usgs b224fd3
Replace base in sumspice
chkim-usgs a4727bc
Replace post with get calls
chkim-usgs 32b47dc
Lowercase mars
chkim-usgs 8dfdcba
Turn off web spice for tests
chkim-usgs ec962b1
Pin spiceql to 1.0.1
chkim-usgs e5f80b3
Remove defaults channel
chkim-usgs 259133e
Merge branch 'dev' into web_spice_calls
chkim-usgs c0e6ad4
Update apollopaninit call
chkim-usgs f13d97d
Add back spiceql dep
chkim-usgs b37300a
Update load kernels for apollopaninit
chkim-usgs f04336c
Merge branch 'dev' into web_spice_calls
chkim-usgs 3f81faf
Merge branch 'web_spice_calls' of https://github.com/AustinSanders/IS…
Kelvinrr 1a5363e
Remove gmock-global
chkim-usgs 9ce522a
Merge branch 'dev' into web_spice_calls
chkim-usgs d060914
Remove protobuf config
chkim-usgs f21492e
trigger build
chkim-usgs f18b343
Set webspice to false
chkim-usgs 56cca14
Remove non-existent test cube file for lrowaccal-mono
chkim-usgs 6950efe
updated preferences
Kelvinrr ac05d75
Merge branch 'web_spice_calls' of https://github.com/AustinSanders/IS…
Kelvinrr 5998cf2
Update two lronaccal tests
chkim-usgs ab47f0b
fixed some calibratation tests
Kelvinrr 94febe6
Merge branch 'web_spice_calls' of github.com:AustinSanders/ISIS3 into…
Kelvinrr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# CMake module for find_package(SpiceQL) | ||
# Finds include directory and all applicable libraries | ||
# | ||
# Sets the following: | ||
# SpiceQL_INCLUDE_DIR | ||
# SpiceQL_LIBRARY | ||
|
||
find_path(SPICEQL_INCLUDE_DIR | ||
NAME spiceql.h | ||
PATH_SUFFIXES "spiceql" | ||
) | ||
|
||
find_library(SPICEQL_LIBRARY | ||
NAMES spiceql | ||
) | ||
|
||
get_filename_component(SUPERLU_ROOT_INCLUDE_DIR "${SUPERLU_INCLUDE_DIR}" DIRECTORY) | ||
|
||
|
||
message(STATUS "SPICEQL INCLUDE DIR: " ${SPICEQL_INCLUDE_DIR} ) | ||
message(STATUS "SPICEQL LIB: " ${SPICEQL_LIBRARY} ) | ||
|
||
get_filename_component(SPICEQL_ROOT_INCLUDE_DIR "${SPICEQL_INCLUDE_DIR}" DIRECTORY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,10 @@ | |
#include "KernelDb.h" | ||
#include "NaifStatus.h" | ||
#include "ProcessByBrick.h" | ||
#include "RestfulSpice.h" | ||
#include "ShadowFunctor.h" | ||
#include "SpicePosition.h" | ||
#include "spiceql.h" | ||
|
||
namespace Isis { | ||
QStringList kernels(QString kernelType, | ||
|
@@ -46,11 +48,14 @@ namespace Isis { | |
allKernelFiles.append(kernels("PCK", &KernelDb::targetAttitudeShape, *demCube->label(), ui)); | ||
allKernelFiles.append(kernels("SPK", &KernelDb::targetPosition, *demCube->label(), ui)); | ||
|
||
|
||
NaifStatus::CheckErrors(); | ||
|
||
SpiceQL::KernelPool &kPool = SpiceQL::KernelPool::getInstance(); | ||
|
||
foreach (QString kernelFile, allKernelFiles) { | ||
kernelsUsed += kernelFile; | ||
furnsh_c(FileName(kernelFile).expanded().toLatin1().data()); | ||
kPool.load(FileName(kernelFile).expanded().toLatin1().data()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these need to change to |
||
} | ||
|
||
// Find the NAIF target code for the DEM's target | ||
|
@@ -63,28 +68,43 @@ namespace Isis { | |
|
||
// Get actual sun position, relative to target | ||
QString bodyFixedFrame = QString("IAU_%1").arg(name.toUpper()); | ||
spkpos_c("SUN", time.Et(), bodyFixedFrame.toLatin1().data(), "NONE", | ||
name.toUpper().toLatin1().data(), sunPosition, &lightTime); | ||
std::vector<double> etStart = {time.Et()}; | ||
std::string observer = name.toUpper().toLatin1().data(); | ||
std::string bff = bodyFixedFrame.toLatin1().data(); | ||
std::vector<std::vector<double>> sunLt; | ||
// If kernels are specified | ||
bool userKernels = false; | ||
|
||
if (ui.WasEntered("PCK") || ui.WasEntered("SPK")){ | ||
userKernels = true; | ||
} | ||
|
||
if (userKernels){ | ||
sunLt = SpiceQL::getTargetStates(etStart, "sun", observer, bff, "NONE", "base", "reconstructed", "reconstructed", true); | ||
}else{ | ||
sunLt = Isis::RestfulSpice::getTargetStates(etStart, "sun", observer, bff, "NONE", RestfulSpice::spiceql_mission_map[observer], "reconstructed", "reconstructed"); | ||
} | ||
|
||
NaifStatus::CheckErrors(); | ||
|
||
// Adjusted for light time | ||
spkpos_c("SUN", time.Et() - lightTime, bodyFixedFrame.toLatin1().data(), "NONE", | ||
name.toUpper().toLatin1().data(), sunPosition, &lightTime); | ||
// Adjust for light time | ||
lightTime = sunLt[0][6]; | ||
etStart = {time.Et() - lightTime}; | ||
|
||
if (userKernels){ | ||
sunLt = SpiceQL::getTargetStates(etStart, "sun", observer, bff, "NONE", "base", "reconstructed", "reconstructed", true); | ||
}else{ | ||
sunLt = Isis::RestfulSpice::getTargetStates(etStart, "sun", observer, bff, "NONE", RestfulSpice::spiceql_mission_map[observer], "reconstructed", "reconstructed"); | ||
} | ||
|
||
std::copy(sunLt[0].begin(), sunLt[0].begin()+3, sunPosition); | ||
NaifStatus::CheckErrors(); | ||
|
||
|
||
|
||
// Convert sun position units: KM -> M | ||
sunPosition[0] *= 1000; | ||
sunPosition[1] *= 1000; | ||
sunPosition[2] *= 1000; | ||
|
||
foreach (QString kernelFile, allKernelFiles) { | ||
unload_c(FileName(kernelFile).expanded().toLatin1().data()); | ||
} | ||
|
||
NaifStatus::CheckErrors(); | ||
functor.setSunPosition(sunPosition); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ifeq ($(ISISROOT), $(BLANK)) | ||
.SILENT: | ||
error: | ||
echo "Please set ISISROOT"; | ||
else | ||
include $(ISISROOT)/make/isismake.apps | ||
endif |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These need to be removed