Exemplo n.º 1
0
int Lgm_B_TU82( Lgm_Vector *v, Lgm_Vector *B, Lgm_MagModelInfo *Info ) {

    Lgm_Vector 	B1, B2, B3, B4;

    Lgm_Brc_TU82( v, &B1,  Info );
    Lgm_Bt_TU82( v, &B2,  Info );
    Lgm_Bmp_TU82( v, &B3,  Info );

    switch ( Info->InternalModel ){

        case LGM_CDIP:
                        Lgm_B_cdip( v, &B4, Info );
                        break;
        case LGM_EDIP:
                        Lgm_B_edip( v, &B4, Info );
                        break;
        case LGM_IGRF:
                        Lgm_B_igrf( v, &B4, Info );
                        break;
        default:
                        fprintf(stderr, "Lgm_B_TU82: Unknown internal model (%d)\n", Info->InternalModel );
                        break;

    }

    B->x = B1.x + B2.x + B3.x + B4.x;
    B->y = B1.y + B2.y + B3.y + B4.y;
    B->z = B1.z + B2.z + B3.z + B4.z;

    ++Info->nFunc;

    return(1);

}
Exemplo n.º 2
0
int Lgm_B_TS07( Lgm_Vector *v, Lgm_Vector *B, Lgm_MagModelInfo *Info ) {

    Lgm_Vector       B2;
    int		         iopt;
    double	         parmod[11], ps, X, Y, Z, Bx, By, Bz;


    parmod[1]  = Info->P; 	// Pressure in nPa

    iopt = 0;		// this param supposedly doesnt actually do anything for this model

    ps = Info->c->psi;  // dipole tilt angle
    X = v->x; Y = v->y; Z = v->z;

    Tsyg_TS07( iopt, parmod, ps, Info->c->sin_psi, Info->c->cos_psi, X, Y, Z, &Bx, &By, &Bz, &Info->TS07_Info );
    /*
    printf("Bts07 =  (%g, %g, %g)\n", Bx, By, Bz);
    B_cdip(  v, &B2, Info );
    printf("Bcdip =  (%f, %f, %f)\n", B2.x, B2.y, B2.z);
    */
    switch ( Info->InternalModel ){

        case LGM_CDIP:
                        Lgm_B_cdip( v, &B2, Info );
                        break;
        case LGM_EDIP:
                        Lgm_B_edip( v, &B2, Info );
                        break;
        case LGM_IGRF:
                        Lgm_B_igrf( v, &B2, Info );
                        break;
        default:
                        fprintf(stderr, "Lgm_B_TS07: Unknown internal model (%d)\n", Info->InternalModel);
                        break;

    }

    B->x = Bx + B2.x;
    B->y = By + B2.y;
    B->z = Bz + B2.z;
/*
    B->x = B2.x;
    B->y = B2.y;
    B->z = B2.z;
    printf("Bigrf =  (%f, %f, %f)\n", B2.x, B2.y, B2.z);
*/


    ++Info->nFunc;

    return(1);

}
Exemplo n.º 3
0
int Lgm_B_T89c( Lgm_Vector *v, Lgm_Vector *B, Lgm_MagModelInfo *Info ) {

    Lgm_Vector      B1, B5;
    double          PARMOD[11];


    T89c( Info->Kp, PARMOD, Info->c->psi, v->x, v->y, v->z, &B1.x, &B1.y, &B1.z, Info );
    switch ( Info->InternalModel ){

        case LGM_CDIP:
                        Lgm_B_cdip( v, &B5, Info );
                        break;
        case LGM_EDIP:
                        Lgm_B_edip( v, &B5, Info );
                        break;
        case LGM_IGRF:
                        Lgm_B_igrf( v, &B5, Info );
                        break;
        default:
                        fprintf(stderr, "Lgm_B_T89c: Unknown internal model (%d)\n", Info->InternalModel );
                        break;

    }





    B->x = B1.x + B5.x;
    B->y = B1.y + B5.y;
    B->z = B1.z + B5.z;

    ++Info->nFunc;

    return(1);

}