westphae / geomag Goto Github PK
View Code? Open in Web Editor NEWGolang implementation of the NOAA World Magnetic Model
License: MIT License
Golang implementation of the NOAA World Magnetic Model
License: MIT License
So sorry to open an issue for this, but you don't have discussions enabled. Could you please let me know where you found your WMM2020_TEST_VALUES.txt data? I am writing my own version of this, and can only find the WMM2020testvalues.pdf
file that came with the Legacy C app.
Hi, pkg.go.dev maintainer here. This is a response to your anonymous feedback from February 8. Apologies for the delay.
We get all our module information from the proxy (proxy.golang.org). So whenever you or anyone else go get
s a version of your module through the proxy (which is the default setting for go get
), then we'll soon see it and process it.
So if you just run go get github.com/westphae/[email protected]
, it should show up on pkg.go.dev shortly.
We're working on a better system, where you can click a button on the site to fetch a new version.
func GetGEOID(lat, lng float64) (float64, error) {
//in order to use package, has to move
loc := egm96.NewLocationGeodetic(lat, math.Mod(lng+360, 360), 0)
h, err := loc.HeightAboveMSL()
if err != nil {
return 0, err
}
geoid := -h
return geoid, nil
}
func MSLAltToW84Alt(lat, lng, msl_height float64) (float64, error) {
geoid, err := GetGEOID(lat, lng)
if err != nil {
return 0, err
}
return msl_height + geoid, nil
}
==================
WARNING: DATA RACE
Write at 0x00c039950ba0 by goroutine 73:
github.com/westphae/geomag/pkg/egm96.loadEGM96Grid()
C:/Users/chand/go/pkg/mod/github.com/westphae/[email protected]/pkg/egm96/egm96.go:264 +0x818
github.com/westphae/geomag/pkg/egm96.Location.HeightAboveMSL()
C:/Users/chand/go/pkg/mod/github.com/westphae/[email protected]/pkg/egm96/egm96.go:132 +0x68
bitbucket.org/anra-contract-support/wc-adsb-pingstation/common/utils.GetGEOID()
C:/Users/chand/Desktop/wc-adsb-pingstation/common/utils/altitude.go:28 +0x65
bitbucket.org/anra-contract-support/wc-adsb-pingstation/common/utils.MSLAltToW84Alt()
C:/Users/chand/Desktop/wc-adsb-pingstation/common/utils/altitude.go:10 +0x154
bitbucket.org/anra-contract-support/wc-adsb-pingstation/adsb/model.Traffic.ParseToAircraftState()
C:/Users/chand/Desktop/wc-adsb-pingstation/adsb/model/traffic.go:98 +0x13b
bitbucket.org/anra-contract-support/wc-adsb-pingstation/adsb.ProcessOneTraffic()
C:/Users/chand/Desktop/wc-adsb-pingstation/adsb/server_manager.go:79 +0xef
bitbucket.org/anra-contract-support/wc-adsb-pingstation/adsb.ProcessOneUDPMessage.func1()
C:/Users/chand/Desktop/wc-adsb-pingstation/adsb/server_manager.go:69 +0x124
Previous read at 0x00c039950ba0 by goroutine 273:
github.com/westphae/geomag/pkg/egm96.Location.HeightAboveMSL()
C:/Users/chand/go/pkg/mod/github.com/westphae/[email protected]/pkg/egm96/egm96.go:154 +0x4cf
bitbucket.org/anra-contract-support/wc-adsb-pingstation/common/utils.GetGEOID()
C:/Users/chand/Desktop/wc-adsb-pingstation/common/utils/altitude.go:28 +0x65
bitbucket.org/anra-contract-support/wc-adsb-pingstation/common/utils.MSLAltToW84Alt()
C:/Users/chand/Desktop/wc-adsb-pingstation/common/utils/altitude.go:10 +0x154
bitbucket.org/anra-contract-support/wc-adsb-pingstation/adsb/model.Traffic.ParseToAircraftState()
C:/Users/chand/Desktop/wc-adsb-pingstation/adsb/model/traffic.go:98 +0x13b
bitbucket.org/anra-contract-support/wc-adsb-pingstation/adsb.ProcessOneTraffic()
C:/Users/chand/Desktop/wc-adsb-pingstation/adsb/server_manager.go:79 +0xef
bitbucket.org/anra-contract-support/wc-adsb-pingstation/adsb.ProcessOneUDPMessage.func1()
C:/Users/chand/Desktop/wc-adsb-pingstation/adsb/server_manager.go:69 +0x124
Goroutine 73 (running) created at:
bitbucket.org/anra-contract-support/wc-adsb-pingstation/adsb.ProcessOneUDPMessage()
C:/Users/chand/Desktop/wc-adsb-pingstation/adsb/server_manager.go:69 +0x208
bitbucket.org/anra-contract-support/wc-adsb-pingstation/adsb.ProcessMessageChannel.func1()
C:/Users/chand/Desktop/wc-adsb-pingstation/adsb/server_manager.go:56 +0x118
Goroutine 273 (running) created at:
bitbucket.org/anra-contract-support/wc-adsb-pingstation/adsb.ProcessOneUDPMessage()
C:/Users/chand/Desktop/wc-adsb-pingstation/adsb/server_manager.go:69 +0x208
bitbucket.org/anra-contract-support/wc-adsb-pingstation/adsb.ProcessMessageChannel.func1()
C:/Users/chand/Desktop/wc-adsb-pingstation/adsb/server_manager.go:56 +0x118
==================
Currently the error model is hard-coded in the wmm package. It depends on the cof file, so really should be an asset.
Hello, i am begginer in Go and someone can tell me how i install this repo? please
Hi, I am very new to gis, but if I have lat, long, and a geometric altitude (above mean sea level), can I use this package to convert the geometric altitude to the wgs84 altitude or egm96 altitude?
lat, lng := 39.865315, -121.32870643118366
loc := egm96.NewLocationGeodetic(lat, lng, 0)
h, err := loc.HeightAboveMSL()
if err != nil {
log.Panicln("err", err)
}
however, I got:
2023/02/22 09:53:41 err requested longitude -121.33 lies outside of EGM96 longitude range 0.0 to 360.0
panic: err requested longitude -121.33 lies outside of EGM96 longitude range 0.0 to 360.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.