/* satellite positions and clocks ----------------------------------------------
* compute satellite positions, velocities and clocks
* args : gtime_t teph I time to select ephemeris (gpst)
* obsd_t *obs I observation data
* int n I number of observation data
* nav_t *nav I navigation data
* int ephopt I ephemeris option (EPHOPT_???)
* double *rs O satellite positions and velocities (ecef)
* double *dts O satellite clocks
* double *var O sat position and clock error variances (m^2)
* int *svh O sat health flag (-1:correction not available)
* return : none
* notes : rs [(0:2)+i*6]= obs[i] sat position {x,y,z} (m)
* rs [(3:5)+i*6]= obs[i] sat velocity {vx,vy,vz} (m/s)
* dts[(0:1)+i*2]= obs[i] sat clock {bias,drift} (s|s/s)
* var[i] = obs[i] sat position and clock error variance (m^2)
* svh[i] = obs[i] sat health flag
* if no navigation data, set 0 to rs[], dts[], var[] and svh[]
* satellite position and clock are values at signal transmission time
* satellite position is referenced to antenna phase center
* satellite clock does not include code bias correction (tgd or bgd)
* any pseudorange and broadcast ephemeris are always needed to get
* signal transmission time
*-----------------------------------------------------------------------------*/
/* read rinex obs and nav files ------------------------------------------------
* read rinex obs and nav files
* args : char *file I file (wild-card * expanded) ("": stdin)
* int rcv I receiver number for obs data
* (gtime_t ts) I observation time start (ts.time==0: no limit)
* (gtime_t te) I observation time end (te.time==0: no limit)
* (double tint) I observation time interval (s) (0:all)
* char *opt I rinex options (see below,"": no option)
* obs_t *obs IO observation data (NULL: no input)
* nav_t *nav IO navigation data (NULL: no input)
* sta_t *sta IO station parameters (NULL: no input)
* return : status (1:ok,0:no data,-1:error)
* notes : read data are appended to obs and nav struct
* before calling the function, obs and nav should be initialized.
* observation data and navigation data are not sorted.
* navigation data may be duplicated.
* call sortobs() or uniqnav() to sort data or delete duplicated eph.
*
* read rinex options (separated by spaces) :
*
* -GLss[=shift]: select GPS signal ss (ss: RINEX 3 code, "1C","2W"...)
* -RLss[=shift]: select GLO signal ss
* -ELss[=shift]: select GAL signal ss
* -JLss[=shift]: select QZS signal ss
* -CLss[=shift]: select BDS signal ss
* -ILss[=shift]: select IRN signal ss
* -SLss[=shift]: select SBS signal ss
*
* shift: carrier phase shift to be added (cycle)
*
* -SYS=sys[,sys...]: select navi systems
* (sys=G:GPS,R:GLO,E:GAL,J:QZS,C:BDS,I:IRN,S:SBS)
*
*-----------------------------------------------------------------------------*/