A data compression/decompression method incorporating aliasing error reduction. An array of terrain data is first scanned for a set of modes and indexes are assigned to those modes. These modes are used as precision points for compression and decompression. A compressed index database is created using the associated modes for the original terrain data. If the number of modes exceed a predetermined number the number of modes is collapsed using an aliasing technique. The alias error is tracked during the compression cycle. Total aliasing error is kept to a local minimum. The compressed data is decompressed by decoding and accessing the index database for the elevation alias. Further compression is accomplished using a lossless coding technique.

Claim:

What is claimed is:

1. A source database compression method wherein the source database comprises a first plurality of data points each with a data value, the database compression methodcomprising the steps of:

(a) assigning a unique index value to each unique value of the source database;

(b) generating an index database comprising a second plurality of data corresponding to the first plurality of data points, wherein each second plurality of data points has a value equal to the index value associated with the corresponding datavalue;

(c) generating a mode database for each unique value of the source database wherein the mode database contains the frequency of occurrence of each unique value of the source database;

(d) initializing an accumulated error value to zero;

(e) locating a least frequent element of the mode database with the smallest frequency of occurrence;

(f) locating the closest element of the mode database to the least frequency element that minimizes the accumulated error wherein the minimum accumulated error is determined by adding the accumulated error value to the difference between thevalue of the least frequent element minus the value of the closest element;

(g) adding the frequency value of the least frequent element to the frequency value of the closest element;

(h) eliminating the least frequent element from the mode database; and

(i) repeating steps (c) through (g) until the mode database contains no more than a predetermined number off elements.

2. The source database compression method of claim 1 wherein the source database is a terrain referenced navigation database of elevations for an array of latitudes and longitudes.

3. The source database compression method of claim 1 wherein the index database is further compressed with run length encoding to form a run length encoded database.

4. The source database compression method of claim 1 wherein the index database is further compressed by a method comprising the steps of:

(a) defining a plurality of system state codes each representing a unique packing density;

(b) writing a first element of the index database to a packed index database;

(c) accessing a next element of the index database;

(d) forming a difference between the last element and the next element;

(e) determining a current optimum packing density based

on the difference;

(f) writing the system state code which represents the unique packing density which equals the current optimum packing density to the packed index database;

(g) writing the difference to the packed index database in a packed form in accordance with the current optimum packing density;

(h) accessing a next element of the indexed database;

(i) forming the difference between the last element of the index database accessed and the next index database element;

(j) determining a next optimum packing density based on the difference;

(k) writing the system state code which represents the unique packing density equal to the current optimum packing density to the packed index database if the next optimum packing density is not equal to the current packing density;

(l) writing the difference to the packed index database in a packed form; and

(m) repeating steps (h) through (1) for all elements of the index database.

(a) reading a running index value from a first element of the packed index database;

(b) accessing a next element of the packed index database;

(c) determining whether or not the next element is a system state code or a packed index value;

(d) changing the state of the decompression method to the corresponding packing density if the next element is a system state code;

(e) unpacking the packed indexes from the next element if the next element is a packed index value and adding the unpacked indexes to the running index value; and

(f) repeating steps (b) through (e) for all elements of the index database.

7. The source database compression method of claim 4 wherein a zero-byte flag is used in succession to signal a transition to a repetition count mode.

8. A source database compression apparatus wherein the source database comprises a first plurality of data points each with a data value, the database compression apparatus comprising:

(a) means for assigning a uniform index value to each unique value of the source database;

(b) means for generating an index database comprising a second plurality of data points corresponding to the first plurality of data points, wherein each second plurality of data points has a value equal to the index value associated with thecorresponding data value;

(c) means for generating a mode database for each unique value of the source database wherein the mode database contains the frequency of occurrence of each unique value of the source database;

(d) means for initializing an accumulated error value to zero;

(e) means for locating a least frequent element of the mode database with the smallest frequency of occurrence;

(f) means for locating the closest element of the mode database to the least frequent element that minimizes the accumulated error;

(g) means for adding the accumulated error value to the difference between the value of the least frequent element minus the value of the closest element to determine the minimum accumulated error;

(h) means for adding the frequency value of the least frequent element to the frequency value of the closest element; and

(i) means for eliminating the least frequent element from the mode database.

9. The source database compression apparatus of claim 8 wherein the source database is a terrain referenced navigation database of elevations for an array of latitudes and longitudes.

10. The source database compression apparatus of claim 8 wherein the index database is further compressed with run length encoding to form a run length encoded database.

11. The source database compression apparatus of claim 8 wherein the index database is further compressed by an apparatus comprising:

(a) means for defining a plurality of system state codes each representing a unique packing density;

(b) means for writing a first element of the index database to a packed index database;

(c) means for accessing a next element of the index database;

(d) means for forming a difference between the last element and the next element;

(e) means for determining a current optimum packing density based on the difference;

(f) means for writing the system state code which represents the unique packing density which equals the current optimum packing density to the packed index database;

(g) means for writing the difference to the packed index database in a packed form in accordance with the current optimum packing density;

(h) means for accessing a next element of the indexed database;

(i) means for forming the difference between the last element of the index database accessed and the next index database element;

(j) means for determining a next optimum packing density based on the difference;

(k) means for writing the system state code to the packed index database, wherein the system state code represents the unique packing density equal to the current optimum packing density, and wherein the means for writing writes the system statecode if the next optimum packing density is not equal to the current packing density; and

(l) means for writing the difference to the packed index database in a packed form.

(a) means for reading a running index value from a first element of the packed index database;

(b) means for accessing a next element of the packed index database;

(c) means for determining whether or not the next element is a system state code or a packed index value;

(d) means for changing the state of the decompression apparatus to the corresponding packing density if the next element is a system state code;

(e) means for unpacking the packed indexes from the next element if the next element is a packed index value; and

(f) means for adding the unpacked indexes to the running index value.

14. The source database compression apparatus of claim 11 wherein a zero-byte flag is used in succession to signal transition to a repetition count mode.

15. The source database compression method of claim 1 wherein the source database comprises digital data of a first predetermined bit length and the index database comprises digital data of a second predetermined bit length such that the secondpredetermined bit length is less then the first predetermined bit length.

16. The source database compression apparatus of claim 8 wherein the source database comprises digital data of a first predetermined bit length and the index database comprises digital data of a second predetermined bit length such that thesecond predetermined bit length is less then the first predetermined bit length.

Description:

BACKGROUND OF THE INVENTION

Field of the Invention

This invention relates to a method of reducing the amount of data storage required to store a set of multi-dimensional coordinates and a method to recover the coordinate positions from the reduced data and, more particularly, to a method ofreducing the data storage requirements of a terrain referenced navigation system while also providing an aliasing error reduction method.

Background of Terrain Referenced Navigation

One prior art terrain aided navigation system is available from Sandia Labs. Sandia has created the Sandia Inertial Terrain-Aided Navigation (SITAN) flight-computer algorithm that produces a very accurate trajectory for low-flying,high-performance aircraft by combining outputs from a radar or laser altimeter, an inertial navigation system (INS), and a digital terrain elevation map. SITAN is a recursive, real time, terrain-aided navigation algorithm for use on fighter aircraft. The algorithm has been implemented in a popular microprocessor. The aircraft's position can be estimated within a 926 meter circle error of probability. A good description of the SITAN terrain aided navigation system can be found in the proceedings ofthe IEEE National Aerospace and Electronics Conference--NAECON, May 20-24, 1985 entitled The AFTI/F16 Terrain-Aided Navigation System, by D. D. Boozer, M. K. Lau, J. R. Fellerhoff, Sandia National Laboratories, Albuquerque, N.M. 87185.

SITAN utilizes Kalman filter algorithms to process geophysical measurements. The algorithm estimates errors in a flight path produced by an inertial navigation system following the equations given in the above-mentioned article.

The Kalman filter can be formed with the following state model:

and the measurement ##EQU1## where .delta.X.sub.k =INS error states to be estimated

.PHI.=slate-transition matrix for INS errors

X.sub.k =states of INS and aircraft

C.sub.k =ground clearance measurement

Z.sub.k =altitude of aircraft

h=height of terrain at position ( . , . )

W.sub.k =driving noise with E(W.sub.k)=O for all k and E(W.sub.k W.sub.j.sup.T)=Q.sub.k .delta..sub.kj

V.sub.k =measurement error with E(V.sub.k)=O for all k and E(V.sub.k V.sub.j)=R.sub.k .delta..sub.kj

k=Subscript denoting time k.

Since the measurement function c(x) is a nonlinear function of the states, the standard extended Kalman filter approach is used to obtain the measurement matrix, ##EQU2## where h.sub.x and h.sub.y are the terrain slopes in the x and y directionsof the map evaluated at X.sub.k (-), the predicted aircraft position just before a measurement is processed at time k. The first three states are taken to be the x position, y position, and altitude, respectively. At any time k,

The state vector often used in a single filter implementation is

where .delta.X .delta.Y .delta.Z .delta.V.sub.X, and .delta.V.sub.Y are errors in the X position, Y position, altitude, X velocity, and Y velocity, respectively. Other INS errors and states can also be included in .delta.X by using the proper.PHI..

Parallel SITAN was developed because the distance needed by SITAN to reach steady state becomes excessive as initial position errors (IPEs) approach several hundred meters. Parallel SITAN is a bank of extended Kalman filters that processidentical altimeter measurements. After some updates, the filter with the minimum average weighted residual squared (AWRS) value is identified as having the correct position estimate. The AWRS value is defined by ##EQU3## where .DELTA..sub.i is theresidual at the ith update, n is the number of updates, and HPH.sup.T +R is the residual variance. Once the IPEs are reduced by the parallel filters, a single filter performs well, starting off essentially in steady state.

To implement parallel SITAN, the number and geometrical layout of the parallel filters needed to cover an IPE must be specified. A square, constant-spaced grid can be used to center the filters about the horizontal position indicated by the INS. Filters at and near the corners are then eliminated to reduce the number of filters. To further lighten the computational burden, three-state, instead of five-state, filters are often used in parallel SITAN with

For both the single and parallel filter implementation, a least-squares plane fit to the map, known as stochastic linearization, is used to compute the slopes, h.sub.X and H.sub.Y. Horizontal uncertainties .sigma..sub.x and .sigma..sub.Y fromthe error-covariance matrix, defined by ##EQU4## and are used to determine the size of the plane. Residuals from the plane fit, RFIT.sub.k, are added to the measurement error variance, R.sub.k, to ensure that the SITAN filter assigns less weight to themeasurement when the plane fit is either very large or is over a rough area, thus adapting to local terrain.

SITAN has three basic modes: acquisition mode, lost mode and track mode.

Acquisition Mode

When one of the filters identifies a reliable estimate of true aircraft position, the track mode is entered. A single five state Kalman filter is initialized at the estimated acquired position. During track mode, the aircraft's position isestimated every 100 meters. SITAN employs a mode control logic concept to handle the transition from track to lost and from acquisition to track.

Acquisition mode is used to locate the aircraft's position within a circular region of uncertainty. The region of uncertainty is called the circular error of probability or CEP. In SITAN a 2100 meter initial position CEP is covered with 573-state Kalman filters centered on a grid whose initial positions are 525 meters apart.

The state acquisition filters include error states. They can estimate an aircraft's position under significant INS velocity errors. Each filter is initialized with position error estimates. To ensure that erroneous information is not employedto update the filters, none of the filters are updated if the pitch altitude is greater than 30 degrees or if the altimeter loses lock or the INS fails.

If the mode control logic of SITAN indicates that the aircraft has deviated from the 2363 meter search area, the lost mode is initiated. The lost mode ceases to provide position estimates for the aircraft, and the pilot has to update theinertial navigation before restarting SITAN.

Track Mode

Track mode estimates the position of the aircraft during flight. The five state tracking filter is used. The acquisition mode initializes the track filters. The track mode makes estimates of terrain slopes in rectangles surrounding the centerof the aircraft position. The track filters are not updated during track mode unless the inertial navigation system, altimeter, and other flight data are valid.

Track mode is entered when the aircraft's actual position is close to the estimated one. In the event of a false fix, the track filter is set at the wrong position and the SITAN algorithm will proceed as if it was correct. This produces largeerrors in estimated positions. It is imperative that the probability of a false fix be kept low. The following is taken from the above-mentioned article in regard to the mode control logic of SITAN.

With the design for the acquisition, lost, and track modes as described above, the mode-control logic is needed to determine in which mode the algorithm should operate. When large aircraft position errors exist, it should choose the acquisitionmode; with small errors, the track. The main parameter used in the mode-control logic for transition from acquisition to track is the AWRS. FIG. 7 shows a cross-section of a three-dimensional AWRS surface where AWRS is a function of the parallel filterpositions (X.sub.j, Y.sub.j). In the acquisition mode the parallel filters will tend to migrate to the relative minima of this surface.

To keep the parallel filters from migrating too far from their initial positions, a maximum of 128 updates is allowed. Four tests are performed after every 32 updates to determine if transition to the track mode is possible by selecting theacquisition filter with the minimum AWRS. Test 1 requires the selected filter to have an AWRS lower than a threshold value to ensure that the parallel filters are indeed over the correct aircraft position. If the parallel filters are configured over anarea which does not include the true aircraft position, the global minimum of the AWRS curve is expected to shift upward. Test 2 requires contrast in the terrain, a sufficient difference between AWRS.sub.min and AWRS.sub.max to prevent transition to thetrack mode over very smooth areas such as water. Test 3, the false-fix test, requires that the minimum AWRS outside of an exclusion region, AWRS*.sub.min does not compete with AWRS.sub.min, where the size of the exclusive region is computed using.sigma..sub.x and .sigma..sub.Y of the selected filter. Statistically, as more updates are made, the separation between the global minimum and relative minima can be realized and still retain the same confidence level. Therefore, the requiredseparation between AWRS*.sub.min and AWRS.sub.min should be a function of l/n, where n is the number of updates. Test 4 requires the .sigma..sub.X and .sigma..sub.Y of the selected filter to be smaller than its initial value, 200 m, indicating thatimprovements have been made in estimating the aircraft's position during acquisition.

If track is not entered after 128 updates, a test for the lost mode is made. If AWRS.sub.min is greater than a threshold, the lost mode is entered and AFTI/SITAN will not produce any more estimates until the pilot updates the INS, which willautomatically restart AFTI/SITAN in the track mode. If the lost condition is not met, the parallel filters are reset and acquisition starts over. This process continues until track or lost mode is entered.

Once in track, the track filter's .sigma..sub.x and .sigma..sub.Y are checked continuously while its AWRS is checked every 64 updates. If either the .sigma.'s or the AWRS is too high, AFTI/SITAN switches back to the acquisition mode. The teston .sigma. prevents the track filter from using excessively large plane fits to maintain track after flying over smooth terrain for a long time. The AWRS test checks for unbelievable filter residuals.

Discussion of the Prior Art

Data storage requirements in real time computer applications require voluminous amounts of information to be stored both in RAM and on permanent storage devices such as a disk or tape. Most real time applications of data storage require somesort of a mapping of a real environment or a set of parameters. In the area of mapping and navigation, the problem of characterizing the environment in a multi-dimensional database is even more complicated and more complex. The types of informationstored in such real time, real world applications range from the physical to the topological characteristics of the location.

A good example of a real time application that is characterized by large data storage requirements is a terrain referenced navigation system in which each physical feature of a terrain area is mapped into memory. This representation of theterrain resides on a permanent storage medium such as a magnetic disk, tape, or optical disk and is referenced in the usual fashion of latitude and longitude. In the case of a terrain referenced navigation system, the elevation of each latitude andlongitude sampled point is stored. For instance, if an area is to be represented in a latitude/longitude elevation survey, it would require, for each latitude/longitude point, a certain number of bits equal to the resolution of the height beingresolved. For example, if 256 discrete elevations are to be resolved, then 8 bits of data need to be dedicated to each latitude/longitude point. In another example, if 65,000 elevations are to be resolved then 16 bits of data need to be assigned toevery latitude/longitude point. In yet another example, a 1,000.times.1,000 latitude/longitude grid storing 16 points of data for each elevation would require 16 million bits of data storage.

The prior art method of reducing data storage requirements for terrain referenced navigation real time applications utilized the discrete cosine transform/differential pulse code modulation method. While this method achieves very highcompression ratios, it also introduces relatively large data errors when compared to the method described herein. Traditional methods of data compression and decompression require that the information no longer be viewed as a latitude/longitudeelevation study, but in fact be viewed as a set of sequential serial bit streams which are compressed using various schemes well known in the prior art. Sequential bit stream compression algorithms cannot be used in flight trajectory algorithms. Sinceelevation data must be available for any given flight path, the elevation data must be directly accessible for any randomly chosen latitude/longitude the aircraft happens to overfly. This drawback of the prior art, along with the advantages of usingdata compression and decompression are important motivations for the invention.

Prior art data compression and decompression algorithms have also suffered from aliasing error. Aliasing error is the error induced when real world analog information is quantized in a digital fashion. A good example of this is the quantizationof altitude data wherein the altitude ranges from 0 feet above sea level to 1,000 feet above sea level where 100 samples will be taken. The accuracy of any sample relative to other samples will be 10 feet. There are 100.times.10 samples being taken. In this example, the aliasing error would be five feet because such sampling provides an accurate representation of the altitude within five feet. As a more specific example, if a sample point is taken at 910 feet, this technique assures that the datapoint value ranges between 910-5 and 910+5 feet. Thus, the aliasing error of the sampling technique, or the storage technique that is required when any analog real time system is being converted to a digital processing system, is the fundamentallimitation on accuracy inherent in any scheme whether it is data compression or just data storage.

SUMMARY OF THE INVENTION

This invention uses a method of data compression and decompression including aliasing error reduction utilizing a statistical approach. An array of real world data is scanned for a set of modes. Each mode represents a database populationdensity that is most popular. These most popular modes are used as precision points in a data compression and decompression scheme such that all nonmodal points are referenced to a mode point. During mode analysis, the alias of the decompression istracked and kept such that the total aliasing error is reduced to a minimum or eliminated.

It is an object of this invention to provide an improved data compression/decompression method and apparatus that reduces the amount of data storage required to store real time data in a mode such that it is still randomly addressable by itsprinciple addressing characteristics.

It is another object of this invention to provide an improved data compression/decompression method and apparatus that is able to decompress the information stored using the compression algorithm described above.

It is yet another object of this invention to provide an improved data compression/decompression method and apparatus that is able to reduce the aliasing error involved in digitizing, compressing and decompressing data.

It is still another object of this invention to provide an improved data compression/decompression method and apparatus that is able to have the decompression phase of the process performed in real time.

It is another object of this invention to provide an improved data compression/decompression method and apparatus that stores latitude and longitude elevation data in a compressed form representing a terrain referenced navigation database.

It is another object of this invention to provide an improved data compression/decompression method and apparatus that decompresses information stored in a terrain referenced navigation system.

Other objects, features and advantages of the present invention will become apparent to those skilled in the art through the Description of the Preferred Embodiment, Claims, and Drawings herein wherein like numerals refer to like elements.

BRIEF DESCRIPTION OF THE DRAWINGS

To illustrate this invention, a preferred embodiment will be described herein with reference to the accompanying drawings. The preferred embodiment concerns the compression and decompression of a source database, such as a terrain referenceddatabase or a video image database.

FIG. 1 shows a data flow block diagram of one embodiment of the method of the invention including the mode analysis process, data compression process and data decompression process.

FIG. 2 shows a flow diagram of one embodiment of the mode analysis method of the invention including the method for frequency counting.

FIG. 3 shows a flow diagram of one embodiment of the compression method of the invention, including the alias adjustment process.

FIG. 4 shows a flow diagram of one embodiment of the decompression method of the invention including decompression of the compressed index database.

FIG. 5 shows a data flow diagram of one embodiment of the compression and coding process of the invention.

FIG. 6 shows a data flow diagram of one embodiment of the decompression and decoding method of the invention.

FIG. 7 shows a data flow diagram of one embodiment of the invention used to compress data to disk or tape.

FIG. 8 shows a data flow diagram of one embodiment of the method of the invention useful for broadcast.

FIG. 9 shows a data flow diagram of the structure of compressed data employed in one embodiment of the invention.

DESCRIPTION OF THE PREFERRED EMBODIMENT

FIG. 1 shows a data flow block diagram of the method of the invention. The data flows from a database 100 through a mode analysis process 110, to an elevation table database 120. Compression and alias compensation 130 are performed to create acompressed index database 140, the data is then decompressed 150, and may be used by an application 160 such as a TRN application. The method of the invention may advantageously be implemented as a software process on a standard microprocessor orimplemented in hardware using specialized components for system functions. The database that is to be compressed could be a data representation of a visual scene or topology.

The database 100 can be arranged in any fashion, typically through an addressing scheme familiar to those in the art. The database 100 is read by the mode analysis function 110 which calculates the most popular modes of the database. A mode isa statistical concept that defines the database 100 as having a population whose elements are most popularly around the mode. The mode constitutes more of these values in the database 100 than any others. The invention calculates the primary mode andthen a plurality of secondary modes until enough modes are found to constitute the elevation table database 120. In an embodiment of the invention used for terrain referenced navigation, 256 modes are checked which represent 8 bits of data storage inthe compressed index database 140. The mode analysis process 110 determines the most popular set of modes and stores this information in the elevation table database 120. The elevation table 120 is then used by the compression and alias compensationstep 130 to determine the compensation and compression of the database 100. The compensation and alias compression step 130 uses the elevation table database 120 and the original database 100 to compress the data and store it in the compressed indexdatabase 140. The decompression and alias compensation step 150 utilizes the compressed index database 140 as well as the elevation table database 120. The application program 160 receives decompressed data from the decompression step 150.

FIG. 2 shows a flow diagram of one example embodiment of the mode analysis process 110. The mode analysis starts at process block 200. The next point in the database 100 is loaded at step 210 which initially is the first point. The frequencyarray update step 220 counts the frequency of each value in the database 100. For instance, if the point in the database 100 has a value of 1000 then the frequency array for 1000 is incremented by 1 by process step 220. At step 230, a check is made todetermine whether all points have been analyzed in the database 100. If the point checked is not the last point in the database, then the process flow returns to step 210 to load the next point from the database 100. If the next point is the lastpoint, then the process flows to step 260 and ends.

FIG. 3 shows a flow diagram of one example embodiment of the compression and aliasing compensation method 130. The compression and aliasing compensation method starts at block 310. At step 320 a check is made to determine whether the number ofentries in the elevation table 120 is less than 256. If there are less than 256 entries in the elevation table 120 then the process ends at step 395. If there are more than 256 entries in the elevation table 120 then the process flows to step 330 tolocate the element of the elevation table 120 with the smallest number of posts. Once the element of the elevation table 120 is found that has the smallest number of posts the process flows to step 335 to find the closest elevation table entry thatminimizes the accumulated error from the aliasing procedure. This process is further described below with reference to FIG. 5 and an example. The process then flows to step 340 to update the accumulated alias error. The alias error is the accumulationof all alias errors over all point values. The process flows to step 350 where the aliased values are adjusted up or down to minimize the accumulated error. The process then flows to step 380 where the aliased compressed data index is stored. Thoseskilled in the art will appreciate that the compressed index data may be stored in an independent database of compressed indexes or in RAM. The process flows to 390 where a check is made to determine whether or not this is the last point. If it is,then the process ends at step 395, if it isn't the process returns to step 320 to check the next point in the dimension scan.

FIG. 4 shows a block diagram of one example of the method of decompression and alias compensation 150. The process starts at step 400. The address of the point to be decompressed is used to access the compressed index database at step 410. Thedesired point index value is obtained in step 420 from the compressed index database 140. The process next flows to step 430 where the point value is returned to its full resolution by accessing the elevation table 120 with the index. The originalpoint may have had a resolution of 16 bits where the compression process compressed it to an 8 bit index, the original 16 bits are restored from the elevation table 120. The process then flows to step 440 where the decompressed data is returned with thefull resolution. The process ends at step 450.

Now that the structure of the data compression and decompression method of the invention has been described an example will be given to better illustrate the principals and theory of operation of the invention.

All compression/decompression processes fall into one of two classes: (1) lossless; and (2) not lossless. The method of the invention may allow both if there is a large enough modulus of index for a given set of data, it may always be possibleto make it lossless, and still obtain some compression. However, in practice the modulus of index is a hardware constraint which a given dataset must be constrained to live with. Therefore, in general, the process of the present invention will producedata that in some cases is not lossless. However, the losses are a function of the modulus of index and are minimal for a certain modulus index in a given data set. In addition, the decompression step 150 of the invention can be accomplished in arelatively very short time. This rapid processing characteristic lends itself well to applications where preprocessing has no real-time constraints, such as taping a television show or movie and editing it, etc.

Now referring to FIG. 5, a dataflow diagram of the method of the invention is shown as applied to a TRN example. In the TRN example, the size of the data for one embodiment of the invention is an array of 200.times.200 points, known as posts,each with 16 bits of elevation information or 40,000.times.2 bytes/post for a total storage requirement of 80K bytes. The compression process 102 is an algorithm where 16 bits of elevation data are represented by an 8 bit index in a table of elevationvalues. Those skilled in the art will appreciate that it could be a 10 bit index or a 4 bit index or any other desired modulus of index. In one embodiment, the modulus was chosen to be 8 to yield approximately a 2:1 compression that did not induceexcessive error.

As described with reference to FIG. 2 the process builds an elevation table of all the unique elevations in the 200.times.200 array of data. For example, to represent terrain in the state of Kansas might require two hundred and twenty uniqueelevations. The data for this example is listed in Table 1.

The compression process 102 proceeds by reading the 40,000 data post elevations, looking each one up in the elevation table 120 and noting its index. Since there are fewer than 256 entries in the elevation table 120, the index is expressible in8 binary digits. However, if there are more than 256 unique elevations in the initial elevation table, the process proceeds to change the data such that there are only 256 different, unique elevations.

The process modifies the data to accomplish two goals:

1. Change the least amount of data necessary to fit the given modulus.

2. Change the data in such a way as to make the mean error approach zero.

The compression method of the invention proceeds by selecting the elevation table 120 entry with the smallest number of posts associated with a particular elevation (column 3 in Table 1) and changes all the elements of the elevation table 120 andthe compressed index database 140, with that elevation to some other elevation which is closest to the original elevation in either a plus or minus direction following the method of the invention described below.

For example, elevation 351 at index 6 is selected since it has only twelve members. Those twelve members are changed from 351 to 350 in the block of data and entry 6 is eliminated from Table 1. The process of the invention may optionally chooseto select the entry with the minimal entry in column 3 of the table and alias it to its neighbor and eliminate it until the table has only 256 entries. This approach satisfies the minimal error objective in that it modifies the minimum amount of datanecessary to fit the given modulus; here assumed to be 8 binary digits.

The compression process 102 further proceeds by accumulating the total induced error ERROR.sub.CUM for the block of data as a whole. In our example, we changed 12 posts from an elevation of 351 feet to an elevation of 350 feet so that theERROR.sub.CUM =-12 feet. Since the accumulated error is negative, the next entry will process UP rather than DOWN.

For example, the next lowest entry in Table 1 is index 2 at elevation 347 with 20 members represented. Since the ERROR.sub.CUM is negative it is aliased to index 3 (or UP the index count) and all 20 data block entries of 347 are replaced with anew value, 348, and 347 is eliminated from the table. Then, the accumulated error becomes

The process will then alias down in the next compensation cycle. In so doing, the accumulated absolute error will stay near zero rather than becoming large in a positive or negative sense.

Table 3 has been reduced by six entries and has a cumulative error of -6. In addition, the worst case error for any post is .vertline.3.vertline. feet. Therefore, the compression process 102 searches column 4 first, looking for the minimumerror entries. Of all data points with the same absolute value, it selects the one with the fewest number of posts and aliases UP or DOWN to minimize the total cumulative error. The aliased value is removed from the table and the process loops untilthe desired number of entries remain. Therefore, this results in an "aliased" surface which is a minimum representation of the original surface for a given modulus.

The compression process 102 has produced a set of 200.times.200.times.8 bit indexes which is stored in the compressed index database 140 or in a RAM array, and a table of 256 elevation values in the elevation table 120 which could also be in RAM.

The decompression process 150 proceeds as follows: retrieve the elevation at point (i,j), look up the index stored in the compressed database 145 or RAM (i,j) to obtain the 8 bit index K. This takes one memory fetch. Then look up K in theelevation table 120, which takes one memory fetch, and the associated 16 bit elevation is obtained. Thus, to get a 2:1 data compression costs only one extra memory reference at utilization time (25 nsec).

Referring again to FIG. 5 which shows an encoding process 540 which further compresses the indexes in the compressed index database 140 for more efficient storage on disk or tape. Terrain data like most visual data is fairly well-behaved, in thesense that adjacent data generally is 2nd derivative continuous, or close together in elevation in the terrain example (or color/contrast in the TV example). A line of elevation posts (row or column) in a block of data have elevations which are closetogether, and so, when quantized and expressed as a series of indices in a table, the absolute value of consecutive posts have indices which are close together.

Experimental data shows that in a block of data which was 256 .times.256, that more than 92% of the elevation posts when expressed as modules 256 indices were within .+-.7 of the index of the post next to them. If the difference in the indicesof all the elevations in a given block of data were .+-.7, another 2:1 compression could have been accomplished, with no additional error.

Two differences can be expressed in one 8 bit byte. Similarly, when the terrain is flatter, many of the consecutive data in a row fall within .+-.1 of the previous index data. This would only require 1 bit and a second bit to show differencesof +1, 0, -1 in the indexes of adjacent posts, allowing the packing of four data points in an 8 bit word.

The following cases must be distinguished:

1. one eight bit index per byte.

2. two four bit "nibbles" per byte (difference)

3. three two bit "quarters" per byte (difference)

4. Four two bit "quarters" per byte (difference).

To accomplish these distinctions, the table of indexes must be reduced to 254 and two unique 8 bit values must be created as flags to denote the system state.

Since case 3 above is a subset of case 4 with a "null" in lower two bits there are only three cases. Since from any given case there are only two other cases to transition to, only 2 flags are required.

The method of the invention proceeds as follows. Put out the first index as an 8 bit byte (1:1). Then if at least four following indices are within .+-.7 but not .+-.1, write out the flag 1 byte (0000 0000) and begin packing indices two to abyte. When transitioning back to 1:1 write out a 1000 0000 or when transitioning to 4:1 write out another 0000 0000, as shown on the diagram above. Continue this process until out of data for the block.

Data which is packed into 4 bit nibbles to a byte has the following translation table:

Those skilled in the art will note that extended strings of a constant delta are represented with a "repetition comment" as is done in "run length encoding" methods. In one alternate embodiment of the invention this could be incorporated byusing both zero-byte flags in succession to signal transition to repetition count mode. Since by definition the string of constants is the same as the previously written index, just the two zero bytes and a repeat constant need be stored. If therepetition count (which is always positive) is greater than 256 (there are no zero lengths) then we can start a second repetition count immediately after it. There would be a zero byte terminator of one or the other type which would follow the repeatcount to signal what the next 1:1 index was, than that index would follow and the process would be out of repetition count mode:

The decompression data flow for decompressing the packed index offsets 610 to actual data 170 is illustrated in FIG. 6. The decoding process 620 unpacks the encoded data 610 into index array format using codes such as in the above encodingtables to reconstruct 8 bit data indices 140A from 1:1, 2:1, 3:1 and 4:1 difference data. This could be done in a look-ahead mode to bring up the next anticipated block of data (using direction of flight in a TRN application, for example) on the nextblock of data off the disk or tape for the TV example.

Decompression process 150 proceeds as shown in FIG. 4. There are no losses in the encoding portion of the process step 540. The envisioned compression implementation for TV is shown in FIG. 7. Raw data 100 is quantized by process 102 into anindex database stored in RAM 730 following the compression method of the invention. The index is packed using the coding process 540. The packed index database can then be stored on disk 710 or tape 740.

Now referring to FIG. 8 which shows the method of the invention used to broadcast then decompress the raw data 100. The compressed information is transmitted by RF transmitter 720 through RF medium 725 from disk 710 or tape 740. The receivedsignal is decoded by process 620 and unpacked compressed data is stored in RAM 780. Decompression process 150 restores the data to original resolution to database 170. The typical compression is about 4:1 so the data can be transmitted at a rate 4times slower than used on the screen.

Each database, whether it is 200.times.200 elevation posts, 250.times.250 elevation posts for TRN or a single TV frame or high resolution computer video display of 2000 pixels.times.2000 lines; will have an associated table of indexes which willhave 254 entries in it assuming modulus 8.

The table of indices is also compressed by the encoding process 540 before being written on disk as shown in FIG. 7. The structure of the compressed data on the disk or tape is shown in FIG. 9.

In the case of a disk 710, a "header block" 810 should be written which keeps up with the latitudes and longitudes at the NW, NE, SW and SE corner of each data block and the sector number on the disk where that information is stored. Then theaccessing program could determine which block was needed and go directly to that sector to get the table of indices and the packed data for the desired block of elevation data.

Those skilled in the art will recognize that when compressing data that exceeds the modulus of index range, in the TRN example the 8 bit byte encodes for 254 elevations, more than one byte of data may be used to start the encoding sequence. Also, elevation changes may require an additional control state that codes for changes in elevation greater than 254 feet.

This invention has been described herein in considerable detail in order to comply with the Patent Statutes and to provide those skilled in the art with the information needed to apply the novel principles and to construct and use suchspecialized components as are required. However, it is to be understood that the invention can be carried out by specifically different equipment and devices, and that various modifications, both as to the equipment details and operating procedures, canbe accomplished without departing from the scope of the invention itself.