예제 #1
0
        public Position GetPlanePosition()
        {
            return(FsxOperation(() =>
            {
                double latitudeHigh = GetFsxData(FsxDataOffset.LatitudeHigh);
                double latitudeLow = GetFsxData(FsxDataOffset.LatitudeLow);

                double longitudeHigh = GetFsxData(FsxDataOffset.LongitudeHigh);
                double longitudeLow = GetFsxData(FsxDataOffset.LongitudeLow);

                double altitudeIntegral = GetFsxData(FsxDataOffset.AircraftAltitudeIntegral);
                double altitudeFractional = GetFsxData(FsxDataOffset.AircraftAltitudeFractional);

                return PositionCalculator.CalculatePosition(latitudeLow, latitudeHigh, longitudeLow, longitudeHigh, altitudeIntegral, altitudeFractional);
            }));
        }