Module Utils

This module contains derived utilities taken from the MIST framework, which are excellent tools to be reused in an OO environment!.

Authors:

  • Grimes : Design & Programming of the MIST framework.

Contributions:

  • FlightControl : Rework to OO framework

Global(s)

FLARECOLOR
SMOKECOLOR
UTILS
lookup_table

Type FLARECOLOR

FLARECOLOR.Green
FLARECOLOR.Red
FLARECOLOR.White
FLARECOLOR.Yellow

Type SMOKECOLOR

SMOKECOLOR.Blue
SMOKECOLOR.Green
SMOKECOLOR.Orange
SMOKECOLOR.Red
SMOKECOLOR.White

Type UTILS

UTILS.BasicSerialize(s)
UTILS.DeepCopy(object)
UTILS.DoString(s)
UTILS.FeetToMeters(feet)
UTILS.KmphToMps(kmph)
UTILS.KnotsToMps(knots)
UTILS.MetersToFeet(meters)
UTILS.MetersToNM(meters)
UTILS.MpsToKmph(mps)
UTILS.MpsToKnots(mps)
UTILS.NMToMeters(NM)
UTILS.OneLineSerialize(tbl)
UTILS.Round(num, idp)

From http://lua-users.org/wiki/SimpleRound use negative idp for rounding ahead of decimal place, positive for rounding after decimal place

UTILS.ToDegree(angle)
UTILS.ToRadian(angle)
UTILS.tostringLL(lat, lon, acc, DMS)

Global(s)

#FLARECOLOR FLARECOLOR
#SMOKECOLOR SMOKECOLOR
#UTILS UTILS
lookup_table

Type Utils

Type FLARECOLOR

Field(s)

FLARECOLOR.Green
FLARECOLOR.Red
FLARECOLOR.White
FLARECOLOR.Yellow

Type SMOKECOLOR

Field(s)

SMOKECOLOR.Blue
SMOKECOLOR.Green
SMOKECOLOR.Orange
SMOKECOLOR.Red
SMOKECOLOR.White

Type UTILS

Utilities static class.

Field(s)

UTILS.BasicSerialize(s)

porting in Slmod's "safestring" basic serialize

Parameter

  • s :

UTILS.DeepCopy(object)

from http://lua-users.org/wiki/CopyTable

Parameter

  • object :

UTILS.DoString(s)

porting in Slmod's dostring

Parameter

  • s :

UTILS.FeetToMeters(feet)

Parameter

  • feet :

UTILS.KmphToMps(kmph)

Parameter

  • kmph :

UTILS.KnotsToMps(knots)

Parameter

  • knots :

UTILS.MetersToFeet(meters)

Parameter

  • meters :

UTILS.MetersToNM(meters)

Parameter

  • meters :

UTILS.MpsToKmph(mps)

Parameter

  • mps :

UTILS.MpsToKnots(mps)

Parameter

  • mps :

UTILS.NMToMeters(NM)

Parameter

  • NM :

UTILS.OneLineSerialize(tbl)

porting in Slmod's serialize_slmod2

Parameter

  • tbl :

UTILS.Round(num, idp)

From http://lua-users.org/wiki/SimpleRound use negative idp for rounding ahead of decimal place, positive for rounding after decimal place

Parameters

  • num :

  • idp :

UTILS.ToDegree(angle)

Parameter

  • angle :

UTILS.ToRadian(angle)

Parameter

  • angle :

UTILS.tostringLL(lat, lon, acc, DMS)

acc: in DM: decimal point of minutes. In DMS: decimal point of seconds. position after the decimal of the least significant digit: So: 42.32 - acc of 2.

Parameters

  • lat :

  • lon :

  • acc :

  • DMS :