-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
33564d8
commit c462077
Showing
8 changed files
with
98 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\VSOP2013.NET\VSOP2013.NET.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
using System.Text; | ||
using VSOP2013; | ||
namespace EphemerisGenerator | ||
{ | ||
internal class Program | ||
{ | ||
static Calculator s_calculator = new Calculator(); | ||
|
||
static void Main(string[] args) | ||
{ | ||
StringBuilder sb = new StringBuilder(); | ||
var enddate = new DateTime(2100, 1, 1); | ||
int lineCount = 0; | ||
using (StreamWriter writer = new StreamWriter("./ephemeris.csv",false)) | ||
{ | ||
writer.WriteLine("body,j2000,a,l,k,h,q,p"); | ||
foreach (VSOPBody body in Enum.GetValues(typeof(VSOPBody))) | ||
{ | ||
VSOPTime time = new VSOPTime(new DateTime(1900, 1, 1), TimeFrame.TDB); | ||
while (time.TDB < enddate) | ||
{ | ||
VSOPResult_ELL result = s_calculator.GetPlanetPosition_Native(body, time); | ||
sb.Clear(); | ||
sb.Append((int)body).Append(',').Append(time.J2000).Append(','); | ||
sb.Append(string.Join(", ", result.Variables_ELL)); | ||
writer.WriteLine(sb.ToString()); | ||
time._dt= time._dt.AddDays(1); | ||
lineCount++; | ||
if (lineCount % 1000==0) | ||
{ | ||
Console.WriteLine($"Output {lineCount} lines..."); | ||
} | ||
} | ||
|
||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters