Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kanchudeep authored Dec 11, 2017
1 parent c7e6bde commit 6ebc176
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ Java class to calculate magnetic declination, magnetic field strength, inclinati
// Create instance
Geomagnetism gm = new Geomagnetism(123.45678, 76.54321);
System.out.printf("Declination: %f\n", gm.getDeclination());
// Update instance
gm.calculate(98.76543, 12.34567);

// Create a calendar for calculation
Calendar calendar = Calendar.getInstance();
calendar.set(2017, 6, 1); // 2017 July 01
// Update instance wit altitude and date apart from location
gm.calculate(98.76543, 12.34567, 1234, calendar);
System.out.printf("Declination: %f\n", gm.getDeclination());
```

0 comments on commit 6ebc176

Please sign in to comment.