Skip to content

Commit

Permalink
Added additional .csproj tags and additional documentation comments t…
Browse files Browse the repository at this point in the history
…o support the NuGet package.
  • Loading branch information
Jim Carr committed Feb 21, 2021
1 parent 799179a commit ca767ec
Show file tree
Hide file tree
Showing 17 changed files with 288 additions and 10 deletions.
10 changes: 10 additions & 0 deletions PALib/Data/BinaryData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

namespace PALib.Data
{
/// <summary>
/// Holds information about binary star systems.
/// </summary>
public class BinaryData
{
/// <summary>
Expand Down Expand Up @@ -46,6 +49,9 @@ public class BinaryData
public double PANode { get; set; }
}

/// <summary>
/// Binary star system data manager.
/// </summary>
public static class BinaryInfo
{
static List<BinaryData> _binaryData;
Expand Down Expand Up @@ -157,6 +163,10 @@ static BinaryInfo()
};
}

/// <summary>
/// Retrieve information about a specific binary star system.
/// </summary>
/// <returns></returns>
public static BinaryData GetBinaryInfo(string name)
{
var returnValue = _binaryData
Expand Down
81 changes: 81 additions & 0 deletions PALib/Data/CometData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,101 @@

namespace PALib.Data
{
/// <summary>
/// Information about a comet with an elliptical orbit.
/// </summary>
public class CometDataElliptical
{
/// <summary>
/// Name of comet
/// </summary>
public string Name { get; set; }

/// <summary>
/// Epoch of the perihelion
/// </summary>
public double epoch_EpochOfPerihelion { get; set; }

/// <summary>
/// Longitude of the perihelion
/// </summary>
public double peri_LongitudeOfPerihelion { get; set; }

/// <summary>
/// Longitude of the ascending node
/// </summary>
public double node_LongitudeOfAscendingNode { get; set; }

/// <summary>
/// Period of the orbit
/// </summary>
public double period_PeriodOfOrbit { get; set; }

/// <summary>
/// Semi-major axis of the orbit
/// </summary>
public double axis_SemiMajorAxisOfOrbit { get; set; }

/// <summary>
/// Eccentricity of the orbit
/// </summary>
public double ecc_EccentricityOfOrbit { get; set; }

/// <summary>
/// Inclination of the orbit
/// </summary>
public double incl_InclinationOfOrbit { get; set; }
}

/// <summary>
/// Information about a comet with a parabolic orbit.
/// </summary>
public class CometDataParabolic
{
/// <summary>
/// Name of the comet
/// </summary>
public string Name { get; set; }

/// <summary>
/// Epoch perihelion day
/// </summary>
public double EpochPeriDay { get; set; }

/// <summary>
/// Epoch perihelion month
/// </summary>
public int EpochPeriMonth { get; set; }

/// <summary>
/// Epoch perihelion year
/// </summary>
public int EpochPeriYear { get; set; }

/// <summary>
/// Arg perihelion
/// </summary>
public double ArgPeri { get; set; }

/// <summary>
/// Comet's node
/// </summary>
public double Node { get; set; }

/// <summary>
/// Distance at the perihelion
/// </summary>
public double PeriDist { get; set; }

/// <summary>
/// Inclination
/// </summary>
public double Incl { get; set; }
}

/// <summary>
/// Data manager for comets with elliptical orbits.
/// </summary>
public static class CometInfoElliptical
{
static List<CometDataElliptical> _cometDataElliptical;
Expand Down Expand Up @@ -188,6 +259,9 @@ static CometInfoElliptical()
};
}

/// <summary>
/// Get information about a comet with an elliptical orbit.
/// </summary>
public static CometDataElliptical GetCometEllipticalInfo(string name)
{
var returnValue = _cometDataElliptical
Expand All @@ -198,6 +272,10 @@ public static CometDataElliptical GetCometEllipticalInfo(string name)
return (returnValue == null) ? new CometDataElliptical() { Name = "NotFound" } : returnValue;
}
}

/// <summary>
/// Data manager for comets with parabolic orbits.
/// </summary>
public static class CometInfoParabolic
{
static List<CometDataParabolic> _cometDataParabolic;
Expand All @@ -218,6 +296,9 @@ static CometInfoParabolic()
};
}

