public CoursePass FromSkiVideo(SkiVideoEntity video) { CenterLineDegreeOffset = video.CenterLineDegreeOffset; RopeLengthOff = video.RopeLengthM; KnownCourses courses = new KnownCourses(); Course = courses.ByName(video.CourseName); return FromUrl(video.JsonUrl); }
public void TestByName() { KnownCourses courses = new KnownCourses(); Course cove = courses.ByName("cove"); Assert.IsTrue(cove.Course55EntryCL.Latitude == 42.28958); double coveHeading = cove.GetCourseHeadingDeg(); var poly = cove.Polygon; Course outside = courses.ByName("outside"); Assert.IsTrue(outside.Course55ExitCL.Longitude == -71.361781); double outsideHeading = outside.GetCourseHeadingDeg(); }
private void FindCourse(List<Measurement> measurements) { if (Course55Coordinates.EntryLat != default(double)) { this.m_course = new Course( new GeoCoordinate(Course55Coordinates.EntryLat, Course55Coordinates.EntryLon), new GeoCoordinate(Course55Coordinates.ExitLat, Course55Coordinates.ExitLon) ); } else { KnownCourses knownCourses = new KnownCourses(); this.m_course = knownCourses.FindCourse(measurements); } }