Extrait de son courriel : « Par rapport à la précédente j'ai surtout corrigé des bugs. » Note : la version du listener portable sur Fonera, envoyée en même temps par Julien, viendra plus tard (le temps que je l'incorpore). Détail des changements après analyse du code : aggregator : correction de bogues. positioning : * Ajout d'un fichier de config format boost (cfg/config.cfg). * Makefile : implantation des cibles "install" et "uninstall" ; la cible "astyle" devient "style". * accesspoint.{hh,cc}, area.cc, measurement.hh, point.{hh,cc}, referencepoint.{hh,cc} : cosmétique. * owlps-positioning.c : correction de la lecture du fichier de config (ajout d'une option permettant de spécifier un fichier alternatif). * server.cc : essentiellement correction des requêtes. * libowlps-positioning.{hh,cc} : passage de "unsigned long long" à "uint64_t" comme type de retour de timeval_to_ms(). writeInDb : * Ajout de la gestion d'un fichier de config. * Ajout de deux scripts pour la BDD. git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@96 785a6c6c-259e-4ff1-8b91-dc31627914f0
125 lines
2.4 KiB
Bash
125 lines
2.4 KiB
Bash
-- =====================================
|
|
-- Nom de la base : owlps_db
|
|
-- Date de création : 25/06/09
|
|
-- =====================================
|
|
|
|
create table ap
|
|
(
|
|
id_ap serial not null unique,
|
|
ap_addr varchar(20) not null,
|
|
x float ,
|
|
y float ,
|
|
z float ,
|
|
friis_index float ,
|
|
freq bigint ,
|
|
antenna_gain float ,
|
|
output_power float ,
|
|
primary key (id_ap, ap_addr)
|
|
);
|
|
|
|
create table mobile
|
|
(
|
|
id_mobile serial not null unique,
|
|
mobile_addr varchar(20) not null,
|
|
ip_mobile varchar(20) ,
|
|
antenna_gain float ,
|
|
last_connect numeric(30) ,
|
|
primary key (id_mobile, mobile_addr)
|
|
);
|
|
|
|
create table building
|
|
(
|
|
id_building serial not null,
|
|
building_name varchar(50) ,
|
|
address varchar(100) ,
|
|
postal_code varchar(10) ,
|
|
city varchar(20) ,
|
|
primary key (id_building)
|
|
);
|
|
|
|
|
|
create table area
|
|
(
|
|
id_area serial not null,
|
|
name_area varchar(40) ,
|
|
x_min float ,
|
|
y_min float ,
|
|
z_min float ,
|
|
x_max float ,
|
|
y_max float ,
|
|
z_max float ,
|
|
id_building integer references building,
|
|
primary key (id_area)
|
|
);
|
|
|
|
create table waypoint
|
|
(
|
|
x float ,
|
|
y float ,
|
|
z float ,
|
|
id_building integer references building,
|
|
primary key (x,y,z)
|
|
);
|
|
|
|
|
|
create table ref_point
|
|
(
|
|
id_ref_point serial not null,
|
|
x float ,
|
|
y float ,
|
|
z float ,
|
|
direction char(1) ,
|
|
primary key (id_ref_point)
|
|
);
|
|
|
|
create table request
|
|
(
|
|
id_request serial not null,
|
|
mobile_time numeric(30) ,
|
|
id_mobile integer references mobile(id_mobile),
|
|
primary key (id_request)
|
|
);
|
|
|
|
create table ref_request
|
|
(
|
|
id_ref_request serial not null,
|
|
mobile_time numeric(30) ,
|
|
id_mobile integer references mobile(id_mobile),
|
|
id_ref_point integer references ref_point ON DELETE CASCADE,
|
|
primary key (id_ref_request)
|
|
);
|
|
|
|
create table packet
|
|
(
|
|
id_packet serial not null,
|
|
ap_time numeric(30) ,
|
|
power integer ,
|
|
id_ap integer references ap(id_ap),
|
|
id_request integer references request,
|
|
primary key (id_packet)
|
|
);
|
|
|
|
create table ref_packet
|
|
(
|
|
id_ref_packet serial not null,
|
|
ap_time numeric(30) ,
|
|
power integer ,
|
|
id_ap integer references ap(id_ap) ,
|
|
id_ref_request integer references ref_request ON DELETE CASCADE,
|
|
primary key (id_ref_packet)
|
|
);
|
|
|
|
create table result
|
|
(
|
|
id_result serial not null,
|
|
x float ,
|
|
y float ,
|
|
z float ,
|
|
direction char(1) ,
|
|
calcul_date numeric(30) ,
|
|
using_algo varchar(30) ,
|
|
id_request integer references request,
|
|
primary key (id_result)
|
|
);
|
|
|