package shared.model; /** * Constants that are used throughout the program * Created by Erika on 19-Mar-17. */ public class Constants { /** * Multiply by this factor to convert nautical miles to meters. *
* Divide by this factor to convert meters to nautical miles. *
* 1 nautical mile = 1852 meters. */ public static final int NMToMetersConversion = 1852; /** * Multiply by this factor to convert Knots to millimeters per second. *
* Divide by this factor to convert millimeters per second to Knots. *
* 1 knot = 514.444 millimeters per second. */ public static final double KnotsToMMPerSecond = 514.444; /** * The scale factor of the race. * Frame periods are multiplied by this to get the amount of time a single frame represents. * E.g., frame period = 20ms, scale = 5, frame represents 20 * 5 = 100ms, and so boats are simulated for 100ms, even though only 20ms actually occurred. */ public static final int RaceTimeScale = 2;//10; /** * The race pre-start time, in milliseconds. 3 minutes (30 seconds for development). */ // public static final long RacePreStartTime = 30 * 1000; public static final long RacePreStartTime = 1000; /** * The race preparatory time, in milliseconds. 1 minute. */ // public static final long RacePreparatoryTime = 60 * 1000; public static final long RacePreparatoryTime = 1 * 60 * 1000; /** * The number of milliseconds in one hour. *
* Multiply by this factor to convert milliseconds to hours. *
* Divide by this factor to convert hours to milliseconds. */ public static long OneHourMilliseconds = 1 * 60 * 60 * 1000; /** * The number of seconds in one hour. *
* Multiply by this factor to convert seconds to hours. *
* Divide by this factor to convert hours to seconds. */ public static long OneHourSeconds = 1 * 60 * 60; }