OriginGeoPoint
field in the configuration settings (in order to access this setting, you need to start a custom session instead of a sample scenario). The default latitude and longitude in this section correspond to Seattle, USA.
Alternatively, you can also use the setGeoReference()
function in the Python API.
When using a geospatial scene, the Python client needs to be initialized with the geo=True
flag. For example: client = airgen.MultirotorClient(geo=True)
.
AirGen provides the following API functionality that is specific to geospatial scenes/scenarios:
simSetVehicleGeoPose
: Set the GPS location and an orientation of the drone.
simSetObjectGeoPose
: Set the GPS location and an orientation of an object.
simSetGeoReference
: Set the GPS location of the origin of the scene (the vehicle will also be teleported when this function is used).
moveToGPSAsync
: Move the drone to a GPS location with specified velocity, yaw behavior.
getGPSData
: Get the GPS location of the drone.
simListSceneObjects()
. The objects can also be filtered using wildcards to find some that fit a name pattern.simDestroyObject.
simEnableWeather(True)
.simSetWeatherParameter()
, which enables users to set various weather effects. These effects impact only visuals and do not alter drone dynamics. Available weather parameters are:
airgen.WeatherParameter
and provide a scalar value between 0
and 1
, where 1.0
is the maximum effect.
simSetWind()
function modifies wind parameters in the simulation and directly impacts both visuals and the drone’s dynamics. The wind is defined using a Vector3r
vector, where each component specifies wind speed in meters per second along the North-East-Down (NED) coordinate frame.
simSetWind()
settings.simSetTimeofDay()
. This function adjusts sun and moon positions, ambient lighting, and overall sky conditions. Specify the desired date and time in the "YYYY-MM-DD HH:MM:SS"
format.