- Main Page
- Classes
- Files

- File List

# C:/Users/Andreas Schiffler/Desktop/SVN/NewGamePhysics/NewGamePhysics/Physics/GravityMarsNormalModel.cs

    00001 ﻿// --------------------------------------------------------
    00002 // GravityMarsNormalModel.cs
    00003 // (A. Schiffler, 2009)
    00004 // --------------------------------------------------------
    00005
    00006 namespace NewGamePhysics.Physics
    00007 {
    00008     using System;
    00009     using System.Collections.Generic;
    00010     using System.Linq;
    00011     using System.Text;
    00012
    00016     public class GravityMarsNormalModel
    00017     {
    00018
    00019         // Mars Equatorial gravity (m/sec2)
    00020         // Reference:
    00021         // http://www.wolframalpha.com/input/?i=equatorial+gravity+on+mars
    00022         public const double EquatorialGravity = 3.71;
    00023
    00024         // Mars Ellipsoid Semi-Major Axis (km)
    00025         // Reference:
    00026         // http://pds-geosciences.wustl.edu/mro/mro-m-rss-5-sdp-v1/mrors_1xxx/data/rsdmap/
    00027         public const double SemiMajorAxis = 3396.0;
    00028
    00029         // Mars Ellipsoid Semi-Major Axis (JPL) (km)
    00030         // Reference:
    00031         // http://pds-geosciences.wustl.edu/mro/mro-m-rss-5-sdp-v1/mrors_1xxx/data/rsdmap/
    00032         public const double SemiMajorAxisJpl = 3397.0;
    00033
    00034         // Mars Ellipsoid Gravity constant (m**3/s**2)
    00035         // Reference:
    00036         // http://pds-geosciences.wustl.edu/mro/mro-m-rss-5-sdp-v1/mrors_1xxx/data/rsdmap/
    00037         public const double GM = 4.282837519531400e+13;
    00038
    00039         // Mars Ellipsoid Gravity constant (JPL) (m**3/s**2)
    00040         // Reference:
    00041         // http://pds-geosciences.wustl.edu/mro/mro-m-rss-5-sdp-v1/mrors_1xxx/data/rsdmap/
    00042         public const double GMJpl = 42828.35796; // km**3/s**2
    00043
    00044         // Mars Ellipsoid Rotation rate (rad/s)
    00045         // Reference:
    00046         // http://pds-geosciences.wustl.edu/mro/mro-m-rss-5-sdp-v1/mrors_1xxx/data/rsdmap/
    00047         public const double RotationRate = 7.088218066303858e-05; // rad/s
    00048
    00049         // Mars Ellipsoid Rotation rate (JPL) (rad/s)
    00050         // Reference:
    00051         // http://pds-geosciences.wustl.edu/mro/mro-m-rss-5-sdp-v1/mrors_1xxx/data/rsdmap/
    00052         public const double RotationRateJpl = 7.088218081e-5; // rad/s
    00053
    00054         // Mars Ellipsoid Inverse of Flattening
    00055         // Reference:
    00056         // http://pds-geosciences.wustl.edu/mro/mro-m-rss-5-sdp-v1/mrors_1xxx/data/rsdmap/
    00057         public const double InverseFlattening = 196.877360;
    00058
    00059         // Mars Ellipsoid Flattening
    00060         // Reference:
    00061         // http://pds-geosciences.wustl.edu/mro/mro-m-rss-5-sdp-v1/mrors_1xxx/data/rsdmap/
    00062         public const double Flattening = 5.079304192e-3;
    00063
    00074         public static double Calculate(double latitude)
    00075         {
    00076             // Model gravity for ellipse
    00077             double latRad = latitude * Math.PI / 180.0;
    00078             double sinLat = Math.Sin(latRad);
    00079             double sin2Lat = Math.Sin(2.0 * latRad);
    00080             double sinLat2 = sinLat * sinLat;
    00081             double sin2Lat2 = sin2Lat * sin2Lat;
    00082             double value = 3.7114219 + 0.02400635 * sinLat2 - 4.2212837e-5 * sin2Lat2;
    00083             return value;
    00084         }
    00085     }
    00086 }