test_yuma.c

Go to the documentation of this file.
00001 /** 
00002 \file    test_yuma.c
00003 \brief   unit tests for yuma.c/.h
00004 \author  Glenn D. MacGougan (GDM)
00005 \date    2007-11-29
00006 \since   2007-11-29
00007 
00008 \b "LICENSE INFORMATION" \n
00009 Copyright (c) 2007, refer to 'author' doxygen tags \n
00010 All rights reserved. \n
00011 
00012 Redistribution and use in source and binary forms, with or without
00013 modification, are permitted provided the following conditions are met: \n
00014 
00015 - Redistributions of source code must retain the above copyright
00016   notice, this list of conditions and the following disclaimer. \n
00017 - Redistributions in binary form must reproduce the above copyright
00018   notice, this list of conditions and the following disclaimer in the
00019   documentation and/or other materials provided with the distribution. \n
00020 - The name(s) of the contributor(s) may not be used to endorse or promote 
00021   products derived from this software without specific prior written 
00022   permission. \n
00023 
00024 THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS 
00025 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
00026 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00027 DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
00028 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00029 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
00030 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
00031 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
00032 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
00033 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
00034 SUCH DAMAGE.
00035 */
00036 #include <stdio.h>
00037 #include "Basic.h"     // CUnit/Basic.h
00038 #include "yuma.h"
00039 
00040 
00041 int init_suite_YUMA(void)
00042 {
00043   return 0;
00044 }
00045 
00046 int clean_suite_YUMA(void)
00047 {
00048   return 0;
00049 }
00050 
00051 
00052 
00053 /* yuma431.txt
00054 ******** Week 431 almanac for PRN-01 ********
00055 ID:                         01
00056 Health:                     000
00057 Eccentricity:               0.7102489471E-002
00058 Time of Applicability(s):  589824.0000
00059 Orbital Inclination(rad):   0.9908943176
00060 Rate of Right Ascen(r/s):  -0.7632479537E-008
00061 SQRT(A)  (m 1/2):           5153.553711
00062 Right Ascen at Week(rad):  -0.1041447520E+001
00063 Argument of Perigee(rad):  -1.798838139
00064 Mean Anom(rad):            -0.2883712769E+001
00065 Af0(s):                     0.1697540283E-003
00066 Af1(s/s):                   0.3637978807E-011
00067 week:                        431
00068 
00069 ******** Week 431 almanac for PRN-02 ********
00070 ID:                         02
00071 Health:                     000
00072 Eccentricity:               0.8688926697E-002
00073 Time of Applicability(s):  589824.0000
00074 Orbital Inclination(rad):   0.9451141357
00075 Rate of Right Ascen(r/s):  -0.8130882634E-008
00076 SQRT(A)  (m 1/2):           5153.601074
00077 Right Ascen at Week(rad):   0.3086080551E+001
00078 Argument of Perigee(rad):   2.422875524
00079 Mean Anom(rad):            -0.2096464515E+001
00080 Af0(s):                     0.1554489136E-003
00081 Af1(s/s):                   0.3637978807E-011
00082 week:                        431
00083 
00084 ******** Week 431 almanac for PRN-03 ********
00085 ID:                         03
00086 Health:                     000
00087 Eccentricity:               0.1021337509E-001
00088 Time of Applicability(s):  589824.0000
00089 Orbital Inclination(rad):   0.9255142212
00090 Rate of Right Ascen(r/s):  -0.8123606676E-008
00091 SQRT(A)  (m 1/2):           5153.592773
00092 Right Ascen at Week(rad):   0.1944178343E+001
00093 Argument of Perigee(rad):   0.794445515
00094 Mean Anom(rad):            -0.2681670308E+001
00095 Af0(s):                     0.1525878906E-003
00096 Af1(s/s):                   0.3637978807E-011
00097 week:                        431
00098 
00099 ******** Week 431 almanac for PRN-04 ********
00100 ID:                         04
00101 Health:                     000
00102 Eccentricity:               0.8028030396E-002
00103 Time of Applicability(s):  589824.0000
00104 Orbital Inclination(rad):   0.9444789886
00105 Rate of Right Ascen(r/s):  -0.8141796570E-008
00106 SQRT(A)  (m 1/2):           5153.604492
00107 Right Ascen at Week(rad):   0.3105142951E+001
00108 Argument of Perigee(rad):   0.320883989
00109 Mean Anom(rad):             0.5347421169E+000
00110 Af0(s):                    -0.3147125244E-004
00111 Af1(s/s):                  -0.3637978807E-011
00112 week:                        431
00113 
00114 ******** Week 431 almanac for PRN-05 ********
00115 ID:                         05
00116 Health:                     000
00117 Eccentricity:               0.8495330811E-002
00118 Time of Applicability(s):  589824.0000
00119 Orbital Inclination(rad):   0.9410877228
00120 Rate of Right Ascen(r/s):  -0.8141796570E-008
00121 SQRT(A)  (m 1/2):           5153.628418
00122 Right Ascen at Week(rad):   0.9098359346E+000
00123 Argument of Perigee(rad):   1.218577743
00124 Mean Anom(rad):            -0.2140271664E-001
00125 Af0(s):                     0.5731582642E-003
00126 Af1(s/s):                   0.2182787284E-010
00127 week:                        431
00128 
00129 ******** Week 431 almanac for PRN-06 ********
00130 ID:                         06
00131 Health:                     000
00132 Eccentricity:               0.5452632904E-002
00133 Time of Applicability(s):  589824.0000
00134 Orbital Inclination(rad):   0.9331188202
00135 Rate of Right Ascen(r/s):  -0.8050847100E-008
00136 SQRT(A)  (m 1/2):           5153.580078
00137 Right Ascen at Week(rad):   0.2007190228E+001
00138 Argument of Perigee(rad):  -1.667430043
00139 Mean Anom(rad):             0.1462155223E+001
00140 Af0(s):                     0.2021789551E-003
00141 Af1(s/s):                  -0.1091393642E-010
00142 week:                        431
00143 
00144 ******** Week 431 almanac for PRN-07 ********
00145 ID:                         07
00146 Health:                     000
00147 Eccentricity:               0.1010322571E-001
00148 Time of Applicability(s):  589824.0000
00149 Orbital Inclination(rad):   0.9347114563
00150 Rate of Right Ascen(r/s):  -0.8032657206E-008
00151 SQRT(A)  (m 1/2):           5153.721191
00152 Right Ascen at Week(rad):   0.1981814384E+001
00153 Argument of Perigee(rad):  -1.631943583
00154 Mean Anom(rad):             0.1292079210E+001
00155 Af0(s):                    -0.2288818359E-004
00156 Af1(s/s):                   0.0000000000E+000
00157 week:                        431
00158 
00159 ******** Week 431 almanac for PRN-08 ********
00160 ID:                         08
00161 Health:                     000
00162 Eccentricity:               0.1020097733E-001
00163 Time of Applicability(s):  589824.0000
00164 Orbital Inclination(rad):   0.9812278748
00165 Rate of Right Ascen(r/s):  -0.7828930393E-008
00166 SQRT(A)  (m 1/2):           5153.615723
00167 Right Ascen at Week(rad):   0.1546382904E-002
00168 Argument of Perigee(rad):   2.837109804
00169 Mean Anom(rad):             0.1522171497E+001
00170 Af0(s):                    -0.1316070557E-003
00171 Af1(s/s):                   0.0000000000E+000
00172 week:                        431
00173 
00174 ******** Week 431 almanac for PRN-09 ********
00175 ID:                         09
00176 Health:                     000
00177 Eccentricity:               0.1938629150E-001
00178 Time of Applicability(s):  589824.0000
00179 Orbital Inclination(rad):   0.9690589905
00180 Rate of Right Ascen(r/s):  -0.7978087524E-008
00181 SQRT(A)  (m 1/2):           5153.638672
00182 Right Ascen at Week(rad):  -0.8547973633E-001
00183 Argument of Perigee(rad):   1.377475858
00184 Mean Anom(rad):             0.1178699851E+001
00185 Af0(s):                     0.9918212891E-004
00186 Af1(s/s):                   0.0000000000E+000
00187 week:                        431
00188 
00189 ******** Week 431 almanac for PRN-10 ********
00190 ID:                         10
00191 Health:                     000
00192 Eccentricity:               0.7751941681E-002
00193 Time of Applicability(s):  589824.0000
00194 Orbital Inclination(rad):   0.9663391113
00195 Rate of Right Ascen(r/s):  -0.7938069757E-008
00196 SQRT(A)  (m 1/2):           5153.684570
00197 Right Ascen at Week(rad):  -0.2117694139E+001
00198 Argument of Perigee(rad):   0.499766946
00199 Mean Anom(rad):            -0.1432633519E+001
00200 Af0(s):                    -0.1602172852E-003
00201 Af1(s/s):                  -0.1091393642E-010
00202 week:                        431
00203 
00204 ******** Week 431 almanac for PRN-11 ********
00205 ID:                         11
00206 Health:                     000
00207 Eccentricity:               0.7613658905E-002
00208 Time of Applicability(s):  589824.0000
00209 Orbital Inclination(rad):   0.8926105499
00210 Rate of Right Ascen(r/s):  -0.8629285730E-008
00211 SQRT(A)  (m 1/2):           5153.660645
00212 Right Ascen at Week(rad):   0.2913496137E+001
00213 Argument of Perigee(rad):   0.546045899
00214 Mean Anom(rad):             0.1971806884E+001
00215 Af0(s):                     0.2670288086E-004
00216 Af1(s/s):                   0.0000000000E+000
00217 week:                        431
00218 
00219 ******** Week 431 almanac for PRN-12 ********
00220 ID:                         12
00221 Health:                     000
00222 Eccentricity:               0.3116130829E-002
00223 Time of Applicability(s):  589824.0000
00224 Orbital Inclination(rad):   0.9625511169
00225 Rate of Right Ascen(r/s):  -0.7905327948E-008
00226 SQRT(A)  (m 1/2):           5153.675293
00227 Right Ascen at Week(rad):   0.9990948439E+000
00228 Argument of Perigee(rad):  -1.092309713
00229 Mean Anom(rad):             0.2499961734E+001
00230 Af0(s):                    -0.3499984741E-003
00231 Af1(s/s):                   0.0000000000E+000
00232 week:                        431
00233 
00234 ******** Week 431 almanac for PRN-13 ********
00235 ID:                         13
00236 Health:                     000
00237 Eccentricity:               0.3281116486E-002
00238 Time of Applicability(s):  589824.0000
00239 Orbital Inclination(rad):   0.9950408936
00240 Rate of Right Ascen(r/s):  -0.7592461770E-008
00241 SQRT(A)  (m 1/2):           5153.674805
00242 Right Ascen at Week(rad):  -0.1053738832E+001
00243 Argument of Perigee(rad):   1.408947825
00244 Mean Anom(rad):            -0.1709633946E+001
00245 Af0(s):                     0.2250671387E-003
00246 Af1(s/s):                   0.3637978807E-011
00247 week:                        431
00248 
00249 ******** Week 431 almanac for PRN-14 ********
00250 ID:                         14
00251 Health:                     000
00252 Eccentricity:               0.3743171692E-002
00253 Time of Applicability(s):  589824.0000
00254 Orbital Inclination(rad):   0.9888858795
00255 Rate of Right Ascen(r/s):  -0.7654307410E-008
00256 SQRT(A)  (m 1/2):           5153.594238
00257 Right Ascen at Week(rad):  -0.1070010424E+001
00258 Argument of Perigee(rad):  -2.134685159
00259 Mean Anom(rad):            -0.2045622945E+001
00260 Af0(s):                    -0.3166198730E-003
00261 Af1(s/s):                   0.3637978807E-011
00262 week:                        431
00263 
00264 ******** Week 431 almanac for PRN-15 ********
00265 ID:                         15
00266 Health:                     000
00267 Eccentricity:               0.1007080078E-002
00268 Time of Applicability(s):  589824.0000
00269 Orbital Inclination(rad):   0.9574222565
00270 Rate of Right Ascen(r/s):  -0.7956259651E-008
00271 SQRT(A)  (m 1/2):           5153.536621
00272 Right Ascen at Week(rad):  -0.1105578065E+001
00273 Argument of Perigee(rad):  -2.075240493
00274 Mean Anom(rad):            -0.3428694010E+000
00275 Af0(s):                    -0.7438659668E-004
00276 Af1(s/s):                   0.3637978807E-011
00277 week:                        431
00278 
00279 ******** Week 431 almanac for PRN-16 ********
00280 ID:                         16
00281 Health:                     000
00282 Eccentricity:               0.4120349884E-002
00283 Time of Applicability(s):  589824.0000
00284 Orbital Inclination(rad):   0.9643554688
00285 Rate of Right Ascen(r/s):  -0.7883500075E-008
00286 SQRT(A)  (m 1/2):           5153.726074
00287 Right Ascen at Week(rad):   0.1015131950E+001
00288 Argument of Perigee(rad):  -0.562877297
00289 Mean Anom(rad):            -0.1362055540E+000
00290 Af0(s):                     0.1268386841E-003
00291 Af1(s/s):                   0.0000000000E+000
00292 week:                        431
00293 
00294 ******** Week 431 almanac for PRN-17 ********
00295 ID:                         17
00296 Health:                     000
00297 Eccentricity:               0.3050804138E-002
00298 Time of Applicability(s):  589824.0000
00299 Orbital Inclination(rad):   0.9593334198
00300 Rate of Right Ascen(r/s):  -0.7788912626E-008
00301 SQRT(A)  (m 1/2):           5153.644043
00302 Right Ascen at Week(rad):   0.2055675030E+001
00303 Argument of Perigee(rad):  -2.966418147
00304 Mean Anom(rad):            -0.1160219073E+001
00305 Af0(s):                     0.4768371582E-004
00306 Af1(s/s):                   0.0000000000E+000
00307 week:                        431
00308 
00309 ******** Week 431 almanac for PRN-18 ********
00310 ID:                         18
00311 Health:                     000
00312 Eccentricity:               0.8884906769E-002
00313 Time of Applicability(s):  589824.0000
00314 Orbital Inclination(rad):   0.9504356384
00315 Rate of Right Ascen(r/s):  -0.8076312952E-008
00316 SQRT(A)  (m 1/2):           5153.591797
00317 Right Ascen at Week(rad):  -0.2104108930E+001
00318 Argument of Perigee(rad):  -2.521630764
00319 Mean Anom(rad):            -0.1232171059E-001
00320 Af0(s):                    -0.2222061157E-003
00321 Af1(s/s):                   0.3637978807E-011
00322 week:                        431
00323 
00324 ******** Week 431 almanac for PRN-19 ********
00325 ID:                         19
00326 Health:                     000
00327 Eccentricity:               0.4151821136E-002
00328 Time of Applicability(s):  589824.0000
00329 Orbital Inclination(rad):   0.9571952820
00330 Rate of Right Ascen(r/s):  -0.7803464541E-008
00331 SQRT(A)  (m 1/2):           5153.574219
00332 Right Ascen at Week(rad):   0.2113353252E+001
00333 Argument of Perigee(rad):  -0.678779721
00334 Mean Anom(rad):            -0.1759031773E+001
00335 Af0(s):                     0.9536743164E-005
00336 Af1(s/s):                   0.3637978807E-011
00337 week:                        431
00338 
00339 ******** Week 431 almanac for PRN-20 ********
00340 ID:                         20
00341 Health:                     000
00342 Eccentricity:               0.3303527832E-002
00343 Time of Applicability(s):  589824.0000
00344 Orbital Inclination(rad):   0.9499492645
00345 Rate of Right Ascen(r/s):  -0.8123606676E-008
00346 SQRT(A)  (m 1/2):           5153.631836
00347 Right Ascen at Week(rad):  -0.2157547712E+001
00348 Argument of Perigee(rad):   1.297490835
00349 Mean Anom(rad):            -0.1667904854E-001
00350 Af0(s):                     0.1249313354E-003
00351 Af1(s/s):                   0.0000000000E+000
00352 week:                        431
00353 
00354 ******** Week 431 almanac for PRN-21 ********
00355 ID:                         21
00356 Health:                     000
00357 Eccentricity:               0.1308870316E-001
00358 Time of Applicability(s):  589824.0000
00359 Orbital Inclination(rad):   0.9380130768
00360 Rate of Right Ascen(r/s):  -0.8218194125E-008
00361 SQRT(A)  (m 1/2):           5153.701660
00362 Right Ascen at Week(rad):   0.3121827245E+001
00363 Argument of Perigee(rad):  -2.783395767
00364 Mean Anom(rad):             0.1315448403E+001
00365 Af0(s):                     0.7629394531E-004
00366 Af1(s/s):                   0.0000000000E+000
00367 week:                        431
00368 
00369 ******** Week 431 almanac for PRN-22 ********
00370 ID:                         22
00371 Health:                     000
00372 Eccentricity:               0.5015373230E-002
00373 Time of Applicability(s):  589824.0000
00374 Orbital Inclination(rad):   0.9480495453
00375 Rate of Right Ascen(r/s):  -0.8094502846E-008
00376 SQRT(A)  (m 1/2):           5153.622559
00377 Right Ascen at Week(rad):  -0.2097227693E+001
00378 Argument of Perigee(rad):  -1.735002279
00379 Mean Anom(rad):            -0.1406764150E+001
00380 Af0(s):                     0.2040863037E-003
00381 Af1(s/s):                   0.0000000000E+000
00382 week:                        431
00383 
00384 ******** Week 431 almanac for PRN-23 ********
00385 ID:                         23
00386 Health:                     000
00387 Eccentricity:               0.5223274231E-002
00388 Time of Applicability(s):  589824.0000
00389 Orbital Inclination(rad):   0.9710712433
00390 Rate of Right Ascen(r/s):  -0.7821654435E-008
00391 SQRT(A)  (m 1/2):           5153.543945
00392 Right Ascen at Week(rad):  -0.1093096137E+001
00393 Argument of Perigee(rad):   2.745398283
00394 Mean Anom(rad):            -0.2477374077E+001
00395 Af0(s):                     0.3147125244E-003
00396 Af1(s/s):                   0.3637978807E-011
00397 week:                        431
00398 
00399 ******** Week 431 almanac for PRN-24 ********
00400 ID:                         24
00401 Health:                     000
00402 Eccentricity:               0.8298397064E-002
00403 Time of Applicability(s):  589824.0000
00404 Orbital Inclination(rad):   0.9546833038
00405 Rate of Right Ascen(r/s):  -0.8029019227E-008
00406 SQRT(A)  (m 1/2):           5153.602051
00407 Right Ascen at Week(rad):  -0.3138392091E+001
00408 Argument of Perigee(rad):  -0.751108646
00409 Mean Anom(rad):            -0.1998051405E+000
00410 Af0(s):                     0.5054473877E-004
00411 Af1(s/s):                   0.3637978807E-011
00412 week:                        431
00413 
00414 ******** Week 431 almanac for PRN-25 ********
00415 ID:                         25
00416 Health:                     000
00417 Eccentricity:               0.1172208786E-001
00418 Time of Applicability(s):  589824.0000
00419 Orbital Inclination(rad):   0.9624862671
00420 Rate of Right Ascen(r/s):  -0.8043571142E-008
00421 SQRT(A)  (m 1/2):           5153.639160
00422 Right Ascen at Week(rad):  -0.1430066824E+000
00423 Argument of Perigee(rad):  -1.294391394
00424 Mean Anom(rad):             0.1407431364E+000
00425 Af0(s):                     0.4863739014E-003
00426 Af1(s/s):                   0.3637978807E-011
00427 week:                        431
00428 
00429 ******** Week 431 almanac for PRN-26 ********
00430 ID:                         26
00431 Health:                     000
00432 Eccentricity:               0.1842498779E-001
00433 Time of Applicability(s):  589824.0000
00434 Orbital Inclination(rad):   0.9930324554
00435 Rate of Right Ascen(r/s):  -0.7610651664E-008
00436 SQRT(A)  (m 1/2):           5153.533203
00437 Right Ascen at Week(rad):  -0.1054520845E+001
00438 Argument of Perigee(rad):   0.893498898
00439 Mean Anom(rad):             0.3093351603E+001
00440 Af0(s):                     0.1125335693E-003
00441 Af1(s/s):                   0.1091393642E-010
00442 week:                        431
00443 
00444 ******** Week 431 almanac for PRN-27 ********
00445 ID:                         27
00446 Health:                     000
00447 Eccentricity:               0.2089309692E-001
00448 Time of Applicability(s):  589824.0000
00449 Orbital Inclination(rad):   0.9670639038
00450 Rate of Right Ascen(r/s):  -0.7970811566E-008
00451 SQRT(A)  (m 1/2):           5153.587402
00452 Right Ascen at Week(rad):  -0.1090148687E+000
00453 Argument of Perigee(rad):  -1.767943978
00454 Mean Anom(rad):             0.3054419756E+000
00455 Af0(s):                     0.1516342163E-003
00456 Af1(s/s):                   0.3637978807E-011
00457 week:                        431
00458 
00459 ******** Week 431 almanac for PRN-28 ********
00460 ID:                         28
00461 Health:                     000
00462 Eccentricity:               0.1308441162E-001
00463 Time of Applicability(s):  589824.0000
00464 Orbital Inclination(rad):   0.9624786377
00465 Rate of Right Ascen(r/s):  -0.7868948160E-008
00466 SQRT(A)  (m 1/2):           5153.655762
00467 Right Ascen at Week(rad):   0.1024014950E+001
00468 Argument of Perigee(rad):  -2.157932401
00469 Mean Anom(rad):            -0.8401706219E+000
00470 Af0(s):                    -0.1144409180E-004
00471 Af1(s/s):                   0.0000000000E+000
00472 week:                        431
00473 
00474 ******** Week 431 almanac for PRN-30 ********
00475 ID:                         30
00476 Health:                     000
00477 Eccentricity:               0.1036357880E-001
00478 Time of Applicability(s):  589824.0000
00479 Orbital Inclination(rad):   0.9472885132
00480 Rate of Right Ascen(r/s):  -0.8061761037E-008
00481 SQRT(A)  (m 1/2):           5153.641602
00482 Right Ascen at Week(rad):   0.9601974487E+000
00483 Argument of Perigee(rad):   1.369896889
00484 Mean Anom(rad):            -0.4680734873E+000
00485 Af0(s):                     0.5435943604E-004
00486 Af1(s/s):                   0.0000000000E+000
00487 week:                        431
00488 
00489 ******** Week 431 almanac for PRN-31 ********
00490 ID:                         31
00491 Health:                     000
00492 Eccentricity:               0.6537437439E-002
00493 Time of Applicability(s):  589824.0000
00494 Orbital Inclination(rad):   0.9655532837
00495 Rate of Right Ascen(r/s):  -0.8010829333E-008
00496 SQRT(A)  (m 1/2):           5153.565918
00497 Right Ascen at Week(rad):  -0.5225157738E-001
00498 Argument of Perigee(rad):  -1.318798423
00499 Mean Anom(rad):             0.2062978387E+001
00500 Af0(s):                     0.0000000000E+000
00501 Af1(s/s):                   0.0000000000E+000
00502 week:                        431
00503 
00504 ******** Week 431 almanac for PRN-32 ********
00505 ID:                         32
00506 Health:                     063
00507 Eccentricity:               0.1481294632E-001
00508 Time of Applicability(s):  589824.0000
00509 Orbital Inclination(rad):   0.9716835022
00510 Rate of Right Ascen(r/s):  -0.7843482308E-008
00511 SQRT(A)  (m 1/2):           5153.470703
00512 Right Ascen at Week(rad):  -0.2059595823E+001
00513 Argument of Perigee(rad):  -1.354981422
00514 Mean Anom(rad):            -0.2236462355E+001
00515 Af0(s):                     0.1573562622E-003
00516 Af1(s/s):                   0.1091393642E-010
00517 week:                        431
00518 */
00519 
00520 
00521 void test_YUMA_ReadAlmanacDataFromFile(void)
00522 {
00523   YUMA_structAlmanac test;
00524   YUMA_structAlmanac alm[32];
00525   unsigned char number_read=0;
00526   BOOL result;
00527   unsigned i = 0;
00528 
00529   memset( alm, 0, sizeof(YUMA_structAlmanac)*32 );
00530   result = YUMA_ReadAlmanacDataFromFile( 
00531     "yuma431.txt",
00532     alm,
00533     32,
00534     &number_read );
00535   CU_ASSERT_FATAL( result );
00536   CU_ASSERT_FATAL( number_read == 31 ); // PRN29 is not in the file
00537 
00538   /*
00539   ******** Week 431 almanac for PRN-01 ********
00540   ID:                         01
00541   Health:                     000
00542   Eccentricity:               0.7102489471E-002
00543   Time of Applicability(s):  589824.0000
00544   Orbital Inclination(rad):   0.9908943176
00545   Rate of Right Ascen(r/s):  -0.7632479537E-008
00546   SQRT(A)  (m 1/2):           5153.553711
00547   Right Ascen at Week(rad):  -0.1041447520E+001
00548   Argument of Perigee(rad):  -1.798838139
00549   Mean Anom(rad):            -0.2883712769E+001
00550   Af0(s):                     0.1697540283E-003
00551   Af1(s/s):                   0.3637978807E-011
00552   week:                        431
00553   */
00554   test.prn    = 1;
00555   test.health = 0;
00556   test.week   = 431;
00557   test.ecc      = 0.7102489471E-002;
00558   test.toa      = 589824.0000;
00559   test.i0       = 0.9908943176;
00560   test.omegadot = -0.7632479537E-008;
00561   test.sqrta    = 5153.553711;
00562   test.omega0   = -0.1041447520E+001;
00563   test.w        = -1.798838139;
00564   test.m0       = -0.2883712769E+001;
00565   test.af0      = 0.1697540283E-003;
00566   test.af1      = 0.3637978807E-011;
00567   test.is_af0_af1_high_precision = 0;
00568 
00569   i = 0;
00570   CU_ASSERT( alm[i].prn == test.prn );
00571   CU_ASSERT( alm[i].health == test.health );
00572   CU_ASSERT( alm[i].week == test.week );
00573   CU_ASSERT_DOUBLE_EQUAL( alm[i].ecc, test.ecc, 1e-11 );
00574   CU_ASSERT_DOUBLE_EQUAL( alm[i].toa, test.toa, 1e-2 );
00575   CU_ASSERT_DOUBLE_EQUAL( alm[i].i0, test.i0, 1e-9 );
00576   CU_ASSERT_DOUBLE_EQUAL( alm[i].omegadot, test.omegadot, 1e-17 );
00577   CU_ASSERT_DOUBLE_EQUAL( alm[i].sqrta, test.sqrta, 1e-6 );
00578   CU_ASSERT_DOUBLE_EQUAL( alm[i].omega0, test.omega0, 1e-8 );
00579   CU_ASSERT_DOUBLE_EQUAL( alm[i].w, test.w, 1e-8 );
00580   CU_ASSERT_DOUBLE_EQUAL( alm[i].m0, test.m0, 1e-7 );
00581   CU_ASSERT_DOUBLE_EQUAL( alm[i].af0, test.af0, 1e-12 );
00582   CU_ASSERT_DOUBLE_EQUAL( alm[i].af1, test.af1, 1e-20 );
00583   CU_ASSERT( alm[0].is_af0_af1_high_precision == test.is_af0_af1_high_precision );
00584 
00585     /*
00586 ID:                         02
00587 Health:                     000
00588 Eccentricity:               0.8688926697E-002
00589 Time of Applicability(s):  589824.0000
00590 Orbital Inclination(rad):   0.9451141357
00591 Rate of Right Ascen(r/s):  -0.8130882634E-008
00592 SQRT(A)  (m 1/2):           5153.601074
00593 Right Ascen at Week(rad):   0.3086080551E+001
00594 Argument of Perigee(rad):   2.422875524
00595 Mean Anom(rad):            -0.2096464515E+001
00596 Af0(s):                     0.1554489136E-003
00597 Af1(s/s):                   0.3637978807E-011
00598 week:                        431
00599 */
00600   test.prn    = 2;
00601   test.health = 0;
00602   test.week   = 431;
00603   test.ecc      = 0.8688926697E-002;
00604   test.toa      = 589824.0000;
00605   test.i0       = 0.9451141357;
00606   test.omegadot = -0.8130882634E-008;
00607   test.sqrta    = 5153.601074;
00608   test.omega0   = 0.3086080551E+001;
00609   test.w        = 2.422875524;
00610   test.m0       = -0.2096464515E+001;
00611   test.af0      = 0.1554489136E-003;
00612   test.af1      = 0.3637978807E-011;
00613   test.is_af0_af1_high_precision = 0;
00614 
00615   i = 1;
00616   CU_ASSERT( alm[i].prn == test.prn );
00617   CU_ASSERT( alm[i].health == test.health );
00618   CU_ASSERT( alm[i].week == test.week );
00619   CU_ASSERT_DOUBLE_EQUAL( alm[i].ecc, test.ecc, 1e-11 );
00620   CU_ASSERT_DOUBLE_EQUAL( alm[i].toa, test.toa, 1e-2 );
00621   CU_ASSERT_DOUBLE_EQUAL( alm[i].i0, test.i0, 1e-9 );
00622   CU_ASSERT_DOUBLE_EQUAL( alm[i].omegadot, test.omegadot, 1e-17 );
00623   CU_ASSERT_DOUBLE_EQUAL( alm[i].sqrta, test.sqrta, 1e-6 );
00624   CU_ASSERT_DOUBLE_EQUAL( alm[i].omega0, test.omega0, 1e-8 );
00625   CU_ASSERT_DOUBLE_EQUAL( alm[i].w, test.w, 1e-8 );
00626   CU_ASSERT_DOUBLE_EQUAL( alm[i].m0, test.m0, 1e-7 );
00627   CU_ASSERT_DOUBLE_EQUAL( alm[i].af0, test.af0, 1e-12 );
00628   CU_ASSERT_DOUBLE_EQUAL( alm[i].af1, test.af1, 1e-20 );
00629   CU_ASSERT( alm[0].is_af0_af1_high_precision == test.is_af0_af1_high_precision );
00630 
00631 /*
00632 ID:                         03
00633 Health:                     000
00634 Eccentricity:               0.1021337509E-001
00635 Time of Applicability(s):  589824.0000
00636 Orbital Inclination(rad):   0.9255142212
00637 Rate of Right Ascen(r/s):  -0.8123606676E-008
00638 SQRT(A)  (m 1/2):           5153.592773
00639 Right Ascen at Week(rad):   0.1944178343E+001
00640 Argument of Perigee(rad):   0.794445515
00641 Mean Anom(rad):            -0.2681670308E+001
00642 Af0(s):                     0.1525878906E-003
00643 Af1(s/s):                   0.3637978807E-011
00644 week:                        431
00645 */
00646   test.prn    = 3;
00647   test.health = 0;
00648   test.week   = 431;
00649   test.ecc      = 0.1021337509E-001;
00650   test.toa      = 589824.0000;
00651   test.i0       = 0.9255142212;
00652   test.omegadot = -0.8123606676E-008;
00653   test.sqrta    = 5153.592773;
00654   test.omega0   = 0.1944178343E+001;
00655   test.w        = 0.794445515;
00656   test.m0       = -0.2681670308E+001;
00657   test.af0      = 0.1525878906E-003;
00658   test.af1      = 0.3637978807E-011;
00659   test.is_af0_af1_high_precision = 0;
00660 
00661   i = 2;
00662   CU_ASSERT( alm[i].prn == test.prn );
00663   CU_ASSERT( alm[i].health == test.health );
00664   CU_ASSERT( alm[i].week == test.week );
00665   CU_ASSERT_DOUBLE_EQUAL( alm[i].ecc, test.ecc, 1e-11 );
00666   CU_ASSERT_DOUBLE_EQUAL( alm[i].toa, test.toa, 1e-2 );
00667   CU_ASSERT_DOUBLE_EQUAL( alm[i].i0, test.i0, 1e-9 );
00668   CU_ASSERT_DOUBLE_EQUAL( alm[i].omegadot, test.omegadot, 1e-17 );
00669   CU_ASSERT_DOUBLE_EQUAL( alm[i].sqrta, test.sqrta, 1e-6 );
00670   CU_ASSERT_DOUBLE_EQUAL( alm[i].omega0, test.omega0, 1e-8 );
00671   CU_ASSERT_DOUBLE_EQUAL( alm[i].w, test.w, 1e-8 );
00672   CU_ASSERT_DOUBLE_EQUAL( alm[i].m0, test.m0, 1e-7 );
00673   CU_ASSERT_DOUBLE_EQUAL( alm[i].af0, test.af0, 1e-12 );
00674   CU_ASSERT_DOUBLE_EQUAL( alm[i].af1, test.af1, 1e-20 );
00675   CU_ASSERT( alm[0].is_af0_af1_high_precision == test.is_af0_af1_high_precision );
00676 /*
00677 ID:                         04
00678 Health:                     000
00679 Eccentricity:               0.8028030396E-002
00680 Time of Applicability(s):  589824.0000
00681 Orbital Inclination(rad):   0.9444789886
00682 Rate of Right Ascen(r/s):  -0.8141796570E-008
00683 SQRT(A)  (m 1/2):           5153.604492
00684 Right Ascen at Week(rad):   0.3105142951E+001
00685 Argument of Perigee(rad):   0.320883989
00686 Mean Anom(rad):             0.5347421169E+000
00687 Af0(s):                    -0.3147125244E-004
00688 Af1(s/s):                  -0.3637978807E-011
00689 week:                        431
00690 */
00691 /*
00692 ID:                         05
00693 Health:                     000
00694 Eccentricity:               0.8495330811E-002
00695 Time of Applicability(s):  589824.0000
00696 Orbital Inclination(rad):   0.9410877228
00697 Rate of Right Ascen(r/s):  -0.8141796570E-008
00698 SQRT(A)  (m 1/2):           5153.628418
00699 Right Ascen at Week(rad):   0.9098359346E+000
00700 Argument of Perigee(rad):   1.218577743
00701 Mean Anom(rad):            -0.2140271664E-001
00702 Af0(s):                     0.5731582642E-003
00703 Af1(s/s):                   0.2182787284E-010
00704 week:                        431
00705 */
00706 /*
00707 ID:                         06
00708 Health:                     000
00709 Eccentricity:               0.5452632904E-002
00710 Time of Applicability(s):  589824.0000
00711 Orbital Inclination(rad):   0.9331188202
00712 Rate of Right Ascen(r/s):  -0.8050847100E-008
00713 SQRT(A)  (m 1/2):           5153.580078
00714 Right Ascen at Week(rad):   0.2007190228E+001
00715 Argument of Perigee(rad):  -1.667430043
00716 Mean Anom(rad):             0.1462155223E+001
00717 Af0(s):                     0.2021789551E-003
00718 Af1(s/s):                  -0.1091393642E-010
00719 week:                        431
00720 */
00721 /*
00722 ID:                         07
00723 Health:                     000
00724 Eccentricity:               0.1010322571E-001
00725 Time of Applicability(s):  589824.0000
00726 Orbital Inclination(rad):   0.9347114563
00727 Rate of Right Ascen(r/s):  -0.8032657206E-008
00728 SQRT(A)  (m 1/2):           5153.721191
00729 Right Ascen at Week(rad):   0.1981814384E+001
00730 Argument of Perigee(rad):  -1.631943583
00731 Mean Anom(rad):             0.1292079210E+001
00732 Af0(s):                    -0.2288818359E-004
00733 Af1(s/s):                   0.0000000000E+000
00734 week:                        431
00735 */
00736 /*
00737 ID:                         08
00738 Health:                     000
00739 Eccentricity:               0.1020097733E-001
00740 Time of Applicability(s):  589824.0000
00741 Orbital Inclination(rad):   0.9812278748
00742 Rate of Right Ascen(r/s):  -0.7828930393E-008
00743 SQRT(A)  (m 1/2):           5153.615723
00744 Right Ascen at Week(rad):   0.1546382904E-002
00745 Argument of Perigee(rad):   2.837109804
00746 Mean Anom(rad):             0.1522171497E+001
00747 Af0(s):                    -0.1316070557E-003
00748 Af1(s/s):                   0.0000000000E+000
00749 week:                        431
00750 */
00751 /*
00752 ID:                         09
00753 Health:                     000
00754 Eccentricity:               0.1938629150E-001
00755 Time of Applicability(s):  589824.0000
00756 Orbital Inclination(rad):   0.9690589905
00757 Rate of Right Ascen(r/s):  -0.7978087524E-008
00758 SQRT(A)  (m 1/2):           5153.638672
00759 Right Ascen at Week(rad):  -0.8547973633E-001
00760 Argument of Perigee(rad):   1.377475858
00761 Mean Anom(rad):             0.1178699851E+001
00762 Af0(s):                     0.9918212891E-004
00763 Af1(s/s):                   0.0000000000E+000
00764 week:                        431
00765 */
00766 /*
00767 ID:                         10
00768 Health:                     000
00769 Eccentricity:               0.7751941681E-002
00770 Time of Applicability(s):  589824.0000
00771 Orbital Inclination(rad):   0.9663391113
00772 Rate of Right Ascen(r/s):  -0.7938069757E-008
00773 SQRT(A)  (m 1/2):           5153.684570
00774 Right Ascen at Week(rad):  -0.2117694139E+001
00775 Argument of Perigee(rad):   0.499766946
00776 Mean Anom(rad):            -0.1432633519E+001
00777 Af0(s):                    -0.1602172852E-003
00778 Af1(s/s):                  -0.1091393642E-010
00779 week:                        431
00780 */
00781 /*
00782 ID:                         11
00783 Health:                     000
00784 Eccentricity:               0.7613658905E-002
00785 Time of Applicability(s):  589824.0000
00786 Orbital Inclination(rad):   0.8926105499
00787 Rate of Right Ascen(r/s):  -0.8629285730E-008
00788 SQRT(A)  (m 1/2):           5153.660645
00789 Right Ascen at Week(rad):   0.2913496137E+001
00790 Argument of Perigee(rad):   0.546045899
00791 Mean Anom(rad):             0.1971806884E+001
00792 Af0(s):                     0.2670288086E-004
00793 Af1(s/s):                   0.0000000000E+000
00794 week:                        431
00795 */
00796 /*
00797 ID:                         12
00798 Health:                     000
00799 Eccentricity:               0.3116130829E-002
00800 Time of Applicability(s):  589824.0000
00801 Orbital Inclination(rad):   0.9625511169
00802 Rate of Right Ascen(r/s):  -0.7905327948E-008
00803 SQRT(A)  (m 1/2):           5153.675293
00804 Right Ascen at Week(rad):   0.9990948439E+000
00805 Argument of Perigee(rad):  -1.092309713
00806 Mean Anom(rad):             0.2499961734E+001
00807 Af0(s):                    -0.3499984741E-003
00808 Af1(s/s):                   0.0000000000E+000
00809 week:                        431
00810 */
00811 /*
00812 ID:                         13
00813 Health:                     000
00814 Eccentricity:               0.3281116486E-002
00815 Time of Applicability(s):  589824.0000
00816 Orbital Inclination(rad):   0.9950408936
00817 Rate of Right Ascen(r/s):  -0.7592461770E-008
00818 SQRT(A)  (m 1/2):           5153.674805
00819 Right Ascen at Week(rad):  -0.1053738832E+001
00820 Argument of Perigee(rad):   1.408947825
00821 Mean Anom(rad):            -0.1709633946E+001
00822 Af0(s):                     0.2250671387E-003
00823 Af1(s/s):                   0.3637978807E-011
00824 week:                        431
00825 */
00826 /*
00827 ID:                         14
00828 Health:                     000
00829 Eccentricity:               0.3743171692E-002
00830 Time of Applicability(s):  589824.0000
00831 Orbital Inclination(rad):   0.9888858795
00832 Rate of Right Ascen(r/s):  -0.7654307410E-008
00833 SQRT(A)  (m 1/2):           5153.594238
00834 Right Ascen at Week(rad):  -0.1070010424E+001
00835 Argument of Perigee(rad):  -2.134685159
00836 Mean Anom(rad):            -0.2045622945E+001
00837 Af0(s):                    -0.3166198730E-003
00838 Af1(s/s):                   0.3637978807E-011
00839 week:                        431
00840 */
00841 /*
00842 ID:                         15
00843 Health:                     000
00844 Eccentricity:               0.1007080078E-002
00845 Time of Applicability(s):  589824.0000
00846 Orbital Inclination(rad):   0.9574222565
00847 Rate of Right Ascen(r/s):  -0.7956259651E-008
00848 SQRT(A)  (m 1/2):           5153.536621
00849 Right Ascen at Week(rad):  -0.1105578065E+001
00850 Argument of Perigee(rad):  -2.075240493
00851 Mean Anom(rad):            -0.3428694010E+000
00852 Af0(s):                    -0.7438659668E-004
00853 Af1(s/s):                   0.3637978807E-011
00854 week:                        431
00855 */
00856 /*
00857 ID:                         16
00858 Health:                     000
00859 Eccentricity:               0.4120349884E-002
00860 Time of Applicability(s):  589824.0000
00861 Orbital Inclination(rad):   0.9643554688
00862 Rate of Right Ascen(r/s):  -0.7883500075E-008
00863 SQRT(A)  (m 1/2):           5153.726074
00864 Right Ascen at Week(rad):   0.1015131950E+001
00865 Argument of Perigee(rad):  -0.562877297
00866 Mean Anom(rad):            -0.1362055540E+000
00867 Af0(s):                     0.1268386841E-003
00868 Af1(s/s):                   0.0000000000E+000
00869 week:                        431
00870 */
00871 /*
00872 ID:                         17
00873 Health:                     000
00874 Eccentricity:               0.3050804138E-002
00875 Time of Applicability(s):  589824.0000
00876 Orbital Inclination(rad):   0.9593334198
00877 Rate of Right Ascen(r/s):  -0.7788912626E-008
00878 SQRT(A)  (m 1/2):           5153.644043
00879 Right Ascen at Week(rad):   0.2055675030E+001
00880 Argument of Perigee(rad):  -2.966418147
00881 Mean Anom(rad):            -0.1160219073E+001
00882 Af0(s):                     0.4768371582E-004
00883 Af1(s/s):                   0.0000000000E+000
00884 week:                        431
00885 */
00886 /*
00887 ID:                         18
00888 Health:                     000
00889 Eccentricity:               0.8884906769E-002
00890 Time of Applicability(s):  589824.0000
00891 Orbital Inclination(rad):   0.9504356384
00892 Rate of Right Ascen(r/s):  -0.8076312952E-008
00893 SQRT(A)  (m 1/2):           5153.591797
00894 Right Ascen at Week(rad):  -0.2104108930E+001
00895 Argument of Perigee(rad):  -2.521630764
00896 Mean Anom(rad):            -0.1232171059E-001
00897 Af0(s):                    -0.2222061157E-003
00898 Af1(s/s):                   0.3637978807E-011
00899 week:                        431
00900 */
00901 /*
00902 ID:                         19
00903 Health:                     000
00904 Eccentricity:               0.4151821136E-002
00905 Time of Applicability(s):  589824.0000
00906 Orbital Inclination(rad):   0.9571952820
00907 Rate of Right Ascen(r/s):  -0.7803464541E-008
00908 SQRT(A)  (m 1/2):           5153.574219
00909 Right Ascen at Week(rad):   0.2113353252E+001
00910 Argument of Perigee(rad):  -0.678779721
00911 Mean Anom(rad):            -0.1759031773E+001
00912 Af0(s):                     0.9536743164E-005
00913 Af1(s/s):                   0.3637978807E-011
00914 week:                        431
00915 */
00916 /*
00917 ID:                         20
00918 Health:                     000
00919 Eccentricity:               0.3303527832E-002
00920 Time of Applicability(s):  589824.0000
00921 Orbital Inclination(rad):   0.9499492645
00922 Rate of Right Ascen(r/s):  -0.8123606676E-008
00923 SQRT(A)  (m 1/2):           5153.631836
00924 Right Ascen at Week(rad):  -0.2157547712E+001
00925 Argument of Perigee(rad):   1.297490835
00926 Mean Anom(rad):            -0.1667904854E-001
00927 Af0(s):                     0.1249313354E-003
00928 Af1(s/s):                   0.0000000000E+000
00929 week:                        431
00930 */
00931 /*
00932 ID:                         21
00933 Health:                     000
00934 Eccentricity:               0.1308870316E-001
00935 Time of Applicability(s):  589824.0000
00936 Orbital Inclination(rad):   0.9380130768
00937 Rate of Right Ascen(r/s):  -0.8218194125E-008
00938 SQRT(A)  (m 1/2):           5153.701660
00939 Right Ascen at Week(rad):   0.3121827245E+001
00940 Argument of Perigee(rad):  -2.783395767
00941 Mean Anom(rad):             0.1315448403E+001
00942 Af0(s):                     0.7629394531E-004
00943 Af1(s/s):                   0.0000000000E+000
00944 week:                        431
00945 */
00946 /*
00947 ID:                         22
00948 Health:                     000
00949 Eccentricity:               0.5015373230E-002
00950 Time of Applicability(s):  589824.0000
00951 Orbital Inclination(rad):   0.9480495453
00952 Rate of Right Ascen(r/s):  -0.8094502846E-008
00953 SQRT(A)  (m 1/2):           5153.622559
00954 Right Ascen at Week(rad):  -0.2097227693E+001
00955 Argument of Perigee(rad):  -1.735002279
00956 Mean Anom(rad):            -0.1406764150E+001
00957 Af0(s):                     0.2040863037E-003
00958 Af1(s/s):                   0.0000000000E+000
00959 week:                        431
00960 */
00961 /*
00962 ID:                         23
00963 Health:                     000
00964 Eccentricity:               0.5223274231E-002
00965 Time of Applicability(s):  589824.0000
00966 Orbital Inclination(rad):   0.9710712433
00967 Rate of Right Ascen(r/s):  -0.7821654435E-008
00968 SQRT(A)  (m 1/2):           5153.543945
00969 Right Ascen at Week(rad):  -0.1093096137E+001
00970 Argument of Perigee(rad):   2.745398283
00971 Mean Anom(rad):            -0.2477374077E+001
00972 Af0(s):                     0.3147125244E-003
00973 Af1(s/s):                   0.3637978807E-011
00974 week:                        431
00975 */
00976 /*
00977 ID:                         24
00978 Health:                     000
00979 Eccentricity:               0.8298397064E-002
00980 Time of Applicability(s):  589824.0000
00981 Orbital Inclination(rad):   0.9546833038
00982 Rate of Right Ascen(r/s):  -0.8029019227E-008
00983 SQRT(A)  (m 1/2):           5153.602051
00984 Right Ascen at Week(rad):  -0.3138392091E+001
00985 Argument of Perigee(rad):  -0.751108646
00986 Mean Anom(rad):            -0.1998051405E+000
00987 Af0(s):                     0.5054473877E-004
00988 Af1(s/s):                   0.3637978807E-011
00989 week:                        431
00990 */
00991 /*
00992 ID:                         25
00993 Health:                     000
00994 Eccentricity:               0.1172208786E-001
00995 Time of Applicability(s):  589824.0000
00996 Orbital Inclination(rad):   0.9624862671
00997 Rate of Right Ascen(r/s):  -0.8043571142E-008
00998 SQRT(A)  (m 1/2):           5153.639160
00999 Right Ascen at Week(rad):  -0.1430066824E+000
01000 Argument of Perigee(rad):  -1.294391394
01001 Mean Anom(rad):             0.1407431364E+000
01002 Af0(s):                     0.4863739014E-003
01003 Af1(s/s):                   0.3637978807E-011
01004 week:                        431
01005 */
01006 /*
01007 ID:                         26
01008 Health:                     000
01009 Eccentricity:               0.1842498779E-001
01010 Time of Applicability(s):  589824.0000
01011 Orbital Inclination(rad):   0.9930324554
01012 Rate of Right Ascen(r/s):  -0.7610651664E-008
01013 SQRT(A)  (m 1/2):           5153.533203
01014 Right Ascen at Week(rad):  -0.1054520845E+001
01015 Argument of Perigee(rad):   0.893498898
01016 Mean Anom(rad):             0.3093351603E+001
01017 Af0(s):                     0.1125335693E-003
01018 Af1(s/s):                   0.1091393642E-010
01019 week:                        431
01020 */
01021 /*
01022 ID:                         27
01023 Health:                     000
01024 Eccentricity:               0.2089309692E-001
01025 Time of Applicability(s):  589824.0000
01026 Orbital Inclination(rad):   0.9670639038
01027 Rate of Right Ascen(r/s):  -0.7970811566E-008
01028 SQRT(A)  (m 1/2):           5153.587402
01029 Right Ascen at Week(rad):  -0.1090148687E+000
01030 Argument of Perigee(rad):  -1.767943978
01031 Mean Anom(rad):             0.3054419756E+000
01032 Af0(s):                     0.1516342163E-003
01033 Af1(s/s):                   0.3637978807E-011
01034 week:                        431
01035 */
01036 /*
01037 ID:                         28
01038 Health:                     000
01039 Eccentricity:               0.1308441162E-001
01040 Time of Applicability(s):  589824.0000
01041 Orbital Inclination(rad):   0.9624786377
01042 Rate of Right Ascen(r/s):  -0.7868948160E-008
01043 SQRT(A)  (m 1/2):           5153.655762
01044 Right Ascen at Week(rad):   0.1024014950E+001
01045 Argument of Perigee(rad):  -2.157932401
01046 Mean Anom(rad):            -0.8401706219E+000
01047 Af0(s):                    -0.1144409180E-004
01048 Af1(s/s):                   0.0000000000E+000
01049 week:                        431
01050 */
01051 /*
01052 ID:                         30
01053 Health:                     000
01054 Eccentricity:               0.1036357880E-001
01055 Time of Applicability(s):  589824.0000
01056 Orbital Inclination(rad):   0.9472885132
01057 Rate of Right Ascen(r/s):  -0.8061761037E-008
01058 SQRT(A)  (m 1/2):           5153.641602
01059 Right Ascen at Week(rad):   0.9601974487E+000
01060 Argument of Perigee(rad):   1.369896889
01061 Mean Anom(rad):            -0.4680734873E+000
01062 Af0(s):                     0.5435943604E-004
01063 Af1(s/s):                   0.0000000000E+000
01064 week:                        431
01065 */
01066 /*
01067 ID:                         31
01068 Health:                     000
01069 Eccentricity:               0.6537437439E-002
01070 Time of Applicability(s):  589824.0000
01071 Orbital Inclination(rad):   0.9655532837
01072 Rate of Right Ascen(r/s):  -0.8010829333E-008
01073 SQRT(A)  (m 1/2):           5153.565918
01074 Right Ascen at Week(rad):  -0.5225157738E-001
01075 Argument of Perigee(rad):  -1.318798423
01076 Mean Anom(rad):             0.2062978387E+001
01077 Af0(s):                     0.0000000000E+000
01078 Af1(s/s):                   0.0000000000E+000
01079 week:                        431
01080 */
01081   test.prn    = 31;
01082   test.health = 0;
01083   test.week   = 431;
01084   test.ecc      = 0.6537437439E-002;
01085   test.toa      = 589824.0000;
01086   test.i0       = 0.9655532837;
01087   test.omegadot = -0.8010829333E-008;
01088   test.sqrta    = 5153.565918;
01089   test.omega0   = -0.5225157738E-001;
01090   test.w        = -1.318798423;
01091   test.m0       = 0.2062978387E+001;
01092   test.af0      = 0.0000000000E+000;
01093   test.af1      = 0.0000000000E+000;
01094   test.is_af0_af1_high_precision = 0;
01095 
01096   i = 29;
01097   CU_ASSERT( alm[i].prn == test.prn );
01098   CU_ASSERT( alm[i].health == test.health );
01099   CU_ASSERT( alm[i].week == test.week );
01100   CU_ASSERT_DOUBLE_EQUAL( alm[i].ecc, test.ecc, 1e-11 );
01101   CU_ASSERT_DOUBLE_EQUAL( alm[i].toa, test.toa, 1e-2 );
01102   CU_ASSERT_DOUBLE_EQUAL( alm[i].i0, test.i0, 1e-9 );
01103   CU_ASSERT_DOUBLE_EQUAL( alm[i].omegadot, test.omegadot, 1e-17 );
01104   CU_ASSERT_DOUBLE_EQUAL( alm[i].sqrta, test.sqrta, 1e-6 );
01105   CU_ASSERT_DOUBLE_EQUAL( alm[i].omega0, test.omega0, 1e-8 );
01106   CU_ASSERT_DOUBLE_EQUAL( alm[i].w, test.w, 1e-8 );
01107   CU_ASSERT_DOUBLE_EQUAL( alm[i].m0, test.m0, 1e-7 );
01108   CU_ASSERT_DOUBLE_EQUAL( alm[i].af0, test.af0, 1e-12 );
01109   CU_ASSERT_DOUBLE_EQUAL( alm[i].af1, test.af1, 1e-20 );
01110   CU_ASSERT( alm[0].is_af0_af1_high_precision == test.is_af0_af1_high_precision );
01111 /*
01112 ID:                         32
01113 Health:                     063
01114 Eccentricity:               0.1481294632E-001
01115 Time of Applicability(s):  589824.0000
01116 Orbital Inclination(rad):   0.9716835022
01117 Rate of Right Ascen(r/s):  -0.7843482308E-008
01118 SQRT(A)  (m 1/2):           5153.470703
01119 Right Ascen at Week(rad):  -0.2059595823E+001
01120 Argument of Perigee(rad):  -1.354981422
01121 Mean Anom(rad):            -0.2236462355E+001
01122 Af0(s):                     0.1573562622E-003
01123 Af1(s/s):                   0.1091393642E-010
01124 week:                        431
01125 */
01126   test.prn    = 32;
01127   test.health = 63;
01128   test.week   = 431;
01129   test.ecc      = 0.1481294632E-001;
01130   test.toa      = 589824.0000;
01131   test.i0       = 0.9716835022;
01132   test.omegadot = -0.7843482308E-008;
01133   test.sqrta    = 5153.470703;
01134   test.omega0   = -0.2059595823E+001;
01135   test.w        = -1.354981422;
01136   test.m0       = -0.2236462355E+001;
01137   test.af0      = 0.1573562622E-003;
01138   test.af1      = 0.1091393642E-010;
01139   test.is_af0_af1_high_precision = 0;
01140 
01141   i = 30;
01142   CU_ASSERT( alm[i].prn == test.prn );
01143   CU_ASSERT( alm[i].health == test.health );
01144   CU_ASSERT( alm[i].week == test.week );
01145   CU_ASSERT_DOUBLE_EQUAL( alm[i].ecc, test.ecc, 1e-11 );
01146   CU_ASSERT_DOUBLE_EQUAL( alm[i].toa, test.toa, 1e-2 );
01147   CU_ASSERT_DOUBLE_EQUAL( alm[i].i0, test.i0, 1e-9 );
01148   CU_ASSERT_DOUBLE_EQUAL( alm[i].omegadot, test.omegadot, 1e-17 );
01149   CU_ASSERT_DOUBLE_EQUAL( alm[i].sqrta, test.sqrta, 1e-6 );
01150   CU_ASSERT_DOUBLE_EQUAL( alm[i].omega0, test.omega0, 1e-8 );
01151   CU_ASSERT_DOUBLE_EQUAL( alm[i].w, test.w, 1e-8 );
01152   CU_ASSERT_DOUBLE_EQUAL( alm[i].m0, test.m0, 1e-7 );
01153   CU_ASSERT_DOUBLE_EQUAL( alm[i].af0, test.af0, 1e-12 );
01154   CU_ASSERT_DOUBLE_EQUAL( alm[i].af1, test.af1, 1e-20 );
01155   CU_ASSERT( alm[0].is_af0_af1_high_precision == test.is_af0_af1_high_precision );
01156 
01157 
01158 }
01159 
01160 void test_YUMA_WriteAlmanacDataToFile(void)
01161 {
01162   YUMA_structAlmanac alm[32];
01163   YUMA_structAlmanac alm_test[32];
01164   unsigned char number_read=0;
01165   BOOL result;
01166   unsigned i = 0;
01167 
01168   memset( alm, 0, sizeof(YUMA_structAlmanac)*32 );
01169   memset( alm_test, 0, sizeof(YUMA_structAlmanac)*32 );
01170 
01171   // read in the data file
01172   result = YUMA_ReadAlmanacDataFromFile( 
01173     "yuma431.txt",
01174     alm,
01175     32,
01176     &number_read );
01177   CU_ASSERT_FATAL( result );
01178   CU_ASSERT_FATAL( number_read == 31 ); // PRN29 is not in the file
01179 
01180   // write a new data file
01181   result = YUMA_WriteAlmanacDataToFile(
01182     "yuma.txt",
01183     alm,
01184     number_read );
01185   CU_ASSERT_FATAL( result );
01186 
01187   // read in the new data file
01188   result = YUMA_ReadAlmanacDataFromFile( 
01189     "yuma.txt",
01190     alm_test,
01191     32,
01192     &number_read );
01193   CU_ASSERT_FATAL( result );
01194   CU_ASSERT_FATAL( number_read == 31 ); // PRN29 is not in the file
01195 
01196   for( i = 0; i < number_read; i++ )
01197   {
01198     CU_ASSERT( alm[i].prn == alm_test[i].prn );    
01199     CU_ASSERT( alm[i].health == alm_test[i].health );
01200     CU_ASSERT( alm[i].week == alm_test[i].week );
01201     CU_ASSERT_DOUBLE_EQUAL( alm[i].ecc, alm_test[i].ecc, 1e-11 );
01202     CU_ASSERT_DOUBLE_EQUAL( alm[i].toa, alm_test[i].toa, 1e-2 );
01203     CU_ASSERT_DOUBLE_EQUAL( alm[i].i0, alm_test[i].i0, 1e-9 );
01204     CU_ASSERT_DOUBLE_EQUAL( alm[i].omegadot, alm_test[i].omegadot, 1e-17 );
01205     CU_ASSERT_DOUBLE_EQUAL( alm[i].sqrta, alm_test[i].sqrta, 1e-6 );
01206     CU_ASSERT_DOUBLE_EQUAL( alm[i].omega0, alm_test[i].omega0, 1e-8 );
01207     CU_ASSERT_DOUBLE_EQUAL( alm[i].w, alm_test[i].w, 1e-8 );
01208     CU_ASSERT_DOUBLE_EQUAL( alm[i].m0, alm_test[i].m0, 1e-7 );
01209     CU_ASSERT_DOUBLE_EQUAL( alm[i].af0, alm_test[i].af0, 1e-12 );
01210     CU_ASSERT_DOUBLE_EQUAL( alm[i].af1, alm_test[i].af1, 1e-20 );
01211     CU_ASSERT( alm[0].is_af0_af1_high_precision == alm_test[i].is_af0_af1_high_precision );
01212   }
01213   remove("yuma.txt");
01214 }
01215 
01216 
01217 void test_YUMA_WriteSingleAlmanacElementToBuffer(void)
01218 {
01219   char buffer[1024];
01220   YUMA_structAlmanac alm[32];
01221   unsigned char number_read=0;
01222   BOOL result;  
01223   char test_buffer[] = "******** Week 431 almanac for PRN-01 ********\n\
01224 ID:                         01\n\
01225 Health:                     000\n\
01226 Eccentricity:               0.007102489471\n\
01227 Time of Applicability(s):   589824.0000\n\
01228 Orbital Inclination(rad):   0.9908943176\n\
01229 Rate of Right Ascen(r/s):   -7.632479537e-009\n\
01230 SQRT(A)  (m 1/2):           5153.553711\n\
01231 Right Ascen at Week(rad):   -1.04144752\n\
01232 Argument of Perigee(rad):   -1.798838139\n\
01233 Mean Anom(rad):             -2.883712769\n\
01234 Af0(s):                     0.0001697540283\n\
01235 Af1(s/s):                   3.637978807e-012\n\
01236 week:                       431\n\n";
01237 
01238   memset( alm, 0, sizeof(YUMA_structAlmanac)*32 );
01239 
01240   // read in the data file
01241   result = YUMA_ReadAlmanacDataFromFile( 
01242     "yuma431.txt",
01243     alm,
01244     32,
01245     &number_read );
01246   CU_ASSERT_FATAL( result );
01247   CU_ASSERT_FATAL( number_read == 31 ); // PRN29 is not in the file
01248 
01249   result = YUMA_WriteSingleAlmanacElementToBuffer(
01250     alm[0],
01251     buffer,
01252     1024 
01253     );
01254   CU_ASSERT_FATAL( result );
01255 
01256   /*
01257   printf( buffer );
01258   printf( test_buffer );
01259   {
01260     int ii = strlen( buffer);
01261     int jj = strlen( test_buffer );
01262     int gg= 0;
01263   }
01264   */
01265 
01266   CU_ASSERT( strcmp( buffer, test_buffer ) == 0 );  
01267 }
01268