Class to represent gravity. More...
Public Member Functions | |
| GravityCalculator () | |
| Constructs the gravity object for earth. | |
| GravityCalculator (CelestialObject body) | |
| Constructs the gravity object for a celestial object. | |
| string | GetModelInfo () |
| Returns information on the current gravity model for the selected celestial object. | |
Public Attributes | |
| const double | G = 6.67428e-11 |
| The gravitational constant in units of m^3 kg^-1 s^-2. | |
| const double | StandardBouguerDensity = 2670.0 |
| Nominally averaged crustal density of the earth in kg m^-3 used in Bouguer correction. | |
Properties | |
| EarthGravityModel | EarthGravityModel [get, set] |
| Gets or sets the mathematical model used when correcting for location when the simulated body is earth. Sets the simulated body to be earth and updates g value. | |
| MarsGravityModel | MarsGravityModel [get, set] |
| Gets or sets the mathematical model used when correcting for location when the simulated body is mars. Sets the simulated body to be mars and updates g value. | |
| EarthGravityAnomaly | EarthGravityAnomaly [get, set] |
| Gets or sets the anomaly calculation to use when correcting for height and/or elevation when the simulated body is earth. Some models ('Hd') already incorporate the 'fac' anomaly. | |
| double | Value [get] |
| Gets or sets the gravitational field value in units of m/sec^2. | |
| double | Latitude [get, set] |
| Gets or sets the latitude of the observer in degrees. Value range -90.0 to 90.0 degrees. | |
| double | Longitude [get, set] |
| Gets or sets the longitude of the observer in degrees. Value range 0.0 to 360.0 degrees. | |
| double | Elevation [get, set] |
| Gets or sets the elevation of the observer in meters above sea level. Maybe adjusts ground elevation for consistency. Value range 0 to 1000000 meters. | |
| double | GroundElevation [get, set] |
| Gets or sets the height of the ground in meters above sea level. Maybe adjusts elevation for consistency. Value range 0 to 10000 meters. | |
Class to represent gravity.
Definition at line 182 of file GravityCalculator.cs.
| NewGamePhysics.Physics.GravityCalculator.GravityCalculator | ( | ) |
Constructs the gravity object for earth.
Definition at line 488 of file GravityCalculator.cs.
| NewGamePhysics.Physics.GravityCalculator.GravityCalculator | ( | CelestialObject | body | ) |
Constructs the gravity object for a celestial object.
| body | The celestial object to represent. |
Definition at line 497 of file GravityCalculator.cs.
00498 { 00499 // Initialize earth models 00500 this.wgsModel = new GravityEarthWgsModel(); 00501 this.grsModel = new GravityEarthGrsModel(); 00502 this.gfcGrid = new GravityEarthGfcGrid(); 00503 this.gfcModel = new GravityEarthGfcModel(); 00504 00505 // Initialize mars models 00506 this.mroModel = new GravityMarsMroModel(); 00507 00508 // Initialize instance state 00509 this.simulatedBody = body; 00510 this.earthGravityModel = EarthGravityModel.None; 00511 this.earthGravityAnomaly = EarthGravityAnomaly.None; 00512 this.marsGravityModel = MarsGravityModel.None; 00513 this.latitude = 0.0; 00514 this.elevation = 0.0; 00515 this.groundElevation = 0.0; 00516 00517 // Initialize current value 00518 this.UpdateValue(); 00519 }
| string NewGamePhysics.Physics.GravityCalculator.GetModelInfo | ( | ) |
Returns information on the current gravity model for the selected celestial object.
Definition at line 526 of file GravityCalculator.cs.
00527 { 00528 StringBuilder sb = new StringBuilder(); 00529 00530 switch (this.simulatedBody) 00531 { 00532 case CelestialObject.Sun: 00533 sb.AppendLine("Model: Fixed value."); 00534 sb.AppendLine("Source: http://www.wikipedia.org [Earth's Gravity]"); 00535 break; 00536 case CelestialObject.Mercury: 00537 sb.AppendLine("Model: Fixed value."); 00538 sb.AppendLine("Source: http://www.wikipedia.org [Earth's Gravity]"); 00539 break; 00540 case CelestialObject.Venus: 00541 sb.AppendLine("Model: Fixed value."); 00542 sb.AppendLine("Source: http://www.wikipedia.org [Earth's Gravity]"); 00543 break; 00544 case CelestialObject.Earth: 00545 switch (this.earthGravityModel) 00546 { 00547 case EarthGravityModel.None: 00548 sb.AppendLine("Model: Fixed value."); 00549 sb.AppendLine("Source: http://www.wikipedia.org [Earth's Gravity]"); 00550 break; 00551 case EarthGravityModel.FolkPhysics: 00552 sb.AppendLine("Model: Commonly used fixed value."); 00553 break; 00554 case EarthGravityModel.Igf67: 00555 sb.AppendLine("Model: Geodetic Reference System from 1967 (Version provided by IGF)."); 00556 sb.AppendLine("Source: http://geophysics.ou.edu/solid_earth/notes/potential/igf.htm"); 00557 break; 00558 case EarthGravityModel.Grs80: 00559 sb.AppendLine("Model: The GRS 80 geodetic system."); 00560 sb.AppendLine("Source: http://bgi.cnes.fr:8110"); 00561 break; 00562 case EarthGravityModel.Grs80Hd: 00563 sb.AppendLine("Model: High-res calculation of the geodetic reference system (GRS 80)"); 00564 sb.AppendLine("Applies height correction."); 00565 sb.AppendLine("Source: Hofmann-Wellenhof/Moritz, Physical Godesy, 2006."); 00566 break; 00567 case EarthGravityModel.Wgs84: 00568 sb.AppendLine("Model: World Geodetic System 84 Ellipsoidal Gravity Formula"); 00569 sb.AppendLine("Source: http://www.wikipedia.org [Earth's Gravity]"); 00570 break; 00571 case EarthGravityModel.Wgs84Hd: 00572 sb.AppendLine("Model: High-res calculation of the World Geodetic System (WGS 84)"); 00573 sb.AppendLine("Applies height correction."); 00574 sb.AppendLine("Source: Hofmann-Wellenhof/Moritz, Physical Godesy, 2006."); 00575 break; 00576 case EarthGravityModel.GfcGrid: 00577 sb.AppendLine("Model: Grid interpolator of earths gravity based on data from"); 00578 sb.AppendLine("the International Center for Global Earth Models (ICGEM)."); 00579 sb.AppendLine("Grid based on eigen5c model with a 1 degree resolution."); 00580 sb.AppendLine("Source: http://icgem.gfz-potsdam.de/ICGEM/ICGEM.html"); 00581 break; 00582 case EarthGravityModel.Ggm03sModel: 00583 sb.AppendLine("Model: Satellite only mean Earth Gravity Model from GRACE satellite"); 00584 sb.AppendLine("GGM03S is an unconstrained global gravity model complete to degree and order 180"); 00585 sb.AppendLine("accelerometer data. 47 months of GRACE data for the period from January 2003"); 00586 sb.AppendLine("through December 2006 were used (January 2004 excluded). The GRACE atmosphere-ocean"); 00587 sb.AppendLine("de-aliasing product (AOD1B) was used, but the mean of the AOD1B for the 47 months"); 00588 sb.AppendLine("has been restored so that GGM03S represents the true mean field."); 00589 sb.AppendLine("Source: http://icgem.gfz-potsdam.de/ICGEM/ICGEM.html"); 00590 break; 00591 case EarthGravityModel.Eigen5cModel: 00592 sb.AppendLine("Model: A new global combined high-resolution GRACE-based gravity"); 00593 sb.AppendLine("field model of the GFZ-GRGS cooperation."); 00594 sb.AppendLine("The reference epoch of this gravity field model is 01 Oct 2004"); 00595 sb.AppendLine("Source: http://icgem.gfz-potsdam.de/ICGEM/ICGEM.html"); 00596 break; 00597 } 00598 break; 00599 case CelestialObject.Moon: 00600 sb.AppendLine("Model: Fixed value."); 00601 sb.AppendLine("Source: http://www.wikipedia.org [Earth's Gravity]"); 00602 break; 00603 case CelestialObject.Mars: 00604 switch (this.marsGravityModel) 00605 { 00606 case MarsGravityModel.None: 00607 sb.AppendLine("Model: Fixed value."); 00608 sb.AppendLine("Source: http://www.wikipedia.org [Earth's Gravity]"); 00609 break; 00610 case MarsGravityModel.Normal: 00611 sb.AppendLine("Model: Ellipsoid."); 00612 sb.AppendLine("Algorithm: Hofmann-Wellenhof/Moritz, Physical Godesy, 2006"); 00613 sb.AppendLine("Source: http://pds-geosciences.wustl.edu/mro/mro-m-rss-5-sdp-v1/mrors_1xxx/data/rsdmap/"); 00614 break; 00615 case MarsGravityModel.GgMro: 00616 sb.AppendLine("Model: GgMro 095A NASA GSFC Mars Reconnaissance Orbiter."); 00617 sb.AppendLine("A digital map of the Mars gravity anomalies derived from"); 00618 sb.AppendLine("spherical harmonic coefficients of the NASA GSFC MROMGM0032 Mars gravity field"); 00619 sb.AppendLine("Source: http://pds-geosciences.wustl.edu/mro/mro-m-rss-5-sdp-v1/mrors_1xxx/data/rsdmap/"); 00620 break; 00621 } 00622 break; 00623 case CelestialObject.Jupiter: 00624 sb.AppendLine("Model: Fixed value."); 00625 sb.AppendLine("Source: http://www.wikipedia.org [Earth's Gravity]"); 00626 break; 00627 case CelestialObject.Io: 00628 sb.AppendLine("Model: Fixed value."); 00629 sb.AppendLine("Source: http://www.wikipedia.org [Io_(moon)]"); 00630 break; 00631 case CelestialObject.Europa: 00632 sb.AppendLine("Model: Fixed value."); 00633 sb.AppendLine("Source: http://www.wikipedia.org [Europa_(moon)]"); 00634 break; 00635 case CelestialObject.Ganymede: 00636 sb.AppendLine("Model: Fixed value."); 00637 sb.AppendLine("Source: http://www.wikipedia.org [Ganymede_(moon)]"); 00638 break; 00639 case CelestialObject.Callisto: 00640 sb.AppendLine("Model: Fixed value."); 00641 sb.AppendLine("Source: http://www.wikipedia.org [Callisto_(moon)]"); 00642 break; 00643 case CelestialObject.Saturn: 00644 sb.AppendLine("Model: Fixed value."); 00645 sb.AppendLine("Source: http://www.wikipedia.org [Earth's Gravity]"); 00646 break; 00647 case CelestialObject.Uranus: 00648 sb.AppendLine("Model: Fixed value."); 00649 sb.AppendLine("Source: http://www.wikipedia.org [Earth's Gravity]"); 00650 break; 00651 case CelestialObject.Neptune: 00652 sb.AppendLine("Model: Fixed value."); 00653 sb.AppendLine("Source: http://www.wikipedia.org [Earth's Gravity]"); 00654 break; 00655 } 00656 00657 return sb.ToString(); 00658 }
| const double NewGamePhysics.Physics.GravityCalculator.G = 6.67428e-11 |
The gravitational constant in units of m^3 kg^-1 s^-2.
Definition at line 187 of file GravityCalculator.cs.
| const double NewGamePhysics.Physics.GravityCalculator.StandardBouguerDensity = 2670.0 |
Nominally averaged crustal density of the earth in kg m^-3 used in Bouguer correction.
Source: http://gravmag.ou.edu/reduct/reduce.html
Definition at line 201 of file GravityCalculator.cs.
EarthGravityAnomaly NewGamePhysics.Physics.GravityCalculator.EarthGravityAnomaly [get, set] |
Gets or sets the anomaly calculation to use when correcting for height and/or elevation when the simulated body is earth. Some models ('Hd') already incorporate the 'fac' anomaly.
Definition at line 360 of file GravityCalculator.cs.
EarthGravityModel NewGamePhysics.Physics.GravityCalculator.EarthGravityModel [get, set] |
Gets or sets the mathematical model used when correcting for location when the simulated body is earth. Sets the simulated body to be earth and updates g value.
Definition at line 289 of file GravityCalculator.cs.
double NewGamePhysics.Physics.GravityCalculator.Elevation [get, set] |
Gets or sets the elevation of the observer in meters above sea level. Maybe adjusts ground elevation for consistency. Value range 0 to 1000000 meters.
Definition at line 431 of file GravityCalculator.cs.
double NewGamePhysics.Physics.GravityCalculator.GroundElevation [get, set] |
Gets or sets the height of the ground in meters above sea level. Maybe adjusts elevation for consistency. Value range 0 to 10000 meters.
Definition at line 461 of file GravityCalculator.cs.
double NewGamePhysics.Physics.GravityCalculator.Latitude [get, set] |
Gets or sets the latitude of the observer in degrees. Value range -90.0 to 90.0 degrees.
Definition at line 392 of file GravityCalculator.cs.
double NewGamePhysics.Physics.GravityCalculator.Longitude [get, set] |
Gets or sets the longitude of the observer in degrees. Value range 0.0 to 360.0 degrees.
Definition at line 411 of file GravityCalculator.cs.
MarsGravityModel NewGamePhysics.Physics.GravityCalculator.MarsGravityModel [get, set] |
Gets or sets the mathematical model used when correcting for location when the simulated body is mars. Sets the simulated body to be mars and updates g value.
Definition at line 327 of file GravityCalculator.cs.
double NewGamePhysics.Physics.GravityCalculator.Value [get] |
Gets or sets the gravitational field value in units of m/sec^2.
Definition at line 380 of file GravityCalculator.cs.
1.6.2