/// <summary>
/// Get information about a comet with a parabolic orbit.
/// </summary>
public static CometDataParabolic GetCometParabolicInfo(string name)
{
var returnValue = _cometDataParabolic
Expand Down
58 changes: 58 additions & 0 deletions PALib/Data/PlanetData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@

namespace PALib.Data
{
/// <summary>
/// Information about a planet.
/// </summary>
public class PlanetData
{
/// <summary>
/// Name of planet.
/// </summary>
public string Name { get; set; }

/// <summary>
Expand Down Expand Up @@ -89,21 +95,70 @@ public class PlanetData
public double v0_VisualMagnitude { get; set; }
}

/// <summary>
/// Working data for precise planet calculations.
/// </summary>
public class PlanetDataPrecise
{
/// <summary>
/// Name of planet.
/// </summary>
public string Name { get; set; }

/// <summary>
/// Working value 1.
/// </summary>
public double Value1 { get; set; }

/// <summary>
/// Working value 2.
/// </summary>
public double Value2 { get; set; }

/// <summary>
/// Working value 3.
/// </summary>
public double Value3 { get; set; }

/// <summary>
/// Working value 4.
/// </summary>
public double Value4 { get; set; }

/// <summary>
/// Working value 5.
/// </summary>
public double Value5 { get; set; }

/// <summary>
/// Working value 6.
/// </summary>
public double Value6 { get; set; }

/// <summary>
/// Working value 7.
/// </summary>
public double Value7 { get; set; }

/// <summary>
/// Working value 8.
/// </summary>
public double Value8 { get; set; }

/// <summary>
/// Working value 9.
/// </summary>
public double Value9 { get; set; }

/// <summary>
/// Working AP value.
/// </summary>
public double APValue { get; set; }
}

/// <summary>
/// Data manager for planets.
/// </summary>
public static class PlanetInfo
{
static List<PlanetData> _planetData;
Expand Down Expand Up @@ -210,6 +265,9 @@ static PlanetInfo()
};
}

/// <summary>
/// Get information about a planet.
/// </summary>
public static PlanetData GetPlanetInfo(string name)
{
var returnValue = _planetData
Expand Down
7 changes: 3 additions & 4 deletions PALib/Helpers/MathExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace PALib.Helpers
{
/// <summary>
/// Extension methods for mathematical calculations.
/// </summary>
public static class MathExtensions
{
/// <summary>
Expand Down Expand Up @@ -48,8 +51,6 @@ public static double ASine(this double d)
/// <summary>
/// Returns the cosine of the specified angle.
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
public static double Cosine(this double d)
{
return Math.Cos(d);
Expand Down Expand Up @@ -79,8 +80,6 @@ public static double Log10(this double d)
/// <summary>
/// Returns the sine of the specified angle.
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
public static double Sine(this double a)
{
return Math.Sin(a);
Expand Down
3 changes: 3 additions & 0 deletions PALib/PABinary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

namespace PALib
{
/// <summary>
/// Binary star calculations.
/// </summary>
public class PABinary
{
/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions PALib/PAComet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

namespace PALib
{
/// <summary>
/// Comet calculations.
/// </summary>
public class PAComet
{
/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions PALib/PACoordinates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

namespace PALib
{
/// <summary>
/// Coordinate system calculations and conversions.
/// </summary>
public class PACoordinates
{
/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions PALib/PADateTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

namespace PALib
{
/// <summary>
/// Date and time calculations.
/// </summary>
public class PADateTime
{
/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions PALib/PAEclipses.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

namespace PALib
{
/// <summary>
/// Eclipse calculations.
/// </summary>
public class PAEclipses
{
/// <summary>
Expand Down
16 changes: 13 additions & 3 deletions PALib/PALib.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageId>PracticalAstronomyDotNet</PackageId>
<Version>1.0.2</Version>
<Authors>Jim Carr</Authors>
<Company>Good Guy Science</Company>
<Title>Algorithms from "Practical Astronomy with your Calculator or Spreadsheet"</Title>
<Description>
This library contains an implementation of the algorithms from the "Practical Astronomy with your Calculator or Spreadsheet" book, authored by Peter Duffet-Smith and Jonathan Zwart.
</Description>
<RepositoryUrl>https://github.com/jfcarr-astronomy/practical-astronomy-dotnet</RepositoryUrl>
</PropertyGroup>

</Project>
3 changes: 3 additions & 0 deletions PALib/PAMacros.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

namespace PALib
{
/// <summary>
/// Miscellaneous macro functions supporting the other classes.
/// </summary>
public static class PAMacros
{
/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions PALib/PAMoon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

namespace PALib
{
/// <summary>
/// Moon calculations.
/// </summary>
public class PAMoon
{
/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions PALib/PAPlanet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

namespace PALib
{
/// <summary>
/// Planet calculations.
/// </summary>
public class PAPlanet
{
/// <summary>
Expand Down
Loading

0 comments on commit ca767ec

Please sign in to comment.