Skip to content
Snippets Groups Projects
Select Git revision
  • c8bcef18acc3b453ce420554049f46201154e8ef
  • trunk
  • RELEASE_6_5_DRIVEDB
  • RELEASE_6_6_DRIVEDB
  • RELEASE_7_0_DRIVEDB
  • RELEASE_7_2_DRIVEDB
  • RELEASE_7_3_DRIVEDB
  • RELEASE_6_0_DRIVEDB
  • RELEASE_6_1_DRIVEDB
  • RELEASE_6_2_DRIVEDB
  • RELEASE_6_3_DRIVEDB
  • RELEASE_6_4_DRIVEDB
  • tags/RELEASE_7_4
  • tags/RELEASE_7_3
  • RELEASE_5_41_DRIVEDB
  • RELEASE_5_42_DRIVEDB
  • RELEASE_5_43_DRIVEDB
  • tags/RELEASE_7_2
  • tags/RELEASE_7_1
  • tags/RELEASE_7_0
  • RELEASE_5_40_DRIVEDB
21 results

os_freebsd.cpp

Blame
  • readACC.m 790 B
    function ACC1B = readACC(file)
    % Input: ascii file containing GRACE ACC1B data 
    % Output: matrix containing ACC1B data
    % 
    % cf. GRACE Level 1B Data Product User Handbook
    %
    % Example: ACC1B = readACC('ACC1B_2002-12-02_A_02.asc')
    
    % Counts header lines and removes them.
    header=0;
    fid = fopen(file);
      while 1
          line = fgetl(fid);
          header = header+1;
          if (~isempty(strfind(line,'END OF HEADER')))
               break
          end
      end
    
    % Reads the desired values from ACC1B data.
    [gps_time, lin_acc_x, lin_acc_y, lin_acc_z, ang_acc_x, ang_acc_y, ang_acc_z] = textread(file,'%f %*s %f %f %f %f %f %f %*f %*f %*f %*f','headerlines',header);
    
    % Produces the matrix containing the desired values.
    ACC1B = [gps_time, lin_acc_x, lin_acc_y, lin_acc_z, ang_acc_x, ang_acc_y, ang_acc_z];
    
    end