Public Member Functions | Properties

FsLongitude Struct Reference

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

List of all members.

Public Member Functions

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

Properties

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

Detailed Description

A structure representing a longitude value in MS Flight Simulator.


Constructor & Destructor Documentation

FsLongitude ( long  FSUnits )

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

Parameters:
FSUnitsAn 8-Byte integer representing the longitude in FS Units. e.g. from FSUIPC offset 0x0568
FsLongitude ( int  FSUnits )

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

Parameters:
FSUnitsA 4-Byte integer representing the longitude in FS Units. e.g. from FSUIPC offset 0x0864
FsLongitude ( Double  DecimalDegrees )

Create a new longitude value in degrees.

Parameters:
DecimalDegreesThe longitude value in degrees
FsLongitude ( int  Degrees,
double  DecimalMinutes 
)

Create a new longitude value in degrees and minutes.

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

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

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

Member Function Documentation

FsLongitude Add ( FsLongitudeSpan  Distance )

Create a new longitude by adding a longitude span to the current longitude.

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

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

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

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

Parameters:
MinutesThe nunber of minutes to add
Returns:
The resulting longitude after the addition
FsLongitude AddSeconds ( Double  Seconds )

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

Parameters:
SecondsThe nunber of seconds to add
Returns:
The resulting longitude after the addition
FsLongitude Subtract ( FsLongitudeSpan  Distance )

Create a new longitude by subtracting a longitude span from the current longitude.

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

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

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

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

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

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

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

The longitude represented as a string in the specified format.

Parameters:
HemisphereAsTextDenote hemisphere using W or E. If false, west 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 longitude in the specified format

Property Documentation

double DecimalDegrees [get]

The longitude expressed in degrees.

double DecimalMinutes [get]

The minutes part of the longitude.

double DecimalSeconds [get]

The seconds part of the longitude.

int Degree [get]

The whole degree part of the longitude.

int Minute [get]

The whole minute part of the longitude.

int Second [get]

The whole seconds part of the longitude.