HOMEPAGE

Development Sites - Information for Software-Developers

Developer Platform
The first instructions
Installations
System param. structures
connect to MeteoCom
simple screen drawing
own data drawing
Picture service
File Management
EmailBulletin Service

MeteoTools::LoadScreenField

BOOL LoadScreenField(time_t date,int hour,int count,ScreenGridData &screenfield);

Return Value

    Nonzero if successful; otherwise 0.

Parameters

    date

    the meteo basis time reference as type time_t (see CTime)

    hour

    the hour step, will be added to the date (hour * 3600)
  
 if hour -1, that means you want synop data

    count

    the field size, the size of sreenfield.
 

    sreenfield

  
 The ScreenGridData  is a array for symbols, that receive the meteo data set.
    This contains later the data values for screen figures and so one...
    Y
ou must choose a size for the symbol grid,
    that is normal a square of
30 pixel,  that means divide the screen / 30 squares

Remarks

     Load a data field with meteo data, for own screen drawing or data analysis.
    
Note:
     This initiates the internal data structures for all the next data accesses.

Example 

// center point of Screen
// sx = mySreenSize.cx / 2; sy = mySreenSize.cy / 2;
// xoff,yoff,xscale,yscale --> see
DrawSeaData
// You yourself should put hour and date

//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// Bonito counted from left/top to bottom/right
// all the transfomations see the refence point on the center of the screen
// the world cordinates system that Bonito use:
//
// in minutes = 180W to 180E --> -10800 to 10800
//               90N to 90S  -->  -5400 to  5400

#define GRIDWIDTH  30  //grid point width
#define GRIDMIDDLE 15  //the middle dot of the squares


    ScreenGridData sc_data;
    int grid_yy=mySreenSize.cy/GRIDWIDTH+1; //screen-Y / gridwidth
    int grid_xx=mySreenSize.cx/GRIDWIDTH+1; //screen-X / gridwidth
    int Y,X;   

    int count=grid_yy*grid_xx;
    sc_data.SetSize(count);
 
    for(z=0; z<count; z++)
        {
        Y=sc_data[z].y=((z/grid_xx)*GRIDWIDTH)+GRIDMIDDLE;
        X=sc_data[z].x=((z%grid_xx)*GRIDWIDTH)+GRIDMIDDLE;
        sc_data[z].lon= -(int)(xoff + ((double)(sx - X) *xscale));
        sc_data[z].lat= -(int)(lmapyoff + ((double)(sy - Y) * yscale));
        }

    if(!LoadScreenField(date,hour,count,sc_data))....

See Also   DrawSeaData, DrawSfcData,DrawSynData
 

   Copyright 2006 Bonito Germany.   
www.bonito.net