Skip to content

Commit

Permalink
Create TrochoidalWave.h
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrouch authored Aug 29, 2024
1 parent e40090a commit 1751e73
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions bbn_wave_freq_m5atomS3/TrochoidalWave.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#ifndef TrochoidalWave_h
#define TrochoidalWave_h

/*
See https://bareboat-necessities.github.io/my-bareboat/bareboat-math.html
*/

double trochoid_wave_length(double periodSec);

const double g_std = 9.80665; // standard gravity acceleration m/s2

double trochoid_wave_length(double periodSec) {
double lengthMeters = g_std * periodSec * periodSec / (2 * PI);
return lengthMeters;
}

#endif

0 comments on commit 1751e73

Please sign in to comment.