Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Pymavlinks mavgen.py now works under python3.2 and python2

  • Loading branch information...
commit d42fc63c6c30e82f04b40881e30a7c9a8304bc72 1 parent e1c0d7a
@dagoodma dagoodma authored committed
Showing with 9 additions and 2 deletions.
  1. +1 −0  .gitignore
  2. +8 −2 pymavlink/mavextra.py
View
1  .gitignore
@@ -10,3 +10,4 @@ share/
pymavlink/generator/C/include_v0.9/*/
pymavlink/generator/C/include_v1.0/*/
pymavlink/generator/message_definitions
+*.swp
View
10 pymavlink/mavextra.py
@@ -9,7 +9,13 @@
import os, sys
from math import *
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), 'examples'))
-from rotmat import Vector3, Matrix3
+'''
+Modified on August 6th, 2012 by David Goodman
+ Removed the rotmat import below since it is not running under
+ python3.2, and the functions within this file that use Vector3
+ and Matrix3 are not called by mavgen.py
+'''
+# from rotmat import Vector3, Matrix3
def kmh(mps):
@@ -346,7 +352,7 @@ def distance_two(GPS_RAW1, GPS_RAW2):
'''distance between two points'''
if hasattr(GPS_RAW1, 'cog'):
lat1 = radians(GPS_RAW1.lat)*1.0e-7
- lat2 = radians(GPS_RAW2.lat)*1.0e-7
+ lat2 = radians(GPS_RAW2.lat)*1.0e-7
lon1 = radians(GPS_RAW1.lon)*1.0e-7
lon2 = radians(GPS_RAW2.lon)*1.0e-7
else:
Please sign in to comment.
Something went wrong with that request. Please try again.