this is all I have.
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim gb, gl, zt As Float
Dim rad As Double: rad = 180 / cPI
Dim ast As Astro
Dim sunrs() As String
Dim monrs() As String
Dim panRS As Panel
Dim imvPhase As ImageView
Dim labMoonRS As Label
Dim labSunRS As Label
Dim imgSun As ImageView
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("layout_riseset")
gb = 50.06 'Your true coordinates here
gl = 10.9
zt = DateTime.GetTimeZoneOffsetAt(DateTime.Now)
RiseSet
'50.083 (Breitengrad) 50.6 my Location
'10.933 (Längengrad) my Location
'Last gb = 50.6
'last gl = gl = 10.95
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub RiseSet
Dim m As String
Dim mdata(5) As Double
Dim dd, mm, yy As Int
dd = DateTime.GetDayOfMonth(DateTime.Now)
mm = DateTime.GetMonth(DateTime.Now)
yy = DateTime.GetYear(DateTime.Now)
m = "Sun" & CRLF
sunrs = ast.Sun(dd,mm,yy,gb,gl,zt)
m = m & "Rise: " & sunrs(0) & CRLF
m = m & "Set: " & sunrs(1) & CRLF & CRLF & CRLF & CRLF & CRLF
labSunRS.Text = m
mdata = ast.GetMoonData(dd,mm,yy,gb,gl,zt)
imvPhase.SetBackgroundImage(LoadBitmap(File.DirAssets,"phases/" & Round(mdata(1)) & ".png"))
monrs = ast.Moon(dd,mm,yy,gb,gl,zt)
m = "Moon" & CRLF
m = m & "Rise: " & monrs(0) & CRLF
m = m & "Set: " & monrs(1) & CRLF
m = m & "Age: " & Round2(mdata(1),2) & CRLF
m = m & "Phase: " & Round(mdata(0) * rad) & Chr(176) & CRLF
labMoonRS.Text = m
' panRS.BringToFront
' panRS.Visible = True
End Sub
Sub panRS_Click
panRS.Visible = False
imvPhase.Visible = False
imgSun.Visible = False
Activity.Finish
End Sub