Select Page

# PVAL +/- 1 unit of time

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

Viewing 9 posts - 16 through 24 (of 24 total)
• Author
Posts
• #56163
Andrew
• Topics: 20
• Replies: 43
• Posts: 63

…..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
Andrew
• Topics: 20
• Replies: 43
• Posts: 63

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
Trevor R
• Topics: 79
• Replies: 252
• Posts: 331

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:

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

Cheers

Trevor

The Auld Tyma at

###### Attachments:
#56261
Andrew
• Topics: 20
• Replies: 43
• Posts: 63

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
Andrew
• Topics: 20
• Replies: 43
• Posts: 63

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
Trevor R
• Topics: 79
• Replies: 252
• Posts: 331

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
Andrew
• Topics: 20
• Replies: 43
• Posts: 63

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
Andrew
• Topics: 20
• Replies: 43
• Posts: 63

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:
#56781
Andrew
• Topics: 20
• Replies: 43
• Posts: 63

Hi folks – I’ve recently returned from a decent break and I’m in need of some guidance here.

It would appear that since Var7 is dependent on a mouse click first that I won’t be able to use use a show bar when a condition related to Var7 is met ie. have the tool show a vertical line each time say VE/ME has moved say 20 points as defined by Var7.

Now perhaps another option could be to hardcode the start date into the script tool… does this seem doable?

Grateful for help on getting started with this. Ideally I’d like to initiate the tool/script with an initial mouse click and then have that somehow define the date and value (establish it as the ‘ground zero’ value) before the code thereafter executes? Make sense?

Viewing 9 posts - 16 through 24 (of 24 total)
• You must be logged in to reply to this topic.