Instructions for Programmatic Access

Using the programmatic interface
  • The calculator provides an easy way for you to get results in HTML, XML, or CSV programmatically. To use the programmatic interface, you just have to url-encode the form parameters into a GET request including the result format you want.
    The following is a list of parameters and the base url needed to perform a declination calculation programmatically.
    BASE URL: http://realtimepomme-geomag.elasticbeanstalk.com/
  • PARAMETERS
    !--->
    ParameterRequiredDefaultDescription
    decimalLat yes   decimal degrees or degrees minutes seconds: -90.0 to 90.0
    decimalLon yes   decimal degrees or degrees minutes seconds: -180.0 to 180.0
    altitude   0.0 height above WGS-84 ellipsoid of calculation location: -10 - 600 km
    elevationUnit   K units of elevation parameter: 'k', 'm', or 'f'
    model     which magnetic reference model to use: 'POMME'
    minYear   current year start year of calculation interval: 2000-2015
    minMonth   current month start month of calculation interval: 1 - 12
    minDay   current day start day of calculation interval: 1 - 31
    utc   current utc hour hour of calculation: 0 - 23
    minute   current minute minute of calculation: 0-59
    outputElement   D, Declination for csv output, the chosen magnetic element will be output: D, I, F, H, X, Y, Z

    EXAMPLE:
    An XML document with magnetic field values in Boulder once a year since today's date in 2010 to the present using the World Magnetic Model
    http://realtimepomme-geomag.elasticbeanstalk.com/?decimalLat=0&decimalLon=0&altitude=0&elevationUnit=k&minMonth=8&minDay=1&minYear=2015&UTC=10&minute=00
Feedback
  • We would like to hear from you. Use this link to submit your comments. This will help us to improve the online calculators. Registration is strongly recommended for developers.