https://github.com/ktsu-dev/physics.earth
https://github.com/ktsu-dev/physics.earth
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/ktsu-dev/physics.earth
- Owner: ktsu-dev
- License: mit
- Created: 2024-06-17T04:25:32.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-25T06:01:29.000Z (about 1 year ago)
- Last Synced: 2025-03-25T07:19:32.367Z (about 1 year ago)
- Language: PowerShell
- Size: 203 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
- Authors: AUTHORS.md
Awesome Lists containing this project
README
# ktsu.Physics.Earth
The `ktsu.Physics.Earth` library provides a set of classes and methods to work with Earth's physical properties and calculations, including gravity, radius, mass, and volume. It also offers methods for computing gravity at different altitudes and related geophysical quantities.
## Features
- **Gravity at Sea Level**: `Earth.GravityAtSeaLevel`
- **Earth's Radius, Diameter, and Circumference**: `Earth.Radius`, `Earth.Diameter`, `Earth.Circumference`
- **Earth's Mass and Volume**: `Earth.Mass`, `Earth.Volume`
- **Earth's Average Density**: `Earth.Density`
- **Geophysical Calculations**:
- Gravity at Geometric and Geopotential Altitudes: `Earth.GravityAtAltitude`, `Earth.GravityAtGeopotentialAltitude`
- Geopotential Altitude Calculation: `Earth.GeopotentialAltitude`
- Reciprocal Relative Altitude Calculation: `Earth.ReciprocalRelativeAltitude`
## Installation
To install the `ktsu.Physics.Earth` library, use the following command:
```sh
dotnet add package ktsu.Physics.Earth
```
## Usage
### Basic Properties
```csharp
using ktsu.Physics.Earth;
using ktsu.PhysicalQuantity.Length;
var gravityAtSeaLevel = Earth.GravityAtSeaLevel;
var earthRadius = Earth.Radius;
var earthDiameter = Earth.Diameter;
var earthMass = Earth.Mass;
var earthVolume = Earth.Volume;
var earthDensity = Earth.Density;
```
### Geophysical Calculations
#### Gravity at Altitude
```csharp
var altitude = 1000.Meters();
var gravityAtAltitude = Earth.GravityAtAltitude(altitude);
```
#### Gravity at Geopotential Altitude
```csharp
var geopotentialAltitude = 1000.Meters();
var gravityAtGeopotentialAltitude = Earth.GravityAtGeopotentialAltitude(geopotentialAltitude);
```
#### Geopotential Altitude Calculation
```csharp
var geometricAltitude = 1000.Meters();
var geopotentialAltitude = Earth.GeopotentialAltitude(geometricAltitude);
```
#### Reciprocal Relative Altitude Calculation
```csharp
var altitude = 1000.Meters();
var reciprocalRelativeAltitude = Earth.ReciprocalRelativeAltitude(altitude);
```
## Contributing
Contributions are welcome! Please fork the repository and submit pull requests.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.