-
Notifications
You must be signed in to change notification settings - Fork 109
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
More robust conversion #3
Comments
What about this as a conversion library: https://github.com/Dokko1230/conversion.js |
That would probably be worth looking at, thank you! |
Here are the formulas to convert different units of measure. The PDF comes from NOAA so I know they are correct. Based on the way these formulas are written I think we could easily do the conversions ourselves using pure JS. |
@PallasStreams, I think the way to go is to remove conversions entirely from this lib. Math.js has a nice and up to snuff set of converters that will likely be better than anything added to weather.js. What do you think? |
It's up to you, but I don't see the point of trying to remove all dependencies (i.e. jQuery and SugarJS) just to add another another dependency afterwards. Especially since almost all the conversions are just multiplying or dividing by one or two numbers. |
The goal of removing dependencies is primarily to trim down the size of the package and to make it easier to use in a production environment. As I mentioned in #10, a good conversion library will address some of the funny bits of converting units that I will probably get wrong in my implementation. It also allows users of weather.js to choose their own conversion library (perhaps they already have one). I'll think about it a little more, but I'm definitely leaning toward dropping all converters in favor of making a few recommendations. |
Issues #1 and #2 both deal with conversion. It may be best to solve both of these with a simple conversion library, either by suggesting an existing solution, or creating one.
The text was updated successfully, but these errors were encountered: