Commit 2359e9ee authored by Ian Humphrey's avatar Ian Humphrey
Browse files

PROG: Updated truth data for SpiceRotation's unit test. References #3972.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@6875 41f8697f-d340-4b68-9986-7bafba869bb8
parent 503bcd11
Loading
Loading
Loading
Loading
+219 −47
Original line number Diff line number Diff line
Unit test for SpiceRotation
Naif code = -94031
Testing without cache ... 
Testing without cache (from SPICE)... 
CJ(0) = -0.87506927 0.25477955 -0.41151081
         0.011442263 0.86088548 0.50867009
         0.48386242 0.44041295 -0.75624969
@@ -151,107 +151,107 @@ Testing with polynomial functions over Spice ...
Source = 4
Time           = -69382819
CJ(0) = -0.87809698 0.25267525 -0.40632612
         0.01085749 0.85950052 0.51101954
         0.010857485 0.85950052 0.51101953
         0.4783595 0.44431303 -0.75746823
av(0) = 3.6136802e-05 -0.001148937 -0.0007178313
av(0) = 3.6136802e-05 -0.001148937 -0.00071783127
Time           = -69382785
CJ(1) = -0.85534528 0.27482047 -0.43915619
         0.013830533 0.85950782 0.51093545
         0.01383053 0.85950782 0.51093544
         0.5178737 0.43095246 -0.73897687
av(1) = 2.6818529e-05 -0.0011482899 -0.00072824247
av(1) = 2.6818529e-05 -0.0011482899 -0.00072824243
Time           = -69382751
CJ(2) = -0.83089148 0.29534676 -0.47158206
         0.015622985 0.85955538 0.51080376
         0.015622983 0.85955538 0.51080376
         0.55621513 0.41705497 -0.71881144
av(2) = 1.5045992e-05 -0.0011468841 -0.00073507985
av(2) = 1.5045992e-05 -0.0011468841 -0.00073507982
Time           = -69382717
CJ(3) = -0.80487479 0.31420086 -0.50344253
         0.016285301 0.8597142 0.5105157
         0.0162853 0.8597142 0.5105157
         0.59322117 0.40270251 -0.69707915
av(3) = 6.7201932e-06 -0.00114088 -0.00073822293
av(3) = 6.7201932e-06 -0.00114088 -0.0007382229
Time           = -69382683
CJ(4) = -0.77730696 0.33143284 -0.53473934
         0.015873612 0.86003946 0.50998054
         0.015873612 0.86003947 0.50998054
         0.62892123 0.38792318 -0.6737757
av(4) = -5.6601096e-06 -0.0011345655 -0.00074475062
av(4) = -5.6601096e-06 -0.0011345655 -0.00074475059
Time           = -69382648
CJ(5) = -0.74837985 0.34697393 -0.56527576
         0.014476129 0.86059696 0.50908086
         0.01447613 0.86059696 0.50908086
         0.66311239 0.37280285 -0.64907626
av(5) = -1.3898006e-05 -0.001126288 -0.00074801569
av(5) = -1.3898006e-05 -0.001126288 -0.00074801566
Time           = -69382614
CJ(6) = -0.71811664 0.36084246 -0.59506403
         0.012135219 0.86143483 0.50772312
CJ(6) = -0.71811664 0.36084247 -0.59506403
         0.012135221 0.86143483 0.50772312
         0.69581695 0.35738319 -0.62298959
av(6) = -2.1224594e-05 -0.0011158407 -0.00075276265
av(6) = -2.1224594e-05 -0.0011158407 -0.00075276262
Time           = -69382580
CJ(7) = -0.68675883 0.37311393 -0.62381752
         0.0090314639 0.86251995 0.50594245
         0.0090314657 0.86251995 0.50594245
         0.72682924 0.34182646 -0.59571296
av(7) = -3.5938808e-05 -0.0011049021 -0.0007547869
av(7) = -3.5938808e-05 -0.0011049021 -0.00075478687
Time           = -69382546
CJ(8) = -0.65434784 0.38366055 -0.65163908
         0.0051328027 0.86396924 0.50351842
CJ(8) = -0.65434784 0.38366056 -0.65163908
         0.005132805 0.86396924 0.50351842
         0.75617628 0.32613145 -0.56730566
av(8) = -4.4387854e-05 -0.0010910882 -0.00075256003
av(8) = -4.4387854e-05 -0.0010910882 -0.00075255999
Time           = -69382512
CJ(9) = -0.62100725 0.39254656 -0.67842258
         0.00050302029 0.86574982 0.50047676
CJ(9) = -0.62100725 0.39254656 -0.67842257
         0.00050302319 0.86574982 0.50047677
         0.78380466 0.31045844 -0.53783438
av(9) = -5.6369117e-05 -0.0010744677 -0.00075515741
av(9) = -5.6369117e-05 -0.0010744677 -0.00075515738

Test fitting polynomial function over cache to new cache
Source = 2
Time           = -69382819
CJ(0) = -0.87809698 0.25267525 -0.40632612
         0.01085749 0.85950052 0.51101954
         0.010857485 0.85950052 0.51101953
         0.4783595 0.44431303 -0.75746823
av(0) = 3.6136802e-05 -0.001148937 -0.0007178313
av(0) = 3.6136802e-05 -0.001148937 -0.00071783127
Time           = -69382785
CJ(1) = -0.85534528 0.27482047 -0.43915619
         0.013830533 0.85950782 0.51093545
         0.01383053 0.85950782 0.51093544
         0.5178737 0.43095246 -0.73897687
av(1) = 2.6818529e-05 -0.0011482899 -0.00072824247
av(1) = 2.6818529e-05 -0.0011482899 -0.00072824243
Time           = -69382751
CJ(2) = -0.83089148 0.29534676 -0.47158206
         0.015622985 0.85955538 0.51080376
         0.015622983 0.85955538 0.51080376
         0.55621513 0.41705497 -0.71881144
av(2) = 1.5045992e-05 -0.0011468841 -0.00073507985
av(2) = 1.5045992e-05 -0.0011468841 -0.00073507982
Time           = -69382717
CJ(3) = -0.80487479 0.31420086 -0.50344253
         0.016285301 0.8597142 0.5105157
         0.0162853 0.8597142 0.5105157
         0.59322117 0.40270251 -0.69707915
av(3) = 6.7201932e-06 -0.00114088 -0.00073822293
av(3) = 6.7201932e-06 -0.00114088 -0.0007382229
Time           = -69382683
CJ(4) = -0.77730696 0.33143284 -0.53473934
         0.015873612 0.86003946 0.50998054
         0.015873612 0.86003947 0.50998054
         0.62892123 0.38792318 -0.6737757
av(4) = -5.6601096e-06 -0.0011345655 -0.00074475062
av(4) = -5.6601096e-06 -0.0011345655 -0.00074475059
Time           = -69382648
CJ(5) = -0.74837985 0.34697393 -0.56527576
         0.014476129 0.86059696 0.50908086
         0.01447613 0.86059696 0.50908086
         0.66311239 0.37280285 -0.64907626
av(5) = -1.3898006e-05 -0.001126288 -0.00074801569
av(5) = -1.3898006e-05 -0.001126288 -0.00074801566
Time           = -69382614
CJ(6) = -0.71811664 0.36084246 -0.59506403
         0.012135219 0.86143483 0.50772312
CJ(6) = -0.71811664 0.36084247 -0.59506403
         0.012135221 0.86143483 0.50772312
         0.69581695 0.35738319 -0.62298959
av(6) = -2.1224594e-05 -0.0011158407 -0.00075276265
av(6) = -2.1224594e-05 -0.0011158407 -0.00075276262
Time           = -69382580
CJ(7) = -0.68675883 0.37311393 -0.62381752
         0.0090314639 0.86251995 0.50594245
         0.0090314657 0.86251995 0.50594245
         0.72682924 0.34182646 -0.59571296
av(7) = -3.5938808e-05 -0.0011049021 -0.0007547869
av(7) = -3.5938808e-05 -0.0011049021 -0.00075478687
Time           = -69382546
CJ(8) = -0.65434784 0.38366055 -0.65163908
         0.0051328027 0.86396924 0.50351842
CJ(8) = -0.65434784 0.38366056 -0.65163908
         0.005132805 0.86396924 0.50351842
         0.75617628 0.32613145 -0.56730566
av(8) = -4.4387854e-05 -0.0010910882 -0.00075256003
av(8) = -4.4387854e-05 -0.0010910882 -0.00075255999
Time           = -69382512
CJ(9) = -0.62100725 0.39254656 -0.67842258
         0.00050302029 0.86574982 0.50047676
