Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid using single char name #30

Open
azzamsa opened this issue Dec 17, 2022 · 0 comments
Open

Avoid using single char name #30

azzamsa opened this issue Dec 17, 2022 · 0 comments

Comments

@azzamsa
Copy link
Contributor

azzamsa commented Dec 17, 2022

Hi, Abdelhak.

I plan to refactor my Rust port. Primarily the baselib.
I am having a hard time understanding the equation because of single variable names such:

Are you able to rename those single-char names to a more descriptive name?

def equation_of_time(jd):
    '''Get equation of time'''
    n = jd - 2451544.5
    g = 357.528 + 0.9856003 * n
    c = 1.9148 * dsin(g) + 0.02 * dsin(2 * g) + 0.0003 * dsin(3 * g)
    lamda = 280.47 + 0.9856003 * n + c
    r = (-2.468 * dsin(2 * lamda)
         + 0.053 * dsin(4 * lamda)
         + 0.0014 * dsin(6 * lamda))
    return (c + r) * 4

jd would be julian_day, but I have no clue about n, g, c, etc.
Is the source also using a single char name?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant