Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
CodeIsDataIsCode
sxtwl_cpp
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
sxtwl_cpp
/
src
/
const.h
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
46 lines (43 loc) · 1.56 KB
master
Breadcrumbs
sxtwl_cpp
/
src
/
const.h
Copy path
Top
File metadata and controls
Code
Blame
46 lines (43 loc) · 1.56 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#pragma
once
#include
<math.h>
//PI
#define
PI
(3.141592653589793)
//地球赤道半径(千米)
#define
cs_rEar
(6378.1366)
//平均半径
#define
cs_rEarA
(0.99834*cs_rEar)
//地球极赤半径比
#define
cs_ba
(0.99664719)
//地球极赤半径比的平方
#define
cs_ba2
(cs_ba*cs_ba)
//天文单位长度(千米)
#define
cs_AU
(1.49597870691e8)
//sin(太阳视差)
#define
cs_sinP
(cs_rEar / cs_AU)
//太阳视差
#define
cs_PI
( Math.asin(cs_sinP))
//光速(行米/秒)
#define
cs_GS
( 299792.458)
//每天文单位的光行时间(儒略世纪)
#define
cs_Agx
( cs_AU / cs_GS / 86400 / 36525)
//#define cs_xxHH ( new Array(116, 584, 780, 399, 378, 370, 367, 367)) //行星会合周期
//#define xxName ( new Array('地球', '水星', '金星', '火星', '木星', '土星', '天王星', '海王星', '冥王星'))
//每弧度的角秒数
#define
rad
( 180 * 3600 / PI)
//每弧度的度数
#define
radd
( 180 / PI)
#define
pi2
( PI * 2)
#define
pi_2
( PI / 2)
#define
J2000
( 2451545)
//
#define
cs_k
( 0.2725076) //月亮与地球的半径比(用于半影计算)
#define
cs_k2
( 0.2722810) //月亮与地球的半径比(用于本影计算)
#define
cs_k0
( 109.1222) //太阳与地球的半径比(对应959.64)
#define
cs_sMoon
( cs_k*cs_rEar*1.0000036*rad) //用于月亮视半径计算
#define
cs_sMoon2
( cs_k2*cs_rEar*1.0000036*rad) //用于月亮视半径计算
#define
cs_sSun
( 959.64) //用于太阳视半径计算
//转整型
//#define int2(v) ((v)>=0?(int)(v):((int)(v)-1))
#define
int2
(
v
) ((int)floor(v))
//求余
#define
fmod2
(
v
,
n
) ((v%n + n) % n)
You can’t perform that action at this time.