#I guess we're doomed! sys.stderr.write("\nSomething went wrong ... \n\n") sys.stderr.write("%s\n\n" % e) sys.stderr.write(" ... better try again.\n") sys.exit(2) print "Updating site `" + site + "' (" + log.site_name() + ")" ###---------------------- #+#Connect to GIPSY sta_info database ###---------------------- sta_info = sif.sta_info_interface() sta_info.connect() #Update STA ID TABLE if not sta_info.got_sta_id(log.site()): sta_info.add_sta_id(log.site(), log.site_number(), log.site_full_name()) # sta_info.dump_sta_id() #Update SVEC TABLE sta_info.update_svec(log.site(), log.antennas()) # sta_info.dump_svec() #Update POS TABLE sta_info.add_pos(log.site(), log.first_installed(), log.XPos(), log.YPos(), log.ZPos(), log.XVel(), log.YVel(), log.ZVel()) sta_info.dump_sta_pos() sta_info.close()
print "%15.4f %15.4f %15.4f" % (log.XPos(), log.YPos(), log.ZPos()) #print benchmark->arp vector if arp_vector: print "%15.4f %15.4f %15.4f" % \ ( log.arp_vector(direction="east"), log.arp_vector(direction="north"), log.arp_vector(direction="up") ) ###---------------------- #+#GIPSY specific stuff ###---------------------- #print site_pos format, if asked for if gipsy_pos: print " %.4s %.4d %.2d %.2d %.2d %.2d %5.2f %10.2f %15.4f %14.4f %14.4f %15.7E %14.7E %14.7E %.30s" % \ ( log.site().upper(), log.year(), log.month(), log.day(), log.hour(), log.minute(), log.second(), log.duration(), log.XPos(), log.YPos(), log.ZPos(), log.XVel(), log.YVel(), log.ZVel(), log.comment() ) #print site_id format, if asked for if gipsy_sta_id: #some of these may not exist and hence return None station_name = [ log.site_name(), log.loc_city(), log.loc_state(),
#print benchmark->arp vector if arp_vector: print "%15.4f %15.4f %15.4f" % \ ( log.arp_vector(direction="east"), log.arp_vector(direction="north"), log.arp_vector(direction="up") ) ###---------------------- #+#GIPSY specific stuff ###---------------------- #print site_pos format, if asked for if gipsy_pos: print " %.4s %.4d %.2d %.2d %.2d %.2d %5.2f %10.2f %15.4f %14.4f %14.4f %15.7E %14.7E %14.7E %.30s" % \ ( log.site().upper(), log.year(), log.month(), log.day(), log.hour(), log.minute(), log.second(), log.duration(), log.XPos(), log.YPos(), log.ZPos(), log.XVel(), log.YVel(), log.ZVel(), log.comment() ) #print site_id format, if asked for if gipsy_sta_id: #some of these may not exist and hence return None station_name = [log.site_name(), log.loc_city(), log.loc_state(), log.loc_country()] station_name = [s for s in station_name if s is not None] print " %.4s %6d %.60s" % \
#I guess we're doomed! sys.stderr.write("\nSomething went wrong ... \n\n") sys.stderr.write("%s\n\n" % e) sys.stderr.write(" ... better try again.\n") sys.exit(2) print "Updating site `"+site+"' ("+log.site_name()+")" ###---------------------- #+#Connect to GIPSY sta_info database ###---------------------- sta_info = sif.sta_info_interface() sta_info.connect() #Update STA ID TABLE if not sta_info.got_sta_id(log.site()): sta_info.add_sta_id(log.site(), log.site_number(), log.site_full_name()) # sta_info.dump_sta_id() #Update SVEC TABLE sta_info.update_svec(log.site(), log.antennas()) # sta_info.dump_svec() #Update POS TABLE sta_info.add_pos(log.site(), log.first_installed(), log.XPos(), log.YPos(), log.ZPos(), log.XVel(), log.YVel(), log.ZVel()) sta_info.dump_sta_pos() sta_info.close()