; ; Translates AIM mission orbit numbers to double ; precision double precision TAI microseconds since ; the GPS epoch (1980 Jan 6.0). ; function aim_orbit2usec, aim_orbit_num sql = "select startTime from AIM_CIPS_SCIENCE.Orbits WHERE orbitNum = " + strtrim(STRING(aim_orbit_num), 2) get_database_login, 'AIM_CIPS_SCIENCE', user=user, password=password, url=url query_database, sql, data, nrows, $ dbUrl=url, $ user=user, $ password=password, /dbConnect if nrows eq 0 then MESSAGE, 'AIM orbit not found ' + strtrim(STRING(aim_orbit_num), 2) if nrows gt 1 then MESSAGE, strtrim(STRING(nrows), 2) + ' rows found for ' + strtrim(STRING(aim_orbit_num), 2) RETURN, data.starttime end