Board index FlightGear Development New features

INS Systems (from Unlimited Wishlist)

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Re: INS Systems (from Unlimited Wishlist)

Postby MAKG » Thu May 14, 2009 4:50 pm

Actually, if you understand rotation matrices, you'll understand quaternions. They are extremely closely related to the Axis-Angle representation (that is, where you specify a rotation by a unit vector axis and an angle to rotate about it). It's much easier to do a cockeyed rotation in that representation than in the more traditional spherical coordinates. Great circle paths are equivalent to rotations on the sphere.

Quaternions are in very common use for 3D gaming. I've borrowed a bunch of techniques from those folks.

If you want some light summer reading, here are a couple of not-very-expensive primers:

1. For map projections (great circles can be calculated easily in gnomonic projections; constant-heading paths work best in Mercator), Synder JP, Map Projections, A Working Manual, USGS Professional Paper 1395, 1987, http://pubs.er.usgs.gov/usgspubs/pp/pp1395 . This is somewhat dated, but is still very, very widely used as the standard reference for cartography, in several fields.

2. For quaternions, given a background in linear and vector algebra, Kuipers, JB, Quaternions and Rotation Sequences: A Primer with Application to Orbits, Aerospace, and Virtual Reality, Princeton Univ. Press, 1999. It's a bit wordy, but it's the clearest introduction to a somewhat murky topic I've found.

Kalman filters would seem to be a bit out of reach for even a very well educated high school student. They are based on integral transforms, several major steps past where you seem to be. An integral transform is kinda like a basis change like you saw in vector algebra; however, they live in infinite dimensions.
MAKG
 
Posts: 1152
Joined: Sun Oct 19, 2008 7:11 pm
Location: California Central Coast

Re: INS Systems (from Unlimited Wishlist)

Postby NicQ » Thu May 14, 2009 5:05 pm

MAKG wrote:Actually, if you understand rotation matrices, you'll understand quaternions. They are extremely closely related to the Axis-Angle representation (that is, where you specify a rotation by a unit vector axis and an angle to rotate about it). It's much easier to do a cockeyed rotation in that representation than in the more traditional spherical coordinates. Great circle paths are equivalent to rotations on the sphere.

Quaternions are in very common use for 3D gaming. I've borrowed a bunch of techniques from those folks.



Indeed, their common usage stemming from the (re)discovery by both FPS and Flight Sim game devs (don't remember who done it first ;)), in both cases, to overcome "gimbals limits" in 6DOF using Euler angles (iirc, I'm not that math educated) which incidentally is pretty much the same problem as passing over the North (or South) Pole :)
And let's not forget they are a real world usage of "unreal" mathematics, complex numbers :)
If it ain't broke, break it. How else are you going to figure out how it works ?
Callsign: C-NICQ, amateur FGFS military and aerobatic test pilot, pushing the envelope since 2009 (sic)

FGFS Gallery
Birds Of Gear, a blog
NicQ's Workshop
NicQ
 
Posts: 429
Joined: Wed Jan 21, 2009 10:30 pm
Location: Montreal, Qc, Canada

Re: INS Systems (from Unlimited Wishlist)

Postby MAKG » Thu May 14, 2009 6:05 pm

"Gimbal locks" from Euler angles (i.e., how one does cockeyed rotations in spherical coordintes) are exactly the same problem as flying over the North Pole (all true headings are 180 deg!). And another example is looking straight up while trying to describe which cardinal direction you're looking in.

While gamers and simmers have been avid users of the technology, its rediscovery goes back at least to the Explorer program in the late 1950s. The earliest modern reference I've found is:

Robinson A.C, On the Use of Quaternions in Simulation of Rigid Body Motion, Tech.Rep. 58-17, Aeronautical Research Lab, Wright-Patterson AFB, 1958

While Hamilton defined them in terms of complex numbers, I don't think it's particularly helpful to think of them that way.
MAKG
 
Posts: 1152
Joined: Sun Oct 19, 2008 7:11 pm
Location: California Central Coast

Re: INS Systems (from Unlimited Wishlist)

Postby flameout » Fri May 15, 2009 12:11 am

When I have time, I will definately read about and try to understand quaternions. From what I hear, they would be very useful for this. When I tried looking at Wikipedia's entry for it in just a few minutes, however, was not near enough. I'll take some more time to look through them. I'll also read about great circle paths, to understand the mathematics of calculating one.

Thank you.
Also known as Johnathan Van Why.
flameout
 
Posts: 442
Joined: Thu Dec 25, 2008 6:43 am
Location: Oregon, USA
Callsign: MSJF
Version: GIT
OS: Gentoo

Re: INS Systems (from Unlimited Wishlist)

Postby NicQ » Mon May 18, 2009 8:24 pm

MAKG wrote:"Gimbal locks" from Euler angles (i.e., how one does cockeyed rotations in spherical coordintes) are exactly the same problem as flying over the North Pole (all true headings are 180 deg!). And another example is looking straight up while trying to describe which cardinal direction you're looking in.

While gamers and simmers have been avid users of the technology, its rediscovery goes back at least to the Explorer program in the late 1950s. The earliest modern reference I've found is:

I meant within the context of game development (my former "career"), not scientific discovery or usage :)
I'm not that ignorant, hehe 8p

Thanks for the reference :)




Robinson A.C, On the Use of Quaternions in Simulation of Rigid Body Motion, Tech.Rep. 58-17, Aeronautical Research Lab, Wright-Patterson AFB, 1958
While Hamilton defined them in terms of complex numbers, I don't think it's particularly helpful to think of them that way.


Agreed, as probably a lot of techniques levering complex numbers aren't helped by reminding folks of their "irrational" nature ;) (oooh, a double entendre pun ;))
If it ain't broke, break it. How else are you going to figure out how it works ?
Callsign: C-NICQ, amateur FGFS military and aerobatic test pilot, pushing the envelope since 2009 (sic)

FGFS Gallery
Birds Of Gear, a blog
NicQ's Workshop
NicQ
 
Posts: 429
Joined: Wed Jan 21, 2009 10:30 pm
Location: Montreal, Qc, Canada

Re: INS Systems (from Unlimited Wishlist)

Postby flameout » Fri Jun 19, 2009 1:17 am

As an update, I will probably get my computer back up in a couple weeks (hopefully less, though) and begin development on it again. My first priority will be getting it ready for use in an aircraft. When it is ready, I will go back and post the code in my first post, and hope someone wants it in their plane.

I have made a wiki entry for it, but I have not done the redirects. Since there are 10 names commonly used for it (all similar,) I would rather hold off on making 9 different redirects. However, if someone wants to add the redirects themselves, go ahead. The names are listed on the wiki page, at http://wiki.flightgear.org/index.php/Inertial_Navigation_System. Please comment on it/fix errors.

Unfortunately, I have not been able to work on it for a few weeks now, so I don't have much work done. However, I did look up great circles (they were what I though, simple paths) and quaternion rotations. I manually calculated the rotation of <1,0,0> about <1,1,1> by 120 degrees, IIRC (the vectors and angle may have been a little different) to get <0,1,0>, which (I believe) is correct. I will immediatly move down the todo list on the wiki when I get FlightGear running again.

Thank you for the help.
Also known as Johnathan Van Why.
flameout
 
Posts: 442
Joined: Thu Dec 25, 2008 6:43 am
Location: Oregon, USA
Callsign: MSJF
Version: GIT
OS: Gentoo

Re: INS Systems (from Unlimited Wishlist)

Postby zakalawe » Fri Jun 19, 2009 9:43 am

Apologies for not following this discussion closely, but just to keep people informed, I'm currently working on re-build / re-writing the core GPS code, and extending it. This is part of larger work on the route-manager, and being able to support a modern FMS suite in the large jets, and will take some time.

Right now the GPS calculates position using the native simulation values (for lat/lon/elevation) - there's disabled code to simulate GPS inaccuracies, but it needs someone with better understand of the reception behaviour of GPS to produce a credible error function. The key thing for any INS system, I guess, is that larger commercial flight computers use GPS, VOR-DME triangulation and optical gyros to establish position - so in the future I'd like to decouple the 'position source' from the rest of the code - which is pretty generic and deals with time to waypoints, ground speed calculation, distance off desired courses and so on. For a KLN89, we'd use a 'pure GPS' source, for a Boeing-777 we'd use a combined GPS/VOR/INS source (but probably cheat and just use the raw, perfect data...), and for Concorde a pure INS model could be used. (Ideally the INS error model would accept an accuracy parameter allowing one C++ model to be used for a range of more- or less- accurate INS systems)

I don't have a good understanding of how close GPS and traditional INS functions are (in terms of waypoints, course and track errors, and other user-visible functions), but I'm happy to extend the C++ GPS/FMS code to support other input and output properties that make creating an INS instrument in Nasal easier. My GPS work is an ongoing (slow) project, though - so please don't take this as a reason to stop working on a pure Nasal solution, just be aware that I might like to combine it with my work in the future.
zakalawe
 
Posts: 1259
Joined: Sat Jul 19, 2008 5:48 pm
Location: Edinburgh, Scotland
Callsign: G-ZKLW
Version: next
OS: Mac

Re: INS Systems (from Unlimited Wishlist)

Postby flameout » Fri Jun 19, 2009 4:05 pm

Good, I thought I noticed the GPS was really accurate...

I am only developing an INS sim for now, so it won't have FMS features. Personally, I think that belongs in an FMS, and I frankly don't know enought to do that. Although I don't know Kalman filters, I will sort of "cheat" and provide a radio updating function, so you can model the GPS/radio/INS modes, pure INS, or GPS/INS, or DME-DME/INS, or VOR-DME/INS, etc.

I don't really see what extensions you are talking about. Are you talking about extensions that help with writing the code for the route? As far as I see, all I need for the INS is already implemented.

Thank you for the update.
Also known as Johnathan Van Why.
flameout
 
Posts: 442
Joined: Thu Dec 25, 2008 6:43 am
Location: Oregon, USA
Callsign: MSJF
Version: GIT
OS: Gentoo

Re: INS Systems (from Unlimited Wishlist)

Postby flameout » Mon Aug 24, 2009 5:30 am

Okay, I finally have a first "release," although it is still in development. I think it is ready for use within an aircraft.

I have edited my first post to include it.

Please post comments and suggestions, and I would like for it to be included in some aircraft.

Hope you enjoy it.
Also known as Johnathan Van Why.
flameout
 
Posts: 442
Joined: Thu Dec 25, 2008 6:43 am
Location: Oregon, USA
Callsign: MSJF
Version: GIT
OS: Gentoo

Re: INS Systems (from Unlimited Wishlist)

Postby Gijs » Mon Aug 24, 2009 8:12 pm

flameout wrote:Please post comments and suggestions, and I would like for it to be included in some aircraft.

Just implemented it to the 747-400. I'll have a closer look tomorrow, but as far as I can see the system works very well!
Great job you did there! Would love to feature it in the next release of the 744! ;)
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9544
Joined: Tue Jul 03, 2007 3:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: INS Systems (from Unlimited Wishlist)

Postby flameout » Mon Aug 24, 2009 8:36 pm

Thank you very much for implementing it. I will continue to work on it, and just keep updating the package in this topic.

Hope you enjoy it.

EDIT: Unfortunately, I have not had the time to work on this project for quite a while now. I am now looking at other projects. Therefore, I consider this project dead and hope someone else can pick up where I left off (or, even better, someone can re-code it in C++.) I hope I find more time soon.
Also known as Johnathan Van Why.
flameout
 
Posts: 442
Joined: Thu Dec 25, 2008 6:43 am
Location: Oregon, USA
Callsign: MSJF
Version: GIT
OS: Gentoo

Re: INS Systems (from Unlimited Wishlist)

Postby Necolatis » Thu Aug 31, 2017 7:07 am

Anyone still got the nasal code for this?

Am trying to update the wiki on how to include it in an aircraft. (http://wiki.flightgear.org/Inertial_Navigation_System)

I see something in the FGAddon concorde and 747-200. Is that the system this thread discusses, it looks different from the OP?
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2233
Joined: Mon Oct 29, 2012 1:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2020.3.19
OS: Windows 10

Re: INS Systems (from Unlimited Wishlist)

Postby Thorsten » Thu Aug 31, 2017 7:34 am

In case it's of any use, the Shuttle has a pretty detailed inertial navigation system simulation, including IMU alignment procedures, redundancy management and fault detection and Kalman filtering.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: INS Systems (from Unlimited Wishlist)

Postby Necolatis » Thu Aug 31, 2017 11:26 am

I will include the shuttle system description on the wiki, does it make use of JSBSim?

I also found the nasal file to make the other system work, wiki updated.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2233
Joined: Mon Oct 29, 2012 1:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2020.3.19
OS: Windows 10

Re: INS Systems (from Unlimited Wishlist)

Postby Thorsten » Thu Aug 31, 2017 11:30 am

I will include the shuttle system description on the wiki, does it make use of JSBSim?


It's a hybrid system (since drift is slow) - it has an instantaneous part which computes the values used for guidance, and it has a slow Nasal simulation of the error evolution (drift, alignment, filtering, redundancy management...) which feeds into the instantaneous part.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

PreviousNext

Return to New features

Who is online

Users browsing this forum: No registered users and 5 guests