Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 149

General Discussion • Re: Planetarium with Near Earth Objects

$
0
0
Sir,

I have a problem with Regular Expressions again.
In order to make an extension to the planetarium I did the following:

First I made a Regex from te api https://ssd-api.jpl.nasa.gov/cad.api.
It will give all the NEO Earth close approaches for the next 60 days. But only the relevant data, i.e for instance distance and time.

So I got this:

Code:

[NEO]Measure=WebParserURL=https://ssd-api.jpl.nasa.gov/cad.apiRegExp=(?siU)"data":.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)",.*,.*,.*,.*,.*,.*,.*,.*,.*,.*,.*"(.*)"DynamicVariables=1[NEO1]Measure=WebParserURL=[NEO]DynamicVariables=1StringIndex=1[NEO2]Measure=WebParserURL=[NEO]DynamicVariables=1StringIndex=2[NEO3]Measure=WebParserURL=[NEO]DynamicVariables=1StringIndex=3[NEO4]Measure=WebParserURL=[NEO]DynamicVariables=1StringIndex=4[NEO5]Measure=WebParserURL=[NEO]DynamicVariables=1StringIndex=5[NEO6]Measure=WebParserURL=[NEO]DynamicVariables=1StringIndex=6[NEO7]Measure=WebParserURL=[NEO]DynamicVariables=1StringIndex=7[NEO8]Measure=WebParserURL=[NEO]DynamicVariables=1StringIndex=8[NEO9]Measure=WebParserURL=[NEO]DynamicVariables=1StringIndex=9[NEO10]Measure=WebParserURL=[NEO]DynamicVariables=1StringIndex=10
In order to get the exact full-precision data for the orbits of NEO objects I downloaded a second api and put it in a Downloadfile, called NEOS.txt.
Because it’s huge, I only download it once, each time Rainmeter is started.

Like this:

Code:

[DoFi]Measure=WebParserURL=https://ssd-api.jpl.nasa.gov/sbdb_query.api?fields=full_name,epoch,e,a,i,om,w,tp,n,H&SB-group=NEO&full-prec=1DownloadFile=NEOS.txtDownload=1DynamicVariables=1
Now, my idea was to work with NEO1 … NEO10 and let Rainmeter look it up in the NEOS.txt.

I tried different regexes but it always says “RegExp matching error (-1)”.

Here is what I tried out, among others:

Code:

[WePaNEO1]Measure=WebParserURL=file://#CURRENTPATH#DownloadFile\NEOS.txtRegExp=(?siU)"(NEO1)","(.*)","(.*)","(.*)","(.*)","(.*)","(.*)","(.*)","(.*)","(.*)"DynamicVariables=1


Can you help me out please?

Statistics: Posted by Fulmar — Today, 12:50 pm



Viewing all articles
Browse latest Browse all 149

Trending Articles