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": 47.317386058501924,
"longitude": -82.77068131302187,
"duration": 179.99989503934935,
"heading": 124.03809972139851
},
{
"latitude": 47.317385024935085,
"longitude": -82.77071419603914,
"duration": 179.99989503934935,
"heading": 124.03809972139851
},
{
"latitude": 47.31738399136824,
"longitude": -82.7707470790564,
"duration": 179.99989503934935,
"heading": 124.03809972139851
},
{
"latitude": 47.3173829578014,
"longitude": -82.77077996207368,
"duration": 179.99989503934935,
"heading": 124.03809972139851
},
{
"latitude": 47.31738192423455,
"longitude": -82.77081284509094,
"duration": 179.99989503934935,
"heading": 124.03809972139851
},
{
"latitude": 47.317380890667714,
"longitude": -82.77084572810821,
"duration": 179.99989503934935,
"heading": 124.03809972139851
},
{
"latitude": 47.31737985710087,
"longitude": -82.77087861112548,
"duration": 179.99989503934935,
"heading": 124.03809972139851
},
{
"latitude": 47.31737882353403,
"longitude": -82.77091149414274,
"duration": 179.99989503934935,
"heading": 124.03809972139851
},
{
"latitude": 47.31737778996718,
"longitude": -82.77094437716,
"duration": 179.99989503934935,
"heading": 124.03809972139851
},
{
"latitude": 47.31737675640034,
"longitude": -82.77097726017728,
"duration": 179.99989503934935,
"heading": 124.03809972139851
}
]
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"
]
}