Skip to content

Commit b844f26

Browse files
committed
updated the Astronomical unit system
- updated the default units (as per https://en.wikipedia.org/wiki/Astronomical_system_of_units) - fixed the docstring
1 parent d88e2e7 commit b844f26

File tree

5 files changed

+12
-15
lines changed

5 files changed

+12
-15
lines changed

Common/UnitDefinitions/Duration.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
},
7575
"FromUnitToBaseFunc": "x*24*3600",
7676
"FromBaseToUnitFunc": "x/(24*3600)",
77-
"UnitSystems": [ "SI", "CGS", "BI", "EE", "USC", "FPS" ],
77+
"UnitSystems": [ "SI", "CGS", "BI", "EE", "USC", "FPS", "Astronomical" ],
7878
"Localization": [
7979
{
8080
"Culture": "en-US",
@@ -175,7 +175,7 @@
175175
},
176176
{
177177
"UnitSystem": "Astronomical",
178-
"BaseUnit": "Second"
178+
"BaseUnit": "Day"
179179
}
180180
]
181181
}

Common/UnitDefinitions/Length.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@
387387
},
388388
{
389389
"UnitSystem": "Astronomical",
390-
"BaseUnit": "LightYear"
390+
"BaseUnit": "AstronomicalUnit"
391391
}
392392
]
393393
}

Common/UnitDefinitions/Mass.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@
286286
},
287287
{
288288
"UnitSystem": "Astronomical",
289-
"BaseUnit": "Kilogram"
289+
"BaseUnit": "SolarMass"
290290
}
291291
]
292292
}

UnitsNet/CustomCode/UnitSystems/Astronomical.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,14 @@
33
namespace UnitsNet.UnitSystems
44
{
55
/// <summary>
6-
/// The centimetre–gram–second system of units (abbreviated CGS or cgs) is a variant of the metric system based on the
7-
/// centimetre as the unit of length, the gram as the unit of mass, and the second as the unit of time. All CGS
8-
/// mechanical units are unambiguously derived from these three base units, but there are several different ways of
9-
/// extending the CGS system to cover electromagnetism.[1][2][3]
10-
/// The CGS system has been largely supplanted by the MKS system based on the metre, kilogram, and second, which was in
11-
/// turn extended and replaced by the International System of Units(SI). In many fields of science and engineering, SI
12-
/// is the only system of units in use but there remain certain subfields where CGS is prevalent.
6+
/// The astronomical system of units, formerly called the IAU System of Astronomical Constants, is a system of
7+
/// measurement developed for use in astronomy. It was adopted by the International Astronomical Union in 1976 via
8+
/// Resolution No. 1, and has been significantly updated in 1994 and 2009.
139
/// </summary>
1410
public partial class Astronomical : UnitSystem
1511
{
1612
/// <summary>
17-
/// Construct a new instance of the CGS unit system
13+
/// Construct a new instance of the Astronomical unit system
1814
/// </summary>
1915
public Astronomical() : base(new Lazy<UnitSystemInfo[]>(GetDefaultSystemUnits))
2016
{

UnitsNet/GeneratedCode/UnitSystems/Astronomical.g.cs

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)