-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mark laylines do not appear for west longitude, north latitude #18
Comments
Revised code is here: |
Missed another intersection check later in the file. Updated tactics_pi.cpp.txt here: |
https://www.codeguru.com/cplusplus/geographic-distance-and-azimuth-calculations/ |
Mike, Thanks, very much!!! I will try to make this change in both tactics and dashboard_tactics on my repo. |
@Rasbats Mike, I tried comparing your tactics_pi.cpp.txt to the one in my repo and it appears that the entire file is different. I am reluctant to just copy over the entire original file. I found this repo and file https://github.com/Rasbats/tactics_pi/blob/master/src/tactics_pi.cpp |
Sorry, the line is 1206 in your repo mnt151-frontend2:
The function GetLineIntersection is the problem. |
Mike, sorry I was not clear, I am using rgleason/tactics_pi/tactics_pi.cpp and am now comparing to https://github.com/Rasbats/tactics_pi/blob/master/src/tactics_pi.cpp. There are a lot of differences, but it is a better comparison. I will try to find GetLineIntersection . I notice that your version appears to be based upon an incomplete development and Tom and Petri had other commits afterwards, from what I can see. How would I test for this problem in my version? I think I should do that first, so I don't screw things up needlessly. |
Here are the find getlineintersection in my version of tactics_pi.cpp
Here are the getlineintersection in your version of tactics_pi.cpp (direct from your repo)
However I find not GCIntersectSegment In this file! |
Lets take this to the bug in tactics_pi: rgleason/tactics_pi#48 |
Installation checklist (change to [X] when sure)
I have installed the software for which I am reporting the issues from:
Your own fork and build Link
Issue reported in CF DashT thread
Specifications
Expected Behavior
Mark laylines should appear for the area where the vessel is being sailed
Current Behavior
Mark laylines appear for east longitudes, north latitude. They do not appear for west longitude, north latitude.
Logic is not correct in the code for the intersection of lines.
Possible Solution
Use spherical trig to solve the intersection problem.
Code for solving the problem will be posted here. Unwilling to make a PR as review by Thomas_R and/or Canne is needed.
Steps/Code to Reproduce the Problem
See: https://www.cruisersforum.com/forums/f134/dashboard-tactics-dash-t-226601-16.html#post3862050
The text was updated successfully, but these errors were encountered: