diff --git a/minmea.h b/minmea.h index 181d8c7..eb4202f 100644 --- a/minmea.h +++ b/minmea.h @@ -216,7 +216,7 @@ int minmea_gettime(struct timespec *ts, const struct minmea_date *date, const st /** * Rescale a fixed-point value to a different scale. Rounds towards zero. */ -static inline int_least32_t minmea_rescale(struct minmea_float *f, int_least32_t new_scale) +static inline int_least32_t minmea_rescale(const struct minmea_float *f, int_least32_t new_scale) { if (f->scale == 0) return 0; @@ -232,7 +232,7 @@ static inline int_least32_t minmea_rescale(struct minmea_float *f, int_least32_t * Convert a fixed-point value to a floating-point value. * Returns NaN for "unknown" values. */ -static inline float minmea_tofloat(struct minmea_float *f) +static inline float minmea_tofloat(const struct minmea_float *f) { if (f->scale == 0) return NAN; @@ -243,7 +243,7 @@ static inline float minmea_tofloat(struct minmea_float *f) * Convert a raw coordinate to a floating point DD.DDD... value. * Returns NaN for "unknown" values. */ -static inline float minmea_tocoord(struct minmea_float *f) +static inline float minmea_tocoord(const struct minmea_float *f) { if (f->scale == 0) return NAN;