Skip to content
This repository was archived by the owner on Apr 13, 2021. It is now read-only.

Commit 0a1ac49

Browse files
Merge pull request #202 from ungureanuvladvictor/const_simulator_almanac
Changed almanac functions to take const pointers.
2 parents 5540453 + c98c776 commit 0a1ac49

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

include/libswiftnav/almanac.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ typedef struct {
3939

4040
/** \} */
4141

42-
void calc_sat_state_almanac(almanac_t* alm, double t, s16 week,
42+
void calc_sat_state_almanac(const almanac_t* alm, double t, s16 week,
4343
double pos[3], double vel[3]);
44-
void calc_sat_az_el_almanac(almanac_t* alm, double t, s16 week,
45-
double ref[3], double* az, double* el);
46-
double calc_sat_doppler_almanac(almanac_t* alm, double t, s16 week,
47-
double ref[3]);
44+
void calc_sat_az_el_almanac(const almanac_t* alm, double t, s16 week,
45+
const double ref[3], double* az, double* el);
46+
double calc_sat_doppler_almanac(const almanac_t* alm, double t, s16 week,
47+
const double ref[3]);
4848

4949
#endif /* LIBSWIFTNAV_ALMANAC_H */

src/almanac.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
* \param vel The satellite velocity in ECEF coordinates is returned in this
3737
* vector. Ignored if NULL.
3838
*/
39-
void calc_sat_state_almanac(almanac_t* alm, double t, s16 week,
39+
void calc_sat_state_almanac(const almanac_t* alm, double t, s16 week,
4040
double pos[3], double vel[3])
4141
{
4242
/* Seconds since the almanac reference epoch. */
@@ -135,8 +135,8 @@ void calc_sat_state_almanac(almanac_t* alm, double t, s16 week,
135135
* \param az Pointer to where to store the calculated azimuth output.
136136
* \param el Pointer to where to store the calculated elevation output.
137137
*/
138-
void calc_sat_az_el_almanac(almanac_t* alm, double t, s16 week,
139-
double ref[3], double* az, double* el)
138+
void calc_sat_az_el_almanac(const almanac_t* alm, double t, s16 week,
139+
const double ref[3], double* az, double* el)
140140
{
141141
double sat_pos[3];
142142
calc_sat_state_almanac(alm, t, week, sat_pos, 0);
@@ -155,8 +155,8 @@ void calc_sat_az_el_almanac(almanac_t* alm, double t, s16 week,
155155
* meters.
156156
* \return The Doppler shift in Hz.
157157
*/
158-
double calc_sat_doppler_almanac(almanac_t* alm, double t, s16 week,
159-
double ref[3])
158+
double calc_sat_doppler_almanac(const almanac_t* alm, double t, s16 week,
159+
const double ref[3])
160160
{
161161
double sat_pos[3];
162162
double sat_vel[3];

0 commit comments

Comments
 (0)