1 / 6

综合练习

综合练习. 编写一个控制台应用程序; P17 例 2 假如你从 30°N , 114°E 的位置出发,以 885km/h 的地面速度在 10km 的高度飞行 8 小时,航行与北成恒定 45° 。你会到哪里?(假设地球为球形,半径为 6371km ). 知识回顾. static void Main(string[] args) { double lat0 = 30, lon0 = 114; double speed = 885, travelTime = 8.0; double earthRadius = 6371,height = 10;

Télécharger la présentation

综合练习

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 综合练习 • 编写一个控制台应用程序; • P17例2 • 假如你从30°N,114°E的位置出发,以885km/h的地面速度在10km的高度飞行8小时,航行与北成恒定45°。你会到哪里?(假设地球为球形,半径为6371km)

  2. 知识回顾 static void Main(string[] args) {double lat0 = 30, lon0 = 114; double speed = 885, travelTime = 8.0; double earthRadius = 6371,height = 10; double deg2rad = 3.14159265 / 180; double azimuth = 45 * deg2rad; double distance = speed * travelTime; double theta = distance / (earthRadius + height); double deltaLat = theta * Math.Cos(azimuth); double deltaLon = theta * Math.Sin(azimuth); double lat = lat0 + deltaLat / deg2rad; double lon = lon0 + deltaLon / deg2rad; Console.WriteLine("当前的纬度为:{0},经度为:{1}", lat, lon); Console.ReadLine(); }

  3. 练习(2) 调试P21页例2.1 调试P25页例2.3 调试P34页 “案例实训” 综合练习: 坐标转换 其中,

  4. 内容回顾 classCoorTrans { double FlatRate(double a, double b) { double f = (a - b) / b; return f; } publicdouble EccentricitySquare(double a, double b) { double f = FlatRate(a, b); double e2 = 2 * f - f * f;return e2; } publicdouble GetN(double a, double b, double B) { double e2 = EccentricitySquare(a, b); double sinB = Math.Sin(B); double n = a / Math.Cos(1 - e2 * sinB * sinB); return n; } }

  5. 综合练习 classProgram { staticvoid Main(string[] args) { double a = 6378137; double b = 6356752.3142; double deg2rad = 3.14159265 / 180; double B = 30 * deg2rad; double L = 114 * deg2rad; double H = 30; CoorTrans coor = newCoorTrans(); double n = coor.GetN(a, b, B); double e2 = coor.EccentricitySquare(a, b); double X = (n + H) * Math.Cos(B) * Math.Cos(L); double Y = (n + H) * Math.Cos(B) * Math.Sin(L); double Z = (n * (1 - e2) + H) * Math.Sin(B); } }

  6. 练习(3) • P41 例3.3 • 3.4 案例实训 • 坐标转换(迭代法) • (选作)兔子从出生要一个月,从出生到成熟要过一个月,一对兔子每个月生出一对兔子来,如果一年后可以繁殖多少对兔子?(Fibonacci) Z P X

More Related