hh1989923 / funf-open-sensing-framework

Automatically exported from code.google.com/p/funf-open-sensing-framework
0 stars 0 forks source link

When location data is not different funf analyze results in a error #97

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Collect data using location probe with the same location. (keep the phone on 
the same place for couple of minutes)
2. Use the funf_analyze.py to visualize

Following error is reported 

Traceback (most recent call last):
  File "funf_analyze.py", line 84, in <module>
    viz_gen.main()
  File "/home/zombie/Projects/gsoc/funf-open-sensing-framework.samples/funf_analyze/viz_gen.py", line 395, in main
    viz.generate()
  File "/home/zombie/Projects/gsoc/funf-open-sensing-framework.samples/funf_analyze/viz_gen.py", line 40, in generate
    self.generate_location_vis()
  File "/home/zombie/Projects/gsoc/funf-open-sensing-framework.samples/funf_analyze/viz_gen.py", line 107, in generate_location_vis
    hm.heatmap(location_data, "classic.png", dotsize=50)
  File "/home/zombie/Projects/gsoc/funf-open-sensing-framework.samples/funf_analyze/heatmap/__init__.py", line 93, in heatmap
    tmp.paste( dot, self._translate([x,y]) )
  File "/home/zombie/Projects/gsoc/funf-open-sensing-framework.samples/funf_analyze/heatmap/__init__.py", line 244, in _translate
    x = (x - self.minXY[0]) / float(self.maxXY[0] - self.minXY[0])
ZeroDivisionError: float division by zero

Original issue reported on code.google.com by perera.p...@gmail.com on 25 Apr 2013 at 12:52

Attachments:

GoogleCodeExporter commented 9 years ago
added a condition to check the division by zero

Original comment by perera.p...@gmail.com on 25 Apr 2013 at 12:59

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks, I was running into this too. I pushed your fix into my repo where I 
fixed the issue that a SimpleLocationProbe was not used by funf_analyze.py: 
https://code.google.com/r/carstendraeger-funf/

Original comment by carsten....@bitz.it on 29 Nov 2013 at 10:21