*** GlobeCs v2 - What is it? It is the 3D vector graph of the globe, 2nd version. The globe is turnable, the display is zoomable and scrollable. Features to select view point, show the long-range fly path, put on the grid, etc. *** Installation and use, legal status Put files in the following directories: \APP\GLOBECS.OPA, \OPD\GLOBECS.ODB, and with Psion-I (English version) install the OPA. It's all. I hope the menu is self-explanatory enough. GlobeCs is a Public Domain, if you use it, or its parts in your own programs, please credit me. Use it as is, there are no registration and support for. *** HW requirements Psion3a (but I guess it runs on 3c and Siena too). Needs approx. 30-40 kB memory to run, plus the PIC size, which depends on globe radius and the use of grey (3.2-102 kB). It works on PC emulator without problems too. *** Features The user can jump to any view point in the Earth. It is possible to move the view point by optional 1,2,...,30,45 degree steps in N, E, S and W directions too. Thanks to vector graphics, the zooming is very easy. The optional globe radius is from 80 pixels (you can see the whole globe in the display) to 320 pixels (wider, than the 3a display, mainly for emulator on PC), varies with 40 pixels steps. The program calculates and plots the map outside the visible display too. After finish of plot the actual map is scrollable by arrow keys, and it can be saved as a PIC file. The view point coordinates are always appearing in the saved filename, ... NEW in v2: ... and with the actual radius at the upper corners of map. NEW in v2: The initial view point is the home city, as in World app settings. NEW in v2: Long-range fly display. Input cities of fly departure and arrival and get the great-circle fly path. The calculated view point is at the middle of the shortest arch between the cities. The fly path looks as a straight line because the observer position is in the plane of the great-circle. It is fine to study the "strange" paths near to poles (e.g. Oslo-Seattle, Sydney-Buenos Aires). The city locations obtained from the ROM. Additional hints: (1) if you give the same city at departure and arrival, you can jump to it, (2) usually is enough to input the first some letters of city (e.g. "ams" for Amsterdam, "atl" for Atlanta). NEW in v2: Plot of the grid on the globe with optional 1,2,...,30,45 degree steps. Don't put on the grid after changing the radius without redraw. NEW in v2: Toggle the use of grey. If you use it, the required memory for the picture is doubled (the background space, the grid and fly line could be drawn with grey). Use redraw after toggle. All current plotting activities displayed by blinking corners, you can use menu commands only if none of them is in operation, but hotkey pressed during plot activates immediatly after plot. *** Menu short description Size Zoom in - increase globe radius by 40 until 320 pixels, redraw Zoom out - decrease globe radius by 40 until 80 pixels, redraw Radius - choose radius in range 80-320 pixels, default is 120 View point Move to North by ... - move with the current step value, redraw Move to East by ... Move to South by ... Move to West by ... Change step - possible steps: 1,2,...30,45 degrees, default is 15, the step value is used in Move to ... and Grid on Jump to - input longitude and latitude in degrees, South and West is negative Action Redraw map - manual request for redraw e.g. after change radius Grey on/Grey off - toggle the use of grey plane, default is off Grid on - puts the meridians and circles of latitude with step Save map - saves the actual map in \PIC\ directory as picture Fly - displays the shortest fly path between two cities, input departure and destination city names Exit - quit program Help About - short message *** Data representation and vectorization The coastline of continents and islands and some big lakes is given like ODB file in binary form. Each point of the coastline represented by two integers (absolute longitude and latitude in degrees, West and South is negative), the end of a polyline indicated by two zeros. The usual step between the break-points is not greater then 7 degree (i.e. 3 bit, in this way it would be possible to save components of a relative vector with their signs in 1 byte, but the unpacking is a surplus time consuming procedure). The data order, and so the plotting sequence of continents is the following: Africa, Europe, Asia, South America, Nord America, Australia and Antarctic (that's why the display is blank for a long, if the view point is e.g. on the West coast of USA or in New Zeeland). Some attempt made to keep continuos line even in case of near islands. In this sense I am proud of the Sumatra, Java and Lesser Sundas, the British-Irish Islands as well as US-Canada Great Lakes but the Philippines turned out not very well. Presently the file consists more than 1500 points. By now some more or less islands in Arctic Ocean are missing, it means 300-400 additional points. *** Computation and speed The rotation of globe and calculation of visible/hidden points requires much trigonometry beyond the spherical-Cartesian transformation. For speed-up the code I used the following tricks: - almost all often repeated calculations are in 2 or 4 byte integer arithmetic, - pre-tabulated SIN for range 1-89 degrees with step 1, normalized to 1024 as integer, look-up of SIN and COS for any whole number degree angle in this table, - procedure CACHEing. I decided not to use the quick gPOLY, and gUPDATE OFF because prior to draw a step is necessary to make a great many calculations, and the speed increase was not very significant. But it is very nice to see how Psion plots point by point! The initial preparation of SIN table and dark background takes 7 sec. The time of plot recently is approx. 47 sec. This last value practically does not depend on the globe size, and the view point. The plot time of grid strongly varies on step value. *** Future plans - to complete the missing islands' data, - to load the initial map from PIC, if saved, instead of plot, - to show the daylight and dark areas on the globe depending on actual date and time in form of ellipse or sickle at the grey layer of bitmap; this could be processed and updated separately from the black layer, - further probable speed increase by store instead of angles the normalized to 1024 SIN and COS values of longitude and latitude for each point, - perhaps partial coding of plot routine in asm86 or C for further reduce the plot time. *** Other programming remarks, reverse engineering The 1024 SIN normalization factor comes from the following considerations: - this value is enough big to get accurate x and y coordinates on display (experiments made with 256, 512 and 1024), - if you multiply 3 such SIN or COS values, you are still in 4 byte long integer range, because 1024**3 < 256**4. I ENCOURAGE to make reverse translation. The majority of variables is GLOBAL, and the global names you can get back by e.g. REVTRAN. All variable and procedure names are transparent, or hopefully understandable by menu. *** Bugfix In GlobeCs v1 fixed a small bug in saved map filename (sign of longitude part, i.e. E or W sometimes was wrong). *** Similar programs D. Rushall's Solun 3 in registered version is able to show the 3D globe map. I have seen only its display hardcopy, but as I understood, that globe is fixed size. Am I wrong? J. McAleey's W2 program does for 2D map the daylight/dark screen. *** Author I am engineer-physicist, my hobby is the handheld and personal computing. My home city is Szekszárd (019E046N:-), Hungary. A Psion3a belongs to me only since last spring (the earlier pocket pet was the Atari Portfolio). I made some family photo galleries, animations with asynchrone sound, Hungarian phonemes and rules to A. Clapham PsionSpech program, etc. I welcome all ideas and suggestions. Enjoy our 3D Globe. Andr s Cserh ti cserhati@tea.npp.hu