Sunteți pe pagina 1din 31

Cyclone Detection System

ABSTRACT

In this system, we are going to find out the possibilities and causes for cyclone
formation by live data. We are using our own API for gathering the live data from 3rd party
librarys.

After around to staring at temperatures, reading reviews, and watching weather alerts
roll in, I can say with confidence that this Weather offers the most straightforward approach
to presenting weather data on an Android smartphone.

1) INTRODUCTION

A typical Cyclone Detection system consists of GPS, (You may use your details
introduction here)
Though it sounds complicated, its all about how much weather you want and how
often, which is pretty easy to figure out.

No two people experience and appreciate weather the same way, and most Android device
owners have different styles of customizing their phones. So picking just one Android
weather app for everyone just isnt going to fly. But we found two impressive offerings in the
never-ending pile and a very helpful alternate pick for weather nerds who really need the next
hours conditions.

2)SYSTEM STUDY

Of course there are lot of advantages in this project, we overcome the disadvantage of
existing.

2.1) EXISTING SYSTEM

Although a variety of location & cyclone based solutions exist, many of them do not
meet the constraints and requirements of the underlying Detecting applications in terms of
(one or more of) efficiency, security, and usability. In an attempt to address these drawbacks,
this system proposes a general research direction one that utilizes sensing technologies to
address exact location and relay lot of failure systems without necessitating any changes to
the traditional detecting usage model.
2.2) PROPOSED SYSTEM

In Android By using the Cyclone detection current technological advancement that


enables with low-cost sensing capabilities. Various types of sensors have been incorporated
with location detection & weather report. This new generation weather detection can
facilitate numerous promising applications for ubiquitous sensing and computation. They also
suggest new ways of providing services by leveraging the unique properties of the current
environment or physical status of the weather. In this system.

SAMPLE APPLICATIONS

AccuWeather
Yahoo Weather
WeatherBug

ADVANTAGES

Low cost
Less delay
Low power
Good efficient
Accuracy
3) SYSTEM ANALYSIS

SYSTEM REQUIREMENTS

System Specification:

Android Device - 4.3 and above

Processor - Dual Core

Ram - 2 GB

Monitor - LCD

Software Specification:
Java - JDK 7.0 u 45

Android SDK - API 11 & above

IDE - Eclipse IDE

Data Base - SQL Server

Inter Mediate Language - PHP

Device - Android OS Mobile

Technology - GPS & Networking

4) SOFTWARE DESCRIPTION

4.1 Android

4.1.1 What is android?

Android is basically an operating system for Smartphones. But we find now


integrated into PDAs,

Touch pads or televisions, even cars (trip computer) or notebooks. The OS was
created by the start-up of the same name, which is owned by Google since 2005.
4.1.2 Specifications:

This operating system is based on version 2.6 of Linux, so it has a monolithic system
kernel, what means that all system functions and drivers are grouped into one block of code.

Architecture:

Android consists of five layers:

-The Linux kernel 2.6-which includes useful drivers that allow for example WiFi or
Bluetooth.

-The library written in C and C + + that provide higher level functionality such as an HTML
engine, or a database (SQLite).

-A runtime environment for applications based on a virtual machine, made for inefficient
machines such as telephones. The aim is to translate JAVA in machine language understood
by Android.

-A JAVA framework that allows applications running on the virtual machine to organize and
cooperate.

-The user applications written in Java (Web browser, contact manager etc..,)
Current Version

Today android is in its 5th version, Android 2.1. Each version is designed to gradually
correct the lack of APIs, to enhance the user interface and add functionality. The latest
version adds such things as support in HTML5 in the browser, it allows multitouch or it
brings new Contact API, which defines a database for contact management.

4.1.3 Characteristic of the market:

Competitors

-The principal competitor is iPhone OS. It is mainly for competing with Apple that Android
has been created.

-Palm OS devices on PDA.

-Blackberry: which team the same name Smartphones

-Windows Mobile: which team Smartphones and PDAs.

-Sybian: Current Market Leader

Key partners

To help launch Android, Google has created an alliance of thirty companies in order to
develop standards for mobile devices. There is, among others:

-Operators such as NTT Dokomo, T-Mobile or Bouygues Telecom

