Would someone please give me a short example of how I could parse out this downloaded file, and get the parameter that I am looking for.
The file I am accessing on the internet is located at:
ftp://ftp.swpc.noaa.gov/pub/lists/costello/ace_pkp_15m.txt
Here's a very short sample of the file structure:
ata_list: ace_pkp_15m.txt
:Created: 2009 Nov 07 2021 UT
# Prepared by the U.S. Dept. of Commerce, NOAA, Space Environment Center.
# Please send comments and suggestions to SEC.Webmaster@noaa.gov
#
# Units: Predicted Index 0-9 in Kp units
# Status(S): 0 = nominal solar wind input data,
# 1 to 5 = incomplete input data, but model output available
# >5 = incomplete input data, no model output
# Solar Wind Source: ACE Satellite
# Missing data values: -1
#
# 15-minute Costello Geomagnetic Activity Index
#
# UT Date Time -Predicted Time- Predicted Lead-time USAF Est.
# YR MO DA HHMM S YR MO DA HHMMSS Index in Minutes Kp
#-------------------------------------------------------------------------
2009 10 31 1800 0 2009 10 31 191400 1.67 74.0 0.00
2009 10 31 1815 0 2009 10 31 192853 1.33 73.9 0.00
2009 10 31 1830 0 2009 10 31 194404 1.33 74.1 0.00
The only data I am interested in would be in the last line of the file, in the 10th column, which shows up in the above sample as 1.33...
I know I can already connect to that url within Processing, by using the following syntax, where urlstr is equal to the URL of the file shown above.
URL url = new URL(urlstr);
URLConnection conn = url.openConnection();
conn.connect();
I just need to know how to extract that one very small piece of data from the file.
PHP is not an option, as I don't have access to a server, and the free ones don't allow you to run this type of php script.
thanks....
Jim