IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 7, 2005, 4:04:22 PM (20 years ago)
Author:
Paul Price
Message:

Using autoconf; some bug fixes to the polynomial order

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/stac/src/stacRead.c

    r5743 r5745  
    124124    psTrace("stac.read.map", 5, "Polynomial order: %d\n", order);
    125125
    126     psPlaneTransform *map = psPlaneTransformAlloc(order + 1, order + 1); // The transformation
     126    psPlaneTransform *map = psPlaneTransformAlloc(order, order); // The transformation
    127127    // Set coefficient masks
    128     for (int i = 0; i < order + 1; i++) {
    129         for (int j = 0; j < order + 1; j++) {
     128    for (int i = 0; i <= order; i++) {
     129        for (int j = 0; j <= order; j++) {
    130130            if (i + j > order + 1) {
    131131                map->x->mask[i][j] = 1;
     
    140140    // Read x coefficients
    141141    psTrace("stac.read.map", 7, "x' = \n");
    142     for (int k = 0; k < order + 1; k++) {
    143         for (int j = 0; j < k + 1; j++) {
     142    for (int k = 0; k <= order; k++) {
     143        for (int j = 0; j <= k; j++) {
    144144            int i = k - j;
    145145            if (fscanf(mapfp, "%lf", &map->x->coeff[i][j]) != 1) {
     
    154154    // Read y coefficients
    155155    psTrace("stac.read.maps", 7, "y' = \n");
    156     for (int k = 0; k < order + 1; k++) {
    157         for (int j = 0; j < k + 1; j++) {
     156    for (int k = 0; k <= order; k++) {
     157        for (int j = 0; j <= k; j++) {
    158158            int i = k - j;
    159159            if (fscanf(mapfp, "%lf", &map->y->coeff[i][j]) != 1) {
     
    188188        }
    189189        // Read the file
    190         sprintf(mapfile,"%s.map",filenames->data[i]);
     190        sprintf(mapfile, "%s.map", (const char*)filenames->data[i]);
    191191        maps->data[i] = stacReadMap(mapfile);
    192192        if (maps->data[i] == NULL) {
Note: See TracChangeset for help on using the changeset viewer.