-Of-equipment manufacturers like Sony Ericsson or Samsung

-Manufacturers of semiconductors, including Intel and Nvidia

-Corporate businesses.

Market share

The android market share continues to increase since its inception, and is likely to
continue climbing because it is favored by big players like HTC , Sony Ericsson, Samsung,
LG, Motorola, Dell, Acer .
Moreover, according to IDC, android will be the 2nd mobile operating system used of
the market in 2013.

Here is the state of the market from 2006 to 2009. You have to know that the first
mobile phone appeared in android date October 2008.

4.1.4. Why Android is better?

Applications

- Google applications

Android includes most of the time many Google applications like Gmail, YouTube or Maps.

These applications are delivered with the machine most of the time, except in certain
cases, such as some phones running android on which the provider has replaced Google
applications by its own applications.

-widgets

With android, it is possible to use widgets which are small tools that can most often
get information. These widgets are directly visible on the main window.

-Android Market

This is an online software store to buy applications. Developers who created


applications can add them into the store, and these applications can be downloaded by users,
they can be both free and paid.

Multitasking

Android allows multitasking in the sense that multiple applications can run
simultaneously. With Task Manager it is possible view all running tasks and to switch from
one to another easily.

SDK

A development kit has been put at disposal of everybody. Accordingly, any developer can
create their own applications, or change the android platform. This kit contains a set of
libraries, powerful tools for debugging and development, a phone emulator, thorough
documentation, FAQs and tutorials.
Modifiability:

This allows everyone to use, improve or transform the functions of Android for example
transform the interface in function of uses, to transform the platform in a real system
embedded Linux.

4.2 JAVA

Java acts as the front end, which drives its syntax from C and object-oriented features
from C++. The main feature is platform independent. Java is popular among Internet
programmers. It expends the universe of objects that can move about freely in cyberspace.
Java can be used to create two types of programs, application and applets. An application is a
program that runs on the computer, under the operation system of that computer. An applet is
a tiny java program, dynamically downloaded across the network.
The Byte code

The output of java compiler is not executable code, it is byte code. It is a set of
instructions to be executed by java run-time system called java virtual machine (JVM) it is an
interpreter for byte code. Some of the java Buzzwords

Simple
Secure
Portable
Object-oriented
Robust
Multithreaded
Architecture-neutral
Interpreted
High performance
Distributed
Dynamic

Simple
It inherits the C syntax and many of the object oriented features of C++. It is the
consolidated form of both.
Portable
Programs to be dynamically downloaded to all various types of platforms connected
to the Internet, some means of generating portable executable code is needed.

Secure

With a help of java-compatible web browser, you can safely download java applets
without fear. It is possible with the help of java execution environment and not allowing it
access to other parts of computer.

Object-oriented

It organizes a program around its data and a set of well-defined interfaces to that data.
Some of its concepts are as follows:

Abstraction
Encapsulation
Inheritance.
Polymorphism
Exception Handling

Abstraction

Its the way of hiding the internal details but showing the external behavior. Example
is car without the details of how it was made.

Encapsulation

It is the mechanism that binds together code and the data it manipulates, and keeps
both safe from outside interference and misuse. In java the basics of encapsulation is class,
which is shared by the objects. Objects are sometimes called instances of a class.

Inheritance

Inheritance is the process by which one object acquires the properties of another
object. It supports the concept of hierarchical classification for example golden retriever is
part of classification dog, which in turn is part of mammal class, which is under the class
animal without in each object would need to define its characteristics explicitly.

Polymorphism

It is a concept that allows one interface to be used for general class of actions.
Consider one example as stack. It is of three types one used for integer values one for floating
values one for characters. The algorithms used are same in non-object oriented programming
you would create three types of routines and with the help of polymorphism the general stack
of routines is enough.
Exception Handling

Java provides very powerful exception handling mechanism. Exception handling


minimizes the runtime loss. Java supports 100% Object Oriented exception handling
mechanism, in fact java itself is 100% OPPs. With the help of this feature various runtime
errors are trapped and handled.

Robust

