trying for a different destination needle
This commit is contained in:
parent
85fc8f2b32
commit
44777805b2
287
dest_needle.svg
Normal file
287
dest_needle.svg
Normal file
@ -0,0 +1,287 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="897.4126"
|
||||
height="897.4126"
|
||||
id="svg5983"
|
||||
version="1.1"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
sodipodi:docname="dest_needle.svg"
|
||||
inkscape:export-filename="/home/rgarcia/flockompass/needle_to_flock.png"
|
||||
inkscape:export-xdpi="55"
|
||||
inkscape:export-ydpi="55">
|
||||
<defs
|
||||
id="defs5985">
|
||||
<symbol
|
||||
id="*Paper_Space-9" />
|
||||
<symbol
|
||||
id="*Model_Space-6" />
|
||||
<pattern
|
||||
height="8"
|
||||
id="Hatch-4"
|
||||
patternUnits="userSpaceOnUse"
|
||||
width="8"
|
||||
x="0"
|
||||
y="0">
|
||||
<path
|
||||
d="M8 4 l-4,4"
|
||||
linecap="square"
|
||||
stroke="#000000"
|
||||
stroke-width="0.25"
|
||||
id="path21927" />
|
||||
<path
|
||||
d="M6 2 l-4,4"
|
||||
linecap="square"
|
||||
stroke="#000000"
|
||||
stroke-width="0.25"
|
||||
id="path21929" />
|
||||
<path
|
||||
d="M4 0 l-4,4"
|
||||
linecap="square"
|
||||
stroke="#000000"
|
||||
stroke-width="0.25"
|
||||
id="path21931" />
|
||||
</pattern>
|
||||
<marker
|
||||
id="DistanceX-9"
|
||||
orient="auto"
|
||||
refX="0"
|
||||
refY="0"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
d="M 3,-3 -3,3 M 0,-5 V 5"
|
||||
style="stroke:#000000;stroke-width:0.5"
|
||||
id="path21924"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<symbol
|
||||
id="*Paper_Space" />
|
||||
<symbol
|
||||
id="*Model_Space" />
|
||||
<pattern
|
||||
height="8"
|
||||
id="Hatch"
|
||||
patternUnits="userSpaceOnUse"
|
||||
width="8"
|
||||
x="0"
|
||||
y="0">
|
||||
<path
|
||||
d="M8 4 l-4,4"
|
||||
linecap="square"
|
||||
stroke="#000000"
|
||||
stroke-width="0.25"
|
||||
id="path17644" />
|
||||
<path
|
||||
d="M6 2 l-4,4"
|
||||
linecap="square"
|
||||
stroke="#000000"
|
||||
stroke-width="0.25"
|
||||
id="path17646" />
|
||||
<path
|
||||
d="M4 0 l-4,4"
|
||||
linecap="square"
|
||||
stroke="#000000"
|
||||
stroke-width="0.25"
|
||||
id="path17648" />
|
||||
</pattern>
|
||||
<marker
|
||||
id="DistanceX"
|
||||
orient="auto"
|
||||
refX="0"
|
||||
refY="0"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
d="M 3,-3 -3,3 M 0,-5 V 5"
|
||||
style="stroke:#000000;stroke-width:0.5"
|
||||
id="path17641" />
|
||||
</marker>
|
||||
<linearGradient
|
||||
y2="1010.44"
|
||||
x2="2880.1899"
|
||||
y1="2331.72"
|
||||
x1="486.00601"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="id5">
|
||||
<stop
|
||||
id="stop30"
|
||||
style="stop-opacity:1; stop-color:#9CBDFF"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop32"
|
||||
style="stop-opacity:1; stop-color:#62A1F4"
|
||||
offset="0.670588" />
|
||||
<stop
|
||||
id="stop34"
|
||||
style="stop-opacity:1; stop-color:#2785E9"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
y2="4301.6802"
|
||||
x2="1642.9301"
|
||||
y1="447.685"
|
||||
x1="1723.29"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="id4">
|
||||
<stop
|
||||
id="stop25"
|
||||
style="stop-opacity:1; stop-color:#73B4FA"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop27"
|
||||
style="stop-opacity:1; stop-color:#58A2F0"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<mask
|
||||
id="id2">
|
||||
<linearGradient
|
||||
y2="1471.39"
|
||||
x2="1683.09"
|
||||
y1="773.80603"
|
||||
x1="1683.09"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="id3">
|
||||
<stop
|
||||
id="stop18"
|
||||
style="stop-opacity:1; stop-color:white"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop20"
|
||||
style="stop-opacity:0; stop-color:white"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<rect
|
||||
id="rect22"
|
||||
height="1133"
|
||||
width="1645"
|
||||
y="556"
|
||||
x="861"
|
||||
style="fill:url(#id3)" />
|
||||
</mask>
|
||||
<mask
|
||||
id="id0">
|
||||
<linearGradient
|
||||
y2="1639.5699"
|
||||
x2="1680.3101"
|
||||
y1="435.362"
|
||||
x1="1680.3101"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="id1">
|
||||
<stop
|
||||
id="stop10"
|
||||
style="stop-opacity:1; stop-color:white"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop12"
|
||||
style="stop-opacity:0; stop-color:white"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<rect
|
||||
id="rect14"
|
||||
height="1950"
|
||||
width="3213"
|
||||
y="63"
|
||||
x="74"
|
||||
style="fill:url(#id1)" />
|
||||
</mask>
|
||||
<style
|
||||
id="style6"
|
||||
type="text/css">
|
||||
|
||||
.fil2 {fill:#E6E6E6}
|
||||
.fil1 {fill:white}
|
||||
.fil0 {fill:url(#id4)}
|
||||
.fil3 {fill:url(#id5)}
|
||||
|
||||
</style>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.62513052"
|
||||
inkscape:cx="431.90981"
|
||||
inkscape:cy="448.7063"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:window-width="1362"
|
||||
inkscape:window-height="744"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="22"
|
||||
inkscape:window-maximized="0"
|
||||
showguides="true"
|
||||
inkscape:guide-bbox="true">
|
||||
<sodipodi:guide
|
||||
position="448.70628,787.32833"
|
||||
orientation="1,0"
|
||||
id="guide2926"
|
||||
inkscape:locked="false" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata5988">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="bg"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(75.420561,-41.324678)">
|
||||
<path
|
||||
style="fill:#a5dadc;fill-opacity:1;stroke:none;stroke-width:6.29291344;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
d="m 547.54461,226.44455 c -348.51779,0 0,0 -348.51779,0 L 373.28572,52.18566 Z"
|
||||
id="rect2923"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:164.30944824px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#1b3655;fill-opacity:1;stroke:none;stroke-width:4.10773611;"
|
||||
x="317.05566"
|
||||
y="216.88927"
|
||||
id="text3452"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3450"
|
||||
x="317.05566"
|
||||
y="216.88927"
|
||||
style="stroke-width:4.10773611;fill:#1b3655;fill-opacity:1;">D</tspan></text>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer4"
|
||||
inkscape:label="dest"
|
||||
transform="translate(-19.814857,-10.814811)" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer5"
|
||||
inkscape:label="flock"
|
||||
transform="translate(-19.814857,-10.814811)">
|
||||
<path
|
||||
style="fill:#6b8e23"
|
||||
inkscape:connector-curvature="0"
|
||||
d="M 405.56918,165.38466"
|
||||
id="path8245" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 7.4 KiB |
2
main.py
2
main.py
@ -79,7 +79,7 @@ class FlockompassApp(App):
|
||||
self.fbearing = atan2(sin(lon2 - lon1) * cos(lat2),
|
||||
cos(lat1) * sin(lat2)
|
||||
- sin(lat1) * cos(lat2) * cos(lon2-lon1))
|
||||
self.fbearing = self.needle_angle - degrees(self.fbearing) + 90
|
||||
self.fbearing = self.needle_angle - degrees(self.fbearing)
|
||||
self.fbearing = (self.fbearing + 360) % 360
|
||||
|
||||
def center_map_on_gps(self):
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.6 KiB |
Loading…
Reference in New Issue
Block a user