Skip to content
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

Feature request - Heading Indicator gauge - variation of the compass #43

Open
KyleGW opened this issue Jun 27, 2022 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@KyleGW
Copy link
Contributor

KyleGW commented Jun 27, 2022

I modified the widget code, to edit the font size, the tick sizes, and to include the heading degrees text. I started to play around with a way to actually rotate the text as the gauge spins, the way a real heading indicator would, but was more work than I felt like putting in after a while. :) Could either implement as it's own gauge or with option flags on the compass gauge.

recommendation is to add ability to modify the compass text size. In my rough implementation I hard coded a font load in with sizes needed for 4k and 1080

edits to widget_compass.py:

       self.font = ImageFont.truetype(font="Roboto-Medium.ttf", size=27) #4k size=27 , 1080 size=13 

        major_tick = size / 13
        minor_tick = size / 13
        tiny_tick = size / 20
        teeny_tick = size / 30

        #added text for heading indicator
        draw.text(locate(30, self.size / text_circleradius), "3", font=self.font, anchor="mm", fill=self.text)
        draw.text(locate(60, self.size / text_circleradius), "6", font=self.font, anchor="mm", fill=self.text)
        draw.text(locate(120, self.size / text_circleradius), "12", font=self.font, anchor="mm", fill=self.text)
        draw.text(locate(150, self.size / text_circleradius), "15", font=self.font, anchor="mm", fill=self.text)
        draw.text(locate(210, self.size / text_circleradius), "21", font=self.font, anchor="mm", fill=self.text)
        draw.text(locate(240, self.size / text_circleradius), "24", font=self.font, anchor="mm", fill=self.text)
        draw.text(locate(300, self.size / text_circleradius), "30", font=self.font, anchor="mm", fill=self.text)
        draw.text(locate(330, self.size / text_circleradius), "33", font=self.font, anchor="mm", fill=self.text)

4K layout xml:

    <translate x="50" y="30">
        <component type="compass" size="350" textsize="27" text="255,255,255" bg="0,0,0,25"/>
        <component type="icon" x="79" y="79" file="airplane.png" size="192"/>
        <composite x="140" y="190" name="altitude">
            <component type="text" x="75" y="0" size="18">ALT(ft)</component>
            <component type="metric" x="75" y="20" metric="alt" dp="0" units="feet" size="28" />
        </composite>
    </translate>

plane icon from: http://clipart-library.com/clip-art/377337_plane-icon-png.htm
Another instrument reference: https://www.mcico.com/resources/flight-instruments/six-pack-aircraft-instruments-explained

@time4tea
Copy link
Owner

Hey this is great! Thank you!

@time4tea time4tea added the enhancement New feature or request label Jun 27, 2022
@prestonvanloon
Copy link

This would be an excellent feature for aviation videos. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants