Cutsom On-Fly-Funktion / Speed between path-markers

Sven

Hello everybody,

how can i determine the speed between two markers in a custom on-the-fly function?

Many Thanks

0

Comments

5 comments

  • Comment author
    Jim McAndrew Dronelink Staff

    Not sure I understand the question.

    0
  • Comment author
    Sven

    Hello,

    I'm currently programming a custom on-fly function. I want to reduce the speed of the drone from a certain marker on a path to 3 kmh and switch back to the "normal" speed from the next marker.

    0
  • Comment author
    Jim McAndrew Dronelink Staff

    Can you share your code?

    0
  • Comment author
    Sven

    I would like to program the following setting of a marker in an custom on-fly function:

    const m1 = new Dronelink.PathComponentMarker(path.nearestDistance(start.spatial.coordinate.geoCoordinate(new Dronelink.Vector2(start.spatial.orientation.yaw + Math.PI, distance-5))))
    m1.altitude = end.spatial.altitude
    m1.pointOfInterestID = poiMain.id
    component.addMarker(m1)

    How can I set the max speed for m1?

     

    0
  • Comment author
    Jim McAndrew Dronelink Staff
    • Edited

    The speed on markers is saved in a value called droneMotionLimits. It can be set like this:

    m1.droneMotionLimits = new Dronelink.MotionLimits6Optional()
    m1.droneMotionLimits.horizontal = new Dronelink.MotionLimitsOptional()
    m1.droneMotionLimits.horizontal.velocity = 1 //m/s
    0

Please sign in to leave a comment.