FSUIPC Client DLL
.NET interface for FSUIPC
PayloadServices Class Reference

A class that provides information about the Fuel and Payload of the current aircraft More...

Public Member Functions

FsFuelTank GetFuelTank (FSFuelTanks Tank)
 DEPRECATED: Use the accessor on the FuelTanks collection instead. e.g. FsFuelTank leftTank = PayloadServices.FuelTanks[FsFuelTanks.Left_Main]; More...
 
void RefreshData ()
 Updates all the payload data from FSUIPC. More...
 
void WriteChanges ()
 Writes the changes to fuel tank levels and payload weights More...
 
double LoadFuelUSGallons (double FuelQuantity, bool SetAbsoluteQuantity)
 Sets the fuel in the aircraft to the specified quantity, or adds the specified quantity. The fuel will be distributed automatically between the fuel tanks present on the aircraft. If adding fuel the algorithm will try to correct any imbalance between the tanks. More...
 
double LoadFuelLitres (double FuelQuantity, bool SetAbsoluteQuantity)
 Sets the fuel in the aircraft to the specified quantity, or adds the specified quantity. The fuel will be distributed automatically between the fuel tanks present on the aircraft. If adding fuel the algorithm will try to correct any imbalance between the tanks. More...
 
double LoadFuelLbs (double FuelQuantity, bool SetAbsoluteQuantity)
 Sets the fuel in the aircraft to the specified quantity, or adds the specified quantity. The fuel will be distributed automatically between the fuel tanks present on the aircraft. If adding fuel the algorithm will try to correct any imbalance between the tanks. More...
 
double LoadFuelKgs (double FuelQuantity, bool SetAbsoluteQuantity)
 Sets the fuel in the aircraft to the specified quantity, or adds the specified quantity. The fuel will be distributed automatically between the fuel tanks present on the aircraft. If adding fuel the algorithm will try to correct any imbalance between the tanks. More...
 
double LoadFuelNewtons (double FuelQuantity, bool SetAbsoluteQuantity)
 Sets the fuel in the aircraft to the specified quantity, or adds the specified quantity. The fuel will be distributed automatically between the fuel tanks present on the aircraft. If adding fuel the algorithm will try to correct any imbalance between the tanks. More...
 
double LoadFuelSlugs (double FuelQuantity, bool SetAbsoluteQuantity)
 Sets the fuel in the aircraft to the specified quantity, or adds the specified quantity. The fuel will be distributed automatically between the fuel tanks present on the aircraft. If adding fuel the algorithm will try to correct any imbalance between the tanks. More...
 

Properties

bool TooManyPayloadStations [get]
 This will be true if the loaded aircraft has more than 61 payload stations. FSUIPC can only handle the first 61 and therefore the PayloadStations list will never have more than that. Becuase of this limitation, stations above 61 that will not be accessible to your application. More...
 
List< FsPayloadStationPayloadStations [get]
 A strongly-typed list of FsPayloadStation objects. One for each payload station on this aircraft. More...
 
FsFuelTanksCollection FuelTanks [get]
 A strongly-typed list of FsFuelTank objects. One for each know possible fuel tank. Check which tanks are present with the IsPresent property. More...
 
double PayloadWeightLbs [get]
 The total current weight of all payload stations in Pounds More...
 
double PayloadWeightKgs [get]
 The current weight of all payload stations in Kilograms More...
 
double PayloadWeightSlugs [get]
 The current weight of all payload stations in Slugs More...
 
double PayloadWeightNewtons [get]
 The current weight of all payload stations in Newtons More...
 
double GrossWeightLbs [get]
 The total current weight of the aircraft in Pounds More...
 
double GrossWeightKgs [get]
 The total current weight of the aircraft in Kilograms More...
 
double GrossWeightSlugs [get]
 The total current weight of the aircraft in Slugs More...
 
double GrossWeightNewtons [get]
 The total current weight of the aircraft in Newtons More...
 
double MaxGrossWeightLbs [get]
 The maxmimum allowed weight (including payload and fuel) of the aircraft in Pounds More...
 
double MaxGrossWeightKgs [get]
 The maxmimum allowed weight (including payload and fuel) of the aircraft in Kilograms More...
 
double MaxGrossWeightSlugs [get]
 The maxmimum allowed weight (including payload and fuel) of the aircraft in Slugs More...
 
double MaxGrossWeightNewtons [get]
 The maxmimum allowed weight (including payload and fuel) of the aircraft in Newtons More...
 
double EmptyWeightLbs [get]
 The total current weight of the aircraft not including fuel or payload, in Pounds More...
 
double EmptyWeightKgs [get]
 The total current weight of the aircraft not including fuel or payload, in Kilograms More...
 
double EmptyWeightSlugs [get]
 The total current weight of the aircraft not including fuel or payload, in Slugs More...
 
double EmptyWeightNewtons [get]
 The total current weight of the aircraft not including fuel or payload, in Newtons More...
 
double FuelWeightLbs [get]
 The total current weight of all the fuel in Pounds More...
 
double FuelWeightKgs [get]
 The total current weight of all the fuel in Kilograms More...
 
double FuelWeightSlugs [get]
 The total current weight of all the fuel in Slugs More...
 
double FuelWeightNewtons [get]
 The total current weight of all the fuel in Newtons More...
 
double FuelCapacityUSGallons [get]
 The total capacity of all fuel tanks in US Gallons More...
 
double FuelCapacityLitres [get]
 The total capacity of all fuel tanks in Litres More...
 
double FuelCapacityLbs [get]
 The total current weight of all the fuel in Pounds More...
 
double FuelCapacityKgs [get]
 The total capacity of all fuel tanks in Kilograms More...
 
double FuelCapacitySlugs [get]
 The total capacity of all fuel tanks in Slugs More...
 
double FuelCapacityNewtons [get]
 The total capacity of all fuel tanks in Newtons More...
 
double FuelLevelUSGallons [get]
 The total level of all fuel tanks in US Gallons More...
 
double FuelLevelLitres [get]
 The total level of all fuel tanks in Litres More...
 
double FuelPercentage [get]
 The total percentage fuel level accross all tanks More...
 
FSFuelTanks [][] FuelDistributionPlan [get, set]
 Gets or Sets the FuelTank distribution plan for the fuel loading algorithm used by the LoadFuel() methods. More...
 

Detailed Description

A class that provides information about the Fuel and Payload of the current aircraft

Member Function Documentation

◆ GetFuelTank()

FsFuelTank GetFuelTank ( FSFuelTanks  Tank)
inline

DEPRECATED: Use the accessor on the FuelTanks collection instead. e.g. FsFuelTank leftTank = PayloadServices.FuelTanks[FsFuelTanks.Left_Main];

Parameters
TankDEPRECATED
Returns
DEPRECATED

◆ LoadFuelKgs()

double LoadFuelKgs ( double  FuelQuantity,
bool  SetAbsoluteQuantity 
)
inline

Sets the fuel in the aircraft to the specified quantity, or adds the specified quantity. The fuel will be distributed automatically between the fuel tanks present on the aircraft. If adding fuel the algorithm will try to correct any imbalance between the tanks.

The priority for filling tanks is set out in the FuelDistributionPlan. The default plan fills tip and aux tanks first, followed by the main tanks, then centre, and finally external.

Parameters
FuelQuantityThe quantity of fuel in Kg
SetAbsoluteQuantitySet to true to set the fuel load to the specified quantity. Set to false to add the specified quantity to the fuel already in the tanks.
Returns
The quantity of fuel that could not be placed in the tanks

◆ LoadFuelLbs()

double LoadFuelLbs ( double  FuelQuantity,
bool  SetAbsoluteQuantity 
)
inline

Sets the fuel in the aircraft to the specified quantity, or adds the specified quantity. The fuel will be distributed automatically between the fuel tanks present on the aircraft. If adding fuel the algorithm will try to correct any imbalance between the tanks.

The priority for filling tanks is set out in the FuelDistributionPlan. The default plan fills tip and aux tanks first, followed by the main tanks, then centre, and finally external.

Parameters
FuelQuantityThe quantity of fuel in Pounds (Lbs)
SetAbsoluteQuantitySet to true to set the fuel load to the specified quantity. Set to false to add the specified quantity to the fuel already in the tanks.
Returns
The quantity of fuel that could not be placed in the tanks

◆ LoadFuelLitres()

double LoadFuelLitres ( double  FuelQuantity,
bool  SetAbsoluteQuantity 
)
inline

Sets the fuel in the aircraft to the specified quantity, or adds the specified quantity. The fuel will be distributed automatically between the fuel tanks present on the aircraft. If adding fuel the algorithm will try to correct any imbalance between the tanks.

The priority for filling tanks is set out in the FuelDistributionPlan. The default plan fills tip and aux tanks first, followed by the main tanks, then centre, and finally external.

Parameters
FuelQuantityThe quantity of fuel in Litres
SetAbsoluteQuantitySet to true to set the fuel load to the specified quantity. Set to false to add the specified quantity to the fuel already in the tanks.
Returns
The quantity of fuel that could not be placed in the tanks

◆ LoadFuelNewtons()

double LoadFuelNewtons ( double  FuelQuantity,
bool  SetAbsoluteQuantity 
)
inline

Sets the fuel in the aircraft to the specified quantity, or adds the specified quantity. The fuel will be distributed automatically between the fuel tanks present on the aircraft. If adding fuel the algorithm will try to correct any imbalance between the tanks.

The priority for filling tanks is set out in the FuelDistributionPlan. The default plan fills tip and aux tanks first, followed by the main tanks, then centre, and finally external.

Parameters
FuelQuantityThe quantity of fuel in Newtons
SetAbsoluteQuantitySet to true to set the fuel load to the specified quantity. Set to false to add the specified quantity to the fuel already in the tanks.
Returns
The quantity of fuel that could not be placed in the tanks

◆ LoadFuelSlugs()

double LoadFuelSlugs ( double  FuelQuantity,
bool  SetAbsoluteQuantity 
)
inline

Sets the fuel in the aircraft to the specified quantity, or adds the specified quantity. The fuel will be distributed automatically between the fuel tanks present on the aircraft. If adding fuel the algorithm will try to correct any imbalance between the tanks.

The priority for filling tanks is set out in the FuelDistributionPlan. The default plan fills tip and aux tanks first, followed by the main tanks, then centre, and finally external.

Parameters
FuelQuantityThe quantity of fuel in Slugs
SetAbsoluteQuantitySet to true to set the fuel load to the specified quantity. Set to false to add the specified quantity to the fuel already in the tanks.
Returns
The quantity of fuel that could not be placed in the tanks

◆ LoadFuelUSGallons()

double LoadFuelUSGallons ( double  FuelQuantity,
bool  SetAbsoluteQuantity 
)
inline

Sets the fuel in the aircraft to the specified quantity, or adds the specified quantity. The fuel will be distributed automatically between the fuel tanks present on the aircraft. If adding fuel the algorithm will try to correct any imbalance between the tanks.

The priority for filling tanks is set out in the FuelDistributionPlan. The default plan fills tip and aux tanks first, followed by the main tanks, then centre, and finally external.

Parameters
FuelQuantityThe quantity of fuel in US Gallons
SetAbsoluteQuantitySet to true to set the fuel load to the specified quantity. Set to false to add the specified quantity to the fuel already in the tanks.
Returns
The quantity of fuel that could not be placed in the tanks

◆ RefreshData()

void RefreshData ( )
inline

Updates all the payload data from FSUIPC.

◆ WriteChanges()

void WriteChanges ( )
inline

Writes the changes to fuel tank levels and payload weights

Property Documentation

◆ EmptyWeightKgs

double EmptyWeightKgs
get

The total current weight of the aircraft not including fuel or payload, in Kilograms

◆ EmptyWeightLbs

double EmptyWeightLbs
get

The total current weight of the aircraft not including fuel or payload, in Pounds

◆ EmptyWeightNewtons

double EmptyWeightNewtons
get

The total current weight of the aircraft not including fuel or payload, in Newtons

◆ EmptyWeightSlugs

double EmptyWeightSlugs
get

The total current weight of the aircraft not including fuel or payload, in Slugs

◆ FuelCapacityKgs

double FuelCapacityKgs
get

The total capacity of all fuel tanks in Kilograms

◆ FuelCapacityLbs

double FuelCapacityLbs
get

The total current weight of all the fuel in Pounds

◆ FuelCapacityLitres

double FuelCapacityLitres
get

The total capacity of all fuel tanks in Litres

◆ FuelCapacityNewtons

double FuelCapacityNewtons
get

The total capacity of all fuel tanks in Newtons

◆ FuelCapacitySlugs

double FuelCapacitySlugs
get

The total capacity of all fuel tanks in Slugs

◆ FuelCapacityUSGallons

double FuelCapacityUSGallons
get

The total capacity of all fuel tanks in US Gallons

◆ FuelDistributionPlan

FSFuelTanks [][] FuelDistributionPlan
getset
Initial value:
= {
new FSFuelTanks[] { FSFuelTanks.Left_Tip, FSFuelTanks.Right_Tip, FSFuelTanks.Left_Aux, FSFuelTanks.Right_Aux },
new FSFuelTanks[] { FSFuelTanks.Left_Main, FSFuelTanks.Right_Main },
new FSFuelTanks[] { FSFuelTanks.Centre_Main, FSFuelTanks.Centre_2, FSFuelTanks.Centre_3 },
new FSFuelTanks[] { FSFuelTanks.External_2, FSFuelTanks.External_1 }
}

Gets or Sets the FuelTank distribution plan for the fuel loading algorithm used by the LoadFuel() methods.

The plan is an array of FSFuelTanks[] arrays. Each sub-array is a group of tanks which get filled equally.

The fuel is placed in the first group of tanks. If they become full the remaining fuel is placed in the next group and so on.

Tanks which are not present on the aircraft being used are ignored. All tanks should be therefore included in the plan.

◆ FuelLevelLitres

double FuelLevelLitres
get

The total level of all fuel tanks in Litres

◆ FuelLevelUSGallons

double FuelLevelUSGallons
get

The total level of all fuel tanks in US Gallons

◆ FuelPercentage

double FuelPercentage
get

The total percentage fuel level accross all tanks

◆ FuelTanks

FsFuelTanksCollection FuelTanks
get

A strongly-typed list of FsFuelTank objects. One for each know possible fuel tank. Check which tanks are present with the IsPresent property.

◆ FuelWeightKgs

double FuelWeightKgs
get

The total current weight of all the fuel in Kilograms

◆ FuelWeightLbs

double FuelWeightLbs
get

The total current weight of all the fuel in Pounds

◆ FuelWeightNewtons

double FuelWeightNewtons
get

The total current weight of all the fuel in Newtons

◆ FuelWeightSlugs

double FuelWeightSlugs
get

The total current weight of all the fuel in Slugs

◆ GrossWeightKgs

double GrossWeightKgs
get

The total current weight of the aircraft in Kilograms

◆ GrossWeightLbs

double GrossWeightLbs
get

The total current weight of the aircraft in Pounds

◆ GrossWeightNewtons

double GrossWeightNewtons
get

The total current weight of the aircraft in Newtons

◆ GrossWeightSlugs

double GrossWeightSlugs
get

The total current weight of the aircraft in Slugs

◆ MaxGrossWeightKgs

double MaxGrossWeightKgs
get

The maxmimum allowed weight (including payload and fuel) of the aircraft in Kilograms

◆ MaxGrossWeightLbs

double MaxGrossWeightLbs
get

The maxmimum allowed weight (including payload and fuel) of the aircraft in Pounds

◆ MaxGrossWeightNewtons

double MaxGrossWeightNewtons
get

The maxmimum allowed weight (including payload and fuel) of the aircraft in Newtons

◆ MaxGrossWeightSlugs

double MaxGrossWeightSlugs
get

The maxmimum allowed weight (including payload and fuel) of the aircraft in Slugs

◆ PayloadStations

List<FsPayloadStation> PayloadStations
get

A strongly-typed list of FsPayloadStation objects. One for each payload station on this aircraft.

◆ PayloadWeightKgs

double PayloadWeightKgs
get

The current weight of all payload stations in Kilograms

◆ PayloadWeightLbs

double PayloadWeightLbs
get

The total current weight of all payload stations in Pounds

◆ PayloadWeightNewtons

double PayloadWeightNewtons
get

The current weight of all payload stations in Newtons

◆ PayloadWeightSlugs

double PayloadWeightSlugs
get

The current weight of all payload stations in Slugs

◆ TooManyPayloadStations

bool TooManyPayloadStations
get

This will be true if the loaded aircraft has more than 61 payload stations. FSUIPC can only handle the first 61 and therefore the PayloadStations list will never have more than that. Becuase of this limitation, stations above 61 that will not be accessible to your application.