Java frees from having to worry about many of the programming errors. It checks the
code at compile time and also at runtime. For example java eliminates the memory
management problem by managing memory allocation and reallocation, exceptional
condition such as division by zero can be resolved with the help of exception handling.

Multithreaded

Multitasking is a concept introduced in operating systems such as UNIX, Windows


etc., Multitasking is allowed only with 32 Bit Operating Systems. Multitasking supports
concurrent execution of multiple tasks. The Operating System take care of the scheduling
algorithms and switching logics. Now these powerful concepts in Operating Systems can be
adopted in programming languages such as VB, JAVA etc., This technique is called as
multithreading. Here program is divided into independent units called threads. Each thread
can be executed concurrently. Java provides easy mechanism for multithreading. These are
the programs that do many things simultaneously.

Architectural-Neutral

Architectural Neutrality means Hardware independent. Cent percent Architectural


Neutrality is not possible but we can develop tools to archive this with in very short period
when compared with other languages. The main goal of it is that write once, run anywhere,
any time.
Distributed

Java is designed for the distributed environment of the Internet, because it handles
TCP/IP protocols. It is possible that two different computers to execute procedures remotely.
Java revived these interfaces in package called Remote Method Invocation (RMI). Even the
java libraries can also be distributed.

Event Handling

Event Driven programming model is a powerful one. We can not predict the flow of
execution before any user interaction. Systems Flow is completely controlled by the users
action called events. Java provides event driven programming model, by its powerful libraries
in AWT-Event and Swing Event packages. Applets are event-driven programs. There are
several types of events. The most common events are those generated by the mouse, the
keyboard, and various control events are supported by java.awt.event package.

PLATFORM-INDEPENDENT AND PORTABLE


The most significant contribution of Java over other languages is its portability. Java
programs can be easily moved from one computer system to another, anywhere and anytime.
Changes and upgrades in operating systems, processors and system resources will not force
any changes in Java programs. This is the reason why Java has become a popular language
for programming on Internet. Java ensures portability in two ways. First, Java compiler
generates byte code instructions that can be implemented on any machine. Secondly, the
sizes of the primitive data types are machine-independent.

OBJECT-ORIENTED
Java is a true object-oriented language. Almost everything in Java is an object. All
program code and data reside within objects and classes. The object model in Java is simple
and easy to extend.

ROBUST AND SECURE

Java is a robust language. It provides many safeguards to ensure reliable code. It has
strict compile time and run time checking for data types. Java also incorporates the concept of
exception handling which captures series of errors and eliminates any risk of crashing the
system. Security becomes an important issue for a language that is used for programming on
Internet. Java systems not only verify all memory access but also ensure that no viruses are
communicated with an applet. The absence of pointers in Java ensures that programs cannot
gain access to memory locations without proper authorization.

MULTITHREADED AND INTERACTIVE

Multithreaded means handling multiple tasks simultaneously. Java supports


multithreaded programs. This means that we need not wait for the application to finish one
task before beginning another. For example, we can listen to an audio clip while scrolling a
page and at the same time download an applet from a distant computer. This feature greatly
improves the interactive performance of graphical applications.

The Java runtime comes with tools that support multi-process synchronization and
construct smoothly running interactive systems.

Java programs support functions written in other languages such as C and C++.
These functions are known as native methods. This facility enables the programmers to use
the efficient functions available in these languages. Native methods are linked dynamically
at runtime.

THREADING TECHNIQUES

Unlike most other computer languages, Java provides built-in support for
multithreaded programming. A multithreaded program contains two or more parts that can
run concurrently. Each part of such a program is called a thread, and each thread defines a
separate path of execution. Thus, multithreading is a specialized form of multitasking.

However, there are two distinct types of multitasking: process-based and thread-
based. In a thread-based multitasking environment, the thread is the smallest unit of
dispatchable code. This means that a single program can perform two or more tasks
simultaneously. Thus, process-based multitasking deals with the big picture, and thread-
based multitasking handles the details.

Javas multithreading system is built upon the Thread class, its methods, and its
companion interface, Runnable. Thread encapsulates a thread of execution. Since we cant
directly refer to the ethereal state of a running thread, we will deal with it through its proxy,
the Thread instance that spawned it. To create a new thread, the program should either
extend Thread class or implement the Runnable interface. The Thread class defines
several methods that help manage threads. The ones used very often are given below:

Method Meaning
getName Obtain a threads name.
getPriority Obtain a threads priority.
isAlive Determine if thread is still running.
join Wait for a thread to terminate.
run Entry point for a thread.
sleep Suspend a thread for a period of time.
start Start a thread by calling its run method.

Components of Java:
Compiler for Java programs that could
JAVAC __
generate byte codes(Class).

Interpreter to read executes Java Byte Codes


JAVA __
(Class files).

JAVAP __ To disassemble and debug Java byte codes.

JAVADOC __ Document generator

JAVAH __ Java programs

To write and link native codes with

Swing:

Swing is a set of classes that provides more powerful and flexible components than
are possible with the AWT. In addition to the familiar components, such as buttons, check
boxes, and labels, Swing supplies several exciting additions, including tabbed panes, scroll
panes, trees, and tables. Even familiar components such as buttons have more capabilities in
Swing.

Unlike AWT components, Swing components are not implemented by platform-


specific code. Instead, they are written entirely in Java and, therefore, are platform-
independent. The term lightweight is used to describe such elements.

Networking

The TCP/IP stack is shorter than the OSI one:

TCP is a connection-oriented protocol; UDP (User Datagram Protocol) is a


connectionless protocol.

IP datagrams

The IP layer provides a connectionless and unreliable delivery system. It considers


each datagram independently of the others. Any association between datagram must be
supplied by the higher layers. The IP layer supplies a checksum that includes its own header.
The header includes the source and destination addresses. The IP layer handles routing
through an Internet. It is also responsible for breaking up large datagram into smaller ones for
transmission and reassembling them at the other end.

UDP

UDP is also connectionless and unreliable. What it adds to IP is a checksum for the
contents of the datagram and port numbers. These are used to give a client/server model.

TCP

TCP supplies logic to give a reliable connection-oriented protocol above IP. It


provides a virtual circuit that two processes can use to communicate.

Internet Address

The Internet uses an address scheme for machines so that they can be located. The
address is a 32 bit integer which gives the IP address. This encodes a network ID and more
addressing. The network ID falls into various classes according to the size of the network
address.

Network Address

Class A uses 8 bits for the network address with 24 bits left over for other addressing.
Class B uses 16 bits network addressing. Class C uses 24 bits network addressing and class D
uses all 32 bits.

Subnet Address

Internally, the UNIX network is divided into sub networks. Building 11 is currently
on one sub network and uses 10-bit addressing, allowing 1024 different hosts.

Host Address

8 bits are finally used for host addresses within the subnet. This places a limit of 256
machines that can be on the subnet.
Total Address

The 32 bit address is usually written as 4 integers separated by dots.

Port Address

A service exists on a host, and is identified by its port. This is a 16 bit number. To
send a message to a server, send it to the port for that service of the host that it is running on.
This is not location transparency! Certain of these ports are "well known".

Sockets

A socket is a data structure maintained by the system to handle network connections.


A socket is created using the call socket. It returns an integer that is like a file descriptor. In
fact, under Windows, this handle can be used with Read File and Write File functions.

#include <sys/types.h>
#include <sys/socket.h>
int socket(int family, int type, int protocol);

Here "family" will be AF_INET for IP communications, protocol will be zero, and
type will depend on whether TCP or UDP is used. Two processes wishing to communicate
over a network create a socket each. These are similar to two ends of a pipe - but the actual
pipe does not yet exist.

Accessing Database
JDBC is an application-programming interface between Java programs
and database management systems. Like Oracles Oracle Call Interface(OCI) or Microsofts
Open Database Connectivity (ODBC), JSBC is a call-level interface. This means a program
uses method or function calls to access its features, as opposed to embedded SQL statements,
which are translated by a precompiled.

A programmer uses a Java class known as a JDBC driver to connect to


a database. A special JDBC driver, known as the JDBC-ODBC bridge, makes using ODBC as
an intermediary possible, which makes the vast number of ODBC drivers usable from JDBC.
The great advantage of JDBC is it provides a standard interface to all database management
systems.
5) SYSTEM DESIGN

