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.897710573405185,
"longitude": -111.56184421408972,
"duration": 179.99987029755133,
"heading": 350.64646965144277
},
{
"latitude": 49.89770122909286,
"longitude": -111.56182085485278,
"duration": 179.99987029755133,
"heading": 350.64646965144277
},
{
"latitude": 49.897691884780535,
"longitude": -111.56179749561585,
"duration": 179.99987029755133,
"heading": 350.64646965144277
},
{
"latitude": 49.89768254046821,
"longitude": -111.56177413637892,
"duration": 179.99987029755133,
"heading": 350.64646965144277
},
{
"latitude": 49.89767319615588,
"longitude": -111.56175077714198,
"duration": 179.99987029755133,
"heading": 350.64646965144277
},
{
"latitude": 49.897663851843554,
"longitude": -111.56172741790505,
"duration": 179.99987029755133,
"heading": 350.64646965144277
},
{
"latitude": 49.89765450753123,
"longitude": -111.56170405866811,
"duration": 179.99987029755133,
"heading": 350.64646965144277
},
{
"latitude": 49.897645163218904,
"longitude": -111.56168069943118,
"duration": 179.99987029755133,
"heading": 350.64646965144277
},
{
"latitude": 49.89763581890658,
"longitude": -111.56165734019424,
"duration": 179.99987029755133,
"heading": 350.64646965144277
},
{
"latitude": 49.897626474594254,
"longitude": -111.56163398095731,
"duration": 179.99987029755133,
"heading": 350.64646965144277
}
]
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"
]
}