示例#1
0
        public void CalcLatLonNorthToSouthPole()
        {
            (double lat, double lon)startCoord  = (90, 0);      // North Pole
            (double lat, double lon)targetCoord = (-90, 0);     // South Pole
            (double lat, double lon)endCoord;

            endCoord = GeoCalcUtils.calcLatLonOffset(
                startCoord.lat,
                startCoord.lon,
                180,
                GeoCalcUtils.PI * GeoCalcUtils.Rnm
                );

            logger.WriteLine($"  startCoord({GeoCalcUtils.pcoord(startCoord)})");
            logger.WriteLine($"    endCoord({GeoCalcUtils.pcoord(endCoord)})");
            logger.WriteLine($" targetCoord({GeoCalcUtils.pcoord(targetCoord)})");
        }
示例#2
0
        public void CalcLatLonElCerritoToOakland()
        {
            (double lat, double lon)startCoord  = (37.9017235, -122.2623529);   // El Cerrito BART Station
            (double lat, double lon)targetCoord = (37.856853, -122.2370224);    // Oakland BART Station
            (double lat, double lon)endCoord;

            endCoord = GeoCalcUtils.calcLatLonOffset(
                startCoord.lat,
                startCoord.lon,
                175,
                7
                );

            logger.WriteLine($"  startCoord({GeoCalcUtils.pcoord(startCoord)})");
            logger.WriteLine($"    endCoord({GeoCalcUtils.pcoord(endCoord)})");
            logger.WriteLine($" targetCoord({GeoCalcUtils.pcoord(targetCoord)})");
        }