VEphemeris 2.0.3
dotnet add package VEphemeris --version 2.0.3
NuGet\Install-Package VEphemeris -Version 2.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="VEphemeris" Version="2.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VEphemeris --version 2.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: VEphemeris, 2.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install VEphemeris as a Cake Addin
#addin nuget:?package=VEphemeris&version=2.0.3
// Install VEphemeris as a Cake Tool
#tool nuget:?package=VEphemeris&version=2.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
General information
VEphemeris is a class library, created for .NET 6.0 framework. VEphemeris provides full set of methods and properties for complex calculation of astronomical ephemerides (XEphem fuctionality).
Objects:
- Sun
- Moon
- Planets, Mercury - Pluto
- Comets
- Asteroids
- stars
Also VEphemeris contains methods for:
- Constellations
- Astrology chart data
Example code - console app
using GeoTimeZone; using TimeZoneConverter; using VEphemeris;
namespace VExample {
internal class Program
{
private static AstroDef.Now tdat;
private static AstroDef.Object pdat;
static void Main(string[] args)
{
string[] dw = new string[] { "Sun", "Mon", "Tue", "Wed", "Thr", "Fri", "Sat" };
int d = 0;
double dt, dis;
Console.WriteLine("VEphemeris Test");
//intialize struct tdat
int yr = DateTime.Now.Year;
int mn = DateTime.Now.Month;
double dy = DateTime.Now.Day;
double hr = DateTime.Now.Hour;
double mi = DateTime.Now.Minute;
tdat.site = WorldSites.sitetbl[0] + ", " + WorldSites.iso3tbl[0];
tdat.lng = AstroDef.degrad(WorldSites.lngtbl[0]);
tdat.lat = AstroDef.degrad(WorldSites.lattbl[0]);
string tzname = TimeZoneLookup.GetTimeZone(WorldSites.lattbl[0], WorldSites.lngtbl[0]).Result;
TimeZoneInfo tzinf = TZConvert.GetTimeZoneInfo(tzname);
tdat.tz = tzinf.DisplayName;
tdat.tzs = tzinf.BaseUtcOffset.Hours;
tdat.temp = 15;
tdat.elev = 91;
tdat.pressure = 751;
dt = dy + (hr + mi / 60) / 24; // local
JulianDate.cal_mjd(mn, dt, yr, ref tdat.mjd);
JulianDate.mjd_dow(tdat.mjd, ref d);
tdat.dayow = dw[d];
tdat.date = Utils.dateformat(tdat.mjd);
tdat.time = Utils.timeformat(tdat.mjd, 1);
tdat.mjd -= tdat.tzs / 24; //to UTC
tdat.mjed = Utils.mm_mjed(tdat.mjd);
GSiderealTime.lst(tdat.mjd, tdat.lng, ref tdat.lst);
Console.WriteLine(string.Format("Site: {0} Location lat/long: {1:00.0}/{2:000.0}",
tdat.site, AstroDef.raddeg(tdat.lat),
AstroDef.raddeg(tdat.lng)));
Console.WriteLine(string.Format("Date: {0} Time: {1}",
tdat.date + "," + tdat.dayow,
tdat.time + "," + tdat.tz));
//calculate struct pdat, print altitude, azimuth, rising and setting times
if (tdat.elev > 200)
dis = AstroDef.DIS_HILLS;
else
dis = AstroDef.DIS_TYPICAL;
pdat.object_type = AstroDef.PLANET;
for (int i = 0; i < Planets.numberof_planets(); i++)
{
pdat.object_id = i;
SkyObject.get_object_data(tdat, ref pdat);
RiseAndSet.get_rise_set_data(tdat, ref pdat, dis);
Console.WriteLine(string.Format("{0} - Alt: {1} Az: {2} Rise; {3} Set: {4}",
Planets.planet_name(i),
Utils.angleformat(pdat.altitude),
Utils.angleformat(pdat.azimuth),
Utils.timeformat(pdat.riseset.risetm + tdat.tzs / 24, 1),
Utils.timeformat(pdat.riseset.settm + tdat.tzs / 24, 1)));
}
}
}
}
- Hovhannisyan, 2022
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on VEphemeris:
Package | Downloads |
---|---|
AstroPx
Astronomy , astrology software |
GitHub repositories
This package is not used by any popular GitHub repositories.