#ifndef PLANET_OVERHEAD_H
#define PLANET_OVERHEAD_H

#include <stdbool.h>
#include <stdint.h>

#include "sam_m10q.h"

/*
 * planet is considered "overhead" when its altitude is greater than PLANET_OVERHEAD_ALT_DEG
 *   0.0f  = above the geometric horizon
 *   5.0f  = at least 5 degrees above the horizon
 *   20.0f = at least 20 degrees above the horizon
 */
#define PLANET_OVERHEAD_ALT_DEG  0.0

typedef enum
{
    PLANET_MERCURY = 0,
    PLANET_VENUS,
    PLANET_MOON,
    PLANET_MARS,
    PLANET_JUPITER,
    PLANET_SATURN,
    PLANET_URANUS,
    PLANET_NEPTUNE,
    PLANET_PLUTO,
    PLANET_COUNT
} planet_id_t;

typedef struct
{
    bool overhead[PLANET_COUNT];
    double altitude_deg[PLANET_COUNT];
} planet_overhead_result_t;


bool PlanetOverhead_Calculate(
    const SAM_M10Q_Data *gnss,
    planet_overhead_result_t *result);

#endif /* PLANET_OVERHEAD_H */