neaps / tide-predictor Goto Github PK
View Code? Open in Web Editor NEWJavascript tide predictor
Home Page: https://neaps.js.org
License: MIT License
Javascript tide predictor
Home Page: https://neaps.js.org
License: MIT License
Create audit tool using the @neaps/tide-database to report on stations where deviation is within test boundaries of 0.1 meters. This should be posted to website and updated daily
Thanks for you contribution. Was curious if you have any plans to support currents in addition to tides?
Add missing constituents - a handy definition is https://legacy.iho.int/mtg_docs/com_wg/IHOTC/IHOTC_Misc/TWCWG_Constituent_list.pdf
As in getExtremesPrediction
, IMHO, it would be beneficial to have a {timeFidelity} option in getTimelinePrediction
: not only the default 10min step is common, hourly prediction is quite common too.
https://github.com/neaps/tide-predictor/blob/main/src/index.js#L19
Hey, @kevee! Thanks for a great lib.
I'm playing with tide predictions and noticed that water levels generated by neaps/tide-predictor are quite different from the ones I can find in other tide predictors.
As an example I'm comparing the Monterey, CA tidal station, 2022-08-19
Neaps results:
High level at 2022-08-19T21:08:11.000Z
is 0.711727...
meters
Low level at 2022-08-19T17:28:11.000Z
is -0.0094...
meters
US Harbors results:
High level at 2022-08-19T00:13:00.000Z
is 1.55...
meters
Low level at 2022-08-19T17:31:00.000Z
is 0.85...
meters
So, while the time is pretty correct, the water levels looks offsetted compared to public predictions.
I can't get the offsets to work. Here is my code: const highLowTidesCowKey = TidePredictor(constituents, { phaseKey: 'phase_local', }).getExtremesPrediction({ timeFidelity: 60, start: new Date(formattedToday), end: new Date(formattedTodayLater), labels: { high: 'High tide', low: 'Low tide', }, offset: { height_offset: { high: 0.65, low: 0.71, }, time_offset: { high: 115, low: 125, }, }, })
And my constituents const constituents = [ {phase_local:281.9,amplitude:0.61,name:'M2',speed:28.984104}, {phase_local:298.2,amplitude:0.17,name:'S2',speed:30}, {phase_local:266.1,amplitude:0.12,name:'N2',speed:28.43973}, {phase_local:280.8,amplitude:0.3,name:'K1',speed:15.041069}, {phase_local:320.8,amplitude:0.03,name:'M4',speed:57.96821}, {phase_local:282.4,amplitude:0.31,name:'O1',speed:13.943035}, {phase_local:0,amplitude:0,name:'M6',speed:86.95232}, {phase_local:0,amplitude:0,name:'MK3',speed:44.025173}, {phase_local:0,amplitude:0,name:'S4',speed:60}, {phase_local:305.1,amplitude:0.02,name:'MN4',speed:57.423832}, {phase_local:271.3,amplitude:0.02,name:'NU2',speed:28.512583}, {phase_local:0,amplitude:0,name:'S6',speed:90}, {phase_local:227.2,amplitude:0.02,name:'MU2',speed:27.968208}, {phase_local:255.9,amplitude:0.02,name:'2N2',speed:27.895355}, {phase_local:279.2,amplitude:0.01,name:'OO1',speed:16.139101}, {phase_local:289.4,amplitude:0,name:'LAM2',speed:29.455626}, {phase_local:284.2,amplitude:0.02,name:'S1',speed:15}, {phase_local:281.6,amplitude:0.02,name:'M1',speed:14.496694}, {phase_local:280.4,amplitude:0.02,name:'J1',speed:15.5854435}, {phase_local:0,amplitude:0,name:'MM',speed:0.5443747}, {phase_local:56,amplitude:0.13,name:'SSA',speed:0.0821373}, {phase_local:187.5,amplitude:0.26,name:'SA',speed:0.0410686}, {phase_local:0,amplitude:0,name:'MSF',speed:1.0158958}, {phase_local:349.1,amplitude:0.04,name:'MF',speed:1.0980331}, {phase_local:271.9,amplitude:0.02,name:'RHO',speed:13.471515}, {phase_local:275.1,amplitude:0.08,name:'Q1',speed:13.398661}, {phase_local:284,amplitude:0.01,name:'T2',speed:29.958933}, {phase_local:298.9,amplitude:0,name:'R2',speed:30.041067}, {phase_local:262.5,amplitude:0.01,name:'2Q1',speed:12.854286}, {phase_local:283.9,amplitude:0.1,name:'P1',speed:14.958931}, {phase_local:0,amplitude:0,name:'2SM2',speed:31.015896}, {phase_local:0,amplitude:0,name:'M3',speed:43.47616}, {phase_local:307.7,amplitude:0.02,name:'L2',speed:29.528479}, {phase_local:0,amplitude:0,name:'2MK3',speed:42.92714}, {phase_local:301.9,amplitude:0.05,name:'K2',speed:30.082138}, {phase_local:0,amplitude:0,name:'M8',speed:115.93642}, {phase_local:312.5,amplitude:0.01,name:'MS4',speed:58.984104}, ];
npm install @neaps/tide-prediction does not work,
I'm guessing the name has been updated to tide-predictor
so it should be installed using npm install @neaps/tide-prediction
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.