コード例 #1
0
/*********************************
 * RSAT_decoder_init:
 * Decoder initialization routine.  */
bin_state *RSAT_decoder_init(char *inN,char *outN,readPulseFunc *reader)
{
    bin_state *s=new_bin_state();
    RSAT_frame aux_frame;

    asfPrintStatus("   Initializing RSAT decoder...\n");
    *reader=RSAT_readNextPulse;

    RSAT_init(s);

    openBinary(s,inN);
    /*Seek to first valid auxiliary data record.*/
    while (RSAT_readNextFrame(s,&aux_frame)->is_aux!=1
        || 0==RSAT_auxIsImaging(&aux_frame.aux)) {}

    /*Update satellite parameters based on auxiliary data record.*/
    RSAT_auxUpdate(&aux_frame.aux,s);

    /*Write pulse replica.*/
    RSAT_writeReplica(s,outN,1.0);

    seekFrame(s,0);

    return s;
}
コード例 #2
0
ファイル: MainWindow.cpp プロジェクト: netromdk/bmod
void MainWindow::showEvent(QShowEvent *event) {
  QMainWindow::showEvent(event);

  if (shown) return;
  shown = true;

  if (geometry.isEmpty()) {
    resize(900, 500);
    Util::centerWidget(this);
  }
  else {
    restoreGeometry(geometry);
  }

  // Load specified files or open file dialog.
  if (startupFiles.isEmpty()) {
    openBinary();
  }
  else {
    foreach (const auto &file, startupFiles) {
      loadBinary(file);
    }
  }