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

Commit 2c5bc9b

Browse files
committed
Use assignment instead of memcpy.
1 parent d848892 commit 2c5bc9b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ephemeris.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ static s8 calc_sat_state_xyz(const ephemeris_t *e, const gps_time_t *t,
5050
double pos[3], double vel[3],
5151
double *clock_err, double *clock_rate_err)
5252
{
53-
// TODO should t be in GPS or SBAS time?
54-
// TODO what is the SBAS valid ttime interval?
53+
/* TODO should t be in GPS or SBAS time? */
54+
/* TODO what is the SBAS valid ttime interval? */
5555

5656
const ephemeris_xyz_t *ex = &e->xyz;
5757

@@ -68,8 +68,8 @@ static s8 calc_sat_state_xyz(const ephemeris_t *e, const gps_time_t *t,
6868
pos[2] = ex->pos[2] + ex->vel[2] * dt +
6969
0.5 * ex->acc[2] * pow(dt, 2);
7070

71-
memcpy(clock_err, &(ex->a_gf0), sizeof(*clock_err));
72-
memcpy(clock_rate_err, &(ex->a_gf1), sizeof(*clock_rate_err));
71+
*clock_err = ex->a_gf0;
72+
*clock_rate_err = ex->a_gf1;
7373

7474
return 0;
7575
}

0 commit comments

Comments
 (0)