logo       

placelab-users: msg#00014

Subject: placelab-users
Hello.  We are of Barcelona and we are making a project of a system of wireless positioning based on Pleases Lab. We are inexperienced in this and we needed aid because the Java code of an application does not work to us, in concrete the PlacaLabExample.  We have modified a little the code and we do not understand porqué does not work....  It would please us that the program recalculara the Access list points whenever one became disconnected or was connected and updated the position of the user to each change.  If somebody has a solution, or can help us or has the same problem we would be thankful answered to us.  Thank you very much!

This is the code:

package org.placelab.example;

import org.placelab.client.PlacelabWithProxy;

import org.placelab.client.tracker.Estimate;

import org.placelab.client.tracker.EstimateListener;

import org.placelab.client.tracker.Tracker;

import org.placelab.core.Coordinate;

import org.placelab.core.Measurement;

import org.placelab.core.BeaconMeasurement;

import org.placelab.spotter.LogSpotter;

import org.placelab.spotter.WiFiSpotter;

import org.placelab.mapper.CompoundMapper;

import org.placelab.mapper.Mapper;

import org.placelab.client.tracker.CentroidTracker;

 

 

/**

* This sample shows how to use the PlacelabWithProxy object to manage

* spotters and trackers for you.

*/

public class PlaceLabExample implements EstimateListener {

Estimate lastEstimate=null;

WiFiSpotter wifispotter = null;

PlacelabWithProxy placelab;

Mapper mapper;

CentroidTracker tracker;

public PlaceLabExample() {

mapper = CompoundMapper.createDefaultMapper(true, true);

tracker = new CentroidTracker(mapper);

wifispotter = new WiFiSpotter();

wifispotter.addListener(tracker);

 

try {

// Create a placelab (with an explicit log spotter)

placelab = new PlacelabWithProxy(wifispotter,

tracker,

mapper,

2000 // poll spotter every 2s

);

placelab.addEstimateListener(this);

placelab.createProxy();

} catch (Exception ex) {

ex.printStackTrace();

}

}

public static void main(String[] args) {

new PlaceLabExample();

}

public void estimateUpdated(Tracker t, Estimate e, Measurement m) {

System.out.println("Estimated position: " + e.getCoord());

System.out.println("Num: " + ((BeaconMeasurement)m).numberOfReadings());

lastEstimate = e;

}

}

------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
web.pylons.gene...    hurd.l4/2002-10...    kernel.commits....    user-groups.lin...    yellowdog.gener...    java.drools.use...    security.openva...    package-managem...    linux.debian.us...    qnx.openqnx.dev...    genealogy.gramp...    file-systems.if...    voip.wengophone...    tex.context/200...    ietf.smime/2003...    audio.csound.de...    culture.region....    xfree86.devel/2...    mobile.kannel.u...    distributed.con...    education.engli...    org.user-groups...    bug-tracking.gn...    recreation.bicy...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe