Esempio n. 1
0
 def PlotAccelerometer(self, e, c, s, params):
   mplot.PlotVec3(c['time'], c['control_input']['imus']['acc'][:, 0],
                  linestyle='-', label='A')
   mplot.PlotVec3(c['time'], c['control_input']['imus']['acc'][:, 1],
                  linestyle=':', label='B')
   mplot.PlotVec3(c['time'], c['control_input']['imus']['acc'][:, 2],
                  linestyle='-.', label='C')
Esempio n. 2
0
 def PlotSpecificForce(self, e, c, s, params):
   mplot.PlotVec3(c['time'], c['estimator']['acc_b_estimates'][:, 0],
                  linestyle='-', label='A')
   mplot.PlotVec3(c['time'], c['estimator']['acc_b_estimates'][:, 1],
                  linestyle=':', label='B')
   mplot.PlotVec3(c['time'], c['estimator']['acc_b_estimates'][:, 2],
                  linestyle='-.', label='C')
Esempio n. 3
0
 def PlotMotorMoments(self, ti, c, s):
     mplot.PlotVec3(c['time'],
                    c['thrust_moment_avail']['moment'],
                    labels=['Roll Avail', 'Pitch Avail', 'Yaw Avail'])
     mplot.PlotVec3(c['time'],
                    c['thrust_moment']['moment'],
                    linestyle=':',
                    labels=['Roll Cmd', 'Pitch Cmd', 'Yaw Cmd'])
Esempio n. 4
0
 def PlotEulerAngleError(self, ti, c, s):
     mplot.PlotVec3(c['time'],
                    ti['eulers_ti2b'],
                    scale=180.0 / np.pi,
                    labels=['Roll', 'Pitch', 'Yaw'])
     mplot.PlotVec3(c['time'],
                    ti['eulers_ti2cmd'],
                    scale=180.0 / np.pi,
                    labels=['Roll Cmd', 'Pitch Cmd', 'Yaw Cmd'],
                    linestyle=':')
Esempio n. 5
0
 def PlotGroundEstimatePosition(self, ci, c, s):
     mplot.PlotVec3(c['time'],
                    ci['ground_estimate']['Xg'],
                    label='vessel_pos_g [estimate]')
     if s is not None:
         # Note: These can only be expected to agree if the simulator and
         # vessel estimator agree on the origin of the g-frame. That's a
         # good reason to standardize the ned origin and express these in the
         # ned frame.
         mplot.PlotVec3(s['time'],
                        s['buoy']['Xg'],
                        label='vessel_pos_g [sim]',
                        linestyle='--')
Esempio n. 6
0
 def _PlotGpsVelocityEcef(self, time, vel_ecef, vel_sigma_ecef, label):
     dims = ['x', 'y', 'z']
     vel = {d: vel_ecef[d] for d in dims}
     labels = ['%s %s ECEF' % (label, d) for d in dims]
     mplot.PlotVec3(time, vel, labels=labels)
     mplot.PlotVec3(time, {d: vel[d] + vel_sigma_ecef[d]
                           for d in dims},
                    linestyle=':',
                    labels=[None for d in dims])
     mplot.PlotVec3(time, {d: vel[d] - vel_sigma_ecef[d]
                           for d in dims},
                    linestyle=':',
                    labels=[None for d in dims])
Esempio n. 7
0
 def _PlotGpsPositionEcef(self, time, pos_ecef, pos_sigma_ecef, label):
     dims = ['x', 'y', 'z']
     pos_offset = {d: np.median(pos_ecef[d]) for d in dims}
     pos = {d: pos_ecef[d] - pos_offset[d] for d in dims}
     labels = ['%s %s ECEF -(%g)' % (label, d, pos_offset[d]) for d in dims]
     mplot.PlotVec3(time, pos, labels=labels)
     mplot.PlotVec3(time, {d: pos[d] + pos_sigma_ecef[d]
                           for d in dims},
                    linestyle=':',
                    labels=[None for d in dims])
     mplot.PlotVec3(time, {d: pos[d] - pos_sigma_ecef[d]
                           for d in dims},
                    linestyle=':',
                    labels=[None for d in dims])
Esempio n. 8
0
 def PlotVesselPosition(self, g, s, params):
     mplot.PlotVec3(g['estimate']['time'],
                    g['estimate']['Xg'],
                    label='[est]',
                    linestyle='--')
     mplot.PlotVec3(g['estimate']['time'],
                    g['estimator']['gps']['Xg'],
                    label='GPS (adjusted)',
                    linestyle=':')
     if s is not None:
         mplot.PlotVec3(s['time'],
                        s['buoy']['Xg'],
                        label='[sim]',
                        linestyle='-')
Esempio n. 9
0
 def PlotMagnetometer(self, g, s, params):
     mplot.PlotVec3(g['estimate']['time'],
                    g['input']['imu']['mag'],
                    label='mag')
     plot(g['estimate']['time'],
          numpy_utils.Vec3Norm(g['input']['imu']['mag']),
          'k--',
          label='mag norm')
Esempio n. 10
0
 def PlotAccBiases(self, e, c, s, params, imu_index=0):
   mplot.PlotVec3(c['time'], e['acc_b_estimates'][:, imu_index],
                  label='IMU %d' % imu_index)
Esempio n. 11
0
 def PlotBodyRates(self, e, c, s, params):
   mplot.PlotVec3(c['time'], c['state_est']['pqr_f'])
Esempio n. 12
0
 def PlotFilteredVelocity(self, e, c, s, params):
   mplot.PlotVec3(c['time'], c['state_est']['Vg'], label='Vg', linestyle='-')
   mplot.PlotVec3(c['time'], c['state_est']['Vg_f'], label='Vg_f',
                  linestyle='-.')
   if s is not None:
     mplot.PlotVec3(s['time'], s['wing']['Vg'], label='sim', linestyle=':')
Esempio n. 13
0
 def PlotBodyRates(self, ti, c, s):
     labels = ['Roll Rate', 'Pitch Rate', 'Yaw Rate']
     mplot.PlotVec3(c['time'], c['state_est']['pqr_f'], labels=labels)
     mplot.PlotVec3(c['time'], ti['pqr_cmd'], labels=labels, linestyle=':')
     plot(c['time'], ti['pitch_rate_b_cmd'], 'k:', label='Pitch Rate Cmd')
Esempio n. 14
0
 def PlotAttitudeError(self, ti, c, s):
     labels = ['Roll Error', 'Pitch Error', 'Yaw Error']
     mplot.PlotVec3(c['time'],
                    ti['axis_b2cmd'],
                    scale=180.0 / np.pi,
                    labels=labels)
Esempio n. 15
0
 def PlotGpsBias(self, e, c, s, params):
   mplot.PlotVec3(c['time'], e['Xg_gps_biases'][:, 0], label='GPS A bias')
   mplot.PlotVec3(c['time'], e['Xg_gps_biases'][:, 1], label='GPS B bias')
Esempio n. 16
0
 def PlotTetherAnchorPoint(self, e, c, s, params):
   mplot.PlotVec3(c['time'], c['state_est']['tether_anchor']['pos_g'],
                  label='pos_g [est]', linestyle='-')
   mplot.PlotVec3(c['time'], c['state_est']['tether_anchor']['pos_g_f'],
                  label='pos_g_f [est]', linestyle='--')
Esempio n. 17
0
 def PlotGsGpsPositionSigmas(self, g, s, params):
     mplot.PlotVec3(g['estimate']['time'],
                    g['input']['gs_gps']['pos_sigma'])
Esempio n. 18
0
 def PlotGyros(self, e, c, s, params, imu_index=0):
   mplot.PlotVec3(c['time'], c['control_input']['imus']['gyro'][:, imu_index])
Esempio n. 19
0
 def PlotAccelerometer(self, g, s, params):
     mplot.PlotVec3(g['estimate']['time'],
                    g['input']['imu']['acc'],
                    label='accelerometer')
Esempio n. 20
0
 def PlotGyroBiases(self, e, c, s, params, imu_index=0):
   mplot.PlotVec3(c['time'], e['gyro_biases'][:, imu_index],
                  label='IMU %d' % imu_index)
   if s is not None:
     mplot.PlotVec3(s['time'], s['imus']['gyro_bias_b'][:, imu_index],
                    linestyle=':')
Esempio n. 21
0
 def PlotGyro(self, g, s, params):
     mplot.PlotVec3(g['estimate']['time'],
                    g['input']['imu']['gyro'],
                    label='gyro')
Esempio n. 22
0
 def PlotBodyRates(self, cw, c, s):
     mplot.PlotVec3(c['time'],
                    cw['pqr_cmd'],
                    linestyle='--',
                    label='pqr_cmd')
     mplot.PlotVec3(c['time'], c['state_est']['pqr_f'], label='pqr_f')
Esempio n. 23
0
 def PlotWingGpsVelocitySigmas(self, ci, c, s):
     for i in range(control_types.kNumWingGpsReceivers):
         mplot.PlotVec3(c['time'],
                        ci['wing_gps']['vel_sigma'][:, i],
                        label=_WING_GPS_HELPER.ShortName(i))