Home > wafo > misc > gravity.m

gravity

PURPOSE ^

returns the constant acceleration of gravity

SYNOPSIS ^

g=gravity(phi)

DESCRIPTION ^

  GRAVITY  returns the constant acceleration of gravity 
 
   CALL:  g = gravity(phi);
 
    g   =  acceleration of gravity in m/s^2 
    phi =  latitude in degrees (default 45 degrees) 
 
   GRAVITY calculates the acceleration of gravity 
   using the international gravitational formulae:
 
    g = 9.78049*(1+0.0052884*sin(phi).^2-0.0000059*sin(2*phi).^2);
 
   Edit GRAVITY.M to change default value for PHI.
 
  Example:%  
     g = gravity
  See also wdensity

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

001 function g=gravity(phi)
002 % GRAVITY  returns the constant acceleration of gravity 
003 %
004 %  CALL:  g = gravity(phi);
005 %
006 %   g   =  acceleration of gravity in m/s^2 
007 %   phi =  latitude in degrees (default 45 degrees) 
008 %
009 %  GRAVITY calculates the acceleration of gravity 
010 %  using the international gravitational formulae:
011 %
012 %   g = 9.78049*(1+0.0052884*sin(phi).^2-0.0000059*sin(2*phi).^2);
013 %
014 %  Edit GRAVITY.M to change default value for PHI.
015 %
016 % Example:%  
017 %    g = gravity
018 % See also wdensity
019 
020 % References:
021 % Irgens, Fridtjov (1987)
022 % "Formelsamling i mekanikk: 
023 % statikk, fasthetslære, dynamikk fluidmekanikk"
024 % tapir forlag, University of Trondheim , ISBN 82-519-0786-1, pp 19
025 
026 % history
027 % revised pab 06.01.2000
028 %  - added phi and international gravitational formulae.
029 %  - updated documentation
030 
031 if nargin<1 |isempty(phi)
032   phi=45;
033 end
034 phi=phi*pi/180; % change from degrees to radians
035 
036 g=9.78049*(1+0.0052884*sin(phi).^2-0.0000059*sin(2*phi).^2); 
037 %g=9.80665000000;
038

Mathematical Statistics
Centre for Mathematical Sciences
Lund University with Lund Institute of Technology

Comments or corrections to the WAFO group


Generated on Thu 06-Oct-2005 02:21:16 for WAFO by m2html © 2003