It is currently March 3rd, 2021, 6:22 am

Planetarium with Near Earth Objects

General topics related to Rainmeter.
Fulmar
Posts: 21
Joined: July 24th, 2012, 4:50 pm
Location: Belgium

Re: Planetarium with Near Earth Objects

Post by Fulmar »

Yes, thank you for the suggestion. However the Database Search Engine is a bit inadequate for this purpose.
It doesn't take into account the position of the object in its orbit. That's important because the object has to be in the neighborhood of the Earth.
Furthermore most close encounters happen in the nodes of the orbit of the object. But in the Search Engine you can limit the nodes of the orbits to only one place, f.i. the position where the Earth will be during the next days. But you have 2 nodes. This means you can limit by object characteristics (AND logical) but for the nodes you need an OR logical.
I've sent an email to jpl.nasa if they can show me the way.
If they answer I will let you know.
Thank you anyway for your kind help.

@brax64: thank you for the suggestion as well. Esa is building up their support for automated data queries.
User avatar
Yincognito
Posts: 3015
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Planetarium with Near Earth Objects

Post by Yincognito »

Fulmar wrote: August 29th, 2020, 4:54 pm Yes, thank you for the suggestion. However the Database Search Engine is a bit inadequate for this purpose.
It doesn't take into account the position of the object in its orbit. That's important because the object has to be in the neighborhood of the Earth.
Furthermore most close encounters happen in the nodes of the orbit of the object. But in the Search Engine you can limit the nodes of the orbits to only one place, f.i. the position where the Earth will be during the next days. But you have 2 nodes. This means you can limit by object characteristics (AND logical) but for the nodes you need an OR logical.
I've sent an email to jpl.nasa if they can show me the way.
If they answer I will let you know.
Thank you anyway for your kind help.

@brax64: thank you for the suggestion as well. Esa is building up their support for automated data queries.
Good luck in your endeavour then! ;-)
Fulmar
Posts: 21
Joined: July 24th, 2012, 4:50 pm
Location: Belgium

Re: Planetarium with Near Earth Objects

Post by Fulmar »

Busy again with the same skin.
I have a New question.

Why doesn't the second WebParser doesn't work with [&NEO1] while just inserting the value of NEO1 in the same WebParser is working perfectly?
:confused:

At this very moment 2020XJ3 is the value of NEO1.

URL="https://ssd-api.jpl.nasa.gov/sbdb.api?sstr=2020XJ3&full-prec=1" --> is working

DBUG (12:06:15.567) Planetarium NAO\Planetarium NEO 5s.ini - [NEO]: Fetching: https://ssd-api.jpl.nasa.gov/cad.api
DBUG (12:06:15.567) Planetarium NAO\Planetarium NEO 5s.ini - [JPL1]: Fetching: https://ssd-api.jpl.nasa.gov/sbdb.api?sstr=2020XJ3&full-prec=1
DBUG (12:06:16.343) Planetarium NAO\Planetarium NEO 5s.ini - [JPL1]: Fetching: Success!
DBUG (12:06:16.345) Planetarium NAO\Planetarium NEO 5s.ini - [JPL1]: Parsing data...
DBUG (12:06:16.347) Planetarium NAO\Planetarium NEO 5s.ini - [JPL1]: Parsing data...done!
DBUG (12:06:16.654) Planetarium NAO\Planetarium NEO 5s.ini - [NEO]: Fetching: Success!
DBUG (12:06:16.656) Planetarium NAO\Planetarium NEO 5s.ini - [NEO]: Parsing data...
DBUG (12:06:16.658) Planetarium NAO\Planetarium NEO 5s.ini - [NEO]: Parsing data...done!
DBUG (12:06:20.837) Planetarium NAO\Planetarium NEO 5s.ini - [JPL1]: Fetching: https://ssd-api.jpl.nasa.gov/sbdb.api?sstr=2020XJ3&full-prec=1
DBUG (12:06:21.071) Planetarium NAO\Planetarium NEO 5s.ini - [JPL1]: Fetching: Success!
DBUG (12:06:21.072) Planetarium NAO\Planetarium NEO 5s.ini - [JPL1]: Parsing data...
DBUG (12:06:21.072) Planetarium NAO\Planetarium NEO 5s.ini - [JPL1]: Parsing data...done!


URL="https://ssd-api.jpl.nasa.gov/sbdb.api?sstr=[&NEO1]&full-prec=1" --> doesn't work

DBUG (11:54:36.179) Planetarium NAO\Planetarium NEO 5s.ini - [NEO]: Fetching: https://ssd-api.jpl.nasa.gov/cad.api
DBUG (11:54:36.179) Planetarium NAO\Planetarium NEO 5s.ini - [JPL1]: Fetching: https://ssd-api.jpl.nasa.gov/sbdb.api?sstr=&full-prec=1
DBUG (11:54:36.894) Planetarium NAO\Planetarium NEO 5s.ini - [JPL1]: Fetching: Success!
DBUG (11:54:36.898) Planetarium NAO\Planetarium NEO 5s.ini - [JPL1]: Parsing data...
ERRO (11:54:36.900) Planetarium NAO\Planetarium NEO 5s.ini - [JPL1]: RegExp matching error (-1)
DBUG (11:54:36.901) Planetarium NAO\Planetarium NEO 5s.ini - [JPL1]: Parsing data...done!
DBUG (11:54:37.214) Planetarium NAO\Planetarium NEO 5s.ini - [NEO]: Fetching: Success!
DBUG (11:54:37.215) Planetarium NAO\Planetarium NEO 5s.ini - [NEO]: Parsing data...
DBUG (11:54:37.217) Planetarium NAO\Planetarium NEO 5s.ini - [NEO]: Parsing data...done!
DBUG (11:54:41.445) Planetarium NAO\Planetarium NEO 5s.ini - [JPL1]: Fetching: https://ssd-api.jpl.nasa.gov/sbdb.api?sstr=&full-prec=1
DBUG (11:54:41.621) Planetarium NAO\Planetarium NEO 5s.ini - [JPL1]: Fetching: Success!
DBUG (11:54:41.622) Planetarium NAO\Planetarium NEO 5s.ini - [JPL1]: Parsing data...
ERRO (11:54:41.623) Planetarium NAO\Planetarium NEO 5s.ini - [JPL1]: RegExp matching error (-1)
DBUG (11:54:41.623) Planetarium NAO\Planetarium NEO 5s.ini - [JPL1]: Parsing data...done!

Code: Select all

; WebParser to cneos;
[NEO]
Measure=WebParser
URL=https://ssd-api.jpl.nasa.gov/cad.api
RegExp=(?siU)"data":.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)"
FinishAction=[!CommandMeasure JPL1 "Update"]
UpdateRate=720

[NEO1]
Measure=WebParser
URL=[NEO]
StringIndex=1

[NEO2]
Measure=WebParser
URL=[NEO]
StringIndex=2

[NEO3]
Measure=WebParser
URL=[NEO]
StringIndex=3

[NEO4]
Measure=WebParser
URL=[NEO]
StringIndex=4

[NEO5]
Measure=WebParser
URL=[NEO]
StringIndex=5

[NEO6]
Measure=WebParser
URL=[NEO]
StringIndex=6

[NEO7]
Measure=WebParser
URL=[NEO]
StringIndex=7

[NEO8]
Measure=WebParser
URL=[NEO]
StringIndex=8

[NEO9]
Measure=WebParser
URL=[NEO]
StringIndex=9

[NEO10]
Measure=WebParser
URL=[NEO]
StringIndex=10

; Webparser to JPL;
[JPL1]
Measure=WebParser
URL="https://ssd-api.jpl.nasa.gov/sbdb.api?sstr=[&NEO1]&full-prec=1"
RegExp=(?siU)"des":"(.*)".*"epoch":"(.*)".*"value":"(.*)".*"value":"(.*)".*"value".*"value":"(.*)".*"value":"(.*)".*"value":"(.*)".*"value":"(.*)".*"value".*"value".*"value":"(.*)"

[NameNEO1]
Measure=WebParser
URL=[JPL1]
StringIndex=1

[EpochNEO1]
Measure=WebParser
URL=[JPL1]
StringIndex=2

[EcNEO1]
Measure=WebParser
URL=[JPL1]
StringIndex=3

[MeDiNEO1]
Measure=WebParser
URL=[JPL1]
StringIndex=4

[InNEO1]
Measure=WebParser
URL=[JPL1]
StringIndex=5

[LoAsNEO1]
Measure=WebParser
URL=[JPL1]
StringIndex=6

[ArPeNEO1]
Measure=WebParser
URL=[JPL1]
StringIndex=7

[MeAnEpNEO1]
Measure=WebParser
URL=[JPL1]
StringIndex=8

[MeMoNEO1]
Measure=WebParser
URL=[JPL1]
StringIndex=9
Thank you very much for your help.
Last edited by SilverAzide on December 23rd, 2020, 1:02 pm, edited 1 time in total.
Reason: Please use code tags, it's the </> button.
User avatar
Yincognito
Posts: 3015
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Planetarium with Near Earth Objects

Post by Yincognito »

Fulmar wrote: December 23rd, 2020, 11:15 am Busy again with the same skin.
I have a New question.

Why doesn't the second WebParser doesn't work with [&NEO1] while just inserting the value of NEO1 in the same WebParser is working perfectly?
:confused:

At this very moment 2020XJ3 is the value of NEO1.
I have no idea why it doesn't work for you, because this (more or less the same code as you posted - commented out the unneeded parts) works for me:

Code: Select all

[Variables]

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=47,47,47,255

---Measures---

[NEO]
Measure=WebParser
URL=https://ssd-api.jpl.nasa.gov/cad.api
RegExp=(?siU)"data":.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)"
FinishAction=[!CommandMeasure JPL1 "Update"]
UpdateRate=720

[NEO1]
Measure=WebParser
URL=[NEO]
StringIndex=1

[NEO2]
Measure=WebParser
URL=[NEO]
StringIndex=2

[NEO3]
Measure=WebParser
URL=[NEO]
StringIndex=3

[NEO4]
Measure=WebParser
URL=[NEO]
StringIndex=4

[NEO5]
Measure=WebParser
URL=[NEO]
StringIndex=5

[NEO6]
Measure=WebParser
URL=[NEO]
StringIndex=6

[NEO7]
Measure=WebParser
URL=[NEO]
StringIndex=7

[NEO8]
Measure=WebParser
URL=[NEO]
StringIndex=8

[NEO9]
Measure=WebParser
URL=[NEO]
StringIndex=9

[NEO10]
Measure=WebParser
URL=[NEO]
StringIndex=10

[JPL1]
Measure=WebParser
URL="https://ssd-api.jpl.nasa.gov/sbdb.api?sstr=[&NEO1]&full-prec=1"
RegExp=(?siU)"des":"(.*)".*"epoch":"(.*)".*"value":"(.*)".*"value":"(.*)".*"value".*"value":"(.*)".*"value":"(.*)".*"value":"(.*)".*"value":"(.*)".*"value".*"value".*"value":"(.*)"
;UpdateRate=720
DynamicVariables=1

[NameNEO1]
Measure=WebParser
URL=[JPL1]
StringIndex=1

[EpochNEO1]
Measure=WebParser
URL=[JPL1]
StringIndex=2

[EcNEO1]
Measure=WebParser
URL=[JPL1]
StringIndex=3

[MeDiNEO1]
Measure=WebParser
URL=[JPL1]
StringIndex=4

[InNEO1]
Measure=WebParser
URL=[JPL1]
StringIndex=5

[LoAsNEO1]
Measure=WebParser
URL=[JPL1]
StringIndex=6

[ArPeNEO1]
Measure=WebParser
URL=[JPL1]
StringIndex=7

[MeAnEpNEO1]
Measure=WebParser
URL=[JPL1]
StringIndex=8

[MeMoNEO1]
Measure=WebParser
URL=[JPL1]
StringIndex=9

---Meters---

[MeterNEO1Data]
Meter=STRING
;X=0
;Y=0
;W=300
;H=24
FontFace=Consolas
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
FontSize=16
AntiAlias=1
;ClipString=1
MeasureName=NameNEO1
MeasureName2=EpochNEO1
MeasureName3=EcNEO1
MeasureName4=MeDiNEO1
MeasureName5=InNEO1
MeasureName6=LoAsNEO1
MeasureName7=ArPeNEO1
MeasureName8=MeAnEpNEO1
MeasureName9=MeMoNEO1
Text="NameNEO1=%1#CRLF#EpochNEO1=%2#CRLF#EcNEO1=%3#CRLF#MeDiNEO1=%4#CRLF#InNEO1=%5#CRLF#LoAsNEO1=%6#CRLF#ArPeNEO1=%7#CRLF#MeAnEpNEO1=%8#CRLF#MeMoNEO1=%9"
DynamicVariables=1
NEO.jpg
P.S. Use the code tags (the </> button at the top of the Post A Reply page) to paste code, otherwise the post will be too long and harder to follow.
You do not have the required permissions to view the files attached to this post.
Fulmar
Posts: 21
Joined: July 24th, 2012, 4:50 pm
Location: Belgium

Re: Planetarium with Near Earth Objects

Post by Fulmar »

Thank you for the information.
I made a mistake (forgot DynamicVariables=1). :Whistle

It is working for now.

So, is there a possiblity to send the WebParser as a result as a condition?
After all, by starting the computer or by refreshing, all the WebParsers are being sent in almost the same time. As a result Nasa will block me.
It is still working for 2 NEO's but for 3 NEO's I am getting a fetching error (error code 12002).

But if I could insert a counter, so that each 5 seconds a new WebParser is being sent until the information for the 10 NEO's is received.

I was thinking of a counter and an IfCondition.

Is this feasible?
User avatar
Yincognito
Posts: 3015
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Planetarium with Near Earth Objects

Post by Yincognito »

Fulmar wrote: December 23rd, 2020, 5:07 pm Thank you for the information.
I made a mistake (forgot DynamicVariables=1). :Whistle

It is working for now.

So, is there a possiblity to send the WebParser as a result as a condition?
After all, by starting the computer or by refreshing, all the WebParsers are being sent in almost the same time. As a result Nasa will block me.
It is still working for 2 NEO's but for 3 NEO's I am getting a fetching error (error code 12002).

But if I could insert a counter, so that each 5 seconds a new WebParser is being sent until the information for the 10 NEO's is received.

I was thinking of a counter and an IfCondition.

Is this feasible?
Oh, yeah, the eternal dynamic variable trick - good catch.

