PVAL +/- 1 unit of time

Optuma Forums Optuma Scripting PVAL +/- 1 unit of time

Viewing 8 posts - 16 through 23 (of 23 total)
  • Author
    Posts
  • #56163
    AvatarAndrew
    • Topics: 11
    • Replies: 26
    • Posts: 37

    …..I like to look at the output via ‘use indicator’ since I know what I’m trying to script should look like from excel…. something isn’t quite right with the way the script is currently dealing with Geocentric retrograde, the script values are always increasing and in some cases jumping up substantially…

    Script                          19 Feb 2014 value 2636.102                 20 Feb 2014 value 2958.599                    Diff +322.497

    Excel/ephemeris      19 Feb 2014 value 322.79                     20 Feb 2014 value 321.82                         Diff -0.97

    Getting close though….

    Attachments:
    #56189
    AvatarAndrew
    • Topics: 11
    • Replies: 26
    • Posts: 37

    Hi Matthew – any suggestions on how to define P1Calc to cope with the retrograde, I think I need to be somehow adding to yesterday’s calculated value?

    //P1Calc = IF(P1Raw < P1Raw[1], P1Raw[1]-ABS(P1Raw-P1Raw[1]) + XXXX, P1Raw + P1Raw[1] + XXXX) ;

    In English

    IF (P1Raw today < P1Raw yesterday)

    THEN take P1Raw today – ABS (P1Raw – P1Raw yesterday) AND add it to yesterday’s calculated value

    ELSE take P1Raw + P1Raw yesterday AND add it to yesterday’s calculated value

    How can I add yesterday’s calculated value into the script?

    #56239
    AvatarTrevor R
    • Topics: 61
    • Replies: 198
    • Posts: 259

    Hi Andrew,

    You will need separate scripts for Geocentric and Heliocentric. Here are my suggestions:

    Heliocentric:

    Geocentric:

    Here is a chart with both the Heliocentric and Geocentric plots:

    20191206 Geo and Helio Plots for Andrew

    I’ve also attached the workbook: “20191206-1 Andrew’s Scripting.owb”.

    Cheers

    Trevor

    The Auld Tyma at

    Auld Tyma Data Logo with URL 1 cm

    Attachments:
    #56261
    AvatarAndrew
    • Topics: 11
    • Replies: 26
    • Posts: 37

    Morning Trevor – those are some long hours your keeping, thanks for chiming in again…. you ought to be on the payroll! I’ll take a good long look at what you’ve proposed and move to the next step of the ultimate process. Breaking it down is the only way forward for a novice like me. Most grateful… Andrew

    #56427
    AvatarAndrew
    • Topics: 11
    • Replies: 26
    • Posts: 37

    So I’ve had the chance to interrogate the Geo output from the script and it’s still not quite right, the daily values during retrograde are not moving down. I believe the following would work if only I could work out how to replace the XXXX with a value for P1Calc[1]

    P1Calc=IF(P1Raw<P1Raw[1],IF(ABS(P1Raw-P1Raw[1])>100,ROUND(XXXX/360,0)*360+P1Raw+360,ROUND(XXXX/360,0)*360+P1Raw),ROUND(XXXX/360,0)*360+P1Raw)

    Any thoughts?

    #56431
    AvatarTrevor R
    • Topics: 61
    • Replies: 198
    • Posts: 259

    Hi Andrew,

    Why are you using such  a complicated formula with the “ROUND(XXXX/360,0)*360” etc?

    Try this for the Geo, I think I previously over complicated the calculation:

    Cheers

    Trevor

    #56435
    AvatarAndrew
    • Topics: 11
    • Replies: 26
    • Posts: 37

    Thanks Trevor, story of my life to over complicate things unnecessarily – the output is now as expected and the good news appears to be that we now have one script that will work whether the coordinate system is either G or H, bravo !!

    Now to work on calculating two separate bodies from the same start date and taking ABS of P1Calc – P2Calc and using this value, say P3Calc to plot regular increments. Lets see how complicated I can make that, hahahaha.

     

    #56523
    AvatarAndrew
    • Topics: 11
    • Replies: 26
    • Posts: 37

    Ok, making good progress, latest script attached. I have defined Var7 as a derivation of other calculated variables. Could someone direct me towards how I would go about defining a showbar that would illustrate say 50 points intervals of Var7 starting from the StartDate ? Happy to be directed towards examples so I can work it out from there.

    Cheers

    Andrew

    Attachments:
Viewing 8 posts - 16 through 23 (of 23 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close