GetAllSatellites {spectator} | R Documentation |
Gets all referenced satellites info
Description
Gets the information about all the satellites known in the Spectator Earth database, and possibly their current positions.
Usage
GetAllSatellites(positions = TRUE)
Arguments
positions |
logical indicating if the current position should be included. Default: TRUE |
Value
If positions
is FALSE
, a data frame with following attributes:
id
integer identifier
name
character satellite name
norad_id
integer satellite catalog number
open
logical whether the data produced by the satellite is freely accessible
platform
character platform name
sensor_name
character name of the sensor available on the satellite
sensor_swath
integer swath width of the sensor available on the satellite
sensor_type
character type of the sensor available on the satellite (SAR or Optical)
If positions
is TRUE
, object of class 'sf
' with 'POINT
' geometry type,
with the same attributes as above.
Source
https://api.spectator.earth/#satellites
See Also
Examples
if(interactive()){
library(sf)
# get all satellites withe their positions
pos <- GetAllSatellites(positions = TRUE)
# do some nice graphs
library(maps)
map("world", fill = TRUE, col = "lightgrey")
# show open data satellites in green
plot(st_geometry(subset(pos, open == TRUE)), add = TRUE, col = "green", pch = 15)
# show others in red
plot(st_geometry(subset(pos, open == FALSE)), add = TRUE, col = "red", pch = 16)
# add labels
xy <- st_coordinates(pos)
# shift labels up to be able to read them
xy[, 2] <- xy[, 2] + 2
text(xy, labels = pos$name, cex = 0.5)
}