;docformat='rst' ;+ ; Fill in orbit info table as needed to the end of the currently available TLEs ; (all orbits which end before the epoch of the second-to-last TLE in the table) ; ; :Author: ; Chris Jeppesen, Bill Barrett ; ;- ;+ ; ; :Params: ; orbit_info : in, required, type=int ; The orbit information data to be updated in the database. ; ; :Keywords: ; verbose : in, optional, type=boolean ; Generate a substantial amount of log information. ; ; :Examples: ; write_orbit_info, orbit_info ;- pro write_orbit_info,orbit_info,verbose=verbose ; Generate SQL from the orbit information sql=orbit_info_to_sql(orbit_info) routine_name = get_routine_name() if keyword_set(verbose) then begin for i = 0, n_elements(sql) - 1 do begin print, routine_name + ' ' + sql[i] endfor endif ; Do NOT write to the database if this is a Jenkins test using_jenkins = getenv('JENKINS_URL') if keyword_set(using_jenkins) then begin print, routine_name + ' writing to db from Jenkins not permitted' return endif spawn, 'whoami', who print, routine_name + ' current user = ' + who close_query_database, /all database='AIM_CIPS_SCIENCE' get_database_login,database,user=user,password=password,url=url,/write for i=0,n_elements(sql)-1 do begin theStatement = sql[i] query_database, theStatement, data, nrows, user=user, password=password, dburl=url, /dbConnect ENDFOR ; close_query_database, /all end