# CCP uses a non-standard factor to calculate light years
# See also: https://gitlab.com/ErikKalkoken/django-eveuniverse/-/issues/16
METERS_PER_LY = 9_460_000_000_000_000


def meters_to_ly(value: float) -> float | None:
    """Convert meters into lightyears."""
    return float(value) / METERS_PER_LY if value is not None else None
