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


import android.location.Location;
import java.text.SimpleDateFormat;
import java.util.Locale;
import java.util.TimeZone;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.NOT_AVAILABLE;
    public static final byte FORMAT_ALTITUDE    = 3;
    public static final byte FORMAT_SPEED       = 4;
    public static final byte FORMAT_ACCURACY    = 5;
    public static final byte FORMAT_BEARING     = 6;
    public static final byte FORMAT_DURATION    = 7;
    public static final byte FORMAT_SPEED_AVG   = 8;
    public static final byte FORMAT_DISTANCE    = 9;
    public static final byte FORMAT_TIME        = 10;

    public static final float M_TO_FT   = 3.280839895f;
    public static final float M_TO_NM   = 0.000539957f;
    public static final float MS_TO_MPH = 2.2369363f;
    public static final float MS_TO_KMH = 3.6f;
    public static final float MS_TO_KN  = 1.943844491f;
    public static final float KM_TO_MI  = 0.621371192237f;

    private final GPSApplication gpsApp = GPSApplication.getInstance();

    /**
     * It returns a PhysicalData formatted basing on the given criteria and on the Preferences.
     *
     * @param number The float number to format as Physical Data
     * @param format The desired Format (FORMAT_LATITUDE, FORMAT_LONGITUDE, FORMAT_ALTITUDE...)
     * @return The Physical Data containing number and unit of measurement
     */
    public PhysicalData format(float number, byte format) {
        PhysicalData physicalData = new PhysicalData();
        physicalData.value = "";
        physicalData.um = "";
        
// 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/PhysicalDataFormatter.java
import android.location.Location;
import java.text.SimpleDateFormat;
import java.util.Locale;
import java.util.TimeZone;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.NOT_AVAILABLE;

    public static final byte FORMAT_ALTITUDE    = 3;
    public static final byte FORMAT_SPEED       = 4;
    public static final byte FORMAT_ACCURACY    = 5;
    public static final byte FORMAT_BEARING     = 6;
    public static final byte FORMAT_DURATION    = 7;
    public static final byte FORMAT_SPEED_AVG   = 8;
    public static final byte FORMAT_DISTANCE    = 9;
    public static final byte FORMAT_TIME        = 10;

    public static final float M_TO_FT   = 3.280839895f;
    public static final float M_TO_NM   = 0.000539957f;
    public static final float MS_TO_MPH = 2.2369363f;
    public static final float MS_TO_KMH = 3.6f;
    public static final float MS_TO_KN  = 1.943844491f;
    public static final float KM_TO_MI  = 0.621371192237f;

    private final GPSApplication gpsApp = GPSApplication.getInstance();

    /**
     * It returns a PhysicalData formatted basing on the given criteria and on the Preferences.
     *
     * @param number The float number to format as Physical Data
     * @param format The desired Format (FORMAT_LATITUDE, FORMAT_LONGITUDE, FORMAT_ALTITUDE...)
     * @return The Physical Data containing number and unit of measurement
     */
    public PhysicalData format(float number, byte format) {
        PhysicalData physicalData = new PhysicalData();
        physicalData.value = "";
        physicalData.um = "";
        
        if (number == NOT_AVAILABLE) return(physicalData);     // Returns empty fields if the data is not available