Post Reply 
help
10-04-2019, 02:50 AM
Post: #1
help
please help complete the formula below from vba to hp prime :

Public Function JDEMinElongTracking(JDE As Double) As Double

Dim JDEAwal As Double
Dim JDEProsess(3)
Dim ELONG(3)
Dim Intervals(7)
Dim ELONGMIN As Double
Dim Hasil As String
Dim I As Integer
Dim J As Integer
Dim k As Integer
Dim L As Integer

Intervals(0) = 1 / 24
Intervals(1) = 1 / 24 / 60
Intervals(2) = 1 / 24 / 60 / 60
Intervals(3) = 1 / 24 / 60 / 60 / 10
Intervals(4) = 1 / 24 / 60 / 60 / 100
Intervals(5) = 1 / 24 / 60 / 60 / 1000
Intervals(6) = 1 / 24 / 60 / 60 / 10000
Intervals(7) = 1 / 24 / 60 / 60 / 100000
JDEAwal = JDE

While I < 7
DoEvents
For J = 0 To 3
If J = 0 Then
JDEProsess(J) = JDE
Else
JDEProsess(J) = JDE + Intervals(I) * J
End If
ELONG(J) = MoonSunGeocentricElongation(JDEProsess(J))
Next


ELONGMIN = ELONG(0)
For k = 0 To 3
If ELONG(k) < ELONGMIN Then ELONGMIN = ELONG(k)
Next

For L = 0 To 3
If ELONG(L) = ELONGMIN Then
If L = 0 Or L = 3 Then
JDE = JDEProsess(L) + Intervals(I) * (L - 1)
Else
JDEMinElongTracking = JDEProsess(L)
On Error Resume Next
JDE = JDEProsess(L) - Intervals(I + 1)
I = I + 1
End If
End If
Next
Wend

End Function
Find all posts by this user
Quote this message in a reply
10-05-2019, 03:24 AM
Post: #2
RE: help
You know what this sounds like? A great first project for you to learn the Prime Programming Language (PPL)! Go check out the documentation and tutorials and let us know what specific questions you have!

Cemetech | YouTube
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)