GetSatellite {spectator} | R Documentation |
Gets info for a satellite
Description
Gets the information about the specified satellite, and possibly its current position.
Usage
GetSatellite(satellite, positions = TRUE)
Arguments
satellite |
character name of the satellite for which to retrieve the trajectory. The satellite name is not case sensitive, and can be abbreviated as long as an unambiguous match can be obtained. Only one satellite can be queried at a time. |
positions |
logical indicating if the current position should be included. Default: TRUE |
Value
If positions
is FALSE
, a single row 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
, a single row 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 trajectory and current position for a selected satellite
sat <- "SPOT-7"
traj <- GetTrajectory(satellite = sat)
pos <- GetSatellite(satellite = sat, positions = TRUE)
# do some nice graphs
library(maps)
map("world", fill = TRUE, col = "lightgrey")
plot(st_geometry(traj), lwd = 2, col = "red", add = TRUE)
plot(st_geometry(pos), pch = 15, col = "green", cex = 1.5, add = TRUE)
title(main = sprintf("current %s trajectory & position", sat))
}