MeteoTools::SetSynopField
int SetSynopField(time_t date);
Return Value
Nonzero if successful; otherwise 0.
The return value ist size of the array of
BMSD_SYN
Parameters
date
the meteo basis time reference
as type time_t (see
CTime)
Remarks
Like
LoadScreenField
you must
prepare before you get synop data.
For the use of
GetSynopDataSet (mySynopList)
you must call up this routine.
Note:
This initiates the internal data
structures for all the next synop 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
int SynArray=SetSynopField(date);
if(!SynArray) return;
//GetSynopDataSet if defined as mySynopList
//SetDetailSympol is a routine of sorce code example DrawTools
for(int z=0; z<mySynopList.GetSize(); z++)
{
int X = (int)((double)(((double)mySynopList[z].lon+xoff)/xscale))+sx;
int Y = (int)((double)(((double)mySynopList[z].lat+yoff)/yscale))+sx;
SetDetailSympol(pDC,mySynopList[z].data.pflag,
mySynopList[z].data.prmsl,
mySynopList[z].data.btcdc,
mySynopList[z].data.temp,
mySynopList[z].data.ugrd,
mySynopList[z].data.vgrd);
}
See Also LoadScreenField, GetSynopDataSet
|