GithubHelp home page GithubHelp logo

astroalgo-dll's Introduction

AstroAlgo

AstroAlgo is an astronomical algorithms library, written in .NET Standard. It can be used to calculate astronomical data, like equator and ecliptic coordinate, planet rise and down time, elevation angle... Planets data are based on the planetary theory VSOP87.

NuGet : https://www.nuget.org/packages/AstroAlgo/

Don't use it for scientific calculations.

Catalogue

Reference

How to Get

  • NuGet Package Manager
PM> Install-Package AstroAlgo -Version 1.0.3
  • Add AstroAlgo.dll to project

Introduction

  • Calculate the Julian day
  • Sidereal time and Zone time converter
  • Coordinate system basic tools, include nutation, coordinate converter...
  • Angle to HoursMinutesSeconds or to DegreeMinutesSeconds
  • Eight planets, in the solar system, rise and down time, equator coordinate, ecliptic coordinate...
  • ......

Code Map

Version History

2018-2-22 1.0.3

  • Now you can calculate solar terms
  • Fixed bugs

2017-9-24 1.0.2

  • Now you can custom timezone when initialize the objects of SolarSystem
  • Fixed many many many bugs...

2017-9-23 1.0.1

  • Improve equinoxes and solstices accuracy
  • ElevationAngle2Time() return "0:0:0" if time dose not exist

2017/9/16 1.0.0

First Version

How to Use

After add reference to project

Julian Day

// Julian to Calendar
double julian = Julian.ToJulianDay(DateTime.Now);
// Calendar to Julian
DateTime now = Julian.ToCalendarDay(julian);

Sidereal Time

// Zone Time, Local Zone, Longitude
double angle = SiderealTime.LocalSiderealTime(DateTime.Now, TimeZoneInfo.Local, 117.18);
string time = BasicTools.Angle2HMS(angle);

Console.WriteLine(time);

Ecliptic Obliquity

double angle = CoordinateSystem.EclipticObliquity(DateTime.Now);

Coordinate Converter

Equator equator = Sun.EquatorialCoordinate(DateTime.Now);
Ecliptic ecliptic = CoordinateSystem.Equatorial2Ecliptic(equator);

Console.WriteLine(ecliptic.Latitude);
Console.WriteLine(ecliptic.Longitude);

Planets Data

// Your latitude and longitude
Venus v = new Venus(34.27, 117.15, TimeZoneInfo.Local);

Console.WriteLine(v.Rise);
Console.WriteLine(v.Culmination);
Console.WriteLine(v.Down);
Console.WriteLine();

Console.WriteLine(v.ElevationAngle);
Console.WriteLine(v.Azimuth);
Console.WriteLine();

Console.WriteLine(v.ToSun);
Console.WriteLine(v.ToEarth);

astroalgo-dll's People

Contributors

zhanggaoxing avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

astroalgo-dll's Issues

local sidereal time off by 1 hour for Daylight savings time

Hello,

I'm currently using your c# library to calculate local sidereal time and it seems now that day light savings happened for MDT (7:00), its an hour off. I'm making the call like your documentation.

double angle = SiderealTime.LocalSiderealTime(DateTime.Now, TimeZoneInfo.Local, -104.98);
string time = BasicTools.Angle2HMS(angle);

It seems TimeZoneInfo.Local supports daylight savings it's an hour off.

Can you confirm this is an issue?

Thanks,
Scott Spiller

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.