Package geoMag

Class MagneticVariation

java.lang.Object
geoMag.MagneticVariation

public class MagneticVariation extends Object
Wrapper class around other available magnetic variation models so that I can switch to other models easily should the need arise. Currently just works with the TSAGeoMag class.
Author:
Doug Gillespie
  • Method Details

    • getInstance

      public static MagneticVariation getInstance()
    • getVariation

      public double getVariation(GpsData gpsData)
      Get the magnetic variation for a GPS location and time
      Parameters:
      gpsData - gps data (contains time and position information)
      Returns:
      magnetic variation in degrees
    • getVariation

      public double getVariation(long timeMilliseconds, double dLat, double dLong)
      Return the magnetic variation for a time and place
      Parameters:
      timeMilliseconds - time in Java milliseconds
      dLat - latitude in decimal degrees
      dLong - longitude in decimal degrees
      Returns:
      magnetic variation in degrees