Are you keeping the original instruments too? And will they be visible?Nathan Cardino wrote: ↑Mon Dec 30, 2019 9:55 pmAs long as it's not permanently mounted it will be okay.
Can't speak about a "10DoF" sensor but the cheap, basic 9 DoF IMU sensor I have combines a three axis gyro , a three axis accelerometer, and a thre axis magnetometometer in one package. Hence nine degrees fo freedom.knute wrote: ↑Tue Dec 31, 2019 4:23 pmDisregarding the question of why you would want to do this; there is no airspeed input. I think the other instruments could be created from the data provided. It is not clear to me what a 10dof is however? I don't know enough about how the gyroscopes in this work to know if it is possible to get a gravity reference as you would with a mechanical gyro instrument.
Sounds like a fun project though!
Code: Select all
import java.awt.*;
import static java.awt.RenderingHints.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.util.*;
import javax.swing.*;
public class Compass extends JPanel {
private final RenderingHints hints;
private volatile int heading;
public Compass() {
setPreferredSize(new Dimension(400,400));
hints = new RenderingHints(KEY_ANTIALIASING,VALUE_ANTIALIAS_ON);
}
public void paintComponent(Graphics g2D) {
Graphics2D g = (Graphics2D)g2D;
g.addRenderingHints(hints);
int smallDimension = Math.min(getWidth(),getHeight());
Ellipse2D circle =
new Ellipse2D.Double(0,0,smallDimension,smallDimension);
g.setColor(Color.WHITE);
g.fillRect(0,0,getWidth(),getHeight());
g.setColor(Color.BLACK);
g.fill(circle);
// draw ticks
g.setColor(Color.WHITE);
g.setStroke(new BasicStroke(2.5f));
g.translate(smallDimension / 2,smallDimension / 2);
g.rotate(Math.PI / -2);
AffineTransform transform = g.getTransform();
g.rotate(Math.toRadians(heading));
for (int i=0; i<360; i+=10) {
g.drawLine(smallDimension / 2 - 20,0,smallDimension / 2,0);
g.rotate(Math.toRadians(5));
g.drawLine(smallDimension / 2 - 10,0,smallDimension / 2,0);
g.rotate(Math.toRadians(5));
}
g.setStroke(new BasicStroke(1f));
// draw labels
g.setFont(getFont().deriveFont(Font.BOLD).deriveFont(24f));
FontMetrics fm = g.getFontMetrics();
for (int i=0; i<360; i+=30) {
g.translate(smallDimension / 2 - 50,0);
g.rotate(Math.toRadians(90.0));
String label;
switch (i) {
case 0: label = "N"; break;
case 90: label = "E"; break;
case 180: label = "S"; break;
case 270: label = "W"; break;
default: label = Integer.toString(i); break;
}
int x = fm.stringWidth(label) / 2;
g.drawString(label,-x,0);
g.rotate(Math.toRadians(-90.0));
g.translate(-(smallDimension / 2 - 50),0);
g.rotate(Math.toRadians(30.0));
}
g.setTransform(transform);
// draw 45 degree marks
Path2D.Double tick = new Path2D.Double();
tick.moveTo(smallDimension / 2 - 12,0);
tick.lineTo(smallDimension / 2,5);
tick.lineTo(smallDimension / 2,-5);
tick.closePath();
for (int i=0; i<360; i+=45) {
g.fill(tick);
g.rotate(Math.toRadians(45));
}
// draw airplane
Path2D.Double airplane = new Path2D.Double();
airplane.moveTo(-125,-20);
airplane.lineTo(-120,-80);
airplane.lineTo(-100,-80);
airplane.lineTo(-90,-20);
airplane.lineTo(10,-20);
airplane.lineTo(20,-140);
airplane.lineTo(50,-140);
airplane.lineTo(80,-20);
airplane.lineTo(140,-20);
airplane.lineTo(140,20);
airplane.lineTo(80,20);
airplane.lineTo(50,140);
airplane.lineTo(20,140);
airplane.lineTo(10,20);
airplane.lineTo(-90,20);
airplane.lineTo(-100,80);
airplane.lineTo(-120,80);
airplane.lineTo(-125,20);
airplane.closePath();
g.draw(airplane);
}
public static void main(String... args) {
EventQueue.invokeLater(() -> {
JFrame frame = new JFrame("Compass");
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
Compass compass = new Compass();
frame.add(compass,BorderLayout.CENTER);
JSlider slider = new JSlider(-180,180,0);
slider.setMajorTickSpacing(30);
slider.setMinorTickSpacing(10);
slider.setPaintTicks(true);
Hashtable<Integer,JLabel> dict = new Hashtable<>();
JLabel label;
for (int i=-180; i<=180; i+=30) {
switch (i) {
case -180:
case 180: label = new JLabel("S"); break;
case -90: label = new JLabel("W"); break;
case 0: label = new JLabel("N"); break;
case 90: label = new JLabel("E"); break;
default: int hdg = i < 0 ? i + 360 : i;
label = new JLabel(Integer.toString(hdg));
}
dict.put(i,label);
}
slider.setLabelTable(dict);
slider.setPaintLabels(true);
slider.addChangeListener(event -> {
compass.heading = -slider.getValue();
compass.repaint();
});
frame.add(slider,BorderLayout.SOUTH);
frame.pack();
frame.setVisible(true);
});
}
}
Just an FYI, FAR103 is the FAA's classification in the USA of a type of aircraft that by definition, doesn't have instruments to start with, so he won't be hiding or blocking his vision to existing instruments. Also, by definition, if you fall under FAR103 you aren't allowed to carry passengers. An example of something that falls under FAR103 is a paramotor or a powered parachute. Check out Tucker Gott on YouTube and you will get the idea.thagrol wrote: ↑Mon Dec 30, 2019 10:17 pmAre you keeping the original instruments too? And will they be visible?Nathan Cardino wrote: ↑Mon Dec 30, 2019 9:55 pmAs long as it's not permanently mounted it will be okay.
The question you need to answer is not whether doing this is technically possible, not even whetther it'll pass regulations but do you trust your own electronics and coding skills with your life and the lives of your passengers?
By making your own instruments and display that's what you'll be doing.
And while I'm not a pilot, won't there be some calibration steps (reference pressure and altitude of the airstrip etc) that you'll end up having to do on two seperate systems? The onboard instruments and your custom ones.
Frankly I'd hesitate to replace the instruments in my car and that's when it's trivial to get the relevant data from the EMU.
Fuse GPS speed with the data from your ACC. GPS speed only is inaccurate.thagrol wrote: ↑Wed Jan 01, 2020 12:40 amCan't speak about a "10DoF" sensor but the cheap, basic 9 DoF IMU sensor I have combines a three axis gyro , a three axis accelerometer, and a thre axis magnetometometer in one package. Hence nine degrees fo freedom.knute wrote: ↑Tue Dec 31, 2019 4:23 pmDisregarding the question of why you would want to do this; there is no airspeed input. I think the other instruments could be created from the data provided. It is not clear to me what a 10dof is however? I don't know enough about how the gyroscopes in this work to know if it is possible to get a gravity reference as you would with a mechanical gyro instrument.
Sounds like a fun project though!
The only way you'll get airspeed from that is to take very frequent readings and integrate them. trouble is that isn't very accurate and is prone to get even less so over time. Don't ask me for the math to do this, I don't know it.
It would probably be easier to derrive airspeed from the GPS fix. Every consumer level GPS I've used (stand alone, in car navigation device, or cell phone) can do this. The downside is no GPS, no airspeed measurement.
Fair enough. Like I said I am not a pilot though I have lots of experience in software failure and testing.TundraFlyer wrote: ↑Thu Jan 02, 2020 5:46 am
Just an FYI, FAR103 is the FAA's classification in the USA of a type of aircraft that by definition, doesn't have instruments to start with, so he won't be hiding or blocking his vision to existing instruments. Also, by definition, if you fall under FAR103 you aren't allowed to carry passengers. An example of something that falls under FAR103 is a paramotor or a powered parachute. Check out Tucker Gott on YouTube and you will get the idea.
I have to disagree here. Accurate instruments, sure. But inaccurate ones are probably worse than none. We're talking about a DIY rig rather than commercially produced, tested and certified devices.So, that said, anything he adds to himself, will be an improvement from no instruments.![]()
It depends on the sensors and technology you use, as DIYers we can use newer, better stuff than traditional equipment makers.i have to disagree here. Accurate instruments, sure. But inaccurate ones are probably worse than none. We're talking about a DIY rig rather than commercially produced, tested and certified devices.