29
CHAPTER 2 THEORETICAL FOUNDATION In this chapter, author will explain the theoretical foundation that author use during the development of the system. This includes fundamental theory and specification of several technologies related to the thesis. 2.1. Java 2 Micro Edition (J2ME) Java 2 Micro Edition (J2ME) is used to run and develop Java Application on Mobile Phone, PDA, Palm and Pocket PC. The existence of J2ME makes it possible for developer to build a multiplatform wireless application that can be implemented and run on any brand of mobile phone that supports Java Technology [28]. Figure 2: J2ME component layer (28) J2ME Components are consisting of [28]: - Java Virtual Machine: to execute Java Application on Emulator or handheld device - Java API: (Application Programming Interface) - Other tools for developing Java Application such as emulator Java Phone, handheld device emulator and J2ME wireless toolkit

CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

CHAPTER 2

THEORETICAL FOUNDATION

In this chapter, author will explain the theoretical foundation that author use during the

development of the system. This includes fundamental theory and specification of several

technologies related to the thesis.

2.1. Java 2 Micro Edition (J2ME)

Java 2 Micro Edition (J2ME) is used to run and develop Java Application on Mobile

Phone, PDA, Palm and Pocket PC. The existence of J2ME makes it possible for

developer to build a multiplatform wireless application that can be implemented and run

on any brand of mobile phone that supports Java Technology [28].

Figure 2: J2ME component layer(28)

J2ME Components are consisting of [28]:

- Java Virtual Machine: to execute Java Application on Emulator or handheld

device

- Java API: (Application Programming Interface)

- Other tools for developing Java Application such as emulator Java Phone,

handheld device emulator and J2ME wireless toolkit

Page 2: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

On the image above, J2ME has configuration layer and profile which are supported by

Java Virtual Machine (Virtual Machine and k-Virtual Machine).

On the development of Wireless Application using Java, J2ME is divided into two parts,

configuration and profile[29]:

1. Configuration Layer

a. Connected Limited Device Configuration (CLDC)

b. Connected Device Configuration (CDC)

2. Profile Layer

a. Mobile Information Device Profile (MIDP)

b. Foundation Profile (FP).

c. Personal Profile.

d. Personal Digital Assistance (PDA) profile.

2.1.1. Connected Limited Device Configuration (CLDC)

Specification of CLDC as follow [29]:

1. Implementing Subset from J2SE.

2. JVM known as K-Virtual Machine (KVM).

3. Used on handheld device with limited physical memory

4. Processor: 16 or 32 bit.

Page 3: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

CLDC is used to develop wireless application with MIDP. Implementation of CLDC is

used for Java Program on hardware with limited memory capability, from 160 up to 512

Kb. Due to this limitation, some unimportant features on J2SE have to be eliminated.

2.1.2. MIDlets

Application running on a handheld device that supports MIDP is called MIDlet. MIDlet

is an application that is based on J2ME and MIDP profile. Like other Java programs,

MIDlets have a "compile once, run anywhere" potential. MIDP is mainly used to develop

application on handset that has limited CPU capability such as low-memory, simple-

keyboard navigation, small-sized display monitor [30].

2.2. Bluetooth JSR-82

Bluetooth is a communication protocol designed for short ranged communication on low

energy (1 meter, 10 meter or 100 meter, this capability depends on Bluetooth classes).

Considering its reliable short range data transfer capability, Bluetooth is applied for

Wireless Personal Area Network. [1]

Table 2: Bluetooth Power and Range(1)

Class Max Power (mW/dBm) Range

(approximation)

Class1 100 mW (20 dBm) ~100 meter

Class 2 2.5 mW (4 dBm) ~10 meter

Class 3 1 mW (0 dBm) ~1 meter

Page 4: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

Bluetooth enables one-to-one information exchange between 2 devices that has Bluetooth

devices integrated or connected such as mobile phone, notebook, PC, printer, scanner,

digital camera. The information is transferred through low short-ranged radio frequency

without secured global license. Bluetooth specification is developed and licensed by

Bluetooth Special Interest Group. [1]

Every Bluetooth devices able to communicate to other Bluetooth devices as long as they

remain on the Bluetooth range. Since these devices use radio communication system,

during the communication, they don’t have to be physically facing each other. [1]

Nowadays, Bluetooth is used on several products such as mobile phone, printer, modem

and headset. Bluetooth is well suited on communication between 2 or more devices

without the needs of high bandwidth. Bluetooth also simplify searching process and

service configuration by showing all available services, thus, those services can be

accessed without having to deal with complication such as network address, permission,

privilege and other things that have to be considered on common computer network. [1]

2.2.1. Bluetooth Communication and Connection

A Bluetooth device can communicate to as many as 7 (Seven) other Bluetooth devices.

That network that consist of 8 (eight) devices is called Piconet. Piconet is an ad-hoc

networking using Bluetooth technology to allow a master device to connect to maximum

of seven other devices simultaneously. [1]

Page 5: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

Data can be transferred from master device to other devices at anytime. Simultaneous

transmission from master device to other devices is possible, although not commonly

used. Each device on Piconet can change its level and act as master device at anytime.

[1]

2.2.2. Building Bluetooth Connection

Bluetooth devices are able to transmit this information below: [1]

- Devices Name

- Bluetooth Device Class

- List of owned and available services

- Other technical information such as features and Bluetooth specification

Each device able to search for other device within Bluetooth range and each device is

configured to respond those search requests. However, if a device knows the physical

address of other device that it wants to connect to, thus, the respond going to be happened

is a direct connection request and transmission of information architecture as mentioned

above. Available services from a device sometimes need pairing or an agreement from

the owner of the service. However, the connection can be initialized by any device

without possible interruption as long as they remain on Bluetooth range.

Some devices can only connect to one other device at a time. This one-on-one connection

prevents both communicating devices connected to other devices until they are

disconnected. The connected device will not be available on searching.

Page 6: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

Each device has 48-bit unique address. Instead of the complicated-computer-code

address, an editable and easy-to-remember name of each device will be displayed as a

result of found paired-device when other user is doing Bluetooth searching services. [1]

2.2.3. Pairing

A couple of Bluetooth device can build secured connection by exchanging a password or

passkey. Passkey is set by one of the user. A device that intent to communicate with

another secured device should authenticate using cryptography on another device

identity. Secured device may also encrypt the data being transmitted to prevent data

breaching or stealing. [1]

Once both devices are connected and a secure connection is built, encryption will be

deactivated and passkey will be stored on device file system instead of the Bluetooth

chip. Since Bluetooth address is permanent, pairing devices stay connected although one

of its Bluetooth name changes. Pairing can be destroyed at anytime by any connected

device. Generally, Bluetooth device needs pairing or remind the owner before allowing

other device to use Bluetooth service owned by him. [1]

2.2.4. Serial Port Profile (SPP)

Serial Port Profile defined how to create virtual serial port and connect two device that

has Bluetooth technology. SPP is based on ETSI TS07.10specification and using

RFCOMM protocol to provide serial port profile emulation. SPP allow data transfer up to

128kbps. [14]

Page 7: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

SPP provides wireless replacement from serial communication application and controlled

signal based on existing RS-232 [14]. In other words, as if both devices are connected

through physical serial cable that is actually only virtual cable emulated on RFCOMM

protocol wireless Bluetooth.

2.3. Record Management System (RMS)

A key subsystem of the Mobile Information Device Profile (MIDP) is the Record

Management System (RMS), an application programming interface (API) that gives

MIDP applications local, on-device data persistence. On most MIDP-enabled devices

today, RMS is the only facility for local data storage -- few devices support a

conventional file system. As you might imagine, then, a thorough understanding of RMS

is critical to writing any application that depends on persistent local data.[10]

RMS can be modeled as follow: [10]

Figure 3: RMS Layer(10)

2.3.1. Records

As you can gather from its name, RMS is a system for managing records. A record is an

individual data item. RMS places no restrictions on what goes into a record: a record can

Page 8: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

contain a number, a string, an array, an image -- anything that a sequence of bytes can

represent. If you can create a binary encoding of your data -- and a corresponding

decoding -- then you can store it in a record, subject of course to any size restrictions the

system imposes.

Many newcomers to RMS are confused by the term record. "Where are the fields?" they

ask, wondering how the system subdivides individual records into discrete data

sequences. The answer is simple: In RMS a record doesn't have any fields. Or, to put it

more precisely, a record consists of a single binary field of variable size. The

responsibility for interpreting the contents of a record falls entirely on the application.

RMS provides the storage and a unique identifier, nothing else. While this division of

labor complicates things for applications, it keeps RMS small and flexible -- important

attributes for a MIDP subsystem. At the API level, records are simply byte arrays. [10]

2.3.2. Records Store

A record store is an ordered collection of records. Records are not independent entities:

each must belong to a record store, and all record access occurs through the record store.

In fact, the record store guarantees that records are read and written atomically, with no

possibility of data corruption. [10]

When a record is created, the record store assigns it a unique identifier, an integer called

the record ID. The first record added to a record store has a record ID of 1, the second a

record ID of 2, and so on. A record ID is not an index: record deletions do not renumber

existing records or affect the value of the next record ID. [10]

Page 9: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

Names are used to identify record stores within a MIDlet suite. A record store's name

consists of 1 to 32 Unicode characters, and must be unique within the MIDlet suite that

created the record store. In MIDP 1.0, record stores cannot be shared by different MIDlet

suites. MIDP 2.0 optionally allows a MIDlet suite to share a record store with other

suites, in which case the record store is identified by the names of the MIDlet suite and its

vendor, along with the record store name itself. [10]

Record stores also maintain time-stamp and version information so applications can

discover when a record store was last modified. For close tracking, applications can

register a listener to be notified whenever a record store is modified. [10]

2.3.3. RMS Aspects

2.3.3.1. Storage Limits

The amount of memory available for record-based data storage varies from device to

device. The MIDP specification requires devices to reserve at least 8K of non-volatile

memory for persistent data storage. The specification does not place any limits on the

size of an individual record, but space constraints will vary from device to device. RMS

provides methods for determining the size of an individual record, the total size of a

record store, and how much memory for data storage remains. Remember that persistent

memory is a shared, scarce resource, so be frugal in its use. [10]

Any MIDlet suite that uses RMS should specify the minimum number of bytes of data

storage it requires, by setting the MIDlet-Data-Size attribute, in both the JAR manifest

Page 10: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

and the application descriptor. Do not set this value any larger than absolutely necessary,

as the device may refuse to install a MIDlet suite whose data storage requirements exceed

the space available. If the attribute is missing, the device assumes the MIDlet suite

requires no space for data storage. In practice, most devices allow applications to exceed

their stated space requirements, but do not depend on this behavior.

Note that some MIDP implementations require you to define additional attributes related

to storage requirements -- check device documentation for details. [10]

2.3.3.2. Speed

Operations on persistent memory normally take longer than the equivalent operations on

volatile (non-persistent) memory. Writing data, in particular, can take a long time on

some platforms. For better performance, cache frequently accessed data in volatile

memory To keep the user interface responsive, don't perform RMS operations from the

MIDlet's event thread. [10]

2.3.3.3. Thread Safety

RMS operations are thread-safe, but threads must still coordinate the reading and writing

of data to the same record store, as with any shared resource. This coordination

requirement applies to threads running in different MIDlets, because record stores are

shared within the same MIDlet suite. [10]

2.4. Global Positioning System (GPS)

Page 11: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

Global Positioning System (GPS) is a navigation system using 24 medium-sized satellites

orbiting the earth 24 hours non stop. Those satellites, operated by US Defense

Department and NASA, transmit precise microwave signals thus enable a GPS receiver

to determine its location, speed, direction and time. GPS was initially invented for

military use only before the US government allowed GPS for public use on 1980. GPS

works at any weather, anywhere in the world, and anytime. There is NO fee required to

install or use GPS.

GPS receiver receive satellite signal passively without returning any reply to the satellite.

In order to work properly, GPS receiver requires direct view to the sky without any

obstacle. Thus, GPS receiver is only used outdoor and quite often doesn’t work properly

in the forest or around skyscrapers. [4]

2.4.1. How GPS works

The main idea of GPS system is calculation of distance between satellite and GPS

receiver. Satellites broadcast signal consisting of its current position on orbit and GPS

receiver will receive the signal and calculate the distance. It is similar to this example: if

we know the exact distance from satellite at outer space, thus we can determine that we

are located on a place at imaginary sphere where the radius is equal to the distance of

satellite’s radius. If we know exact distance between two satellites, we can determine that

we are on the line in which those spheres intersect. And if we get third or fourth

calculation from two satellites or more, we can determine our position. GPS receiver

process calculation of satellites distance and determine its position. [4]

Page 12: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

Figure 4: GPS System(4)

2.4.2. GPS Satellite Constellation

A group of electronic satellites working in concert is known as a satellite constellation.

Such a constellation can be considered to be a number of satellites with coordinated

ground coverage, operating together under shared control, synchronized so that they

overlap well in coverage and complement rather than interfere with other satellites'

coverage.

24 Satellites that act as GPS satellite constellation are orbiting the world 12,000mil above

sea level at average speed of 7,000mph. All of those satellites are moving constantly,

orbiting the earth twice within 24 hour. Ground stations are used to precisely track each

satellite’s orbit. [7]

Page 13: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

Figure 5: GPS Satellite Constellation(7)

The source of energy of GPS satellites is Sun Light. They are also equipped with charged

battery to help them keep operating when sun eclipse is happened. Small rocket in each

satellite prevent them from moving out of the line. [7]

Each of GPS satellite broadcast signal that indicates current time and position. All of

them are moving synchronized to ensure the repeating signal always broadcast at the

same time. Those microwave signals is moving at light speed and received by GPS

Receiver at slightly different time as some satellites might located further then others.

Distance to GPS Satellite can be determined by calculating the time needed by signal to

travel to receiver. If the receiver able to get signal from at least four Satellite, it will be

able to calculate its position on 3 Dimension Perspective. [3]

2.4.3. GPS Accuracy

The accuracy of a position determined with GPS depends on the type of receiver. Most

hand-held GPS units have about 10-20 meter accuracy. Other types of receivers use a

method called Differential GPS (DGPS) to obtain much higher accuracy. DGPS requires

Page 14: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

an additional receiver fixed at a known location nearby. Observations made by the

stationary receiver are used to correct positions recorded by the roving units, producing

an accuracy greater than 1 meter.

Figure 6: DGPS help correcting position information broadcasted by satellite (3)

When the system was created, timing errors were inserted into GPS transmissions to limit

the accuracy of non-military GPS receivers to about 100 meters. This part of GPS

operations, called Selective Availability, was eliminated in May 2000. [3]

These are factors that may decrease or increase GPS signal or affect its accuracy as

follow [3]:

1. Atmospheric Effects: Satellite signal are moving slower every time it pass

through atmosphere and ionosphere and troposphere might cause signal

dispersion. GPS system use built- in model that estimate the delay to correct

wrong calculation of signal traveling time.

2. Multipath Effects: When a signal are traveling through many obstacles such as

trees, buildings or rocks before reaching the receiver, this may cause delay on

signal traveling time, thus probably reduce its accuracy.

3. Ephemeris and Clock errors: Built- in clock in the receiver is not as accurate as

atomic clock on GPS satellite. Thus, miscalculation of time might be possible.

Page 15: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

4. Amount of received signal from satellites: The more satellites are available and its

signal can be received by the receiver, the more accurate the information.

Generally, GPS unit doesn’t work properly at indoor, underwater or below the

ground.

5. Satellite Geometry: This is related to relative position of satellite at a time. An

ideal Satellite geometry exists when satellites are located on obtuse angles which

relatives to each other. Worst Satellite geometry is happened when satellites are

located on the same line/parallel or grouped.

6. Selective Availability: Selective Availability (SA) describes signal quality

reduction intentionally done by US Air Force. SA prevents the user of GPS signal

with accuracy on other military purpose. SA was announced on May 2000, since

then, the GPS accuracy for public use is significantly reduced.

Figure 7: GPS signal error: Blocked & Multipath(3)

2.4.4. NMEA0183 Sentences

NMEA 0183 is a combined electrical and data specification for communication between

marine electronic devices using GPS receiver. NMEA 0183 is defined and is controlled

by the US-Based national marine electronics association.

Page 16: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

The NMEA 0183 standard uses a simple ASCII, serial communications protocol that

defines how data is transmitted in a "sentence" from one "talker" to one "listener" at a

time. Through the use of intermediate expanders, a talker can have a unidirectional

conversation with multiple listeners, and using multiplexers, multiple sensors can talk to

a single computer port. Third-party switches are available that can establish a primary

and secondary talker, with automatic failover if the primary fails. [6]

2.4.4.1. Application Layer Protocols Rules

Application Layer Protocol Rules as follow [6]

- Each message starting character is a ‘$’ sign

- the Next first five character identify the type of message (Talker).

- All data fields that follow are comma-delimited.

- The first character that immediately follows the last data field character is an

asterisk.

- The asterisk is immediately followed by a two-digit checksum representing a hex

number. The checksum is the Exclusive OR of all characters between the '$' and

'*'. According to the official specification, the checksum is optiona l for most data

sentences, but is compulsory for RMA, RMB, and RMC (among others).

- <CR><LF> ends the message.

2.4.4.2. NMEA Sentence Type

Types of NMEA Sentence are based on the first five characters of transmitted message.

Each sentence type consist of different information. There are 62 standard NMEA

Page 17: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

Sentences that has $GPxxx suffix. However, Garmin, a GPS receiver vendor, has its own

NMEA proprietary. [5]

The following are complete list of ALL sentence codes with its short description [5]:

• $GPAAM - Waypoint Arrival Alarm [GPS]

• $GPALM - GPS Almanac Data [GPS]

• $GPAPA - Autopilot format "A"

• $GPAPB - Autopilot format "B" [GPS]

• $GPASD - Autopilot System Data

• $GPBEC - Bearing & Distance to Waypoint, Dead Reckoning

• $GPBOD - Bearing, Origin to Destination [GPS]

• $GPBWC - Bearing & Distance to Waypoint, Great Circle [GPS]

• $GPBWR - Bearing & Distance to Waypoint, Rhumb Line

• $GPBWW - Bearing, Waypoint to Waypoint

• $GPDBT - Depth Below Transducer

• $GPDCN - Decca Position

• $GPDPT - Depth

• $GPFSI - Frequency Set Information

• $GPGGA - Global Positioning System Fix Data [GPS]

• $GPGLC - Geographic Position, Loran-C

• $GPGLL - Geographic Position, Latitude/Longitude [GPS]

• $GPGRS - GPS Range Residuals [GPS]

• $GPGSA - GPS DOP and Active Satellites [GPS]

• $GPGST - GPS Pseudorange Noise Statistics [GPS]

Page 18: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

• $GPGSV - GPS Satellites in View [GPS]

• $GPGXA - TRANSIT Position

• $GPHDG - Heading, Deviation & Variation

• $GPHDT - Heading, True [GPS]

• $GPHSC - Heading Steering Command

• $GPLCD - Loran-C Signal Data

• $GPMSK - Control for a Beacon Receiver [GPS]

• $GPMSS - Beacon Receiver Status [GPS]

• $GPMTA - Air Temperature (to be phased out)

• $GPMTW - Water Temperature

• $GPMWD - Wind Direction

• $GPMWV - Wind Speed and Angle

• $GPOLN - Omega Lane Numbers

• $GPOSD - Own Ship Data

• $GPR00 - Waypoint active route (not standard) [GPS]

• $GPRMA - Recommended Minimum Specific Loran-C Data [GPS]

• $GPRMB - Recommended Minimum Navigation Information [GPS]

• $GPRMC - Recommended Minimum Specific GPS/TRANSIT Data [GPS]

• $GPROT - Rate of Turn

• $GPRPM - Revolutions

• $GPRSA - Rudder Sensor Angle

• $GPRSD - RADAR System Data

• $GPRTE – Routes [GPS]

• $GPSFI - Scanning Frequency Information

Page 19: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

• $GPSTN - Multiple Data ID [GPS]

• $GPTRF - TRANSIT Fix Data [GPS]

• $GPTTM - Tracked Target Message

• $GPVBW - Dual Ground/Water Speed [GPS]

• $GPVDR - Set and Drift

• $GPVHW - Water Speed and Heading

• $GPVLW - Distance Traveled through the Water

• $GPVPW - Speed, Measured Parallel to Wind

• $GPVTG - Track Made Good and Ground Speed [GPS]

• $GPWCV - Waypoint Closure Velocity

• $GPWNC - Distance, Waypoint to Waypoint

• $GPWPL - Waypoint Location [GPS]

• $GPXDR - Transducer Measurements

• $GPXTE - Cross-Track Error, Measured [GPS]

• $GPXTR - Cross-Track Error, Dead Reckoning

• $GPZDA - UTC Date / Time and Local Time Zone Offset [GPS]

• $GPZFO - UTC & Time from Origin Waypoint

• $GPZTG - UTC & Time to Destination Waypoint

The NMEA 0183 standard defines dozens of sentences, but only a fraction apply directly

to GPS Device. The sentences with [GPS] on last of its description are the only signals

that are transmitted by GPS. [7]

Page 20: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

Other than 62 sentences mentioned above, Garmin GPS transmit and receive its own

proprietary sentences. Those proprietary sentences begins with prefix “$PGRM”, instead

of “$G”. Characters that follow the prefix shows the Garmin proprietary sentence.

Considering various amount of NMEA Sentences, not all of them are transmitted by

random GPS unit. Each GPS device has its own NMEA sentences and only transmit

limited NMEA Sentence.

To get the information from NMEA Sentences, System simply reads them into string, do

parsing, get necessary information and convert them into proper and manageable format.

On this thesis, I will only discuss two the most useful sentences, $GPGGA and

$GPRMC, which contains all the information we need. [8]

2.4.4.3. $GPGGA Sentence

$GPGGA (Global Positioning System Fix Data) sentence contains complete position

information, up to 3 Dimensional perspectives. Code, Format and its description of

$GPGGA as follow [5]:

Table 3: $GPGGA Sentence Format

$GPGGA,aaaaaa.aa,bbbb.bbb,c,ddddd.ddd,e,f,gg,h.h,i.i,j,k.k,l,m.m,nnnn*oo

Page 21: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

Table 4: $GPGGA specification

Field Format Definition

1 aaaaaa.aa Fixed UTC time. Format: hhmmss.ss.

2 bbbb.bbb Latitude. Format: ddmm.mmm

3 c Latitude hemisphere (N=North, S=South)

4 ddddd.ddd Longitude. Format: dddmm.mm

5 e Longitude hemisphere (E=East, W=West)

6 f GPS signal quality indicator (0=No fix, 1=Non-

differential GPS fix, 2=Differential GPS fix, 6=Estimated

fix)

7 gg The amount of satellites used.

8 h.h horizontal dilution of precision

9 i.i Antenna altitude above mean-sea- level

j Units of antenna altitude, meters

10 k.k Geoidal height

11 l Units of Geoidal height, meters

12 m.m Age of differential GPS Data (Seconds since last valid

RCTM transmission)

Page 22: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

13 nnnn Differential reference station ID: 0000 – 1023

17 *oo Checksum

An example of $GPGGA sentence with its description as follow [5]:

Table 5: $GPGGA sentence example

$GPGGA,170834,4124.8963,N,08151.6838,W,1,05,1.5,280.2,M,-34.0,M,,,*75

Table 6: $GPGGA sentence explanation

Field Nilai Definition

1 170834 Fixed Time : 17:08:34 UTC

2 4124.8963 Latitude: 41° 24.8963’

3 N Lattitude Hemisphere : North

4 08151.6838 Longitude: 81° 51.6838’

5 W Longitude Hemisphere : West

6 1 Fixed GPS Data

7 05 GPS is using 5 satellite

8 1.5 Relative accuracy from horizontal position

9 280.2 Height from sea : 280.2

Page 23: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

10 M Units of antenna altitude : meters

11 -34.0 Geoidal height WGS84 : -34.0

12 M Units of geoidal height : meter

13 <empty> No Update

14 <empty> No station code

15 *oo Checksum

2.4.4.4. $GPRMC Sentence

$GPRMC (Recommended minimum specific GPS/TRANSIT data) consist of quite

complete information that are commonly used to get position information for GPS

devices. Code, Format and its description of $GPRMC as follow [5]:

Table 7: $GPRMC sentence format

$GPRMC,aaaaaa,b,cccc.cc,d,eeeee.ee,f,ggg.g,hhh.h,jjjjjj,kkk.k,l*mm

Table 8: $GPRMC sentence specification

Field Format Definition

1 aaaaaa Fixed UTC time format: hhmmssss

2 b is the validity of the fix ("A" = valid, "V" = invalid)

3 cccc.cc Latitude. Format: ddmm.mmm

4 d Latitude hemisphere (N=North, S=South)

Page 24: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

5 eeeee.ee Longitude. Format: dddmm.mm

6 f Longitude hemisphere (E=East, W=West)

7 ggg.g the speed in knots

8 hhh.h the true course in degrees

9 jjjjjj the date in DDMMYY format

10 kkk.k the magnetic variation in degrees

11 l the direction of magnetic variation ("E" = east, "W" = west)

12 *mm Checksum

An example of $GPGGA sentence with its description as follow [5]:

Table 9: $GPRMC Sentence Example

$GPRMC,225446,A,4916.45,N,12311.12,W,000.5,054.7,191194,020.3,E*68

Table 10: $GPRMC sentence description

Field Value Definition

1 225446 Fixed time : 22:54:46 UTC

2 A Navigation warning : valid

3 4916.45 Latitude: 49° 16.45’

4 N Latitude hemisphere : North

5 12311.12 Longitude: 123° 11.12’

6 W Longitude hemisphere : West

Page 25: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

7 000.5 Speed : 0.5 knot

8 054.7 Course : 54.7°

9 191194 Date : 19 November 1994

10 020.3 Magnetic variation : 20.3°

11 E The direction of magnetic variation : East

12 *68 Checksum

2.5. Development Tools, SDK and IDE

2.5.1. NetBeans 5.5 and Mobility Pack

The NetBeans IDE is a free, open-source Integrated Development Environment for

software developers. The IDE runs on many platforms including Windows, Linux,

Solaris, and the MacOS. It is easy to install and use straight out of the box. The NetBeans

IDE provides developers with all the tools they need to create professional cross-platform

desktop, enterprise, web and mobile applications. [11]

The NetBeans Platform allows applications to be developed from a set of modular

software components called modules. A module is a Java archive file that contains Java

classes writ ten to interact with the NetBeans Open APIs and a manifest file that identifies

it as a module. Applications built on modules can be extended by adding new modules.

Since modules can be developed independently, applications based on the NetBeans

platform can be easily and powerfully extended by third party developers.

Up to the day this sentence is written, NetBeans has its latest version at 6.0

Here are some features, add-ons and plugins that are available at NetBeans IDE [11]

Page 26: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

- Web Application Development: Create a complete functional JSF page for

manipulating data from a database in a few steps. Supports JavaServer Faces

(JSF), JavaServer Pages (JSP), Persistence Units, Struts, and the JavaServer Pages

Standard Tag Library (JSTL). Comes with a visual editor for deployment

descriptors and an HTTP monitor to debug web

- Enterprise Development: Use BluePrints, templates and wizards to quickly create

Enterprise Java Beans (EJB 3) and JAX-WS web services. Full support for Java

EE 1.3, 1.4 and 1.5 standards

- Web Service and Application Servers: NetBeans IDE works out-of-the box with

Sun Application Server, Tomcat, Weblogic9 and JBoss 4, and it supports J2EE

1.4 and Java EE 5, including the JAX-RPC and JSR 109 standards.

- Version Control: Version control is tightly integrated into the IDE's workflow:

The IDE recognizes your existing CVS working directories automatically. Use the

built- in CVS or get the Subversion module from the Update Center.

- Developer Collaboration: With NetBeans Developer Collaboration (available

from the Update Center), you share whole projects and files in real time over the

network. Allow your co-workers to make remote changes and watch them type

