Geo functions
geoWander
Commentary
added in 0.3.11
stateful function
Generates an infinite, randomized path of coordinates in a geospatially bounded box.
Inputs:
boundingBox
: a geospatially bounded box defined by two points: the lower left point and the upper right point.- All other parameters mirror those in
waypoints
generator.
Outputs:
latitude
: The latitude of the position.longitude
: The longitude of the position.duration
: The number of milliseconds between each point. Use this value to throttle the generator for speed-realism.heading
: The navigational heading/bearing, in degrees, of the object.
Examples
Generating coordinates
{
"_gen": "geoWander",
"boundingBox": [
[
45,
-125
],
[
50,
-70
]
],
"speed": 500,
"scale": 0.025
}
[
{
"latitude": 49.59896620034505,
"longitude": -120.03273834044477,
"duration": 179.9997607342856,
"heading": 161.76585627034183
},
{
"latitude": 49.59896216402495,
"longitude": -120.03268316149754,
"duration": 179.9997607342856,
"heading": 161.76585627034183
},
{
"latitude": 49.59895812770484,
"longitude": -120.03262798255032,
"duration": 179.9997607342856,
"heading": 161.76585627034183
},
{
"latitude": 49.59895409138473,
"longitude": -120.0325728036031,
"duration": 179.9997607342856,
"heading": 161.76585627034183
},
{
"latitude": 49.598950055064634,
"longitude": -120.03251762465588,
"duration": 179.9997607342856,
"heading": 161.76585627034183
},
{
"latitude": 49.59894601874453,
"longitude": -120.03246244570866,
"duration": 179.9997607342856,
"heading": 161.76585627034183
},
{
"latitude": 49.59894198242442,
"longitude": -120.03240726676144,
"duration": 179.9997607342856,
"heading": 161.76585627034183
},
{
"latitude": 49.598937946104314,
"longitude": -120.03235208781422,
"duration": 179.9997607342856,
"heading": 161.76585627034183
},
{
"latitude": 49.59893390978421,
"longitude": -120.032296908867,
"duration": 179.9997607342856,
"heading": 161.76585627034183
},
{
"latitude": 49.5989298734641,
"longitude": -120.03224172991978,
"duration": 179.9997607342856,
"heading": 161.76585627034183
}
]
Specification
JSON schema
{
"type": "object",
"properties": {
"boundingBox": {
"oneOf": [
{
"type": "object",
"properties": {
"_gen": {
"type": "string"
}
},
"required": [
"_gen"
]
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"_gen": {
"type": "string"
}
},
"required": [
"_gen"
]
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"_gen": {
"type": "string"
}
},
"required": [
"_gen"
]
},
{
"type": "number"
}
]
},
"minItems": 2,
"maxItems": 2
}
]
},
"minItems": 2,
"maxItems": 2
}
]
},
"speed": {
"oneOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "object",
"properties": {
"_gen": {
"type": "string"
}
},
"required": [
"_gen"
]
}
]
},
"scale": {
"type": "number",
"minimum": 0.000001
},
"unit": {
"type": "string",
"enum": [
"degrees",
"radians"
]
}
},
"required": [
"boundingBox",
"speed"
]
}