/***************************************************************************************
*	This software simulated for ARPEEC, a routing protocol for Wireless Sensor Network *
*	Copyright (C) 2007 by Tran Quang Vinh (vinhtq@mail.hut.edu.vn)                     *
*	Multimedia Information NETwork Lab - MINET                                         *
*	Dept. Electronic Information Systems, Graduate School of Enginnering               *
*	Shibaura Institute of Technology, Japan.                                           *
*--------------------------------------------------------------------------------------*
*	File name: SensingCoverage.h												       *
*	header file for implementing algorithm to find redundant node                      *
***************************************************************************************/

#ifndef SENSINGCOVERAGE_H
#define SENSINGCOVERAGE_H

#include <omnetpp.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <iostream>

#define M_PI 3.1415926535

int circle_circle_intersection(double x0, double y0, double r0,
                               double x1, double y1, double r1,
                               double *xi, double *yi,
                               double *xi_prime, double *yi_prime);

double get_counterclockwise_angle_in_radians(double ax, double ay, 
											 double bx, double by);

void run_test_angle(double ax, double ay, double bx, double by);

int intersectionAngle2Circles(double x0, double y0, double r0,
						      double x1, double y1, double r1, 
						      double *secA1, double *secA2, double *secB1, double *secB2);
void swapDouble ( double &x, double &y ) ;
void swapInt ( int &x, int &y ) ;

#endif

/************************************************************************************/
