Board index FlightGear Development Spaceflight

LEO targeting

Discussion about development and usage of spacecraft

Re: LEO targeting

Postby Thorsten » Wed Sep 25, 2019 8:53 am

I've never tried it with Orbiter, but I actually coded the position definition under the assumption that Orbiter users might easily interface with the program in that way - so I'm glad if this actually works.
Thorsten
 
Posts: 11060
Joined: Mon Nov 02, 2009 8:33 am

Re: LEO targeting

Postby GinGin » Thu Sep 26, 2019 7:40 am

Me neither.
I will try it tonight for the deorbit thing.
It is indeed really easy to feed it with lat Lon and speed. Never thought to that before .
GinGin
 
Posts: 764
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: LEO targeting

Postby Thorsten » Thu Sep 26, 2019 7:44 am

Currently it takes total velocity and upward velocity (and course) - does Orbiter provide that,, or would horizontal velocity be the better option?

(Well, the difference is probably academic, come to think of it...)
Thorsten
 
Posts: 11060
Joined: Mon Nov 02, 2009 8:33 am

Re: LEO targeting

Postby GinGin » Thu Sep 26, 2019 7:51 am

It should be ok.
There is a mfd giving Orbital speed or Relative speed, and vertical speed , lat Lon, and heading.
So that seems perfect :)
GinGin
 
Posts: 764
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: LEO targeting

Postby GinGin » Thu Sep 26, 2019 6:01 pm

I tried with Position instead of State vector, and it is giving me weird things.

I did like you said, position considered like time zero and I put in tig the time of ignition after time zero ( here 43 mn after the shuttle was in the specified position)

Maybe I am doing something wrong ?
Or it is not supposed to work the same way than when fed with state vector ?


Code: Select all
input

config

units SI
time_format MET
gravity_model spherical
earth_model spherical
burn_model constant
plot2d_resolution 200
fit_max_iterations 1000
fit verbose

position
lat 23.517
lon -44.838
alt 354500
heading 137
vup -4.25
vtot 7696.0



landing_site
name KSC




burn_peg4
name Deorbit
tig 000/00:43:00.0
thetaT 130
H 65.8
c1 14992
c2 -0.6017
ops 3





output

list
position entry_interface

plot2d
file shuttle_deorbit.dat   
x time
y altitude

end
GinGin
 
Posts: 764
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: LEO targeting

Postby Thorsten » Thu Sep 26, 2019 8:13 pm

Please define 'weird things' - are we looking at an unit conversion problem, something else,...?
Thorsten
 
Posts: 11060
Joined: Mon Nov 02, 2009 8:33 am

Re: LEO targeting

Postby GinGin » Thu Sep 26, 2019 8:34 pm

3 iterations and calculator stops ( whatever the parameters I put in Peg4)

Position datas come from there
Almost circular Orbit abeam KSC

Image


Could you try to run the config line I Put?

Also, I don't really know if the TIG I put is valid with the position data, as we don't specify a time like with the state vector ( But I understood it was time zero with position)
I will try to compare in FG with state vector and position from a same scenario, see if it converges towards same results
GinGin
 
Posts: 764
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: LEO targeting

Postby Thorsten » Fri Sep 27, 2019 5:57 am

Maybe I am doing something wrong ?


You've selecting SI units but assume that the PEG-4 parameters still are imperial units - the fit can neither accomodate a height of 65 m nor a c1 of 14992 m/s which is why it fails. If you convert these parameters into meters and m/s, it converges nicely.

How a time offset is parsed I have to check...

Edit: Seems MET is not parsed inside a position declaration, that is not the intended behavior and I'll make a fix available.

Until then, you can edit parser.cxx to look for the block

Code: Select all
      else if (block == "state_vector")
         {
         if (key == "met")
            {
            if (options.time_format_flag == 0)
               {
               options.initial_met = atof (element.c_str());
               }
            else if (options.time_format_flag == 1)
               {
               options.initial_met = converter.parse_time(element);
               }
            }

         }



and insert

Code: Select all
      else if (block == "position")
         {
         if (key == "met")
            {
            if (options.time_format_flag == 0)
               {
               options.initial_met = atof (element.c_str());
               }
            else if (options.time_format_flag == 1)
               {
               options.initial_met = converter.parse_time(element);
               }
            }

         }


right below, this seems to work
Thorsten
 
Posts: 11060
Joined: Mon Nov 02, 2009 8:33 am

Re: LEO targeting

Postby GinGin » Fri Sep 27, 2019 9:57 am

Perfect Thorsten, Thanks.
Indeed for the unit, I naively thought Peg4 was always in Imperial.

I am using Tig from position zero, like a base time, it is working perfectly so far.
And your addition for a MET coupled with the initial position will be even handier.

Here in Orbiter:


https://www.orbiter-forum.com/showthread.php?p=598433#post598433
GinGin
 
Posts: 764
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Re: LEO targeting

Postby Thorsten » Sat Sep 28, 2019 3:11 pm

I've posted the code of a 0.42 bugfix release.
Thorsten
 
Posts: 11060
Joined: Mon Nov 02, 2009 8:33 am

Re: LEO targeting

Postby GinGin » Sat Sep 28, 2019 8:54 pm

Thanks
GinGin
 
Posts: 764
Joined: Wed Jul 05, 2017 10:41 am
Location: Paris
Callsign: Gingin

Previous

Return to Spaceflight

Who is online

Users browsing this forum: No registered users and 2 guests