--- In [email protected], "John Matthews" <[EMAIL PROTECTED]> wrote:
>
> --- In [email protected], Jefferson Mendoza
> <jefferson_mendoza@> wrote:
> >
> > LATITUDE log Am log Bm/Am LATITUDE log Am log Bm/Am 
> > (degrees) (degrees) 
> > 0 8.509727 0.002949 37 8.509194 0.001884 
> 
> Should be: 0 727 0.002949 37 194 0.001884 ?
> 
> > 1 726 0.002949 38 169 0.001834 
> > 2 725 0.002946 39 144 0.001784 
> > 3 723 0.002941 40 118 0.001733 
> > 4 719 0.002935 41 93 0.001683
> > : 
> 
> C or C++? In C, a structure to hold records:
> 
> typedef struct
> {
>     int    lat;
>     int    logAm;
>     double logBmAm;
> } AzRec_t;

If your latitude values are continguous, you don't need them in the
records - the array index is the latitdue:

typedef struct
{
    int    logAm;
    double logBmAm;
} AzRec_t;

static const azData[73] = /* lat = 0..72 */
{
    {727, 0.002949}, /* lat = 0 */
    {726, 0.002949}, /* lat = 1 */
    :

Another option: read the data file at build time, not run time, and
convert it into code, such as the azData[] array shown above. Probably
quite easy in Perl, but I would do it in C (also easy) because I don't
know Perl.

I hope this makes sense- post if you need further explanation.

John

Reply via email to