and run your application. Review your partner's work and send instant messages

in plain text, XML, HTML, or Java complete with syntax highlighting.

- Advanced source code editor: The language-aware editor indents, completes, and

syntax-highlights your source code. It parses your code live, matches words and

brackets, marks errors, and displays hints and javadoc. The Editor can be fully

customized and split vertically or horizontally, and offers well integrated

Refactoring, Debugging and JUnit testing.

Page 27: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

- Java Mobility (J2ME): The free Mobility Pack adds all the functionality to the

IDE needed for professional Java ME development. Install the Mobility Pack for

CLDC/MIDP if you develop for devices supporting CLDC and MIDP, or the

Mobility Pack for CDC if you develop for smart communicators, set-top boxes, or

PDAs.

- Visual Web Development: The free Visual Web Pack adds powerful tools to the

IDE that speed up the development of web applications. It includes visual editors

for rapidly building standards-based web applications using AJAX, CSS, and JSF.

- Service Oriented Architecture:

- Profiler: The free Enterprise Pack adds all the functionality to the IDE needed for

professional Service-Oriented Architecture (SOA) development. Write, test and

debug applications using XML, BPEL, or Java web services.

- C/C++: The free C/C++ Pack adds all the functionality to the IDE needed to

develop professional native applications. Write C and C++ code for a variety of

platforms including Microsoft Windows, Linux, and Solaris Operating Systems.

- UML: With NetBeans UML modeling, your designers focus on the design of the

application, and your developers focus on the code. First, designers and analysts

design applications using UML, a standard modeling language, then developers

generate source code from the UML model. Of course it works both ways: You

can also update the model from changes made in the source code.

2.5.1.1. NetBeans Mobility Pack

NetBeans Mobility Pack is a tool for developing applications that run on mobile devices;

generally mobile phones, but this also includes entry- level PDAs, among others.

Page 28: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

The Mobility Pack can be used to write, test, and debug applications for the Java Micro

Edition platform (Java ME platform) technology-enabled mobile devices. It integrates

support for the Mobile Information Device Profile (MIDP) 2.0, the Connected Limited

Device Configuration (CLDC) 1.1, and Connected Device Configuration (CDC). One can

easily integrate third-party emulators for a robust testing environment. Currently, the

pack is available as two separate clusters, one covering CDC and the other, CLDC

devices. [12]

2.5.1.2. NetBeans Mobility Features

- Project support, built on Apache Ant. Organizes your MIDP source code and

project metadata for easier coding and management. Projects also enable you to

build your project outside of the IDE.

- Integration with the J2ME Wireless Toolkit 2.2, providing support for advanced

development features such as MIDlet signing, certificate management, integrated

over-the-air (OTA) emulation, push registry emulation, Wireless Messaging and

Multimedia APIs, and WMA emulation features for SMS and CBS messages.

- A solution for device fragmentation - Develop your applications for multiple

devices by adding and executing device-specific code as configurations within a

single application.

- Support for MIDP localization - enables you to add locale-specific components to

your application.

- Support for J2ME MIDP 2.0 and CLDC 1.1 standards.

- Support for adding third party emulator platforms - Test your application on a

variety of target device emulators by leading manufacturers.

Page 29: CHAPTER 2 THEORETICAL FOUNDATION - Binus Librarylibrary.binus.ac.id/eColls/eThesisdoc/Bab2/Bab 2_BI-CS 08-20.pdf · today, RMS is theonly facility for local data storage-- few devices

- Integrated obfuscation and optimization support - adds security, improves

performance, and optimizes the size of your application.

- Over-The-Air (OTA) Download Testing - The emulator simulates the behavior of

real mobile devices. [12]

Drag and Drop features really comes very handy when you are developing GUI for your

application. Its palette has pretty complete items that add interactivity to GUI design.

There is also an option to make ‘Visual Midlet’. Visual MIDlet is a special MIDlet

configured by NetBeans to allow you to do drag and drop features, connect one element

to another and edit the flow design. However, some downside of using drag-and-drop

features is that your application size (.jar) might be increased significantly due to ‘very

long variables name’ that are auto-generated by the features. It also makes your code less

readable. [12]