Well, I still think the query solution I mentioned earlier is the proper tool to get the needed data for multiple objects, and I'm sure there are ways to eliminate the drawbacks you mentioned in your replies, but anyway... yes, the "counter" method might be feasible (assuming you poll the site at reasonable time intervals). I've rewritten the previous code to use an adjustable delay (3000 milliseconds, aka 3 seconds here) between calls to the page and since I don't like having tons of measures and meters and a mile long code as a result, I made the code more compact (something you alluded to as well earlier in the thread) by using a self-incrementing measure (NEOID) to dynamically change the queried URL in the JPL WebParser measure based on subsequent NEOID values, and some on-the-fly variables to store the desired values on WebParser childrens' update (see the meaning of the #CURRENTSECTION# built-in variable here). Since the variables are not defined to "default" values (like the empty string or 0) in the [Variables] section, they will display their literal form in the beginning, but that can easily be fixed - I just kept it simple here, feel free to experiment with it and adjust it to your needs if you want...

Code:

Code: Select all

[Variables]
Delay=3000
FontSize=8

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=47,47,47,255

---Measures---

[NEOID]
Disabled=1
Measure=Calc
Formula=(NEOID%10+1)
UpdateDivider=-1

[NEO]
Measure=WebParser
URL=https://ssd-api.jpl.nasa.gov/cad.api
RegExp=(?siU)"data":.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)"
FinishAction=[!EnableMeasure NEOID][!EnableMeasure JPL][!UpdateMeasure NEOID][!CommandMeasure JPL "Update"][!Delay #Delay#][!UpdateMeasure NEOID][!CommandMeasure JPL "Update"][!Delay #Delay#][!UpdateMeasure NEOID][!CommandMeasure JPL "Update"][!Delay #Delay#][!UpdateMeasure NEOID][!CommandMeasure JPL "Update"][!Delay #Delay#][!UpdateMeasure NEOID][!CommandMeasure JPL "Update"][!Delay #Delay#][!UpdateMeasure NEOID][!CommandMeasure JPL "Update"][!Delay #Delay#][!UpdateMeasure NEOID][!CommandMeasure JPL "Update"][!Delay #Delay#][!UpdateMeasure NEOID][!CommandMeasure JPL "Update"][!Delay #Delay#][!UpdateMeasure NEOID][!CommandMeasure JPL "Update"][!Delay #Delay#][!UpdateMeasure NEOID][!CommandMeasure JPL "Update"]
UpdateRate=720
DynamicVariables=1

[NEO1]
Measure=WebParser
URL=[NEO]
StringIndex=1

[NEO2]
Measure=WebParser
URL=[NEO]
StringIndex=2

[NEO3]
Measure=WebParser
URL=[NEO]
StringIndex=3

[NEO4]
Measure=WebParser
URL=[NEO]
StringIndex=4

[NEO5]
Measure=WebParser
URL=[NEO]
StringIndex=5

[NEO6]
Measure=WebParser
URL=[NEO]
StringIndex=6

[NEO7]
Measure=WebParser
URL=[NEO]
StringIndex=7

[NEO8]
Measure=WebParser
URL=[NEO]
StringIndex=8

[NEO9]
Measure=WebParser
URL=[NEO]
StringIndex=9

[NEO10]
Measure=WebParser
URL=[NEO]
StringIndex=10

[JPL]
Disabled=1
Measure=WebParser
URL="https://ssd-api.jpl.nasa.gov/sbdb.api?sstr=[&NEO[&NEOID]]&full-prec=1"
RegExp=(?siU)"des":"(.*)".*"epoch":"(.*)".*"value":"(.*)".*"value":"(.*)".*"value".*"value":"(.*)".*"value":"(.*)".*"value":"(.*)".*"value":"(.*)".*"value".*"value".*"value":"(.*)"
FinishAction=[!EnableMeasureGroup JPLGroup][!UpdateMeasureGroup JPLGroup][!UpdateMeter MeterNEOData][!Redraw]
DynamicVariables=1

[NameNEO]
Group=JPLGroup
Disabled=1
Measure=WebParser
URL=[JPL]
StringIndex=1
UpdateDivider=-1
OnUpdateAction=[!SetVariable #CURRENTSECTION#[NEOID] [#CURRENTSECTION#]]
DynamicVariables=1

[EpochNEO]
Group=JPLGroup
Disabled=1
Measure=WebParser
URL=[JPL]
StringIndex=2
UpdateDivider=-1
OnUpdateAction=[!SetVariable #CURRENTSECTION#[NEOID] [#CURRENTSECTION#]]
DynamicVariables=1

[EcNEO]
Group=JPLGroup
Disabled=1
Measure=WebParser
URL=[JPL]
StringIndex=3
UpdateDivider=-1
OnUpdateAction=[!SetVariable #CURRENTSECTION#[NEOID] [#CURRENTSECTION#]]
DynamicVariables=1

[MeDiNEO]
Group=JPLGroup
Disabled=1
Measure=WebParser
URL=[JPL]
StringIndex=4
UpdateDivider=-1
OnUpdateAction=[!SetVariable #CURRENTSECTION#[NEOID] [#CURRENTSECTION#]]
DynamicVariables=1

[InNEO]
Group=JPLGroup
Disabled=1
Measure=WebParser
URL=[JPL]
StringIndex=5
UpdateDivider=-1
OnUpdateAction=[!SetVariable #CURRENTSECTION#[NEOID] [#CURRENTSECTION#]]
DynamicVariables=1

[LoAsNEO]
Group=JPLGroup
Disabled=1
Measure=WebParser
URL=[JPL]
StringIndex=6
UpdateDivider=-1
OnUpdateAction=[!SetVariable #CURRENTSECTION#[NEOID] [#CURRENTSECTION#]]
DynamicVariables=1

[ArPeNEO]
Group=JPLGroup
Disabled=1
Measure=WebParser
URL=[JPL]
StringIndex=7
UpdateDivider=-1
OnUpdateAction=[!SetVariable #CURRENTSECTION#[NEOID] [#CURRENTSECTION#]]
DynamicVariables=1

[MeAnEpNEO]
Group=JPLGroup
Disabled=1
Measure=WebParser
URL=[JPL]
StringIndex=8
UpdateDivider=-1
OnUpdateAction=[!SetVariable #CURRENTSECTION#[NEOID] [#CURRENTSECTION#]]
DynamicVariables=1

[MeMoNEO]
Group=JPLGroup
Disabled=1
Measure=WebParser
URL=[JPL]
StringIndex=9
UpdateDivider=-1
OnUpdateAction=[!SetVariable #CURRENTSECTION#[NEOID] [#CURRENTSECTION#]]
DynamicVariables=1

---Meters---

[MeterNEOData]
Meter=STRING
FontFace=Consolas
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
FontSize=#FontSize#
AntiAlias=1
Text="Name: #NameNEO1#, Epoch: #EpochNEO1#, Ec: #EcNEO1#, MeDi: #MeDiNEO1#, In: #InNEO1#, LoAs: #LoAsNEO1#, ArPe: #ArPeNEO1#, MeAnEp: #MeAnEpNEO1#, MeMo: #MeMoNEO1##CRLF#Name: #NameNEO2#, Epoch: #EpochNEO2#, Ec: #EcNEO2#, MeDi: #MeDiNEO2#, In: #InNEO2#, LoAs: #LoAsNEO2#, ArPe: #ArPeNEO2#, MeAnEp: #MeAnEpNEO2#, MeMo: #MeMoNEO2##CRLF#Name: #NameNEO3#, Epoch: #EpochNEO3#, Ec: #EcNEO3#, MeDi: #MeDiNEO3#, In: #InNEO3#, LoAs: #LoAsNEO3#, ArPe: #ArPeNEO3#, MeAnEp: #MeAnEpNEO3#, MeMo: #MeMoNEO3##CRLF#Name: #NameNEO4#, Epoch: #EpochNEO4#, Ec: #EcNEO4#, MeDi: #MeDiNEO4#, In: #InNEO4#, LoAs: #LoAsNEO4#, ArPe: #ArPeNEO4#, MeAnEp: #MeAnEpNEO4#, MeMo: #MeMoNEO4##CRLF#Name: #NameNEO5#, Epoch: #EpochNEO5#, Ec: #EcNEO5#, MeDi: #MeDiNEO5#, In: #InNEO5#, LoAs: #LoAsNEO5#, ArPe: #ArPeNEO5#, MeAnEp: #MeAnEpNEO5#, MeMo: #MeMoNEO5##CRLF#Name: #NameNEO6#, Epoch: #EpochNEO6#, Ec: #EcNEO6#, MeDi: #MeDiNEO6#, In: #InNEO6#, LoAs: #LoAsNEO6#, ArPe: #ArPeNEO6#, MeAnEp: #MeAnEpNEO6#, MeMo: #MeMoNEO6##CRLF#Name: #NameNEO7#, Epoch: #EpochNEO7#, Ec: #EcNEO7#, MeDi: #MeDiNEO7#, In: #InNEO7#, LoAs: #LoAsNEO7#, ArPe: #ArPeNEO7#, MeAnEp: #MeAnEpNEO7#, MeMo: #MeMoNEO7##CRLF#Name: #NameNEO8#, Epoch: #EpochNEO8#, Ec: #EcNEO8#, MeDi: #MeDiNEO8#, In: #InNEO8#, LoAs: #LoAsNEO8#, ArPe: #ArPeNEO8#, MeAnEp: #MeAnEpNEO8#, MeMo: #MeMoNEO8##CRLF#Name: #NameNEO9#, Epoch: #EpochNEO9#, Ec: #EcNEO9#, MeDi: #MeDiNEO9#, In: #InNEO9#, LoAs: #LoAsNEO9#, ArPe: #ArPeNEO9#, MeAnEp: #MeAnEpNEO9#, MeMo: #MeMoNEO9##CRLF#Name: #NameNEO10#, Epoch: #EpochNEO10#, Ec: #EcNEO10#, MeDi: #MeDiNEO10#, In: #InNEO10#, LoAs: #LoAsNEO10#, ArPe: #ArPeNEO10#, MeAnEp: #MeAnEpNEO10#, MeMo: #MeMoNEO10#"
DynamicVariables=1
Preview:
NEOs.jpg
P.S. If you're interested in this astronomical stuff (I saw you query for some recently "familiar" astronomical variables to me there), you might check my Solar Sytem simulator skin here - make sure you check the posts and the replies in that thread too, since some of them are important.

EDIT1: I've slightly modified the code so that the NEOID measure value starts back from 1 on subsequent updates of the NEO measure. This is done using the modulo operator. I missed that part in the first version of the code, but realized that soon after.

EDIT2: Another version of the above code, but this time with no delay between calls (apparently NASA has no problem with calls one after another, just don't do them at the same time), and querying the next NEOID (basically the "current" number of the NEO) data right after finishing parsing the previous one. Now the JPL measure indirectly (i.e. through the NEOID measure) self-updates while at the same time incrementing the NEOID value; the condition in the NEOID measure is there to prevent infinite updating of the JPL measure, basically triggering the JPL update only for NEOIDs greater than 1 (since the first JPL update in a 1 to 10 "cycle" is triggered by the NEO measure anyway). I added 2 optional inline formatting lines in the meter to show the line / NEO about to be updated (it stops at 1 when an update "cycle" is finished; \N means not a newline character and \R means any newline character in regex) in the meter - this and the NEO measure's UpdateRate of 60 (i.e. 1 minute) are for testing purposes only, feel free to remove them or set the NEO's UpdateRate to what it was before:

Code: Select all

[Variables]
FontSize=8

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=47,47,47,255

---Measures---

[NEO]
Measure=WebParser
URL=https://ssd-api.jpl.nasa.gov/cad.api
RegExp=(?siU)"data":.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)"
FinishAction=[!EnableMeasure JPL][!CommandMeasure JPL "Update"]
UpdateRate=60
DynamicVariables=1

[NEO1]
Measure=WebParser
URL=[NEO]
StringIndex=1

[NEO2]
Measure=WebParser
URL=[NEO]
StringIndex=2

[NEO3]
Measure=WebParser
URL=[NEO]
StringIndex=3

[NEO4]
Measure=WebParser
URL=[NEO]
StringIndex=4

[NEO5]
Measure=WebParser
URL=[NEO]
StringIndex=5

[NEO6]
Measure=WebParser
URL=[NEO]
StringIndex=6

[NEO7]
Measure=WebParser
URL=[NEO]
StringIndex=7

[NEO8]
Measure=WebParser
URL=[NEO]
StringIndex=8

[NEO9]
Measure=WebParser
URL=[NEO]
StringIndex=9

[NEO10]
Measure=WebParser
URL=[NEO]
StringIndex=10

[NEOID]
Measure=Calc
Formula=(NEOID%10+1)
UpdateDivider=-1
IfCondition=(#CURRENTSECTION#<>1)
IfTrueAction=[!CommandMeasure JPL "Update"]
IfConditionMode=1
DynamicVariables=1

[JPL]
Disabled=1
Measure=WebParser
URL="https://ssd-api.jpl.nasa.gov/sbdb.api?sstr=[&NEO[&NEOID]]&full-prec=1"
RegExp=(?siU)"des":"(.*)".*"epoch":"(.*)".*"value":"(.*)".*"value":"(.*)".*"value".*"value":"(.*)".*"value":"(.*)".*"value":"(.*)".*"value":"(.*)".*"value".*"value".*"value":"(.*)"
FinishAction=[!EnableMeasureGroup JPLGroup][!UpdateMeasureGroup JPLGroup][!UpdateMeter MeterNEOData][!Redraw][!UpdateMeasure NEOID]
UpdateRate=-1
DynamicVariables=1

[NameNEO]
Group=JPLGroup
Disabled=1
Measure=WebParser
URL=[JPL]
StringIndex=1
UpdateDivider=-1
OnUpdateAction=[!SetVariable #CURRENTSECTION#[NEOID] [#CURRENTSECTION#]]
DynamicVariables=1

[EpochNEO]
Group=JPLGroup
Disabled=1
Measure=WebParser
URL=[JPL]
StringIndex=2
UpdateDivider=-1
OnUpdateAction=[!SetVariable #CURRENTSECTION#[NEOID] [#CURRENTSECTION#]]
DynamicVariables=1

[EcNEO]
Group=JPLGroup
Disabled=1
Measure=WebParser
URL=[JPL]
StringIndex=3
UpdateDivider=-1
OnUpdateAction=[!SetVariable #CURRENTSECTION#[NEOID] [#CURRENTSECTION#]]
DynamicVariables=1

[MeDiNEO]
Group=JPLGroup
Disabled=1
Measure=WebParser
URL=[JPL]
StringIndex=4
UpdateDivider=-1
OnUpdateAction=[!SetVariable #CURRENTSECTION#[NEOID] [#CURRENTSECTION#]]
DynamicVariables=1

[InNEO]
Group=JPLGroup
Disabled=1
Measure=WebParser
URL=[JPL]
StringIndex=5
UpdateDivider=-1
OnUpdateAction=[!SetVariable #CURRENTSECTION#[NEOID] [#CURRENTSECTION#]]
DynamicVariables=1

[LoAsNEO]
Group=JPLGroup
Disabled=1
Measure=WebParser
URL=[JPL]
StringIndex=6
UpdateDivider=-1
OnUpdateAction=[!SetVariable #CURRENTSECTION#[NEOID] [#CURRENTSECTION#]]
DynamicVariables=1

[ArPeNEO]
Group=JPLGroup
Disabled=1
Measure=WebParser
URL=[JPL]
StringIndex=7
UpdateDivider=-1
OnUpdateAction=[!SetVariable #CURRENTSECTION#[NEOID] [#CURRENTSECTION#]]
DynamicVariables=1

[MeAnEpNEO]
Group=JPLGroup
Disabled=1
Measure=WebParser
URL=[JPL]
StringIndex=8
UpdateDivider=-1
OnUpdateAction=[!SetVariable #CURRENTSECTION#[NEOID] [#CURRENTSECTION#]]
DynamicVariables=1

[MeMoNEO]
Group=JPLGroup
Disabled=1
Measure=WebParser
URL=[JPL]
StringIndex=9
UpdateDivider=-1
OnUpdateAction=[!SetVariable #CURRENTSECTION#[NEOID] [#CURRENTSECTION#]]
DynamicVariables=1

---Meters---

[MeterNEOData]
Meter=STRING
FontFace=Consolas
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
FontSize=#FontSize#
AntiAlias=1
Text="Name: #NameNEO1#, Epoch: #EpochNEO1#, Ec: #EcNEO1#, MeDi: #MeDiNEO1#, In: #InNEO1#, LoAs: #LoAsNEO1#, ArPe: #ArPeNEO1#, MeAnEp: #MeAnEpNEO1#, MeMo: #MeMoNEO1##CRLF#Name: #NameNEO2#, Epoch: #EpochNEO2#, Ec: #EcNEO2#, MeDi: #MeDiNEO2#, In: #InNEO2#, LoAs: #LoAsNEO2#, ArPe: #ArPeNEO2#, MeAnEp: #MeAnEpNEO2#, MeMo: #MeMoNEO2##CRLF#Name: #NameNEO3#, Epoch: #EpochNEO3#, Ec: #EcNEO3#, MeDi: #MeDiNEO3#, In: #InNEO3#, LoAs: #LoAsNEO3#, ArPe: #ArPeNEO3#, MeAnEp: #MeAnEpNEO3#, MeMo: #MeMoNEO3##CRLF#Name: #NameNEO4#, Epoch: #EpochNEO4#, Ec: #EcNEO4#, MeDi: #MeDiNEO4#, In: #InNEO4#, LoAs: #LoAsNEO4#, ArPe: #ArPeNEO4#, MeAnEp: #MeAnEpNEO4#, MeMo: #MeMoNEO4##CRLF#Name: #NameNEO5#, Epoch: #EpochNEO5#, Ec: #EcNEO5#, MeDi: #MeDiNEO5#, In: #InNEO5#, LoAs: #LoAsNEO5#, ArPe: #ArPeNEO5#, MeAnEp: #MeAnEpNEO5#, MeMo: #MeMoNEO5##CRLF#Name: #NameNEO6#, Epoch: #EpochNEO6#, Ec: #EcNEO6#, MeDi: #MeDiNEO6#, In: #InNEO6#, LoAs: #LoAsNEO6#, ArPe: #ArPeNEO6#, MeAnEp: #MeAnEpNEO6#, MeMo: #MeMoNEO6##CRLF#Name: #NameNEO7#, Epoch: #EpochNEO7#, Ec: #EcNEO7#, MeDi: #MeDiNEO7#, In: #InNEO7#, LoAs: #LoAsNEO7#, ArPe: #ArPeNEO7#, MeAnEp: #MeAnEpNEO7#, MeMo: #MeMoNEO7##CRLF#Name: #NameNEO8#, Epoch: #EpochNEO8#, Ec: #EcNEO8#, MeDi: #MeDiNEO8#, In: #InNEO8#, LoAs: #LoAsNEO8#, ArPe: #ArPeNEO8#, MeAnEp: #MeAnEpNEO8#, MeMo: #MeMoNEO8##CRLF#Name: #NameNEO9#, Epoch: #EpochNEO9#, Ec: #EcNEO9#, MeDi: #MeDiNEO9#, In: #InNEO9#, LoAs: #LoAsNEO9#, ArPe: #ArPeNEO9#, MeAnEp: #MeAnEpNEO9#, MeMo: #MeMoNEO9##CRLF#Name: #NameNEO10#, Epoch: #EpochNEO10#, Ec: #EcNEO10#, MeDi: #MeDiNEO10#, In: #InNEO10#, LoAs: #LoAsNEO10#, ArPe: #ArPeNEO10#, MeAnEp: #MeAnEpNEO10#, MeMo: #MeMoNEO10#"
InlineSetting=Color | 255,255,0,255
InlinePattern=(?s)^(\N*(?:\R|$)){[NEOID]}
DynamicVariables=1
Obviously you can choose whichever variant you feel is more suited to your scenario.
You do not have the required permissions to view the files attached to this post.
Fulmar
Posts: 21
Joined: July 24th, 2012, 4:50 pm
Location: Belgium

Re: Planetarium with Near Earth Objects

Post by Fulmar »

Thanks again for your information. Now I am able to start with the calculations.
I have 2 questions again.

First: the data obtained contain numbers lower than 0, and they are displayed as .xxxxxxx (not as 0.xxxxxxx) and the code doesn't recognize these numbers. How can I teach Rainmeter these numbers are to be recognized as 0.xxxxxx?

Second: For the transformation concerning Kepler's law I have got a lua script before.
Can I use it for this code?

This is the code for the Mean Anomaly (for instance):

[MeAnNEO1]
Measure=Calc
Formula=#MeAnEpNEO1#+(#MeMoNEO1#*(JD-#EpochNEO1#))
DynamicVariables=1


To obtain the Eccentric Anomaly we could use this code:

[EcAnNEO1]
Measure=Script
ScriptFile=#CURRENTPATH#Kepler.lua
M=MeAnNEO1
e=EcNEO1
DynamicVariables=1


And the lua script itself is:

function Initialize()
MeasureName_M = SELF:GetOption("M")
MeasureName_e = SELF:GetOption("e")

Measure_M = SKIN:GetMeasure(MeasureName_M)
Measure_e = SKIN:GetMeasure(MeasureName_e)
end

function Update()
local M = Measure_M:GetValue()
local e = Measure_e:GetValue()

local E = M

repeat
local LastE = E
E = E + (M + math.deg(e)*math.sin(math.rad(E)) - E)/(1 - e*math.cos(math.rad(E)))
until math.abs (E - LastE) < 0.0000000001

return E
end


But I don't know if I have to write, f.i. M or #M#, e or #e#...

Thank you very much for your kind help.

PS. I downloaded the Solar System simulator to study. Very impressive!!
I am just a retired bank employee. I never got a degree in ICT or astronomy. But I am very interested.
User avatar
Yincognito
Posts: 3015
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Planetarium with Near Earth Objects

Post by Yincognito »

Fulmar wrote: December 24th, 2020, 2:55 pmFirst: the data obtained contain numbers lower than 0, and they are displayed as .xxxxxxx (not as 0.xxxxxxx) and the code doesn't recognize these numbers. How can I teach Rainmeter these numbers are to be recognized as 0.xxxxxx?
Yes, Rainmeter doesn't use the .XXX format, but the 0.XXX one, as explained in the note here. An easy way to solve this is to add the following regex substitution to the measures getting such values (or even to all the measures in the JPLGroup for that matter, since it doesn't cause issues if the pattern is not found, unless you have an object name like .34OBJ or something, but the odds of that are really small IMHO):

Code: Select all

RegExpSubstitute=1
Substitute="^(\.\d)":"0\1"
What this does is to replace the period followed by a digit at the start of the string with 0 followed by the said pattern (which was captured, i.e. "memorized" by regex in \1). So, say, the EcNEO measure will now look like this:

Code: Select all

[EcNEO]
Group=JPLGroup
Disabled=1
Measure=WebParser
URL=[JPL]
StringIndex=3
UpdateDivider=-1
RegExpSubstitute=1
Substitute="^(\.\d)":"0\1"
OnUpdateAction=[!SetVariable #CURRENTSECTION#[NEOID] [#CURRENTSECTION#]]
DynamicVariables=1
Do this for the other related measures like explained above and that's all. There are probably other ways to deal with this, but this is the first thing I thought about and it's simple and short enough to not be uncomfortable.
Fulmar wrote: December 24th, 2020, 2:55 pmSecond: For the transformation concerning Kepler's law I have got a lua script before.
Can I use it for this code?
[...]
But I don't know if I have to write, f.i. M or #M#, e or #e#...
I suppose the Lua script is properly calculating things, otherwise it wouldn't have been written. Unfortunately I'm not really into Lua (although I do programming), but if (and when) you use those M and e in Lua, no # are needed, as far as I know. The hash tags are only needed in the native Rainmeter code to "tell" Rainmeter that something is a variable. In any case, to be sure, some confirmation from someone knowing Lua better than I do would not hurt.
Fulmar wrote: December 24th, 2020, 2:55 pmI am just a retired bank employee. I never got a degree in ICT or astronomy. But I am very interested.
Not to worry, I'm an amateur too, it's not like I'm working for NASA, LOL. I like challenges though, and to know all kinds of things. Working on the Solar System skin provided the opportunity to learn something new (and to correct some misconceptions I had along the way) and I really liked the "subject". Unfortunately, due to how Rainmeter works and the particularities of the skin combined with the attempted animation, the skin is not as "resource friendly" as I wanted to. But at least it is reasonably precise, given that I tested it against Celestia (a dedicated free software for such things).
Fulmar
Posts: 21
Joined: July 24th, 2012, 4:50 pm
Location: Belgium

Re: Planetarium with Near Earth Objects

Post by Fulmar »

I am still confused concerning the use of syntaxes.
In every measure I made I am getting syntax errors.

I will give an example.

Concerning your reply of December 24th I am using the first code.
When I want to calculate the Actual Mean Anomaly of let's say NEO1 (MeAnNEO1) I need the Mean Anomaly on Epoch (MeAnEpNEO1), the Mean Motion (MeMoNEO1) and the amount of days since Epoch (=Julian Date of today - Julian Date of Epoch) (JD-EpochNEO1). All these measures are known.

The Formula is:

MeAnNEO1=MeAnEpNEO+MeMoNEO1*(JD-EpochNEO1)

If I write:

Code: Select all

[MeAnNEO1]
Measure=Calc
Formula=[#MeAnEpNEO1]+[#MeMoNEO1]*(JD-[#EpochNEO1])
RegExpSubstitute=1
Substitute="^(\.\d)":"0\1"
DynamicVariables=1 
I am getting an error message:

ERRO (14:24:23.140) Planetarium NEO\Planetarium NEO 5s.ini - [MeAnNEO1]: Calc: Syntax error

The same with:

Code: Select all

[MeAnNEO1]
Measure=Calc
Formula=[#MeAnEpNEO1#]+[#MeMoNEO1#]*(JD-[#EpochNEO1#])
RegExpSubstitute=1
Substitute="^(\.\d)":"0\1"
DynamicVariables=1
or other codes where I am using [], # or &.
In case I am just using parentheses () the values are unknown.

Can you tell me which mistake I am making here?

Thank you so much.
:???:
Last edited by balala on January 4th, 2021, 2:48 pm, edited 1 time in total.
Reason: Please use <code> tags whenever are posting code snippets. It's the </> button.
User avatar
Yincognito
Posts: 3015
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Planetarium with Near Earth Objects

Post by Yincognito »

Fulmar wrote: January 4th, 2021, 1:58 pm I am still confused concerning the use of syntaxes.
In every measure I made I am getting syntax errors.

I will give an example.

[...]

Can you tell me which mistake I am making here?
Technically, you're not making any mistake. The issue appears because the variables used in the formula are created "on the fly" by the WebParser measures at the time of polling the site for data, and they are not "declared" or being assigned default values beforehand. See the part where I said (in the same 24 Dec reply):
Yincognito wrote: December 24th, 2020, 4:35 am and since I don't like having tons of measures and meters and a mile long code as a result, I made the code more compact (something you alluded to as well earlier in the thread) by using [...] some on-the-fly variables to store the desired values on WebParser childrens' update (see the meaning of the #CURRENTSECTION# built-in variable here). Since the variables are not defined to "default" values (like the empty string or 0) in the [Variables] section, they will display their literal form in the beginning, but that can easily be fixed - I just kept it simple here, feel free to experiment with it and adjust it to your needs if you want...
So, what happens is that at skin load or refresh, since the variables don't technically "exist" at that point, the formula in your Calc measure will use the variables' literal name instead of their values (since the latter don't exist, as mentioned), and as you can imagine, the literal [#MeAnEpNEO1]+[#MeMoNEO1]*(JD-[#EpochNEO1]) makes no sense mathematically, since Rainmeter expects some values to be used in the formula and not the literal "[#MeAnEpNEO1]" and the like.

The (classic, see the end of my reply for an alternate) solution, just as for your previous question, is simple - just declare the variables and give them some value in the [Variables] section of the skin. For example, I added these parts to the already existing (and adjusted as per your request) code, in the appropriate locations...

Variable declaration (obviously FontSize is from the "old" code):

Code: Select all

[Variables]
FontSize=8
MeAnEpNEO1=0
MeMoNEO1=0
EpochNEO1=0
The measures (created a dummy one for JD in my case, but you'd use your own JD measure, naturally):

Code: Select all

---Derivate Measures---

[JD]
Measure=Calc
Formula=(2455945.5+100)
UpdateDivider=-1

[MeAnNEO1]
Measure=Calc
Formula=[#MeAnEpNEO1]+[#MeMoNEO1]*(JD-[#EpochNEO1])
RegExpSubstitute=1
Substitute="^(\.\d)":"0\1"
DynamicVariables=1
And an optional meter to display the result, placed after the existing meter:

Code: Select all

---Derivate Meters---

[MeterMeAnNEO1]
Meter=STRING
Y=0R
FontFace=Consolas
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
FontSize=#FontSize#
AntiAlias=1
NumOfDecimals=3
MeasureName=MeAnNEO1
Text="MeAnNEO1: %1"
DynamicVariables=1
Basically the only difference is that I created/instantiated MeAnEpNEO1, MeMoNEO1 and EpochNEO1 with 0 at the start of the code. They now exist from the beginning and the Rainmeter formula parser can replace the variables with their actual values at any time while the skin is loaded. Now of course, since you have a lot of these variables (for NEO1, NEO2 and so on), I wasn't exactly willing to have half of the code made of assigning 0 (or any value, for that matter) to a ton of variables when I wrote that reply, but you can do it. And this is yet another reason why I chose to do what I did: when creating the variables dynamically / on the fly in the WebParser measures by the !SetVariable bangs, you don't have to readjust and add to the code if the number of NEOs change, as there will always be just as many variables created as they are needed.

Some notes:
- despite the scary visuals, those syntax errors should be harmless anyway, since they appear only before polling the site for data
- the substitute is practically not really required in the Calc measure, since it already uses 0.XXX type values, but it doesn't hurt either
- I believe you can safely use the "normal" variable syntax (i.e. #SomeVariable#) instead of the nested syntax (i.e. [#SomeVariable]) in the Calc measures, without any drawback, although you can continue in the current form as well
- another (shorter) option, which doesn't require the declaring mentioned above, if you don't always need the variables or the calculated values, would be to start with the Calc measure(s) disabled and then enable them on the (first) polling to the site for data, similar to how the JPLGroup measures are. For example, taking advantage of the fact that we already have the JPLGroup measure group which reacts the same, we can simply add:

Code: Select all

Group=JPLGroup
Disabled=1
to each (potential) Calc measure. This will simply avoid using the said variables before they're assigned a value of some kind or before they actually exist in the skin. The MeAnNEO1 measure will therefore look like:

Code: Select all

[MeAnNEO1]
Group=JPLGroup
Disabled=1
Measure=Calc
Formula=[#MeAnEpNEO1]+[#MeMoNEO1]*(JD-[#EpochNEO1])
RegExpSubstitute=1
Substitute="^(\.\d)":"0\1"
DynamicVariables=1
As always, feel free to choose whichever variant above you deem more suitable or comfortable for your usage scenario.