// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int NOT_AVAILABLE = -100000;


import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.NOT_AVAILABLE;
import androidx.documentfile.provider.DocumentFile;
import android.net.Uri;
import android.util.Log;
import org.greenrobot.eventbus.EventBus;
import java.io.BufferedInputStream;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileNotFoundException;
                }
                BufferedInputStream bin = new BufferedInputStream(fin);
                DataInputStream din = new DataInputStream(bin);
                int i;
                int i_lon = BOUNDARY;
                int i_lat = BOUNDARY;
                int count = (int) ((privateDocument.length() / 2));

                for (i = 0; (i < count); i++) {
                    try {
                        EGMGrid[i_lon][i_lat] = din.readShort();
                        i_lon++;
                        if (i_lon >= (1440 + BOUNDARY)) {
                            i_lat++;
                            i_lon = BOUNDARY;
                        }
                    } catch (IOException e) {
                        isEGMGridLoaded = false;
                        isEGMGridLoading = false;
                        Log.w("myApp", "[#] EGM96.java - IOException");
                        return;
                        //Toast.makeText(getApplicationContext(), "Oops", Toast.LENGTH_SHORT).show();
                        //e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
                    }
                }

                if (BOUNDARY > 0) {
                    // Fill boundaries with correct data, in order to speed up retrieving for interpolation;
                    // fill left + right boundaries
                    //Log.w("myApp", "[#] EGM96.java - LR BOUNDARIES");
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int NOT_AVAILABLE = -100000;


// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/EGM96.java
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.NOT_AVAILABLE;
import androidx.documentfile.provider.DocumentFile;
import android.net.Uri;
import android.util.Log;
import org.greenrobot.eventbus.EventBus;
import java.io.BufferedInputStream;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileNotFoundException;

                }
                BufferedInputStream bin = new BufferedInputStream(fin);
                DataInputStream din = new DataInputStream(bin);
                int i;
                int i_lon = BOUNDARY;
                int i_lat = BOUNDARY;
                int count = (int) ((privateDocument.length() / 2));

                for (i = 0; (i < count); i++) {
                    try {
                        EGMGrid[i_lon][i_lat] = din.readShort();
                        i_lon++;
                        if (i_lon >= (1440 + BOUNDARY)) {
                            i_lat++;
                            i_lon = BOUNDARY;
                        }
                    } catch (IOException e) {
                        isEGMGridLoaded = false;
                        isEGMGridLoading = false;
                        Log.w("myApp", "[#] EGM96.java - IOException");
                        return;
                        //Toast.makeText(getApplicationContext(), "Oops", Toast.LENGTH_SHORT).show();
                        //e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
                    }
                }

                if (BOUNDARY > 0) {
                    // Fill boundaries with correct data, in order to speed up retrieving for interpolation;
                    // fill left + right boundaries
                    //Log.w("myApp", "[#] EGM96.java - LR BOUNDARIES");
                    for (int ix = 0; (ix < BOUNDARY); ix++) {