Skip to content

Avoid using single char name #30

@azzamsa

Description

@azzamsa

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions