Motorola i88s manual Addition, to obtain better accurate speed and direction

Page 12

Motorola Inc.

i88s J2ME Developers’ Guide

// assistant data unavailable

}

}// end of position response ok else if(c.getStatus() ==

com.motorola.iden.position.PositionConnection.POSITION_RESPONSE_ERROR)

{

//indicate an error occurred while getting the position if(oap.getResponseCode() == PositionDevice.FIX_NOT_ATTAINABLE) {

//means position information not provided (timeout)

}

else if(oap.getResponseCode() == PositionDevice.FIX_NOT_ATTAIN_ASSIST_DATA_UNAV) {

//means position information not provided (timeout) and

//assistant data unavailable

}

else if(oap.getResponseCode() == PositionDevice.BATTERY_TOO_LOW) { // means battery is too low to provide fix

}

else if(oap.getResponseCode() == PositionDevice.GPS_CHIPSET_MALFUNCTION) { // means GPS chipset malfunction

}

else if(oap.getResponseCode() == PositionDevice.ALMANAC_OUT_OF_DATE) {

//means almanac out of date to get fix

//This scenario occurs when user overrides almanac but device is

//not packet data provisioned

}

else{

// Unknown error occurs

}

}// end of position response error

//position is null

}finally {

if ( c != null) c.close();

}

New positions can be obtained using the following method on the same PositionConnection object until the close method is called.

AggregatePosition cell = c.getPosition(“delay=no”);

or

AggregatePosition oap = c.getPosition(“delay=low”);

or

AggregatePosition oap = c.getPosition(“delay=high”);

In addition, to obtain better accurate speed and direction

AggregatePosition oap = c.getPosition(“delay=low;fix=extended”);

or

AggregatePosition oap = c.getPosition(“delay=high;fix=extended”);

Version 1.0 - Page 12

Image 12
Contents I88s Multi-Communication Device J2ME Developers’ Guide J2ME Networking Document Overview DisclaimerContact Information Acronyms and DefinitionsAcronyms Used In This Guide Terminology Definition Agps On The i88s Phone OverviewPosition API AccuracyAssist Data PositionConnection Class Almanac Out Of DateExample Method Descriptions Retrieving Position in JavaGetPosition GetPositionString name Using Position in Java GetStatusExample Using PositionConnection Positionresponsenoalmanacoverride Addition, to obtain better accurate speed and direction Recommendation J2ME Networking Http HttpsClass Descriptions Http HttpsSupported Protocols on the i88s Phone TCP Sockets SSL Secure SocketsServerSockets Serial Port Access UDP SocketsConnection Optional Parameters Communicating on a PortExample using StreamConnection Implementation NotesTips Concurrent Connections For The i88s Phone Protocol MaximumFile I/O Class DescriptionMethod Descriptions Opening a file Deleting a file Reading and WritingCode Examples Example # 2 Complete MIDlet code Motorola Inc I88s J2ME Developers’ Guide Os = sc.openOutputStream //get InputStream Sc.close Caveats Motorola Inc I88s J2ME Developers’ Guide
Related manuals
Manual 43 pages 17.94 Kb