Comments (6)
If your reference point for the GPS is '(A, B)', and your UTM zone is 32N, then:
gps_ref = f2c.Point(A, B)
ref_xy = f2c.Transform.transform(gps_ref, "EPSG:4326", "UTM:32N datum:WGS84")
dubins_path.moveTo(ref_xy)
gps_path = f2c.Transform.transform(dubins_path, "UTM:32N datum:WGS84", "EPSG:4326")
from fields2cover.
@Gonzalo-Mier Thanks for your reply.
I got this error :
"ref_xy = f2c.Transform.transform(gps_ref, "EPSG:4326", "UTM:32N datum:WGS84")
TypeError: transform() takes 2 positional arguments but 3 were given"
I'm not sure, but also i think that the 1st argument of "Transform.transform" should be F2CField type (in my case i don't have a field).
Other question : As you see, every time i add a start.point and end.point to the path[i] to make a Line (example path0.addPoint( 5.0, -30.0), path0.addPoint( 0.0, 10.0))
Because in my application i should give them in GPS coordinates instead of (X,Y) like the simple example on top, adding the gps-ref to the code is the only change that should be done?
from fields2cover.
Sorry, the swig interface doesn't allow that yet. Recompile the f2c library, install it and try this:
gps_ref = f2c.Point(4.261999903178513,51.785970497504699)
field = f2c.Field()
field.setRefPoint(gps_ref)
f2c.Transform.transformToUTM(field)
path = f2c.Transform.transformToPrevCRS(dubins_path, field)
It should work now
from fields2cover.
Thanks, yes it works.
So, i can put directly the points of the swaths (path[i].addPoint(.....,.....) in the example) in gps coords ?
from fields2cover.
I don't understand what you want
from fields2cover.
I'll close the issue as it was solved. Feel free to open a new one if you have more doubts :)
from fields2cover.
Related Issues (20)
- Errors install Ubuntu 22.04 HOT 2
- Using enumerate on a Swaths object causes a segfault HOT 3
- Visualization using python HOT 2
- Compilation error HOT 4
- Full path constrained within headland HOT 2
- Compile error due to include path HOT 1
- ROS Noetic, CMake could not find Fiels2Cover package
- Crossing inner cells HOT 3
- ROS buildfarm does not compile F2C properly HOT 18
- Packaging for distribution is needed, as the build subsequently fails because of the many unspecified dependencies HOT 3
- Fields2Cover build breaks other ROS packages build (Eigen error) HOT 2
- Install swig from package manager HOT 8
- Python syntax to specify options for planCovPath and planCovRoute HOT 3
- CMake error with v2 changes on libabsl_log_severity.a HOT 23
- Add figure_size() function to allow control of output size of visualiser.
- Idea - add minimum distance cost/penalty for ortools::RoutingModel for emergent snake/spiral behaviour. HOT 1
- Planning of Loops F2c V2 HOT 8
- Segfault at exit. HOT 6
- Virtual Superclasses Should Have Virtual Destructors
- Installing f2c as a local package to venv HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fields2cover.