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.8625677936458,
"longitude": -114.76728912071275,
"duration": 179.99989602684013,
"heading": 216.56802791440774
},
{
"latitude": 45.862557341736604,
"longitude": -114.76734154316978,
"duration": 179.99989602684013,
"heading": 216.56802791440774
},
{
"latitude": 45.86254688982741,
"longitude": -114.76739396562682,
"duration": 179.99989602684013,
"heading": 216.56802791440774
},
{
"latitude": 45.862536437918216,
"longitude": -114.76744638808385,
"duration": 179.99989602684013,
"heading": 216.56802791440774
},
{
"latitude": 45.86252598600902,
"longitude": -114.7674988105409,
"duration": 179.99989602684013,
"heading": 216.56802791440774
},
{
"latitude": 45.86251553409982,
"longitude": -114.76755123299793,
"duration": 179.99989602684013,
"heading": 216.56802791440774
},
{
"latitude": 45.86250508219062,
"longitude": -114.76760365545496,
"duration": 179.99989602684013,
"heading": 216.56802791440774
},
{
"latitude": 45.86249463028143,
"longitude": -114.76765607791201,
"duration": 179.99989602684013,
"heading": 216.56802791440774
},
{
"latitude": 45.862484178372235,
"longitude": -114.76770850036904,
"duration": 179.99989602684013,
"heading": 216.56802791440774
},
{
"latitude": 45.86247372646304,
"longitude": -114.76776092282608,
"duration": 179.99989602684013,
"heading": 216.56802791440774
}
]
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"
]
}