Public Member Functions | Properties

FsLatitude Struct Reference

A structure representing a latitude value in MS Flight Simulator. More...

List of all members.

Public Member Functions

 FsLatitude (long FSUnits)
 Create a new latitude value from the 8-Byte MS Flight Simulator units supplied by FSUIPC.
 FsLatitude (int FSUnits)
 Create a new latitude value from the 4-Byte MS Flight Simulator units supplied by FSUIPC.
 FsLatitude (Double DecimalDegrees)
 Create a new latitude value in degrees.
 FsLatitude (int Degrees, double DecimalMinutes)
 Create a new latitude value in degrees and minutes.
 FsLatitude (int Degrees, int Minutes, double DecimalSeconds)
 Create a new latitude value in degrees, minutes and seconds.
long ToFSUnits8 ()
 Converts this latitude to 8-Byte MS Flight Simulator units. Can be used to write to FSUIPC, e.g. offset 0x0560.
int ToFSUnits4 ()
 Converts this latitude to 4-Byte MS Flight Simulator units. Can be used to write to FSUIPC, e.g. offset 0x085C.
override string ToString ()
 The latitude represented as a string in the default format of N|S dd* mm.mm'.
string ToString (bool HemisphereAsText, string DetailLevel, short DecimalPlaces)
 The lattitude represented as a string in the specified format.
FsLatitude Add (FsLatitudeSpan Distance)
 Create a new latitude by adding a latitude span to the current lattitude.
FsLatitude Subtract (FsLatitudeSpan Distance)
 Create a new latitude by subtracting a latitude span from the current lattitude.
FsLatitude AddDegrees (Double Degrees)
 Create a new latitude by adding a number of degrees to the current latitude.
FsLatitude AddMinutes (Double Minutes)
 Create a new latitude by adding a number of minutes to the current latitude.
FsLatitude AddSeconds (Double Seconds)
 Create a new latitude by adding a number of seconds to the current latitude.

Properties

int Degree [get]
 The whole degree part of the latitude.
int Minute [get]
 The whole minute part of the latitude.
int Second [get]
 The whole second part of latitude.
double DecimalDegrees [get]
 The latitiude expressed in degrees.
double DecimalMinutes [get]
 The minutes part of the latitude.
double DecimalSeconds [get]
 The seconds part of the latitude.

Detailed Description

A structure representing a latitude value in MS Flight Simulator.


Constructor & Destructor Documentation

FsLatitude ( long  FSUnits )

Create a new latitude value from the 8-Byte MS Flight Simulator units supplied by FSUIPC.

Parameters:
FSUnitsAn 8-Byte integer representing the latitude in FS Units. e.g. from FSUIPC offset 0x0560
FsLatitude ( int  FSUnits )

Create a new latitude value from the 4-Byte MS Flight Simulator units supplied by FSUIPC.

Parameters:
FSUnitsA 4-Byte integer representing the latitude in FS Units. e.g. from FSUIPC offset 0x085C
FsLatitude ( Double  DecimalDegrees )

Create a new latitude value in degrees.

Parameters:
DecimalDegreesThe latitude in degrees
FsLatitude ( int  Degrees,
double  DecimalMinutes 
)

Create a new latitude value in degrees and minutes.

Parameters:
DegreesThe number of degrees for the new latitude
DecimalMinutesThe number of minutes for the new latitude
FsLatitude ( int  Degrees,
int  Minutes,
double  DecimalSeconds 
)

Create a new latitude value in degrees, minutes and seconds.

Parameters:
DegreesThe number of degrees for the new latitude
MinutesThe number of minutes for the new latitude
DecimalSecondsThe number of seconds for the new latitude

Member Function Documentation

FsLatitude Add ( FsLatitudeSpan  Distance )

Create a new latitude by adding a latitude span to the current lattitude.

Parameters:
DistanceThe latitude span to add
Returns:
The resulting latitude after the addition
FsLatitude AddDegrees ( Double  Degrees )

Create a new latitude by adding a number of degrees to the current latitude.

Parameters:
DegreesThe number of degrees to add
Returns:
The resulting latitude after the addition
FsLatitude AddMinutes ( Double  Minutes )

Create a new latitude by adding a number of minutes to the current latitude.

Parameters:
MinutesThe number of minutes to add
Returns:
The resulting latitude after the addition
FsLatitude AddSeconds ( Double  Seconds )

Create a new latitude by adding a number of seconds to the current latitude.

Parameters:
SecondsThe number of seconds to add
Returns:
The resulting latitude after the addition
FsLatitude Subtract ( FsLatitudeSpan  Distance )

Create a new latitude by subtracting a latitude span from the current lattitude.

Parameters:
DistanceThe latitude span to subtract
Returns:
The resulting latitude after the subtraction
int ToFSUnits4 (  )

Converts this latitude to 4-Byte MS Flight Simulator units. Can be used to write to FSUIPC, e.g. offset 0x085C.

Returns:
The latitude represented in 4-Byte MS Flight Simulator units.
long ToFSUnits8 (  )

Converts this latitude to 8-Byte MS Flight Simulator units. Can be used to write to FSUIPC, e.g. offset 0x0560.

Returns:
The latitude represented in 8-Byte MS Flight Simulator units.
override string ToString (  )

The latitude represented as a string in the default format of N|S dd* mm.mm'.

Returns:
A string representing the latitude in the default format
string ToString ( bool  HemisphereAsText,
string  DetailLevel,
short  DecimalPlaces 
)

The lattitude represented as a string in the specified format.

Parameters:
HemisphereAsTextDenote hemisphere using N or S. If false, south is marked as -
DetailLevelSpecifies the detail level. "d" for degrees only, "m" for degrees and minutes, "s" for degrees, minutes and seconds
DecimalPlacesThe number of decimal places to show
Returns:
A string representing the latitude in the specified format

Property Documentation

double DecimalDegrees [get]

The latitiude expressed in degrees.

double DecimalMinutes [get]

The minutes part of the latitude.

double DecimalSeconds [get]

The seconds part of the latitude.

int Degree [get]

The whole degree part of the latitude.

int Minute [get]

The whole minute part of the latitude.

int Second [get]

The whole second part of latitude.