space-physics / igrf

International Geomagnetic Reference Field IGRF13 in Python and Matlab
https://www.ngdc.noaa.gov/IAGA/vmod/
MIT License
66 stars 28 forks source link

Need help upgrading to 1.2 #1

Closed BlinkyStitt closed 6 years ago

BlinkyStitt commented 6 years ago

Hello, I just found this library through ardupilot. It looks like the API changes for 1.2 broke their code. I've opened an issue with them (https://github.com/ArduPilot/ardupilot/issues/8451), but am wondering if you have steps for migrating from older versions.

gridigrf12 changed and now the code is giving AttributeError: 'int' object has no attribute 'ravel'.

scivision commented 6 years ago

I did an ArduPilot pull request to fix this issue. I think you can just copy the generate.py into your directory to make it work.

BlinkyStitt commented 6 years ago

Thank you!

On May 23, 2018, at 2:36 AM, Michael Hirsch, Ph.D. notifications@github.com wrote:

I did an ArduPilot pull request to fix this issue. I think you can just copy the generate.py into your directory to make it work.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

scivision commented 6 years ago

Note: In v1.3.1 (released just now) I include the inclination and declination computations as part of the normal output. I did a new pull request for Ardupilot, further simplifying their code.