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
waypointsgenerator.
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": 45.39729012444939,
"longitude": -75.79133315114478,
"duration": 179.99953613126078,
"heading": 39.70884698981962
},
{
"latitude": 45.39728779701243,
"longitude": -75.79139440473543,
"duration": 179.99953613126078,
"heading": 39.70884698981962
},
{
"latitude": 45.39728546957548,
"longitude": -75.79145565832607,
"duration": 179.99953613126078,
"heading": 39.70884698981962
},
{
"latitude": 45.39728314213852,
"longitude": -75.79151691191672,
"duration": 179.99953613126078,
"heading": 39.70884698981962
},
{
"latitude": 45.39728081470157,
"longitude": -75.79157816550736,
"duration": 179.99953613126078,
"heading": 39.70884698981962
},
{
"latitude": 45.39727848726461,
"longitude": -75.79163941909799,
"duration": 179.99953613126078,
"heading": 39.70884698981962
},
{
"latitude": 45.397276159827655,
"longitude": -75.79170067268863,
"duration": 179.99953613126078,
"heading": 39.70884698981962
},
{
"latitude": 45.397273832390695,
"longitude": -75.79176192627928,
"duration": 179.99953613126078,
"heading": 39.70884698981962
},
{
"latitude": 45.39727150495374,
"longitude": -75.79182317986992,
"duration": 179.99953613126078,
"heading": 39.70884698981962
},
{
"latitude": 45.39726917751678,
"longitude": -75.79188443346057,
"duration": 179.99953613126078,
"heading": 39.70884698981962
}
]
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"
]
}