Methods, Status = open ( ), Status = close ( ) – Casio Naurtech CETerm Ver.5.5 Scripting Guide User Manual

Page 51: Position = getposition( ), Method action

Advertising
background image

N

AURTECH

W

EB

B

ROWSER AND

T

ERMINAL

E

MULATION FOR

W

INDOWS

CE

AND

W

INDOWS

M

OBILE




CETerm Scripting Guide

Page 51


Methods

The following methods are available

Method

Action

Open

Open the GPS device and enable operations.

Close

Close the GPS device.

GetPosition

Read the current GPS position.

GetDeviceState

Query the GPS device state.

status = Open ( )

Open the GPS device and enable operations. This action will supply power to
the GPS device if it is not already operational. To minimize power consumption,
the GPS device should remain closed until data is required.

Before opening the device, you may want to set the event properties if events are
used to monitor location changes. Return 0 for success, non-zero for error. Use
the GPS property LastError to get additional error information.

status = Close ( )

Close the GPS device. Return 0 for success, non-zero for error. Use the GPS
property LastError to get additional error information.

position = GetPosition( )

Read the current GPS position. The returned position is a JavaScript object
literal {…} containing information about the current position. See Section 2.8 for
details about handling JavaScript literals. Return null if error. Use the GPS
property LastError to get additional error information.

The returned literal contents will depend on the capabilities of the GPS hardware.
If successful, the contents should at least contain “latitude” and “longitude”
values. The GPS property MaximumAge also affects the returned values. Any
position data older than MaximumAge milliseconds will not be reported. Satellite
data is only included if the GPS property IncludeSatelliteData is true.

Here is a sample position output:

{flags:0x0,timeUTC:{year:2008,month:8,day:8,
hour:8,minute:8,second:0,millisecond:0},

Advertising
This manual is related to the following products: