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::LoadDataField

BOOL LoadDataField(time_t date, int hour,int count,BMSDataList &datafeld);

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)
  
 
    count

    the field size, the size of datafeld. 
  
    datafeld

    The BMSDataList  is a array for your own data resolution. 
    This contains later the data values of the feld what you want...
    You must choose a size for the symbol grid, and then set the coorditates lon, lat

     typedef struct 
	{ //BMSD_LST = Bonito Meteo Server List = a Array of calculated Data
	short 	       lat;  //Lat in Minutes of the position to get and calculate the data
	short 	       lon;  //Lon in Minutes of tho position to get and calculate the data
	BMSDATA_SET data;
	}BMSD_LST; 

      typedef CArray<BMSD_LST,BMSD_LST&> BMSDataList;

Remarks

     Load a data field with meteo data, for own 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


    BMSDDataList bmsd_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;
    bmsd_data.SetSize(count);
 
    for(z=0; z<count; z++)
        {
        Y=((z/grid_xx)*GRIDWIDTH)+GRIDMIDDLE;
        X=((z%grid_xx)*GRIDWIDTH)+GRIDMIDDLE;
        bmsd_data[z].lon= -(int)(xoff + ((double)(sx - X) *xscale));
        bmsd_data[z].lat= -(int)(lmapyoff + ((double)(sy - Y) * yscale));
        }

    if(!LoadDataField(date,hour,count,bmsd_data))

See Also   DrawSeaData, DrawSfcData, DrawSynData, LoadScreenField
 

   Copyright 2006 © Bonito Germany.   
www.bonito.net