beautypg.com

Programming landmark mobile – Juniper Systems LandMark Mobile User Manual

Page 68

background image

  LandMark Mobile User’s Manual

Programming LandMark Mobile

LandMark Mobile is designed to be used as a GPS utility for

third party applications. This chapter explains details about how

LandMark Mobile and third party applications work together.

This chapter is intended to give programming tips on interfacing

with LandMark Mobile.
The Memory Exchange file is used to exchange information

between LandMark Mobile and a third party application

program. There are three methods to obtain information

from Memory Exchange. These methods are divided into two

categories: data pushed by LandMark Mobile (real time), or data

pulled from LandMark Mobile by a third party application. The

following is a list and description of each category.

Using the Memory Exchange Mechanism

The memory exchange module can be accessed by third party

applications by using the lmce.dll provided with the software

package. It supports C++ projects only.
Static link the library using the files lmce.h and lmce.lib in the

third party application project. This is the recommended method

of using the DLL module.
The alternative method is to dynamically link to the library at

run time. If you are planning on using this method, please make

sure to use LoadLibrary at the beginning of application installation

and free it when the application closes. This methodology is

needed because the module contains state variables that should

only be initialized once.
The DLL can be used by one third party application at a time.

Internal GPS — Pulled Data

The third party application calls the following function when it

needs new GPS data. The function returns with the most current

GPS data LandMark Mobile has copied to shared memory, or

provides the information after a three second delay.
The internal GPS function provides GPS data in WGS84 datum,

decimal degrees, and altitude/elevation in meters. This is the

recommended internal format of most GPS receivers as the most

accurate GPS data.