Download MGC4C Programmer`s Manual

Transcript
6 Example Programs
Many of the example programs are written in Win32 console mode. This was done in order to provide the
clearest possible code, without the complication and complexity of GUI code. All console mode programs
can be converted to GUI mode by adding the necessary Windows interface code. Example programs are
located in the \APPS sub-directory created by SETUP.
Project files are classified as follows:
//$
//$
//$
//$
//$
//$
//$
*.vcproj
*.dsp
*.mak
*._m_
*._b_
*._i_
*._w_
Visual Studio makefile.
VC_6.0 / Visual Studio makefile.
Microsoft C/C++ (or Borland) makefile.
Microsoft C/C++ command line makefile.
Borland C/C++ 5 command line makefile.
Borland C/C++ 5.5 command line makefile.
Watcom C/C++ 11 command line makefile.
6.1 BCB_PGM
The BCB_PGM.CPP program is a C++ Builder program that continuously displays latitude and longitude.
Load project file BCB_PRJ.MAK for BCB version_1.0 and BCB_PRJ.BPR for later versions of BCB.
6.2 CALLBACK
The CALLBACK example console mode program demonstrates the use of the mgcCallback function.
6.3 COMPUTE
COMPUTE is a console mode program that computes great circle distances and bearings from a pair of
latitude/longitude values.
6.4 CONVERT
CONVERT is a console mode program that coverts latitude (or longitude) between (deg, min, min/1000),
(deg, min, sec), and single integer encoding.
6.5 CS_VERS
The CS_VERS example program is the Visual C# .NET equivalent of the MGCVER program.
6.6 CS_LATLON
The CS_LATLON example program is the Visual C# .NET equivalent of the LATLON program.
6.7 Example
The "Example" program is a console mode program that displays latitude and longitude in decimal degrees
from GGA sentences. Compare to the LatLon.c example program.
23