Code Monkey home page Code Monkey logo

go-igrf's People

Contributors

proway2 avatar testpersonal avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

go-igrf's Issues

Return warnings

Decide how to return and return warnings (there might be more than one) when e.g. horizontal intensity is weak. Check warn_* variables in C code.

Re-read coeffs

Re-read coeffs. Consider make it similar to those available at C implementation. Add degree and order for h.

Refactor `igrf.IGRF`

If igrf.IGRF called few times it reads SHC again and again every time. Refactor igrf.IGRF and come up with the approach that solves this, so that SHC is read once and used for any number of calculations.

Check `findDateFactor` function.

When date is higher than end_epoch the factor is calculated the very same way it's done in C implementation. However, this calculation doesn't respect leap years, although when date is lower than end_epoch, factor is calculated with respect to leap years.

Check if it's possible to improve accuracy by calculating factor with leap years when date is higher than end_epoch.

Add test data

Create an extensive set of fixtures for unittests. Including edge cases.

Improve test data

Testdata was created with FORTRAN, some values are coarse, especially all SV values. Allowed error (used in test cases) for this values is very high.

  • Check if it's possible to create more accurate testdata with C version.
  • Generate the new testdata
  • Implement a way to digest the new testdata and automatically create tests bases on it.
  • Refactor tests - decrease max allowed error for SV fields.

Near pole lats

Add tests for latitudes near North and South poles:

  • 89,9995
  • -89,9995

Calculate D, H, I, F and SVs

Calculate:
Declination| (D)
DeclinationSV
Inclination| (I)
InclinationSV
HzIntensity (H)
HorizontalSV
NorthSV (X)
EastSV (Y)
VerticalSV (Z)
TotalIntensity (F)
TotalSV (F)

Add comments

Add meaningful comments for private functions.

Read the COEFFs

  • Read the model coeffs;
  • Find coeffs by interpolation for a certain date.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.