Changeset 9152
- Timestamp:
- May 5, 2011, 11:30:48 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/website/tile.py
r9151 r9152 197 197 # copy the raw reported values 198 198 MAX_SIGNAL = 50 199 # XXX: The radius relates to the zoom-level we are in, and should represent 200 # a fixed distance, given the scale. Assume signal/distance to be lineair 201 # such that signal 100% = 100m and 1% = 1m. 202 # 203 # XXX: The relation is not lineair but from a more logeritmic scape, as we 204 # are dealing with radio signals 205 # 206 MAX_RANGE = 100 199 207 200 208 def dif(x,y): … … 211 219 log.info(meting.accespoint.ssid, meting.latitude, meting.longitude, xcoord, ycoord) 212 220 213 # XXX: The radius relates to the zoom-level we are in, and should represent 214 # a fixed distance, given the scale. Assume signal/distance to be lineair 215 # such that signal 100% = 100m and 1% = 1m. 221 # TODO: Please note that this 'logic' technically does apply to WiFi signals, 222 # if you are plotting from the 'source'. When plotting 'measurement' data you 223 # get different patterns and properly need to start looking at techniques like: 224 # Multilateration,Triangulation or Trilateration to recieve 'source' points. 216 225 # 217 # XXX: The relation is not lineair but from a more logeritmic scape, as we 218 # are dealing with radio signals 226 # Also you can treat all points as seperate and use techniques like 227 # Multivariate interpolation to make the graphs. A nice overview at: 228 # http://en.wikipedia.org/wiki/Multivariate_interpolation 219 229 # 220 # TODO: Please note that this 'logic' technically does any apply to WiFi signals,221 # if you are plotting from the 'source'. With measured data you get222 # different patterns.223 #224 im.add_circle((xcoord,ycoord),float( meting.signaal) / meters_per_pixel,(255,0,0),MAX_SIGNAL - meting.signaal)230 # One very intersting one to look at will be Inverse distance weighting 231 # with examples like this: 232 # http://stackoverflow.com/questions/3104781/inverse-distance-weighted-idw-interpolation-with-python 233 signal_normalized = MAX_RANGE - (MAX_SIGNAL - meting.signaal) 234 im.add_circle((xcoord,ycoord),float(signal_normalized) / meters_per_pixel,(255,0,0), MAX_SIGNAL - meting.signaal) 225 235 226 236 log.info("BoundingBox NW: %s" % nw_deg)
Note:
See TracChangeset
for help on using the changeset viewer.