|
void | doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException |
|
void | doPost (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException |
|
Servlet PositioningServlet This servlet is used for locating the mobile device.
com.servlet.positioning.PositioningServlet.PositioningServlet |
( |
| ) |
|
Map containing MAC address of waypoints and the RSSI values
- See also
- HttpServlet::HttpServlet() Default constructor of a servlet
Compute the location from distributions of RSSI values.
- Parameters
-
fingerprintsArray | an array of fingerprints |
sample | a RssiSample |
- Returns
- the location of the mobile device
void com.servlet.positioning.PositioningServlet.doGet |
( |
HttpServletRequest |
request, |
|
|
HttpServletResponse |
response |
|
) |
| throws ServletException, IOException |
|
protected |
- See also
- HttpServlet::doGet(HttpServletRequest request, HttpServletResponse response)
void com.servlet.positioning.PositioningServlet.doPost |
( |
HttpServletRequest |
request, |
|
|
HttpServletResponse |
response |
|
) |
| throws ServletException, IOException |
|
protected |
- See also
- HttpServlet::doPost(HttpServletRequest request, HttpServletResponse response) When a post request is received, this function is called and process it. Forward request from mobile to waypoints, then retrieve data from waypoints and compute the location and send the location to mobile.
Find the three nearest locations from the current position according to the RSSI distances
- Parameters
-
fingerprints | an array of fingerprints |
sample | a RssiSample |
- Returns
- the location of the mobile device
Compute the rssi_distance between two RssiSamples
- Parameters
-
s1 | a RssiSample |
s2 | a RssiSample |
- Returns
- a double value corresponding to the rssi_distance
LinkedHashMap<Fingerprint, Double> com.servlet.positioning.PositioningServlet.sortHashMapByValues |
( |
HashMap< Fingerprint, Double > |
passedMap | ) |
|
Sort a hash map in decreasing order
- Parameters
-
passedMap | a HashMap<Fingerprint, double> |
- Returns
- a LinkedHashMap in the right order
The documentation for this class was generated from the following file:
- src/com/servlet/positioning/PositioningServlet.java