CJ(9) = -0.62100725 0.39254656 -0.67842257
         0.00050302319 0.86574982 0.50047677
         0.78380466 0.31045844 -0.53783438
av(9) = -5.6369117e-05 -0.0010744677 -0.00075515741
av(9) = -5.6369117e-05 -0.0010744677 -0.00075515738

Testing ToReferencePartial method
For angles (ra,dec,twist) = 1.9429654 2.1356375 -0.92665897
@@ -481,3 +481,175 @@ Testing angle wrapping...
   Using anchor angle of 30, -10 changes to -10
   Using anchor angle of 30, -180 changes to 180
   Using anchor angle of 30, 90 changes to 90


Begin tests for PCK data...

Test LoadPCFromSpice and all the coefficient accessors...
Test CacheLabel for PCK data...
Test LoadPCFromTable...
Io Pole RA coefficients = 268.05,-0.009,0
Io Pole DEC coefficients = 64.5,0.003,0
Io PM coefficients = 200.39,203.48895,0
Io Pole RA Nutation/Precession coefficients = 0,0,0.094,0.024,0,0,0,0,0,0,0,0,0,0,0,
Io Pole DEC Nutation/Precession coefficients = 0,0,0.04,0.011,0,0,0,0,0,0,0,0,0,0,0,
Io PM Nutation/Precession coefficients = 0,0,-0.085,-0.022,0,0,0,0,0,0,0,0,0,0,0,
Io System Nutation/Precession constants = 73.32,24.62,283.9,355.8,119.9,229.8,352.25,113.35,146.64,49.24,99.360714,175.89537,300.32316,114.0123,49.511251,
Io System Nutation/Precession coefficients = 91472.9,45137.2,4850.7,1191.3,262.1,64.3,2382.6,6070,182945.8,90274.4,4850.4046,1191.9605,262.5475,6070.2476,64.3,

Testing with PCK polynomial ... 
Io    Angles = -2.0466383,25.496441,-24.093155


  Mars original SPICE values for target body orientation unadjusted
  Source = 2
    Time           = -69382819
CJ(0) = 0.65330574 -0.46117449 -0.60042459
         0.61166293 0.78886884 0.059619006
         0.44616149 -0.4062069 0.79745588
    Time           = -69382785
CJ(1) = 0.65478275 -0.45926576 -0.60027869
         0.61008153 0.78998159 0.061070579
         0.44616149 -0.4062069 0.79745588
    Time           = -69382751
CJ(2) = 0.65625594 -0.45735435 -0.60012927
         0.60849657 0.79108972 0.062521795
         0.44616149 -0.4062069 0.79745588
    Time           = -69382717
CJ(3) = 0.65772528 -0.45544026 -0.59997635
         0.60690805 0.79219323 0.063972645
         0.44616149 -0.4062069 0.79745588
    Time           = -69382683
CJ(4) = 0.65919078 -0.45352351 -0.59981992
         0.60531598 0.79329211 0.065423122
         0.44616149 -0.4062069 0.79745588
    Time           = -69382648
CJ(5) = 0.66065243 -0.45160411 -0.59965998
         0.60372038 0.79438635 0.066873216
         0.44616149 -0.4062069 0.79745588
    Time           = -69382614
CJ(6) = 0.66211021 -0.44968207 -0.59949654
         0.60212124 0.79547595 0.068322919
         0.44616149 -0.4062069 0.79745588
    Time           = -69382580
CJ(7) = 0.66356413 -0.4477574 -0.59932959
         0.60051859 0.7965609 0.069772222
         0.44616149 -0.4062069 0.79745588
    Time           = -69382546
CJ(8) = 0.66501416 -0.44583011 -0.59915914
         0.59891242 0.79764119 0.071221118
         0.44616149 -0.4062069 0.79745588
    Time           = -69382512
CJ(9) = 0.66646031 -0.44390022 -0.59898518
         0.59730276 0.79871681 0.072669597
         0.44616149 -0.4062069 0.79745588


Now PCK polynomial values for angles unadjusted ...
  Io PCK polynomial output
  Source = 5
    Angles = -2.0466383,25.496441,-24.093155

  Mars PCK polynomial output
  Source = 5
    Time           = -69382819
CJ(0) = 0.65330574 -0.46117449 -0.60042459
         0.61166293 0.78886884 0.059619006
         0.44616149 -0.4062069 0.79745588
    Time           = -69382785
CJ(1) = 0.65478275 -0.45926576 -0.60027869
         0.61008153 0.78998159 0.061070579
         0.44616149 -0.4062069 0.79745588
    Time           = -69382751
CJ(2) = 0.65625594 -0.45735435 -0.60012927
         0.60849657 0.79108972 0.062521795
         0.44616149 -0.4062069 0.79745588
    Time           = -69382717
CJ(3) = 0.65772528 -0.45544026 -0.59997635
         0.60690805 0.79219323 0.063972645
         0.44616149 -0.4062069 0.79745588
    Time           = -69382683
CJ(4) = 0.65919078 -0.45352351 -0.59981992
         0.60531598 0.79329211 0.065423122
         0.44616149 -0.4062069 0.79745588
    Time           = -69382648
CJ(5) = 0.66065243 -0.45160411 -0.59965998
         0.60372038 0.79438635 0.066873216
         0.44616149 -0.4062069 0.79745588
    Time           = -69382614
CJ(6) = 0.66211021 -0.44968207 -0.59949654
         0.60212124 0.79547595 0.068322919
         0.44616149 -0.4062069 0.79745588
    Time           = -69382580
CJ(7) = 0.66356413 -0.4477574 -0.59932959
         0.60051859 0.7965609 0.069772222
         0.44616149 -0.4062069 0.79745588
    Time           = -69382546
CJ(8) = 0.66501416 -0.44583011 -0.59915914
         0.59891242 0.79764119 0.071221118
         0.44616149 -0.4062069 0.79745588
    Time           = -69382512
CJ(9) = 0.66646031 -0.44390022 -0.59898518
         0.59730276 0.79871681 0.072669597
         0.44616149 -0.4062069 0.79745588


Testing angular velocity with Io data ...
SpiceRotation av = -6.3193326e-07 -1.7682968e-05 3.7102704e-05
J2000 to body-fixed Naif av = -6.3193326e-07 -1.7682968e-05 3.7102704e-05



Testing partials for target body parameters...
For angles (ra,dec,rotation) = 1.9429654 2.1356375 -0.92665897
Beginning with J2000 vector 0.78673052 0.30824564 -0.53482681
lookB = 0.69294371 0.69249343 -0.20070344

 dLookB with respect to ra = 0.56419869 -0.43208476 0.4571027
  Right ascension partial on A applied to dlookB =:  0.78673052 0.30824564 0

 dLookB with respect to dec = -0.19972128 0.019831273 -0.62112827
  Declination partial on A applied to dlookB =:  0.27671521 -0.25193486 -0.53482681

 dLookB with respect to rotation rate = -556.10123 556.46282 0
  Rotation rate partial on A applied to dlookB =:  565090.03 146205.39 -241683.3

 dLookB with respect to rotation = 0.69249343 -0.69294371 0
  Rotation partial on A applied to dlookB =:  0.87627666 0.22671852 -0.37477468


... Testing failure of body rotation with binary PCK
 Source = 0
Frame type is binary PCK and cannot be updated
End of PCK testing


Testing exceptions...

**I/O ERROR** Cannot find [INS-99999_TRANSX] in text kernels.

**PROGRAMMER ERROR** Argument cacheSize must not be less or equal to zero.

**PROGRAMMER ERROR** Argument startTime must be less than or equal to endTime.

**PROGRAMMER ERROR** Cache size must be more than 1 if startTime and endTime differ.

**PROGRAMMER ERROR** A SpiceRotation cache has already been created.

**PROGRAMMER ERROR** The SpiceRotation has not yet been fit to a function.

**PROGRAMMER ERROR** Only cached rotations can be returned as a line cache of quaternions and time.

**PROGRAMMER ERROR** To create table source of data must be either Memcache or PolyFunction.

**USER ERROR** Target body orientation information not available.  Rerun spiceinit.

**PROGRAMMER ERROR** Unable to evaluate the derivative of the SPICE rotation fit polynomial for the given coefficient index [-1]. Index is negative or exceeds degree of polynomial [2].

**PROGRAMMER ERROR** Unable to evaluate the derivative of the target body rotation fit polynomial for the given coefficient index [100]. Index is negative or exceeds degree of polynomial [2].

**PROGRAMMER ERROR** A rotation axis is outside the valid range of 1 to 3.

**USER ERROR** Time cache not available -- rerun spiceinit.

**PROGRAMMER ERROR** The SpiceRotation pointing angles must be fit to polynomials in order to compute angular velocity.