geomag 0.2.0 geomag: ^0.2.0 copied to clipboard
Translate GPS location data to geo-magnetic data such as magnetic declination.
import 'package:geomag/geomag.dart';
// See also the Flutter example: ...geomag/example/flutter
main(List<String> args) {
final geomag = GeoMag();
final result = geomag.calculate(double.parse(args[0]), double.parse(args[1]),
double.parse(args.length > 2 ? args[2] : '0'));
print('Result: $result');
print('Declination: ${result.dec}');
}