DotNet.Astronomy.Class.BodyPhysics - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki

EliteDangerousAlmanac / Astronomy / BodyPhysics

Class: BodyPhysics

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/BodyPhysics.cs:31

What a scanned body weighs, how dense it is, and what it pulls on.

Remarks

Every calculation reads the figures the scan states, and answers null where the body states none it can use. A journal writes zero for a figure it does not have, so a figure of zero is read as an absent one wherever a calculation needs it above zero.

The maths is ported from the Canonn Research Group's canonn-signals. See ATTRIBUTIONS.md for credit and licence terms.

Fields

GravitationalConstant

const GravitationalConstant: double = 6.6743e-11

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/BodyPhysics.cs:34

The gravitational constant, in cubic metres a kilogram a second squared.

KilogramsPerEarthMass

const KilogramsPerEarthMass: double = 5.972e24

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/BodyPhysics.cs:37

One Earth mass in kilograms.

KilogramsPerSolarMass

const KilogramsPerSolarMass: double = 1.989e30

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/BodyPhysics.cs:40

One solar mass in kilograms.

Methods

BulkDensity()

static BulkDensity(body): double?

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/BodyPhysics.cs:65

How dense one body is, in kilograms a cubic metre.

Parameters

body

BodyProperties

The body, as a scan states it.

Returns

double?

The density, or null where the body states no mass or no radius.

Exceptions

ArgumentNullException

The body is absent.

HillRadius()

static HillRadius(body, primary): double?

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/BodyPhysics.cs:131

How far one body holds satellites of its own, in metres.

Parameters

body

BodyProperties

The body, as a scan states it.

primary

BodyProperties

The body it orbits, as a scan states it.

Returns

double?

The radius, or null where either body states too little.

Exceptions

ArgumentNullException

Either body is absent.

Mass()

static Mass(body): double?

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/BodyPhysics.cs:53

What one body weighs, in kilograms.

Parameters

body

BodyProperties

The body, as a scan states it.

Returns

double?

The mass, or null where the body states neither Earth masses nor solar masses.

Remarks

A planet states Earth masses and a star states solar masses.

Exceptions

ArgumentNullException

The body is absent.

PrimaryAngularDiameter()

static PrimaryAngularDiameter(body, primary): double?

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/BodyPhysics.cs:156

How wide the body it orbits looks from one body, in degrees.

Parameters

body

BodyProperties

The body being looked from, as a scan states it.

primary

BodyProperties

The body being looked at, as a scan states it.

Returns

double?

The angular diameter, or null where either body states too little.

Exceptions

ArgumentNullException

Either body is absent.

RocheLimits()

static RocheLimits(satellite, primary): RocheLimits?

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/BodyPhysics.cs:115

Where one body pulls another apart.

Parameters

satellite

BodyProperties

The body being pulled, as a scan states it.

primary

BodyProperties

The body doing the pulling, as a scan states it.

Returns

RocheLimits?

The two limits, or null where either body states too little.

Exceptions

ArgumentNullException

Either body is absent.

RocheLimitsForDensity()

static RocheLimitsForDensity(primary, satelliteDensityKgM3): RocheLimits?

Defined in: dotnet/src/EliteDangerousAlmanac/Astronomy/BodyPhysics.cs:82

Where one body pulls apart a satellite of a stated density.

Parameters

primary

BodyProperties

The body doing the pulling, as a scan states it.

satelliteDensityKgM3

double

The satellite's density, in kilograms a cubic metre.

Returns

RocheLimits?

The two limits, or null where the primary states no radius or no mass.

Exceptions

ArgumentNullException

The primary is absent.

ArgumentOutOfRangeException

The satellite density is not a finite figure above zero.

⚠️ **GitHub.com Fallback** ⚠️