-
Notifications
You must be signed in to change notification settings - Fork 32
Creating a driver for an ISIS sensor model
Jesse Mapel edited this page Sep 6, 2019
·
5 revisions
- Pick your sensor model. Some sensor models cover multiple instruments so watch out for that!
- Find a cube to use as a test image. You will want a spiceinit’d and unspiceinit’d version of the cube. Go to PILOT and find an image. Test cubes are also in
$ISIS3DATA/mission_name/testData/
. For example,/usgs/cpkgs/isis3/data/messenger/testData/EW0031509051D.cub
is a spiceinit’d MDIS WAC cube - Extract kernels from the spiceinit’d cube and convert them to transfer format
- Extract the information we need from the spiceinit’d cube. We need the following:
- InstrumentPointing Table
- InstrumentPosition Table
- BodyRotation Table
- SunPosition Table
- NaifKeywords Object
Create a json object to test against. For example here’s the InstrumentPointing table from
EW0031509051D.cub
:
Object = Table
Name = InstrumentPointing
StartByte = 1122377
Bytes = 64
Records = 1
ByteOrder = Lsb
TimeDependentFrames = (-236890, -236892, -236880, -236000, 1)
ConstantFrames = (-236800, -236890)
ConstantRotation = (6.32597991633385e-06, -0.9999484094199,
0.010157679784231, -6.22745790674593e-04,
-0.010157681754072, -0.99994821550371,
0.99999980607381, 1.6938907748432e-21,
-6.22777920148769e-04)
CkTableStartTime = 176293972.98331
CkTableEndTime = 176293972.98331
CkTableOriginalSize = 1
FrameTypeCode = 3
Description = "Created by spiceinit"
Kernels = ($messenger/kernels/ck/msgr_0508_v04.bc,
$messenger/kernels/ck/msgr_mdis_sc040812_150430v1.bc,
$messenger/kernels/ck/msgr_mdis_sc050727_100302_sub_v-
1.bc,
$messenger/kernels/ck/msgr_mdis_gm040819_150430v1.bc,
$messenger/kernels/fk/msgr_v231.tf)
tabledump from=EW0031509051D.cub name=InstrumentPointing
J2000Q0,J2000Q1,J2000Q2,J2000Q3,AV1,AV2,AV3,ET
0.83916767084107,-0.17917144340698,0.13221815611789,-0.49619912663709,-2.78375051960417e-05,-3.6543121530637e-05,-7.46424524560798e-05,176293972.98331
This should look like the following in the to_isis json output
{‘InstrumentPointing’ :
'TimeDependentFrames' : [-236890, -236892, -236880, -236000, 1],
‘CkTableStartTime’ : 176293972.98331,
‘CkTableEndTime’ : 176293972.98331,
‘CkTableOriginalSize’ : 1,
‘ConstantFrames’ : [-236800, -236890],
‘ConstantRotation’ : [6.32597991633385e-06, -0.9999484094199, 0.010157679784231, -6.22745790674593e-04, -0.010157681754072, -0.99994821550371, 0.99999980607381, 1.6938907748432e-21, -6.22777920148769e-04],
‘EphemerisTimes’ : [176293972.98331],
‘Quaternions’ : [[0.83916767084107,-0.17917144340698,0.13221815611789,-0.49619912663709]],
‘AngularVelocities’ : [[-2.78375051960417e-05,-3.6543121530637e-05,-7.46424524560798e-05]]
}
You do not need to worry about StartByte, Bytes, Records, ByteOrder, FrameTypeCode, Description, or Kernels. The ISIS table code and spiceinit will handle those.
- Create a load test that uses the label of the unspiceinit’d cube and the kernels from the spiceinit’d cube. Start writing your driver