CEQD v1.0
Welcome to CEQD, a freeware MFC class to support retrieval of recent Earthquake information from the USGS (United States Geological Survey) via the finger protocol.
For detailed information about the Finger protocol, you should read RFC 1288. You can find numerous Web Servers which carry these documents by going to www.yahoo.com and look for RFC and 1288.
The sample app provided with the code implements a very simple console app which queries for the Earthquake information and displays the results using simple printf calls.
Contents |
History |
Features |
Usage |
API Reference |
Contacting the Author |
V1.0 (18 October 1999)
The API consists of the class CQuakeData and the single public member function of the class CEQD namely GetQuakeData.
class CQuakeData
{
enum MagnitudeType
{
Ml,
Lg,
Md,
Mb,
Ms,
Mw,
};
enum LocationQuality
{
A,
B,
C,
D,
U,
};
SYSTEMTIME m_Time;
float m_Latitude;
float m_Longitude;
float m_Depth;
MagnitudeType m_MagType;
float m_Magnitude;
LocationQuality m_Quality;
CString m_sComments;
};
Members
m_Time | The Coordinated Universal Time of when the Earthquake took place. |
m_Latitude | Geographic latitude of the Epicenter. North of the equator is positive, south of the equator is negative. |
m_Longitude | Geographic longitude of the Epicenter. East of the Greenwich prime meridian is positive, west of the prime meridian is negative. |
m_Depth | The depth below sea level in Km of the epicenter |
m_MagType | Enum of the type of magnitude as
reported in m_Magnitude. This member is one of the following enums:
Ml: The original Richter magnitude |
m_Magnitude | The actual magnitude of the earthquake on the Richter Scale. |
m_Quality | Enum of quality of the location fix.
This member is one of the following enums:
A: Quake location is "Good" |
m_sComments | This is a textual Description, Normally this will be the location of the quake |
The CQuakeData class represents the data associated with a single earthquake as returned from CEQD::GetQuakeData.
BOOL CEQD::GetQuakeData(CArray<CQuakeData, CQuakeData&>& data, DWORD dwTimeout = 500);
Return Value
If the function succeeds, the return value is TRUE. If the function fails, the return value is FALSE. To get extended error information, call ::GetLastError.
Parameters
data Upon successful return, this will contain an array of CQuakeData instances which represent all the most recent earthquakes which have occurred.
dwTimeout The timeout value to use in milliseconds for socket connections.
Remarks
Call this member function to perform the actual retrieval of the quake data.
PJ Naughter
Email: pjna@naughter.com
Web: http://www.naughter.com
17 April 2000