IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 25, 2008, 4:51:39 PM (18 years ago)
Author:
eugene
Message:

convert opihi vectors to double type, add option for int type as well

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20081124/Ohana/src/opihi/cmd.data/dbselect.c

    r17852 r20839  
    6767      return (FALSE);
    6868    }
    69     REALLOCATE (vec[i][0].elements, float, Nrows);
     69    REALLOCATE (vec[i][0].elements.Flt, opihi_flt, Nrows);
    7070    vec[i][0].Nelements = Nrows;
    7171  }
     
    9191          case FIELD_TYPE_FLOAT:
    9292          case FIELD_TYPE_DOUBLE:
    93             vec[i][0].elements[j] = atof (row[i]);
     93            vec[i][0].elements.Flt[j] = atof (row[i]);
    9494            break;
    9595          case FIELD_TYPE_TIME:
     
    9797          case FIELD_TYPE_DATETIME:
    9898            seconds = ohana_date_to_sec (row[i]);
    99             vec[i][0].elements[j] = ohana_sec_to_mjd (seconds);
     99            vec[i][0].elements.Flt[j] = ohana_sec_to_mjd (seconds);
    100100            break;
    101101          default:
    102             vec[i][0].elements[j] = NAN;
     102            vec[i][0].elements.Flt[j] = NAN;
    103103        }
    104104      } else {
    105         vec[i][0].elements[j] = NAN;
     105        vec[i][0].elements.Flt[j] = NAN;
    106106      }
    107107    }
Note: See TracChangeset for help on using the changeset viewer.