Start

GPS Start

If

Gather Date From


our library
Weather, wind,
Cloud & etc..,

Server Checking

If Implement
Algorithm
with our data

Warning to Possibilities of
User cyclone formation

Stop
6) Project Description

The Location cyclone detection from mobile application. It comprehensively used to


analyze and display the current data contents with highly security on Android mobile phones
and tablets.

This project has five modules

1) Tag Sensing module


2) GPS Location and Speed Drive module
3) Relay Attack Identification module
4) Location Aware Selective Unlocking module
5) Location Aware Transaction Verification module

Modules

1. Collecting location and geo information by GPS

Colect the current weather data by using the GPS system, it contains the latitude,
langitud & weather data, the data frequently taken through GPS. The data acuracy is
relayable by adding the ArcGIS library. The ArcGIS library is a third party (GOOGLE
Library).

2. Feed location & receive the data By API

By using the Internal Language (PHP) we can feed te data on the cloud. The light
weight framework is working as a meedia to store the data on the cloud server.

Because of the cloude feeding we can share the data to anywhare. The cloud add the advantag
for the application as centalized app.

Data
{"cod":"200","message":0.1963,"city":{"id":1264527,"name":"Chennai","coord"
:{"lon":80.278473,"lat":13.08784},"country":"IN","population":0,"sys":{"pop
ulation":0}},"cnt":7,"list":[{"dt":1413093600,"temp":{"day":307.15,"min":30
3.55,"max":307.15,"night":303.55,"eve":306.51,"morn":307.15},"pressure":101
4.16,"humidity":73,"weather":[{"id":803,"main":"Clouds","description":"brok
en
clouds","icon":"04d"}],"speed":2.46,"deg":300,"clouds":76},{"dt":1413180000
,"temp":{"day":306.44,"min":301.81,"max":306.9,"night":304.35,"eve":305.87,
"morn":301.81},"pressure":1017.3,"humidity":78,"weather":[{"id":802,"main":
"Clouds","description":"scattered
clouds","icon":"03d"}],"speed":3.57,"deg":215,"clouds":32},{"dt":1413266400
,"temp":{"day":306.8,"min":299.33,"max":306.8,"night":300.59,"eve":305.06,"
morn":299.33},"pressure":1011.62,"humidity":0,"weather":[{"id":800,"main":"
Clear","description":"sky is
clear","icon":"01d"}],"speed":4.28,"deg":182,"clouds":3},{"dt":1413352800,"
temp":{"day":303.03,"min":297.8,"max":303.03,"night":298.59,"eve":300.94,"m
orn":297.8},"pressure":1013.99,"humidity":0,"weather":[{"id":501,"main":"Ra
in","description":"moderate
rain","icon":"10d"}],"speed":3.62,"deg":150,"clouds":42,"rain":9.52},{"dt":
1413439200,"temp":{"day":300.35,"min":297.17,"max":300.35,"night":297.55,"e
ve":298.75,"morn":297.17},"pressure":1014.81,"humidity":0,"weather":[{"id":
502,"main":"Rain","description":"heavy intensity
rain","icon":"10d"}],"speed":1.79,"deg":63,"clouds":43,"rain":20},{"dt":141
3525600,"temp":{"day":299.92,"min":296.76,"max":299.92,"night":297.31,"eve"
:299.02,"morn":296.76},"pressure":1014,"humidity":0,"weather":[{"id":501,"m
ain":"Rain","description":"moderate
rain","icon":"10d"}],"speed":2.6,"deg":32,"clouds":22,"rain":11.09},{"dt":1
413612000,"temp":{"day":299.94,"min":296.89,"max":299.94,"night":297.4,"eve
":298.74,"morn":296.89},"pressure":1013.72,"humidity":0,"weather":[{"id":50
2,"main":"Rain","description":"heavy intensity
rain","icon":"10d"}],"speed":2.46,"deg":24,"clouds":13,"rain":13.13}]}

3. Forecasting geo status by using KD Tree

The KD Tree algorither is used for calculating the forcastin status of weather. By
passing the input data as time, location, latitude & langitude, we can receive the report of
required time as output data.

4. visualize current data on device by using Achartengine

can show the data as output graf by using the Achartengine library & we can show the output
on map also..,
8. IMPLEMENTATION AND TESTING

IMPLEMENTATION

Implementation is the stage of the project when the theoretical design is turned out
into a working system. Thus it can be considered to be the most critical stage in achieving a
successful new system and in giving the user, confidence that the new system will work and
be effective.

The implementation stage involves careful planning, investigation of the existing


system and its constraints on implementation, designing of methods to achieve changeover
and evaluation of changeover methods.

Implementation is the process of converting a new system design into operation. It is


the phase that focuses on user training, site preparation and file conversion for installing a
candidate system. The important factor that should be considered here is that the conversion
should not disturb the functioning of the organization.
The sample code is

import java.util.ArrayList;
import java.util.List;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONArray;
import org.json.JSONObject;
import com.raj.psnl.JSONParser;
import android.os.AsyncTask;
import android.os.Bundle;
import android.app.Activity;
import android.app.ProgressDialog;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class Welcome extends Activity {

String URL_weather = "";

JSONParser j_parse;
ProgressDialog p_dialog;
EditText ct;
Button btn_src;
String city_c, country_c, lot_c, long_c;
TextView tv_show_all, tv_counry, tv_city, tv_lat, tv_long;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_welcome);
ct = (EditText) findViewById(R.id.et_city);
tv_show_all = (TextView) findViewById(R.id.tv_show_all);
tv_counry = (TextView) findViewById(R.id.tv_Country);
tv_city = (TextView) findViewById(R.id.tv_City);
tv_lat = (TextView) findViewById(R.id.tv_Latitude);
tv_long = (TextView) findViewById(R.id.tv_Langitude);
btn_src = (Button) findViewById(R.id.btn_search);
btn_src.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
new Welcome_Asyn().execute();
}
});

class Welcome_Asyn extends AsyncTask<String, String, String> {

@Override
protected void onPreExecute() {
// TODO Auto-generated method stub
super.onPreExecute();
p_dialog = new ProgressDialog(Welcome.this);
p_dialog.setMessage("Please Wait");
p_dialog.setCancelable(false);
p_dialog.setIndeterminate(false);
p_dialog.show();
}

@Override
protected String doInBackground(String... params) {
// TODO Auto-generated method stub
j_parse = new JSONParser();
List<NameValuePair> p_param = new
ArrayList<NameValuePair>();
p_param.add(new BasicNameValuePair("mode",
"json"));
p_param.add(new BasicNameValuePair("q",
ct.getText().toString()));
String j_result =
j_parse.makeHttpRequest(URL_weather, "GET",
p_param);
Log.d("j_result", j_result);
if (j_result != null) {
try {
JSONObject j_object_all = new
JSONObject(j_result);
JSONObject j_object_city =
j_object_all.getJSONObject("city");
JSONArray j_object_list =
j_object_all.getJSONArray("list");

/* from common details */


String j_ob_city_name =
j_object_city.getString("name");
String j_ob_city_Country =
j_object_city.getString("country");
JSONObject j_object_coord =
j_object_city.getJSONObject("coord");
String j_ob_coord_lon =
j_object_coord.getString("lon");
String j_ob_coord_lat =
j_object_coord.getString("lat");

/* list common details */


for (int i = 0; i < j_object_list.length();
i++) {

//JSONArray j_array_list =
j_object_list.getJSONArray(j_ob_coord_lat);
city_c = j_ob_city_name;
country_c = j_ob_city_Country;
lot_c = j_ob_coord_lat;
long_c = j_ob_coord_lon;
Log.d("j_ob_city_name", city_c);
Log.d("j_o_city_Country", country_c);
Log.d("j_ob_coord_lon", long_c);
Log.d("j_ob_coord_lat", lot_c);

} catch (Exception e) {
// TODO: handle exception
}
}

return null;
}

@Override
protected void onPostExecute(String result) {
// TODO Auto-generated method stub
super.onPostExecute(result);
p_dialog.dismiss();
tv_counry.setText(country_c);
tv_city.setText(city_c);
tv_lat.setText(lot_c);
tv_long.setText(long_c);
//
}
}

S-ar putea să vă placă și