aLibErr err; Int16 version; version = aLibVersion; err = aLibNew(&version); // handle error |
Int16 i; Char a[99]; err = aLibMapGetItem(mapCountries,0,&i); // 237 err = aLibMapGetItem(mapLocationName,100,a); // "Douala" err = aLibMapGetItem(mapLocationArea,100,&i); // 0 err = aLibMapGetItem(mapAreaName,i,a); // "Africa" err = aLibMapGetItem(mapLocationCountry,100,&i); // 35 err = aLibMapGetItem(mapCountryName,i,a); // "Cameroon" err = aLibMapGetItem(mapCountryCode,i,a); // "CM" err = aLibMapGetItem(mapLocationLon,100,&lon); // 0.16930 = 9e42 err = aLibMapGetItem(mapLocationInfo,77,a); // "China mountains" |
err = aLibMapFindByName(mapLocationName,"Z\xFCrich",&i); // 365 err = aLibMapGetItem(mapLocationName,i,a); // "Zurich" |
err = aLibMapFindByName(mapLocationName,"Istanbul",&i); year=1978; month=10; day=15; hour=23; min=59; err = aLibTimezone (year,month,day,hour,min,0,calGregorian,relLocal,i, 0,&offsStandard,&offsLocal,zoneName); // offsStandard=2, offsLocal=3, zoneName="EEST" |
double jd; err = aLibTimezone(1990,4,19,0,0,0,calGregorian,relUTC,0,&jd,0,0,0); // jd = 2448000.5 |
aLibEvent e; lon=15.0/(180/pi); lat=60.0/(180/pi); err = aLibEventNew(&e,jd,lon,lat); // handle error |
double o[3]; // get obliquity of the ecliptic err = aLibEventGetItem(e,eventEcl,&ecl); // 0.40911 = 23.4406 deg // get geocentric ecliptical position of the Sun err = aLibEventGetObjectItem (e,objSun,objCoordsSpheGeoEcl,o); // lon = 0.50068 = 28.6870 deg, lat = 0, r = 1.004323 // get topocentric equatorial position of the moon err = aLibEventGetObjectItem (e,objMoon,objCoordsSpheTopoEqu,o); // RA = 5.41055 = 310.0019 deg, Decl = -0.34696 = -19.8795 deg // get geocentric equatorial position of Mercury err = aLibEventGetObjectItem (e,objMercury,objCoordsSpheGeoEqu,o); // RA = 0.75503 = 43.2599 deg, Decl = 0.34289 = 19.6495 deg, r = 0.748296 (AU) |
aLibEventFree(&e); aLibFree(); |
Creating data structures from timezone data... Step 1: Reading countries from file 'iso3166.tab'... 239 countries read. Step 2: Reading areas from file 'zone.tab'... 10 areas read. Step 3: Reading locations from file 'zone.tab'... 366 locations read. Step 4: Removing countries without locations... Removed country 27 BV Bouvet Island Removed country 93 HM Heard Island & McDonald Islands 2 countries removed. Step 5: Concating continents to file 'world'... 7 files concated (3226 lines). Step 6: Reading format strings from file 'world'... 298 strings read. Step 7: Reading rules from file 'world'... 125 rules read (1631 items). Maximal number of items per rule: 74. Step 8: Reading zones from file 'world'... Could not add zone: could not split location Zone WET 0:00 EU WE%sT... Could not add zone: could not split location Zone CET 1:00 C-Eur CE%sT... Could not add zone: could not split location Zone MET 1:00 C-Eur ME%sT... Could not add zone: could not split location Zone EET 2:00 EU EE%sT... 356 zones read (1570 items). Maximal number of items per zone: 14. Step 9: Reading links from file 'world'... Link with non-existing link location: Europe/Nicosia... Link with non-existing link location: Asia/Istanbul... Link with non-existing link location: America/Indiana/Indianapolis... Link with non-existing link location: America/Kentucky/Louisville... Link with non-existing link area: EST5EDT... Link with non-existing link area: CST6CDT... Link with non-existing link area: MST7MDT... Link with non-existing link area: PST8PDT... Link with non-existing link area: EST... Link with non-existing link area: MST... Link with non-existing link area: HST... 10 links read. Step 10:Reading locations2 from file 'moreplaces'... 2120 locations read. Checking data consistency... OK. Linking locations of same country... OK. Exporting header file... done. Exporting serialized data... country: 2860 ( 22874 bits) area: 72 ( 574 bits) location: 9188 ( 73500 bits) rule: 11668 ( 93337 bits, max=4201 bits) format: 1398 ( 11177 bits) zone: 13970 (111759 bits, max= 920 bits) location2:34692 (277536 bits) 73848 bytes (72k) exported. Finished. |