Commit 4e1cc382 authored by Leigh B. Stoller's avatar Leigh B. Stoller

This started out as a cleanup pass ...

* Add nodeinfo backend page for the tracker applet to query for info about
  the nodes, including what type, what size, fixed/mobile, allocated etc.
  This is so we can draw the dots in the right scale, and make sure that
  fixed motes cannot be dragged around in the applet.

* Clean up a bunch of hardwired constants, mostly related to the size
  of the dots, and the font size (which determines where labels get

* And then I noticed the oddity resulting from having a robot that is 10.5
  inches long, but sweeps a diameter of 14 inches. The dot we draw is in
  scale (10.5in), but when I changed it to draw a 14in scale dot, that
  looked all wrong. So, there are actually two sizes now; the size of
  the robot, and the radius of the circle it sweeps (which is critical
  for determining obstacle avoidance). Still, this is confusing cause the
  user will place a robot near an obstacle (not overlapping) but will be
  told there is overlap cause the bubble around the robot is bigger then
  the dot. Not sure what to do about that. I could draw a large bubble
  around the robots but that is going to increase the clutter quite a bit.
parent a4f8b614
This diff is collapsed.
# Copyright (c) 2000-2002, 2004, 2005 University of Utah and the Flux Group.
# All rights reserved.
# Only known and logged in users can watch LEDs
$uid = GETLOGIN();
# One robot map right now ...
$building = "MEB-ROBOTS";
$floor = 4;
# Initial goo.
header("Content-Type: text/plain");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
# Clean up when the remote user disconnects
function SPEWCLEANUP()
# Get the robot information. Actually, this includes motes.
$query_result =
DBQueryFatal("select loc.node_id,,r.eid,r.vname,n.type,nt.class ".
" from location_info as loc ".
"left join reserved as r on r.node_id=loc.node_id ".
"left join nodes as n on n.node_id=loc.node_id ".
"left join node_types as nt on nt.type=n.type ".
"where loc.building='$building' and ".
" loc.floor='$floor' $stamp_clause ".
"order by n.type,n.node_id");
while ($row = mysql_fetch_array($query_result)) {
$pname = $row["node_id"];
$vname = $row["vname"];
$pid = $row["pid"];
$eid = $row["eid"];
$type = $row["type"];
$class = $row["class"];
$mobile = ($class == "robot" ? 1 : 0);
# In meters.
$size = ($class == "robot" ? 0.27 : 0.07);
$radius = ($class == "robot" ? 0.18 : 0.04);
$alloc = (isset($pid) ? 1 : 0);
if (!isset($vname))
$vname = $pname;
echo "$pname, $vname, $type, $alloc, $mobile, $size, $radius\n";
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment