Community Forum
ANVEL Licensing Options

ANVEL Path Question

  • Hi,

    Is there a way to define a path file through the API using Lat/Lon coordinates? I have a file that comes from a live test that has lat/lon coordinates that I would like to recreate the same path within ANVEL. I am having a hard time converting the lat/lon coordinates to x/y coordinates to define the path within the API. Is there a way to define the path using lat/lon? Or do you know of a way to convert it the lat/lon that works for ANVEL?

    Thank you!

  • I'm in a similar situation right now. So far, the only method I have for using latitude and longitude effectively in ANVEL is using a pretty inaccurate guesstimate system, and unfortunately, it doesn't actually create a path, just a route, meaning that the vehicle I am trying to use does not interact with the environment at all. It runs through hills and flies over terrain as a static object moving to the recorded positions, and that's something I'm still looking for a solution to. If you have insight, I'd be happy to hear it.
    This is what I have been doing so far:
    I have been using the external API to convert the latitude and longitude into ANVEL coordinates based on the environment file's latitude and longitude coordinates. These coordinates are known for a specific point on the terrain, so I've been zooming in on that point on the terrain and noting the location in ANVEL, offsetting those x and y values using the position tag in the environment file (taking the x and y for the <position x="" y="" z=""> and putting them in as opposite values (positive as negative and vice versa)), and then putting those latitude and longitude coordinates in for the location tag (<location type="latlong" latitude="" longitude="" elevation="" utcOffset=""/>). This aligns a specific point on the environment to a coordinate that can be referenced. The results of this have been questionable at best, but it's certainly a start.
    If anyone else has a method for doing this, I'd be interested in hearing it.

  • Hi,

    I found what I was looking for in the ConvertWGS84ToPoint function within the API. I was using the lat/lon of GPS data.

    However, I am going to be facing the same issue that @tlwalsh describes above. So far all I have done is manually try to shift it within my script. It is not accurate and really cumbersome. I would love to know any ideas someone else might have.

    Here is the scenario I have. I have now taken that GPS data and created a path with it. I have an environment file that was created based on lidar data of the test site the GPS data came from. When I import the GPS data onto the environment file, they are off in the x/y direction. There is definitely a shift between the coordinate systems. I have not figured out how to properly important the environment file to account for this shift.

    Thank you.

  • Hello @jmk479, @tlwalsh,

    This is a common problem and there are a few ways we solve it here at QS. The second being more accurate but more difficult.

    As a quick note I would suggest trying to align the environment correctly using the XML file attributes before applying an offset to your path waypoints. If the environment is geo-referenced properly, you will be able to convert to ANVEL coords using ConvertWGS84ToPoint, create your path, and set a vehicle to follow the path using Vehicles.FollowPath command (rather than teleporting the vehicle as @tlwalsh described).

    1.) Approximate the origin

    • Find a landmark within your environment that will be visible on google maps (a tree, rock, ditch, street corner, etc)
    • Find the landmark's position in ANVEL coordinates (it can be useful to place an object at the location and look in the properties pane)
    • Set the <position> tag in ANVEL to center the environment at that location (as @tlwalsh mentioned above this will be the negative of the object position)
    • Find the latitude, longitude of the landmark using Google Maps Satellite or some alternative
    • Set the <location> tag based on those latitude longitude coordinates.

    We can usually get within 1-2m accuracy with this method, which is enough for many of our testing scenarios.

    2.) Calculate the origin from lidar data

    If the lidar data you used to generate the heightmap is geo-referenced, it's possible to use the geographic position from one of the lidar points as the environment origin. You would need to figure out the ANVEL coordinates of that point and follow similar steps as above. Center the <position> tag around the ANVEL coordinates and enter the geographic coordinates of the lidar point into the <location> tag.

    In the past we have done this inside the script that generates the heightmap from lidar data. Where the geographic coordinates are still available.

    3.) Google Earth environments

    If you have used Google Earth to generate the heightmap from topological data. You can retrieve the north west corner of the heightmap from Google Earth and use that as the ANVEL environment origin.

    Happy coding,