Examples of analysis that can be done with SatelliteToolbox.jl


Hi guys!

Just to let you know that I added to my blog a introductory post about the SatelliteToolbox.jl package: https://www.ronanarraes.com/2019/01/the-satellite-toolbox-for-julia/

I also provided two examples of analysis that can be done with the package:

  1. Compute where the astronauts onboard the ISS were during the New Year; and
  2. Compute the atmospheric density profiles with 4 different models.

If you have any suggestion of better examples, please let me know :slight_smile: . The idea is to eventually add all of them into the documentation.


Hi Ronan,

An idea. The OceanColor site serves lots of data and among them the so called L2 processing level provides almost on-time scenes corresponding approximately to 5 min of acquisition and ~2000 km of swath width. It happens that the file names are constructed with the date and time of acquisition, e.g. yyyydoyhhmm00 (year, day-of-year, hour, minutes, seconds). All fine, but if we want to access to a particular scene (or a group) one needs to go to the site and search for them. The idea is, given a date and geographic location, use the orbit propagation to compute the file name. Given that, one can automatically download the interest file because they are all located at same location (see here for example, in case you don’t know this already).

To be honest I once started doing this using the SGP4 algorithm in Matlab but noticed that the orbit predicted with SGP4 (with an updated TLE file) started to diverge by 1 or 2 km from the scenes location. Than other things came in and I dropped this issue.


Very good! I will try to do this and, if it works, I share with you :slight_smile: For how much time did you propagate the orbit to have 2 km of error?


It was a couple years ago so memory is not fresh anymore, but I think it the TLE was only some months (2, 3?) old.


I see. However, after 2 months of propagation from TLEs, it is unfortunately expected even larger errors :frowning:


Ah, did’n know that and in fact it was also to take advantage of your knowledge that I brought up this matter. But as long as the error does not grow too much to “round up” to the neighbor patch, it should not prevent to give the right name.


Thank you for this post.

However I cannot run init_space_indices()

julia> init_space_indices()
[ Info: Downloading file 'fluxtable.txt' from 'ftp://ftp.geolab.nrcan.gc.ca/data/solar_flux/daily_flux_values/fluxtable.txt'.
┌ Warning: Download failed with error: failed process: Process(`curl -s -o /tmp/juliaTO7kCc -L ftp://ftp.geolab.nrcan.gc.ca/data/solar_flux/daily_flux_values/fluxtable.txt`, ProcessExited(13)) [13]
└ @ RemoteFiles ~/.julia/packages/RemoteFiles/2Wddl/src/download.jl:63
[ Info: Retrying in 5 seconds.

Using curl in the terminal:

$ curl  -L ftp://ftp.geolab.nrcan.gc.ca/data/solar_flux/daily_flux_values/fluxtable.txt
curl: (13) Bad PASV/EPSV response: 502

This is saying that the server does not accept passive ftp connection (or this is a problem with the firewall where I am, that does not allow the client to initiate passive connections).

If I specify to curl that I want an active connection, it works:

curl  -L ftp://ftp.geolab.nrcan.gc.ca/data/solar_flux/daily_flux_values/fluxtable.txt -P -


Hi @Bernard_GODARD,

That is strange, it is working perfectly here, it can be your firewall. However, there is a way to circumvent the download of this file, put it on the directory: .julia/packages/RemoteFiles/2Wddl/data. In this case, the init_space_indices() will not try to download the file again.

EDIT: BTW, can you please open a bug in RemoteFiles.jl so that we can select custom flags to be passed to curl ?


I have added a comment to a related issue you opened sometimes ago:

In your example code on your blog, before plotting, you never define:


and from the previous code snippets h is a scalar (ISS altitude in previous example) and the plot fails.


Thanks! I have updated the post!


Nice work! Here’s some comment/suggestions. Feel free to use them or not! Just trying to be helpful. Best regards.

“with the attitude and orbit control subsystem (AOCS)”

It should read:

“with the altitude and orbit control subsystem (AOCS)”

The following paragraphs should be shortened. It takes to much space and time before we actually goes into the main subject of your blog post. It’s also no longer relevant for new users of Julia. the mian informations could be included in the previous paragraph where you speak about FORTRAN.

" By that time (using v0.2 I think), Julia was a really new language. But I decided to accept the rough edges and try to code my algorithms using it. Anyway, it was just a personal side project to learn more about orbits. I did face many bugs, I had to use master (pre-v0.3) due to some bugs and missing features, but it was fun

After some years (and huge rewrites due to breaking changes), Julia released its v0.4. In this time, given the amount of code I had and the state of the language, I started to see that this bunch of algorithms can indeed be used for something at INPE to help in my activities. Hence, I decided to create a private package, which was called SatToolbox.jl , to organize everything I have done."


This is actually correct: https://en.wikipedia.org/wiki/Attitude_control


I should have checked before! :slight_smile: We learn something new each day.



Hi @Balinus,

Thanks for the suggestions :slight_smile: I am glad to you like the post!