summaryrefslogtreecommitdiff
path: root/subframe.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2011-01-04 21:22:21 -0800
committerGary E. Miller <gem@rellim.com>2011-01-04 21:22:21 -0800
commit8f44230270cc62ab82e26e4fb84d72ca64a0ed73 (patch)
treeda7ac3305c5391eb143c42923f944a63d664f6db /subframe.c
parent1439e3701dccbb7034eff932ff9b5ba5392088e7 (diff)
parent73bf602a91273acfce1dc9e6f5b425b4e588cca9 (diff)
downloadgpsd-8f44230270cc62ab82e26e4fb84d72ca64a0ed73.tar.gz
Merge branch 'master' of ssh://git.berlios.de/gitroot/gpsd
Diffstat (limited to 'subframe.c')
-rw-r--r--subframe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/subframe.c b/subframe.c
index 680bf9e4..ffc5e24f 100644
--- a/subframe.c
+++ b/subframe.c
@@ -105,7 +105,7 @@ static void subframe_almanac(unsigned int tSVID, uint32_t words[],
almp->d_omega = pow(2.0, -23) * almp->omega;
almp->M0 = ( words[8] & 0x00FFFFFF);
almp->M0 = uint2int(almp->M0, 24);
- almp->d_M0 = pow(2.0,-23) * almp->M0;
+ almp->d_M0 = pow(2.0,-23) * almp->M0 * GPS_PI;
almp->af1 = ((words[9] >> 5) & 0x0007FF);
almp->af1 = uint2int(almp->af1, 11);
almp->d_af1 = pow(2.0,-38) * almp->af1;
@@ -250,7 +250,7 @@ gps_mask_t gpsd_interpret_subframe(struct gps_device_t *session,
subp->sub2.M0 <<= 24;
subp->sub2.M0 |= ( words[4] & 0x00FFFFFF);
subp->sub2.M0 = uint2int(subp->sub2.M0, 24);
- subp->sub2.d_M0 = pow(2.0,-31) * subp->sub2.M0;
+ subp->sub2.d_M0 = pow(2.0,-31) * subp->sub2.M0 * GPS_PI;
subp->sub2.Cuc = ((words[5] >> 8) & 0x00FFFF);
subp->sub2.d_Cuc = pow(2.0,-29) * subp->sub2.Cuc;
subp->sub2.e = ( words[5] & 0x0000FF);