Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model is only valid from Tue Dec 20 2019 to Tue Dec 10 2024 #8

Open
diego-betto opened this issue Dec 10, 2024 · 8 comments
Open

Model is only valid from Tue Dec 20 2019 to Tue Dec 10 2024 #8

diego-betto opened this issue Dec 10, 2024 · 8 comments

Comments

@diego-betto
Copy link

Hi,

today our app crashed with the message
"Model is only valid from Tue Dec 20 2019 to Tue Dec 10 2024"

How can we update the model or disable this error?

Thank you!

@diego-betto
Copy link
Author

Also please: warn that there is a time limit :)

@joshuagoran
Copy link

joshuagoran commented Dec 10, 2024

my org would also love to see this model updated, and going forward, politely request that errors are logged rather than crashing with the expired model error 🙏

to anyone else needing a stopgap, I found am successfully using the fork https://github.com/cristianob/geomagnetism as a replacement

@diego-betto
Copy link
Author

As a workaround, we have cloned the module and changed the expiry date.
https://github.com/naturalatlas/geomagnetism/blob/master/data/wmm-2020.json#L379

Let's see if the maintainer responds :)

@facetious
Copy link

This is a bug in implementation rather than outdated spec.

Please note: The World Magnetic Model 2025 will be released on December 17, 2024.
The model is produced at 5-year intervals, with the current model expiring on December 31, 2024.
Source: https://www.ncei.noaa.gov/products/world-magnetic-model

Hopefully the updated spec is integrated soon after it is released, as well.

@diego-betto
Copy link
Author

Nice catch! Thanks @facetious
Hopefully waiting :)

@alist
Copy link

alist commented Dec 11, 2024

Wonderful little y2k-style surprise here :)

If you can wait for the full fix...

  const magneticFieldInfo = geomagnetism
    .model(new Date(2024, 11, 9))
    .point([vehicleWaypoint.latitudeDeg, vehicleWaypoint.longitudeDeg]);

@cristianob
Copy link

cristianob commented Dec 11, 2024

NOAA will release the next World Magnetic Model on December 17th.

Until this date, we need to use the outdated model. My fork will only log a error instead of crashing as a temporary replacement.
https://github.com/cristianob/geomagnetism

Just do a
$ npm install @cristianob/geomagnetism --save

And change the imports to
import Geomagnetism from '@cristianob/geomagnetism'

On December 17th, I will release a new version on my fork and submit a PR here. I am hoping the author will update this library.

If the author don't update, I will mantain the library updated on my fork.
PS: My fork has a typescript typing that I will send a PR here too.

@cristianob
Copy link

NOAA will release the next World Magnetic Model on December 17th.

Until this date, we need to use the outdated model. My fork will only log a error instead of crashing as a temporary replacement. https://github.com/cristianob/geomagnetism

Just do a $ npm install @cristianob/geomagnetism --save

And change the imports to import Geomagnetism from '@cristianob/geomagnetism'

On December 17th, I will release a new version on my fork and submit a PR here. I am hoping the author will update this library.

If the author don't update, I will mantain the library updated on my fork. PS: My fork has a typescript typing that I will send a PR here too.

@diego-betto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants