\begintext

Version and Date
--------------------------------------------------------------------------------

   The instrument addendum kernel i("iak") is used by USGS to store necessary
   data that may not be found in other kernels (i.e. the instrument kernel, or
   "iak").

Note on USGS Frame addition
--------------------------------------------------------------------------------
   All Mvic frames have the boresight in the -X directions, while Isis assumes
   boresight is either in +/- Z direction.  A new frame was created for each
   Mvic ccd's to do a final rotation into the Isis assumed boresight. This is a
   90 degree rotation around the Y-axis.  New Naif Id's were created by simply
   adding 700 to the Mission Naif ID.

   This was done as an extra frame rather than in the FocalPlaneMap code because
   of ckwriter and spkwriter.

   Also note that the FT translations are different from the Tdi. This is
   because of the scan direction for Tdi (See frame kernel diagrams).
     FT: sample = -X   line = +Y
    Tdi: sample = -X   line = -Y

   FRAME  (Naif Frame ID = -98203    Isis Frame ID = -98903)
 

References
--------------------------------------------------------------------------------

             1.   "Calculation of distortion in MVIC frame images" (filename:
                  MVICdistortion-harrison8.doc)
                 Notes:
              a. This is also found as section 10.3.1.2 (pp 58-62) of [2] below.
                 However, the distortion coefficients in the harrison8 version
                 are different than in [2]. We were told to use the values from
                 the harrison8 document.
              b. The harrison8 version is more extensive in its description of
                 the least-squares adjustment and analysis. There is a detailed
                 residual analysis and a number of figures illustrating residual
                 vectors and various plots of deltaC and deltaR (corrections to
                 column and row). There is no mention of correlation analysis
                 (that might have been useful/interesting).
              c. Though we are meant to use this distortion model for TDI as
                 well as Frame, based on the described calibration procedure, it
                 is not clear that the coefficients derived here would be valid
                 for the TDI sensors as well.

             2.  Peterson, Joe (2008), "New Horizons SOC to Instrument Pipeline
                 ICE," Document No. 05310-SOCINST-01, Contract NASW-02008,
                 Southwest Research Institute, August, 2008. 
                 Notes:
              a. section 10.3.1.2 doesn't apparently describe how the distortion
                 model applies to the TDI sensors.

             3.  Lunsford, Allen (2007), "Ralph Geometric Distortion and
                 Boresights," 24 pgs.
                 Notes:
              a. USGS was told this distortion model is less accurate than [1].
              b. TKFRAME matrix values from this document are in the frames
                 kernel ("fk"). The document indicates these matrices have been
                 adjusted to compensate for as yet unexplained offsets ("62
                 urads off around Y-axis for LEISA and MVIC-Frame and 73 urads
                 off in Y direction for MVIC-TDI"). 

             4. Telecon 2014-05-14: Cathy Olkin, Jason Cook, Tracie Sucharski,
                and Ken Edmundson
   
             5. Cook, Jason C. (20??), "MVIC Distortion," 28 pgs.


2014-06-19 USGS Astrogeology Notes on Mvic Frame camera distortion model...
--------------------------------------------------------------------------------

             1. Model definition and parameters are from reference [1] above.
             2. Legendre polynomial distortion coefficients from [1] are below 
                (INS-98900_DISTORTION_COEF_X, INS-98900_DISTORTION_COEF_Y). A
                unique identifier (98900) was created for these coefficients
                and the boresight offsets as it is thought that the same values
                will be used for both Mvic frame and TDI sensors.
             3. 2014-09-15 Residual distorion coefficients for each MVIC TDI band
                from reference [5] above. Given for column and row of each band as
                INS-9890X_RESIDUAL_COL_DIST_COEF and
                INS-9890X_RESIDUAL_ROW_DIST_COEF.


\begindata
 
 INS-98900_DISTORTION_COEF_X = (
                               -2.184e-05,
                               32.911e-05,
                               -0.243e-05,
                                7.444e-05,
                              -19.201e-05,
                               -0.218e-05,
                                0.686e-05,
                               -0.502e-05,
                             -144.410e-05,
                                0.662e-05,
                               -0.194e-05,
                                0.537e-05,
                               -0.843e-05,
                                0.201e-05,
                               -0.289e-05,
                               -0.153e-05,
                               -0.209e-05,
                               -0.067e-05,
                               -0.490e-05,
                              -12.455e-05
                               )
 
 INS-98900_DISTORTION_COEF_Y = (
                              194.590e-05,
                              169.360e-05,
                                1.100e-05,
                               -3.500e-05,
                              609.640e-05,
                               -4.300e-05,
                                0.400e-05,
                             -287.100e-05,
                             -114.900e-05,
                               -5.100e-05,
                               33.600e-05,
                              -41.400e-05,
                              -38.800e-05,
                             -122.500e-05,
                               37.300e-05,
                               41.500e-05,
                                4.500e-05,
                               11.300e-05,
                              -60.000e-05,
                               40.900e-05
                               )
 
 FRAME_ISIS_NH_RALPH_MVIC_FT    = -98903
 FRAME_-98903_NAME          = 'ISIS_NH_RALPH_MVIC_FT'
 FRAME_-98903_CLASS         = 4
 FRAME_-98903_CLASS_ID      = -98903
 FRAME_-98903_CENTER        = -98
 TKFRAME_-98903_RELATIVE    = 'NH_RALPH_MVIC_FT'
 TKFRAME_-98903_SPEC        = 'ANGLES'
 TKFRAME_-98903_ANGLES      = ( 0.0 90.0 0.0 )
 TKFRAME_-98903_AXES        = (  1,  2,  3 )
 TKFRAME_-98903_UNITS       = 'DEGREES'

 INS-98903_PIXEL_PITCH       = 0.013
 INS-98903_FOCAL_LENGTH      = 657.5

 INS-98903_TRANSX  = ( 0.0,  -0.013,  0.0 )
 INS-98903_TRANSY  = ( 0.0, 0.0, 0.013 )

 INS-98903_ITRANSS = ( 0.0, -76.9230769230769, 0.0 )
 INS-98903_ITRANSL = ( 0.0, 0.0, 76.9230769230769 )
           
\begintext

  PAN2  (Naif Frame ID = -98204    Isis Frame ID = -98904)

\begindata
 
 FRAME_ISIS_NH_RALPH_MVIC_PAN2    = -98904
 FRAME_-98904_NAME          = 'ISIS_NH_RALPH_MVIC_PAN2'
 FRAME_-98904_CLASS         = 4
 FRAME_-98904_CLASS_ID      = -98904
 FRAME_-98904_CENTER        = -98
 TKFRAME_-98904_RELATIVE    = 'NH_RALPH_MVIC_PAN2'
 TKFRAME_-98904_SPEC        = 'ANGLES'
 TKFRAME_-98904_ANGLES      = ( 0.0 90.0 0.0 )
 TKFRAME_-98904_AXES        = (  1,  2,  3 )
 TKFRAME_-98904_UNITS       = 'DEGREES'

 INS-98904_PIXEL_PITCH       = 0.013
 INS-98904_FOCAL_LENGTH      = 657.5

 INS-98904_TRANSX  = ( 0.0,  -0.013,  0.0)
 INS-98904_TRANSY  = ( 0.0, 0.0, 0.013 )

 INS-98904_ITRANSS = ( 0.0, -76.9230769230769, 0.0 )
 INS-98904_ITRANSL = ( 0.0, 0.0, 76.9230769230769 )

 INS-98904_RESIDUAL_COL_DIST_COEF = (
                                     1.05201,
                                    -0.272378e-03, 
                                     3.02675e-07, 
                                    -1.85175e-10,
                                     4.28517e-14,
                                    -3.31549e-18 
                                    )
 
 INS-98904_RESIDUAL_ROW_DIST_COEF = (
                                     3.20119,
                                     1.10228e-03, 
                                   -13.2266e-07, 
                                     7.19104e-10,
                                   -16.8607e-14,
                                    14.2024e-18 
                                    )

\begintext
  PAN1  (Naif Frame ID = -98205    Isis Frame ID = -98905)

\begindata
 
 FRAME_ISIS_NH_RALPH_MVIC_PAN1    = -98905
 FRAME_-98905_NAME          = 'ISIS_NH_RALPH_MVIC_PAN1'
 FRAME_-98905_CLASS         = 4
 FRAME_-98905_CLASS_ID      = -98905
 FRAME_-98905_CENTER        = -98
 TKFRAME_-98905_RELATIVE    = 'NH_RALPH_MVIC_PAN1'
 TKFRAME_-98905_SPEC        = 'ANGLES'
 TKFRAME_-98905_ANGLES      = ( 0.0 90.0 0.0 )
 TKFRAME_-98905_AXES        = (  1,  2,  3 )
 TKFRAME_-98905_UNITS       = 'DEGREES'

 INS-98905_PIXEL_PITCH       = 0.013
 INS-98905_FOCAL_LENGTH      = 657.5

 INS-98905_TRANSX  = ( 0.0,  -0.013,  0.0)
 INS-98905_TRANSY  = ( 0.0, 0.0, 0.013 )

 INS-98905_ITRANSS = ( 0.0, -76.9230769230769, 0.0 )
 INS-98905_ITRANSL = ( 0.0, 0.0, 76.9230769230769 )

 INS-98905_RESIDUAL_COL_DIST_COEF = (
                                    -8.26115,
                                    -0.301258e-03, 
                                     3.28326e-07, 
                                    -1.62919e-10,
                                     2.48737e-14,
                                    -0.742968e-18 
                                    )
 
 INS-98905_RESIDUAL_ROW_DIST_COEF = (
                                   -28.4793,
                                    -0.629792e-03, 
                                     4.25381e-07, 
                                    -1.54272e-10,
                                     2.54615e-14,
                                    -1.24917e-18 
                                    )

\begintext
  RED  (Naif Frame ID = -98206    Isis Frame ID = -98906)

\begindata
 
 FRAME_ISIS_NH_RALPH_MVIC_RED    = -98906
 FRAME_-98906_NAME          = 'ISIS_NH_RALPH_MVIC_RED'
 FRAME_-98906_CLASS         = 4
 FRAME_-98906_CLASS_ID      = -98906
 FRAME_-98906_CENTER        = -98
 TKFRAME_-98906_RELATIVE    = 'NH_RALPH_MVIC_RED'
 TKFRAME_-98906_SPEC        = 'ANGLES'
 TKFRAME_-98906_ANGLES      = ( 0.0 90.0 0.0 )
 TKFRAME_-98906_AXES        = (  1,  2,  3 )
 TKFRAME_-98906_UNITS       = 'DEGREES'

 INS-98906_PIXEL_PITCH       = 0.013
 INS-98906_FOCAL_LENGTH      = 657.5

 INS-98906_TRANSX  = ( 0.0,  -0.013,  0.0)
 INS-98906_TRANSY  = ( 0.0, 0.0, 0.013 )

 INS-98906_ITRANSS = ( 0.0, -76.9230769230769, 0.0 )
 INS-98906_ITRANSL = ( 0.0, 0.0, 76.9230769230769 )

 INS-98906_RESIDUAL_COL_DIST_COEF = (
                                    -6.13184,
                                     0.717280e-03, 
                                    -8.14857e-07, 
                                     2.37349e-10,
                                    -3.12424e-14,
                                     1.71459e-18 
                                    )
 
 INS-98906_RESIDUAL_ROW_DIST_COEF = (
                                   -16.1647,
                                    -1.83265e-03, 
                                    11.1065e-07 
                                    -3.30078e-10,
                                     4.62181e-14,
                                    -1.74292e-18 
                                    )
 INS-98906_ROW_OFFSET = 12.0

\begintext
  BLUE  (Naif Frame ID = -98207    Isis Frame ID = -98907)

\begindata
 
 FRAME_ISIS_NH_RALPH_MVIC_BLUE    = -98907
 FRAME_-98907_NAME          = 'ISIS_NH_RALPH_MVIC_BLUE'
 FRAME_-98907_CLASS         = 4
 FRAME_-98907_CLASS_ID      = -98907
 FRAME_-98907_CENTER        = -98
 TKFRAME_-98907_RELATIVE    = 'NH_RALPH_MVIC_BLUE'
 TKFRAME_-98907_SPEC        = 'ANGLES'
 TKFRAME_-98907_ANGLES      = ( 0.0 90.0 0.0 )
 TKFRAME_-98907_AXES        = (  1,  2,  3 )
 TKFRAME_-98907_UNITS       = 'DEGREES'

 INS-98907_PIXEL_PITCH       = 0.013
 INS-98907_FOCAL_LENGTH      = 657.5

 INS-98907_TRANSX  = ( 0.0,  -0.013,  0.0)
 INS-98907_TRANSY  = ( 0.0, 0.0, 0.013 )

 INS-98907_ITRANSS = ( 0.0, -76.9230769230769, 0.0 )
 INS-98907_ITRANSL = ( 0.0, 0.0, 76.9230769230769 )

 INS-98907_RESIDUAL_COL_DIST_COEF = (
                                    -6.35936,
                                     0.634339e-03, 
                                    -8.30971e-07, 
                                     2.80320e-10,
                                    -4.23157e-14,
                                     2.41625e-18 
                                    )
 
 INS-98907_RESIDUAL_ROW_DIST_COEF = (
                                   -16.6520,
                                    -1.71336e-03, 
                                    12.9953e-07 
                                    -4.93728e-10,
                                     9.17910e-14,
                                    -6.16044e-18 
                                    )
\begintext
  METHANE  (Naif Frame ID = -98208    Isis Frame ID = -98908)

\begindata
 
 FRAME_ISIS_NH_RALPH_MVIC_METHANE    = -98908
 FRAME_-98908_NAME          = 'ISIS_NH_RALPH_MVIC_METHANE'
 FRAME_-98908_CLASS         = 4
 FRAME_-98908_CLASS_ID      = -98908
 FRAME_-98908_CENTER        = -98
 TKFRAME_-98908_RELATIVE    = 'NH_RALPH_MVIC_METHANE'
 TKFRAME_-98908_SPEC        = 'ANGLES'
 TKFRAME_-98908_ANGLES      = ( 0.0 90.0 0.0 )
 TKFRAME_-98908_AXES        = (  1,  2,  3 )
 TKFRAME_-98908_UNITS       = 'DEGREES'

 INS-98908_PIXEL_PITCH       = 0.013
 INS-98908_FOCAL_LENGTH      = 657.5

 INS-98908_TRANSX  = ( 0.0,  -0.013,  0.0)
 INS-98908_TRANSY  = ( 0.0, 0.0, 0.013 )

 INS-98908_ITRANSS = ( 0.0, -76.9230769230769, 0.0 )
 INS-98908_ITRANSL = ( 0.0, 0.0, 76.9230769230769 )

 INS-98908_RESIDUAL_COL_DIST_COEF = (
                                    -6.55214,
                                     2.30095e-03, 
                                   -25.2800e-07, 
                                    10.6292e-10,
                                   -21.0429e-14,
                                    16.2012e-18 
                                    )
 
 INS-98908_RESIDUAL_ROW_DIST_COEF = (
                                   -16.0211,
                                    -1.23680e-03, 
                                     0.616729e-07, 
                                     2.17726e-10,
                                    -7.20480e-14,
                                     7.60730e-18 
                                    )

\begintext
  NIR  (Naif Frame ID = -98209    Isis Frame ID = -98909)

\begindata
 
 FRAME_ISIS_NH_RALPH_MVIC_NIR    = -98909
 FRAME_-98909_NAME          = 'ISIS_NH_RALPH_MVIC_NIR'
 FRAME_-98909_CLASS         = 4
 FRAME_-98909_CLASS_ID      = -98909
 FRAME_-98909_CENTER        = -98
 TKFRAME_-98909_RELATIVE    = 'NH_RALPH_MVIC_NIR'
 TKFRAME_-98909_SPEC        = 'ANGLES'
 TKFRAME_-98909_ANGLES      = ( 0.0 90.0 0.0 )
 TKFRAME_-98909_AXES        = (  1,  2,  3 )
 TKFRAME_-98909_UNITS       = 'DEGREES'

 INS-98909_PIXEL_PITCH       = 0.013
 INS-98909_FOCAL_LENGTH      = 657.5

 INS-98909_TRANSX  = ( 0.0,  -0.013,  0.0)
 INS-98909_TRANSY  = ( 0.0, 0.0, 0.013 )

 INS-98909_ITRANSS = ( 0.0, -76.9230769230769, 0.0 )
 INS-98909_ITRANSL = ( 0.0, 0.0, 76.9230769230769 )

 INS-98909_RESIDUAL_COL_DIST_COEF = (
                                    -5.93566,
                                     0.950374e-03, 
                                    -7.41796e-07, 
                                     1.09544e-10,
                                     0.584518e-14,
                                    -1.36733e-18 
                                    )
 
 INS-98909_RESIDUAL_ROW_DIST_COEF = (
                                   -15.1467,
                                    -2.90492e-03, 
                                    17.5191e-07, 
                                    -5.69166e-10,
                                     9.39702e-14,
                                    -5.03314e-18 
                                    )

\begintext
 These are the parameters required for writing c-kernels.  For 
 the New Horizons spacecraft the ck frame is NH_SPACECRAFT (-98000),
 and the ck reference frame is J2000 (1).

\begindata
 INS-98908_CK_FRAME_ID=-98000
 INS-98908_CK_REFERENCE_ID=1

\begintext

