Code example for GeomagneticField

Methods: getDeclination

0
	        double alt = loc.getAltitude();
	        SessionStorage.set_lat(lat);
	        SessionStorage.set_lng(lng);
	         
	        //calculate and store the Magnetic Declination for the current location 
	        geoField = new GeomagneticField((float) (lat), (float) (lng), (float) (alt), System.currentTimeMillis());
	        SessionStorage.set_dec((float) Math.toRadians(geoField.getDeclination()));
	         
            // Run next activity 
	        Intent intent = new Intent();
            intent.setClass(sPlashScreen, GridViewMenu.class);
            startActivity(intent);
             
            //Turn off the GPS 
            locationManager.removeUpdates(locationListener);
             
            //Remove Splash Screen from Memory 
            finish();
	     }   
	   
	        @Override