Skip to content
This repository has been archived by the owner on Oct 5, 2020. It is now read-only.

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

Open
GoogleCodeExporter opened this issue May 5, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 25 Apr 2013 at 12:52

Attachments:

@GoogleCodeExporter
Copy link
Author

added a condition to check the division by zero

Original comment by [email protected] on 25 Apr 2013 at 12:59

Attachments:

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 29 Nov 2013 at 10:21

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant