Skip to content

Commit 196fc2d

Browse files
author
Michael S
committed
Fixed the note and the example.
1 parent 74218ce commit 196fc2d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Go Reference](https://pkg.go.dev/badge/github.com/proway2/go-igrf.svg)](https://pkg.go.dev/github.com/proway2/go-igrf)
44

55
# go-igrf
6-
Pure Go IGRF (International Geomagnetic Reference Field). This is based on the existing `C` implementation.
6+
Pure Go IGRF (International Geomagnetic Reference Field). This is based on the existing `C` implementation. This package computes values for the geomagnetic field and secular variation for a given set of coordinates and date.
77

88
## Inputs
99

@@ -63,8 +63,9 @@ import (
6363
)
6464

6565
func main() {
66-
res, _ := igrf.IGRF(46.9, 39.9, 0.0, 2021.5)
67-
fmt.Println(res)
66+
igrf_data := igrf.New()
67+
res, err := igrf_data.IGRF(46.9, 39.9, 0.0, 2021.5)
68+
fmt.Println(res, err)
6869
}
6970
```
7071

0 commit comments

Comments
 (0)