summaryrefslogtreecommitdiff
path: root/subframe.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2011-01-10 01:56:53 -0800
committerGary E. Miller <gem@rellim.com>2011-01-10 01:56:53 -0800
commit4764f5a9028e55378e04a79f8263e0e11edc06ac (patch)
treebd1788dbcb8e93960778327c5066888a42f75f43 /subframe.c
parentfa92454356bf5d5f0d6ef5b549542dbe5659c117 (diff)
downloadgpsd-4764f5a9028e55378e04a79f8263e0e11edc06ac.tar.gz
All the subframe data now has scaled/unscaled.
Diffstat (limited to 'subframe.c')
-rw-r--r--subframe.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/subframe.c b/subframe.c
index 5ccb70a3..b42d8f8d 100644
--- a/subframe.c
+++ b/subframe.c
@@ -106,7 +106,9 @@ static void subframe_almanac(uint8_t 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 * GPS_PI;
+ /* if you want radians, multiply by GPS_PI, but we do semi-circles
+ * to match IS-GPS-200E */
+ almp->d_M0 = pow(2.0,-23) * almp->M0;
almp->af1 = ((words[9] >> 5) & 0x0007FF);
almp->af1 = (short)uint2int(almp->af1, 11);
almp->d_af1 = pow(2.0,-38) * almp->af1;