I can work on making a PR, but this is a simple fix. You have a typo, the line (124) that reads: self.last_msg = msg.mag should be: self.last_mag = msg.mag would it be possible for you to fix this?