예제 #1
0
 def getSatXYZ_m(self, prn, t_start, t_end):
     time = Timing()
     df_ephemeris = pd.DataFrame(self.nav_data, columns=['prn', 'year', 'month', 'day', 'hour', 'min', 'sec',
                                                         'sv_clock_bias', 'sv_clock_drift', 'sv_clock_drift_rate',
                                                         'IODE', 'Crs', 'Delta_n', 'M0', 'Cuc', 'e', 'Cus', 'sqrt_A',
                                                         'Toe', 'Cic', 'OMEGA', 'CIS', 'i0', 'Crc', 'omega',
                                                         'OMEGA_DOT', 'IDOT', 'Codes_L2_channel', 'GPS_week',
                                                         'L2_P_data_flag', 'SV_accuracy', 'SV_health', 'TGD',
                                                         'IODC', 'transmission_time', 'fit_interval'])
     df_ephemeris["UnixGPSTime"] = time.iso_ToGPSUnixTime(df_ephemeris.year, df_ephemeris.month, df_ephemeris.day)
     subDataFrame = df_ephemeris.query('prn == @prn')
예제 #2
0
    def buildDoubleDifferences(self):
        """Construire les doubles differences"""
        coord_sat_tmp = [0.0, 0.0, 0.0]
        t = Timing()
        flag = 0
        # Il faut d'abord choisir le satellite pivot
        for i in range(0, self.obs[0].rxm_raw.shape[0]):

            for j in range(0, self.eph.nav_data.shape[0]):

                year = int(self.eph.nav_data[j, 1]) + 2000
                month = int(self.eph.nav_data[j, 2])
                day = int(self.eph.nav_data[j, 3])
                hour = int(self.eph.nav_data[j, 4])
                minute = int(self.eph.nav_data[j, 5])
                sec = int(self.eph.nav_data[j, 6])

                if self.obs[0].rxm_raw[i,7] == self.eph.nav_data[j,0] and math.fabs(t.weekToW_ToGPSUnixTime(
                        self.obs[0].rxm_raw[i,1], self.obs[0].rxm_raw[i,0]) - t.iso_ToGPSUnixTime(
                        year, month, day, hour, minute, sec
                        )) < 7200000:
                    coord_sat_tmp = self.eph.getSatXYZ(int(self.obs[0].rxm_raw[i, 0] / 1000), self.eph.nav_data[j])
                    print(coord_sat_tmp)
                    if 10 < float(180 * self.getSatElevation(coord_sat_tmp[0], coord_sat_tmp[1], coord_sat_tmp[2],
                                                  self.coord_pivot[0],self.coord_pivot[1],self.coord_pivot[2])/math.pi):

                        print(float(180 * self.getSatElevation(coord_sat_tmp[0], coord_sat_tmp[1], coord_sat_tmp[2],
                                                  self.coord_pivot[0],self.coord_pivot[1],self.coord_pivot[2])/math.pi))
                        print(self.eph.nav_data[j,0])
                        print(str(year)+"/"+str(month)+"/"+str(day)+"/"+str(hour)+"/"+str(minute)+"/"+str(sec))
                        print(str(self.obs[0].rxm_raw[i,0])+"/"+str(self.obs[0].rxm_raw[i,1]))
                        flag = 1
                        break
            if flag == 1:
                break

        for i in range(1, len(self.obs)):
            # Le nombre des DD = Nbre de cubes fixes x Nbre de cube mobile
            print("OK2")