Costum On-Fly-Function / Dronie
Hello,
i try to write my own Dronie costum On-Fly-Function.
The target is, that the last 10 meter the gimble go slowly in the pitch 0 position.
I try this:
const marker4 = new Dronelink.PathComponentMarker(path.nearestDistance(start.spatial.coordinate.geoCoordinate(new Dronelink.Vector2(start.spatial.orientation.yaw + Math.PI, distance-10))))
marker4.gimbalOrientations = {}
marker4.gimbalOrientations[0] = new Dronelink.Orientation3Optional()
marker4.gimbalOrientations[0].pitch = 0
marker4.gimbalOrientations[0].heading = 0
marker4.gimbalOrientations[0].Interpolation=Dronelink.InterpolationFunction.None
component.addMarker(marker4)
But the heading und the Interpolation is in the test not set?!?
Can anybody help me?
Comments
2 comments
Hi Sven,
I cannot find heading in https://github.com/dronelink/dronelink-kernel-js/blob/master/types/core/Orientation3Optional.d.ts
It is in zReference you find here: https://github.com/dronelink/dronelink-kernel-js/blob/master/types/core/OrientationZReferenceSources.d.ts
Regarding the Interpolation:
https://github.com/dronelink/dronelink-kernel-js/blob/master/types/core/Interpolation.d.ts
You need to specify the function with f
As example I use it in the markers:
marker.interpolation = new Dronelink.Interpolation()
marker.interpolation.f = Dronelink.InterpolationFunction.Sigmoid
Hi Raffaello,
thank you. With
marker.interpolation = new Dronelink.Interpolation()
marker.interpolation.f = Dronelink.InterpolationFunction.Sigmoid
it works.
Sorry, i am new in JavaScript programming ...
Have a nice Weekend
Please sign in to leave a comment.