;+ ; NAME: ; smei_orbit_get ; PURPOSE: ; Extracts fields from orbit structure ; CATEGORY: ; camera/gen/idl/toolbox ; CALLING SEQUENCE: FUNCTION smei_orbit_get, orb, $ number = number , $ fraction = fraction , $ doublex = doublex , $ roundx = roundx , $ ceilx = ceilx , $ floorx = floorx ; INPUTS: ; orb array; type: orbit structure ; orbit structure as created by smei_orbit_set ; OPTIONAL INPUTS: ; /number extract integer orbit number ; /fraction extract double precison fraction ; /doublex extract orbit as double precision number, i.e. the ; sum of number and fraction part. Note that this number ; looses precision pretty quick for high orbit numbers. ; /roundx extract orbit rounded to nearest integer orbit number ; OUTPUTS: ; rtn scalar or array ; integer orbit number of double precision ; fraction depending on setting of /number ; or /fraction ; INCLUDE: @compile_opt.pro ; On error, return to caller ; CALLS: ; InitVar ; PROCEDURE: ; MODIFICATION HISTORY: ; JAN-2006, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- InitVar, number , /key InitVar, fraction, /key InitVar, doublex , /key InitVar, roundx , /key InitVar, ceilx , /key InitVar, floorx , /key CASE 1 OF number : rtn = orb.number fraction: rtn = orb.fraction roundx : rtn = orb.number+round(orb.fraction) floorx : rtn = orb.number+floor(orb.fraction) ceilx : rtn = orb.number+ceil (orb.fraction) doublex : rtn = orb.number+orb.fraction ELSE : rtn = orb ENDCASE RETURN, rtn & END