private SpotData GetSpotData(ISSPosition position, double brightness) { SpotData d = new SpotData(); d.Altitute = position.Altitute; d.Azimuth = position.Azimuth; d.Brightness = brightness; d.StartTime = position.Time; d.TimeRemaining = position.Time - DateTime.Now; if (d.TimeRemaining < TimeSpan.Zero) { d.TimeRemaining = TimeSpan.Zero; } return(d); }
//private double GetPositionAngle(StationStat forecast, ISSPosition position) //{ //} private void AddMarker(StationStat forecast, ISSPosition startPosition, Color color) { SpotData spotData; // ArrorMarkerControl rectangle; Point point; spotData = this.GetSpotData(forecast.Start, forecast.Brightness); var rectangle = new ArrorMarkerControl { Width = 120, Height = 450 }; // new Rectangle { Width = 90, Height = 90, RadiusX = 90, RadiusY = 60, Fill = new SolidColorBrush(color) }; // var rectangle =new Rectangle { Width = 90, Height = 90, RadiusX = 90, RadiusY = 60, Fill = new SolidColorBrush(color) }; arPanel.Children.Add(rectangle); point = new Point(startPosition.Altitute, startPosition.Azimuth); ARPanel.SetDirection(rectangle, point); rectangle.DataContext = spotData; //rectangle.Tap += (s, e) => //{ //}; }