82 auto orbitalFooter=[&]() {
84 p.
labels.push_back({7,285,s.
onGround?L
"LAUNCH EST / NO TERRAIN CHECK":L
"PARKING ORBIT / GUIDANCE ONLY",
Amber});
return;
89 const bool known=c.
known&&std::isfinite(c.minimumKm)&&
93 p.
labels.push_back({7,285,L
"PLAN MIN ALT "+(known?
Number(c.minimumKm,1)+L
"km MSL":L
"---"),color});
98 constexpr double left=12,right=239,top=43,bottom=270,cx=(left+right)/2,cy=(top+bottom)/2;
99 auto line=[&](
Point a,
Point b,std::uint32_t c) {
100 if(!std::isfinite(a.
x)||!std::isfinite(a.
y)||!std::isfinite(b.x)||!std::isfinite(b.y))
return;
103 const double dx=b.x-a.
x,dy=b.y-a.
y;
double first=0,last=1;
104 auto clip=[&](
double direction,
double distance) {
105 if(std::abs(direction)<1e-12)
return distance>=0;
106 const double t=distance/direction;
107 if(direction<0) {
if(t>last)
return false; first=(std::max)(first,t); }
108 else {
if(t<first)
return false; last=(std::min)(last,t); }
111 if(!clip(-dx,a.
x-5)||!clip(dx,247-a.
x)||!clip(-dy,a.
y-38)||!clip(dy,281-a.
y))
return;
112 b={a.
x+last*dx,a.
y+last*dy}; a={a.
x+first*dx,a.
y+first*dy};
113 p.
lines.push_back({a,b,c});
115 auto label=[&](
Point at,
const std::wstring& text,std::uint32_t c) {
116 p.
labels.push_back({
int((std::clamp)(at.
x,6.0,246.0-5*text.size())),
int((std::clamp)(at.
y,38.0,268.0)),text,c});
118 auto mark=[&](
Point at,
const std::wstring& text,std::uint32_t c) {
119 line({at.
x-3,at.
y},{at.
x,at.
y-3},c); line({at.
x,at.
y-3},{at.
x+3,at.
y},c);
120 line({at.
x+3,at.
y},{at.
x,at.
y+3},c); line({at.
x,at.
y+3},{at.
x-3,at.
y},c);
121 if(!text.empty()) label({at.
x+5,at.
y-6},text,c);
125 p.
labels.push_back({7,22,L
"ASCENT / ALTITUDE VS DISTANCE",
Cyan});
128 p.
labels.push_back({7,53,L
"ALT km MSL",
Gray});
129 constexpr double x0=38,x1=237,y0=239,y1=73;
130 double distance=10,height=25;
131 for(
const auto* path:{&profile.plan,&profile.actual})
for(
const auto& a:*path) {
132 if(std::isfinite(a.distanceKm))distance=(std::max)(distance,a.distanceKm);
133 if(std::isfinite(a.altitudeKm))height=(std::max)(height,a.altitudeKm);
135 auto scale=[](
double maximum) {
136 const double power=std::pow(10.0,std::floor(std::log10(maximum)));
137 for(
double step:{1.,2.,2.5,5.,10.})
if(step*power>=maximum)
return step*power;
140 distance=scale(distance);height=scale(height);
141 for(
int j=0;j<=4;++j) {
142 const double fraction=j/4.,x=x0+(x1-x0)*fraction,y=y0-(y0-y1)*fraction;
143 line({x,y1},{x,y0},
Dim);line({x0,y},{x1,y},
Dim);
144 const auto altitude=
Number(height*fraction,height<100?1:0);
146 const auto range=
Number(distance*fraction,distance<100?1:0);
149 p.
labels.push_back({38,264,profile.pickup?L
"DIST FROM PICKUP (km)":L
"GROUND DISTANCE (km)",
Gray});
151 return Point{x0+(x1-x0)*a.distanceKm/distance,
152 y0-(y0-y1)*(std::max)(0.0,a.altitudeKm)/height};
154 auto draw=[&](
const std::vector<AscentPoint>& path,std::uint32_t color) {
155 for(
size_t j=1;j<path.size();++j)line(project(path[j-1]),project(path[j]),color);
157 draw(profile.plan,
Amber);draw(profile.actual,
Green);
158 if(!profile.actual.empty())
mark(project(profile.actual.back()),L
"",
Green);
159 if(profile.plan.empty())p.
labels.push_back({46,130,profile.pending?L
"COMPUTING PLAN...":L
"PLAN UNAVAILABLE",
Amber});
160 else if(profile.planFromKm>0)p.
labels.push_back({117,38,L
"FROM "+
Number(profile.planFromKm)+L
"km",
Amber});
161 p.
labels.push_back({7,285,profile.pending?L
"COMPUTING POWERED PLAN":profile.status,
Amber});
169 s.
plan.
ascent?L
"ASCENT / ACTUAL COAST":L
"ASCENT DETAIL / COAST",
Cyan});
174 if(
Norm(horizontal)<.5) horizontal={1,0,0};
175 constexpr double kmPerPixel=.6;
176 auto local=[&](
Vec point) {
return Point{55+
Dot(point,horizontal)/kmPerPixel,254-(
Dot(point,up)-s.
radius)/kmPerPixel}; };
177 for(
int i=-25;i<100;++i) {
178 const double x1=i*.001,x2=(i+1)*.001;
179 line(local((up*std::cos(x1)+horizontal*std::sin(x1))*s.
radius),local((up*std::cos(x2)+horizontal*std::sin(x2))*s.
radius),
Dim);
181 for(
double h:{0,25,50,75,100}) {
182 const double yy=254-h/kmPerPixel;
183 line({12,yy},{17,yy},
Gray); label({18,yy-12},
Number(h)+L
"km",
Gray);
186 for(
size_t i=1;i<s.
ownPath.size();++i) {
188 if(a.
x<12||a.
x>239||a.
y<43||a.
y>254||b.x<12||b.x>239||b.y<43||b.y>254)
continue;
194 auto planned=[&](
const Sample& point) {
return local(
Rotate(point.r,{0,0,1},-s.
spin*point.seconds)); };
199 else orbitalFooter();
210 u={-std::sin(az),std::cos(az),0}; v={-std::sin(el)*std::cos(az),-std::sin(el)*std::sin(az),std::cos(el)}; }
211 double extent=s.
radius*1.2;
212 auto include=[&](
Vec a) { extent=(std::max)(extent,(std::max)(std::abs(
Dot(a,u)),std::abs(
Dot(a,v)))); };
214 const double scale=extent>0?103/extent:0;
215 auto project=[&](
Vec a,
double t=0.0) ->
Point {
221 const double longitude=std::atan2(a.
x,-a.
y),latitude=-std::asin((std::clamp)(
Unit(a).z,-1.0,1.0));
222 return {left+(longitude+
Pi)/
Tau*(right-left),bottom-(latitude+
Pi/2)/
Pi*(bottom-top)};
224 return {cx+
Dot(a,u)*scale,cy-
Dot(a,v)*scale};
227 for(
int i=0;i<=6;++i) {
const double x=left+(right-left)*i/6; line({x,top},{x,bottom},
Dim); }
228 for(
int i=0;i<=4;++i) {
const double y=top+(bottom-top)*i/4; line({left,y},{right,y},
Dim); }
229 label({left,top},L
"N",
Gray); label({left,bottom-12},L
"S",
Gray);
231 const double radius=s.
radius*scale;
232 for(
int i=0;i<96;++i) {
const double a=
Tau*i/96,b=
Tau*(i+1)/96;
233 line({cx+radius*std::cos(a),cy+radius*std::sin(a)},{cx+radius*std::cos(b),cy+radius*std::sin(b)},
Dim); }
236 for(
int i=0;i<96;++i) line(project({s.
radius*std::cos(
Tau*i/96),s.
radius*std::sin(
Tau*i/96),0}),
238 line(project({}),project({0,0,s.
radius*1.15}),
Gray); label(project({0,0,s.
radius*1.15}),L
"N",
Gray);
240 label({cx-15,cy-6},L
"VIENEO",
Dim);
242 auto path=[&](
const std::vector<Sample>& points,std::uint32_t c,
bool dashed) {
243 for(
size_t i=1;i<points.size();++i) {
244 if(dashed&&(i/3)%2)
continue;
245 const auto a=project(points[i-1].r,points[i-1].seconds),b=project(points[i].r,points[i].seconds);
246 if(view!=
View::Track||std::abs(a.
x-b.x)<(right-left)/2) line(a,b,c);
263 line(project(n),project(n*(-1)),
Dim); label(project(n),L
"NODE",
Cyan); }
271 const auto at=project(point.r,point.seconds);
273 Point textAt{(std::clamp)(at.
x+5,6.0,231.0),(std::clamp)(at.
y-6,38.0,268.0)};
275 for(
int attempt=0;attempt<20;++attempt) {
277 for(
const auto& other:p.
labels)
278 overlap=overlap||(std::abs(textAt.
y-other.y)<11&&textAt.
x<other.x+other.text.size()*5+3&&textAt.
x+8>other.x);
280 textAt.
y+=12;
if(textAt.
y>268) textAt.
y=38;
293inline std::vector<Label>
Readouts(
const BusState& data,
const std::vector<Row>& rows,
int uiRow,
bool dorActive,
bool showKeys=
true)
295 std::vector<Label> labels;
297 auto text=[&](
const std::wstring& value,
int xx,
int yy,std::uint32_t color=
Gray) {
298 labels.push_back({xx,yy,value,color});
301 const bool executionVisible=std::fmod((std::max)(0.0,data.
clock),2.0)<1.0;
302 const bool rejectedSurface=s.mode==
Mode::Return&&!s.plan.entry.active&&s.plan.surface.available&&!s.plan.valid;
303 text(L
"DOR",5,2,0xffff00ff);
304 text(s.targetName.substr(0,24),45,2,
Cyan);
305 text(s.flightPhase,185,2,
Gray);
306 if(!dorActive||executionVisible)
308 !s.plan.valid?L
"NO PLAN":s.plan.ascent?(data.
launch.
pending?L
"SEARCH":
311 s.plan.planningOnly?L
"PLAN ONLY":s.plan.entry.active?L
"READY":L
"ESTIMATE",350,2,
313 for(
size_t i=0;i<rows.size();++i) {
314 const int yy=22+
int(i)*12;
315 if(
int(i)==uiRow) text(std::wstring(31,L
'\x2592'),255,yy,0xff00a0a0);
320 const bool compact=rows.size()>=7;
321 const int dy=22+
int(rows.size())*12+(compact?0:8);
325 if(s.onGround&&(!dorActive||g.ascentWaiting)) {
326 const auto& e=data.
launch;
327 const bool now=e.
valid&&e.launchEpoch-e.epoch<1&&data.
clock-e.epoch<=30;
328 const bool current=e.valid&&e.launchEpoch>=data.
clock;
329 const auto fuelText=[&](
double fuel) {
return fuel>=0?L
"~"+
Number(
fuel)+L
"kg":std::wstring(e.pending?L
"---":L
"NO FIT");};
330 text(g.ascentPlanning?L
"ARMED / COMPARING LAUNCHES":g.ascentWaiting?L
"ARMED / LAUNCH WAIT":e.pending?(e.fastest?L
"FINDING FASTEST RENDEZVOUS":L
"COMPARING LAUNCH TIMES..."):L
"MEET / LAUNCH ESTIMATE",255,dy,
Cyan);
331 text(e.pending?L
"CANDIDATE / NOT COMMITTED":g.ascentWaiting?L
"LIFTOFF IN "+
Clock(g.ascentLaunchEpoch-data.
clock):now?L
"LAUNCH NOW":current?L
"LAUNCH IN "+
Clock(e.launchEpoch-data.
clock):e.valid?L
"LAUNCH PASSED / UPDATING":L
"LAUNCH ---",255,dy+12,
Amber);
332 text(e.valid?L
"FACE "+
Number(e.heading*180/
Pi)+L
"deg T / "+(r.ascentOrbitSteering?L
"ORBIT":L
"AFCS"):L
"FACE ---",255,dy+24,0xffff00ff);
333 text(e.valid?L
"INSERT IN ~"+
Clock(e.insertionEpoch-data.
clock):L
"INSERT ---",255,dy+36,
Gray);
334 text(e.valid?L
"ASC ~"+
Number(e.ascentFuel)+L
"kg XFER ~"+
Number(e.transferFuel)+L
"kg":L
"ASC --- XFER ---",255,dy+48,
Gray);
335 text(e.valid?L
"TOTAL ~"+
Number(e.ascentFuel+e.transferFuel)+L
"kg":L
"TOTAL ---",255,dy+60,e.valid&&!e.fuelEnough?
Red:
Amber);
336 text(L
"MEET -5m "+fuelText(e.earlierFuel),255,dy+72,
Gray);
337 text(L
"MEET +5m "+fuelText(e.laterFuel),255,dy+84,
Gray);
338 text(e.status.substr(0,31),255,dy+96,e.valid?
Amber:
Gray);
339 text(L
"CURRENT GEAR / FIXED WEATHER",255,dy+108,
Gray);
340 text(L
"EST / NO ATTITUDE-RCS FUEL",255,dy+120,
Gray);
341 text(g.ascentWaiting?L
"DOR OFF / INPUT CANCELS WAIT":r.ascentWait?L
"DOR ARMS RECOMMENDED LAUNCH":L
"DOR LIFTS IMMEDIATELY",255,dy+132,
Cyan);
342 text((g.status.empty()?s.status:g.status).substr(0,31),255,266,
Amber);
343 text(s.mode==
Mode::Rendezvous?L
"AUTO TRANSFER AFTER INSERTION":L
"REPLAN RENDEZVOUS IN ORBIT",255,278,
Amber);
344 text(L
"GEAR RETRACTION: PILOT",255,290,
Gray);
345 if(showKeys) {text(L
"\x21e7+\x2190/\x2192 Change",5,304,0xff00a0a0);text(L
"\x21e7+\x2191/\x2193 Select row",315,304,0xff00a0a0);}
348 text(s.mode==
Mode::Rendezvous?L
"ASCENT / AUTO TRANSFER NEXT":L
"PARKING ORBIT / NO ETA",255,dy,
Cyan);
349 text(L
"ALT "+
Number(
Norm(s.ownState.r)-s.radius,1)+L
"km MSL",255,dy+14,
Green);
350 text(L
"AP "+(s.own.bound?
Number(s.own.ap-s.radius,1):L
"---")+L
"km",255,dy+26,
Green);
351 text(L
"PE "+(s.own.valid?
Number(s.own.pe-s.radius,1):L
"---")+L
"km",255,dy+38,
Green);
352 text(L
"ORBIT HDG "+
Number(g.ascentOrbitHeading*180/
Pi)+L
"deg T",255,dy+54,0xffff00ff);
353 text(L
"PITCH "+(g.ascentControl?
Number(g.pitch*180/
Pi,1):L
"---")+L
"deg",255,dy+66,
Gray);
354 text(L
"MAIN "+(g.ascentControl?
Number(g.ascentMain*100):L
"---")+L
"% RCS "+
355 (g.ascentControl?
Number(g.ascentNormal*100):L
"---")+L
"%",255,dy+78,
Gray);
356 text(L
"TGT TAS "+(g.ascentControl?
Number(g.ascentTargetSpeed,2):L
"---")+L
"km/s",255,dy+90,
Gray);
357 text(L
"TGT VSI "+(g.ascentControl?
Number(g.ascentTargetClimb*1000):L
"---")+L
"m/s",255,dy+102,
Gray);
358 text(L
"IAS "+(g.ascentControl?
Number(g.entryForecastIasFraction*100):L
"---")+L
"% / 95% VNE",255,dy+116,g.entryLimited?
Red:
Gray);
359 text(L
"AFT "+(g.ascentControl?
Number(g.entryForecastAftC):L
"---")+L
"C / 200C",255,dy+128,g.entryLimited?
Red:
Gray);
360 text(L
"USED "+
Number(g.fuelUsedKg)+L
"kg / NO BUDGET",255,dy+140,
Amber);
361 if(!dorActive||executionVisible) text((g.status.empty()?s.status:g.status).substr(0,31),255,266,g.entryLimited?
Red:
Amber);
362 text(L
"ALPHA / NO TERRAIN CHECK",255,278,
Amber);
363 text(L
"GEAR RETRACTION: PILOT",255,290,
Gray);
364 if(showKeys) {text(L
"\x21e7+\x2190/\x2192 Change",5,304,0xff00a0a0);text(L
"\x21e7+\x2191/\x2193 Select row",315,304,0xff00a0a0);}
368 const auto& p=s.plan;
const auto& e=p.entry;
370 text(p.surface.reason.substr(0,31),255,dy,p.valid&&!p.planningOnly?
Green:
Amber);
371 const double age=(std::max)(0.0,data.
clock-s.epoch);
372 text(L
"DEORBIT "+(p.surface.available?
Clock(e.coastSeconds-age):L
"---"),255,dy+14,
Cyan);
373 text(L
"100km "+(p.surface.available?
Clock(e.entrySeconds-age):L
"---"),255,dy+26,
Cyan);
374 text(L
"ENTRY FUEL ~"+
Number(p.fuel)+L
"kg",255,dy+40,
Amber);
375 text(L
"PEAK REV "+
Number(e.peakReverse*100)+L
"% RCS "+
Number(e.peakNormal*100)+L
"%",255,dy+52,
Gray);
376 text(L
"PEAK IAS "+
Number(e.peakIasFraction*100)+L
"% / 95% VNE",255,dy+64,e.peakIasFraction>.95?
Red:
Gray);
377 text(L
"PEAK AFT "+
Number(e.peakAftC)+L
"C / 200C",255,dy+76,e.peakAftC>200?
Red:
Gray);
378 text((p.arrival.valid&&(p.arrival.mode==
Final::Ils||p.arrival.mode==
Final::Visual)?L
"DESC 20>3deg ~":L
"GLIDE ~")+
379 Number(e.glideKm)+L
"km TO "+(p.arrival.valid?L
"FINAL":L
"B"),255,dy+88,
Gray);
380 text(L
"LOAD "+
Number(e.peakLoadFraction*100)+L
"% / 95% LIMIT",255,dy+104,e.peakLoadFraction>.95?
Red:
Gray);
381 text(e.skipChecked?L
"SKIP CHECKED / ENTRY":L
"SKIP NOT CHECKED",255,dy+116,e.skipChecked?
Gray:
Amber);
382 text(e.transferCoastEnd<=e.transferCoastStart?L
"CONTINUOUS ENTRY":
383 age>=e.transferCoastEnd?L
"COAST COMPLETE":
384 age>=e.transferCoastStart?L
"COAST END "+
Clock(e.transferCoastEnd-age):
385 L
"COAST "+
Clock(e.transferCoastStart-age)+L
" / "+
Clock(e.transferCoastEnd-age),255,dy+128,
Gray);
390 text(p.arrival.valid?p.arrival.status:data.
speedHoldValid?L
"TAS HOLD / AFCS GUIDANCE":L
"ALPHA / NO TERRAIN CHECK",255,290,
Amber);
391 if(showKeys) {text(L
"\x21e7+\x2190/\x2192 Change",5,304,0xff00a0a0);text(L
"\x21e7+\x2191/\x2193 Select row",315,304,0xff00a0a0);}
395 text(r.surfaceDurationHeld?L
"ROUTES AT SELECTED TRIP":L
"ROUTES AT SELECTED PASS",255,dy,
Cyan);
396 for(
int i=0;i<3;++i) {
397 const auto& option=s.plan.alternatives[i];
399 text(name+(option.available?L
" ~"+
Number(option.fuel)+L
"kg":L
" ---"),255,dy+12+i*24,
401 text(option.reason,255,dy+24+i*24,option.fits?
Gray:
Amber);
403 const auto& e=s.plan.surface;
404 const double range=
Angle(s.ownState.r,s.targetState.r)*s.radius;
405 text(L
"RANGE "+
Number(range,range<10?1:0)+L
"km",255,dy+90,
Cyan);
406 text(L
"TOP "+(e.available?
Number(e.altitudeKm,1)+L
"km MSL":L
"---"),255,dy+102,
Gray);
407 text(L
"TOTAL "+(e.available?
Number(e.deltaV*1000)+L
"m/s":L
"---"),255,dy+114,
Amber);
408 text(L
"FUEL "+(e.available?L
"~"+
Number(e.fuel)+L
"kg":L
"---"),255,dy+126,
Amber);
409 text(L
"THRUST "+(e.available?
Number(e.peakThrust*100)+L
"% peak":L
"---"),255,dy+138,e.available&&e.peakThrust>1?
Red:
Gray);
410 text(L
"MAX q "+(e.available?
Number(e.peakQ/1000,1)+L
"kPa":L
"---"),255,dy+150,
Gray);
411 if(e.available&&(s.plan.retrograde||s.plan.reversesOrbit))
412 text(s.plan.reversesOrbit?L
"ORBIT REVERSAL":L
"RETROGRADE ORBIT",120,22,
Amber);
414 text(L
"NO TERRAIN / HEAT CHECK",255,290,
Gray);
415 if(showKeys&&!rows.empty()) {
416 text(L
"\x21e7+\x2190/\x2192 Change",5,304,0xff00a0a0);
417 text(L
"\x21e7+\x2191/\x2193 Select row",315,304,0xff00a0a0);
421 const bool plan=s.plan.valid;
auto goal=s.plan.goal;
424 if((plan||s.plan.clearanceBlocked)&&(s.plan.reversesOrbit||s.plan.retrograde))
425 text(s.plan.reversesOrbit?(s.plan.retrograde?L
"RETROGRADE / REVERSAL":L
"ORBIT REVERSAL"):L
"RETROGRADE ORBIT",120,22,
Amber);
426 const bool draft=!plan&&s.mode==
Mode::Adjust&&r.initialized;
427 if(draft) { goal.a=r.lock==
Lock::None?r.sizeKm:r.heldRadiusKm/(r.lock==
Lock::Ap?1+r.eccentricity:1-r.eccentricity);
428 goal.e=r.eccentricity; goal.ap=goal.a*(1+goal.e); goal.pe=goal.a*(1-goal.e); }
429 text(plan?L
"CURRENT > FINAL":draft?L
"CURRENT > REQUEST":L
"CURRENT ORBIT",255,dy,
Cyan);
430 auto comparison=[&](
const wchar_t* name,
double actual,
double proposed,
int decimals) {
431 return std::wstring(name)+
Number(actual,decimals)+((plan||draft)?L
">"+
Number(proposed,decimals):L
"");
433 text(!s.own.valid?L
"AP ---":s.own.bound?comparison(L
"AP ",s.own.ap-s.radius,goal.ap-s.radius,1)+L
"km":L
"AP UNBOUND",255,dy+12,
Green);
434 text(s.own.valid?comparison(L
"PE ",s.own.pe-s.radius,goal.pe-s.radius,1)+L
"km":L
"PE ---",255,dy+24,
Green);
435 text(s.own.valid?comparison(L
"e ",s.own.e,goal.e,4):L
"e ---",255,dy+36,
Green);
437 text(L
"PLANE DIF "+
Number(
Angle(s.own.normal,s.target.normal)*180/
Pi,2)+L
"deg",255,dy+48,
Cyan);
438 else text(s.own.valid?L
"i "+
Number(s.own.inclination*180/
Pi,2)+L
"deg":L
"i ---",255,dy+48,
Green);
439 if(s.plan.poweredTransfer.valid) {
440 const auto& transfer=s.plan.poweredTransfer;
441 text(L
"MAIN "+
Number(transfer.peakMain*100)+L
"% RCS "+
Number(transfer.peakTrim*100)+L
"% peak",255,dy+60,
Gray);
442 }
else text((s.own.bound?L
"TP "+
Number(s.own.period)+L
"s":L
"TP ---")+L
" nu "+(s.own.valid?
Number(s.own.anomaly*180/
Pi,1):L
"---"),255,dy+60,
Gray);
443 int by=dy+(compact?72:78);
444 const double age=(std::max)(0.0,data.
clock-s.epoch);
445 for(
int i=0;i<2;++i) {
446 if(i<
int(s.plan.burns.size())) {
447 const auto& b=s.plan.burns[i];
450 const auto when=done?L
"DONE":b.at<=.5?L
"NOW":
Clock((std::max)(0.0,b.at-age));
452 text(s.plan.performance?std::wstring(s.plan.poweredTransfer.valid?L
"BURN ":L
"IDEAL ")+
Number(b.duration,1)+L
"s / "+
Number(b.fuel,1)+L
"kg":L
" PERFORMANCE ---",255,by+12,
Gray);
453 }
else text(i==0?L
"B1 ---":L
"B2 ---",255,by,
Dim);
456 text(plan?L
"TOTAL "+
Number(s.plan.deltaV*1000)+L
"m/s":L
"TOTAL ---",255,by+4,
Amber);
457 text(plan&&s.plan.performance?std::wstring(s.plan.poweredTransfer.valid?L
"TOTAL FUEL ~":L
"IDEAL FUEL ~")+
Number(s.plan.fuel,1)+L
"kg":L
"FUEL ---",255,by+16,
Amber);
462 const bool atmPass=lowPass||guidance.atmosphere||s.atmosphere||s.plan.atmosphere||s.plan.clearanceBlocked;
466 const auto& correction=guidance.correctionClearance;
468 text(L
"CORRECTION MIN "+
Number(correction.minimumKm,1)+L
"km",255,266,
Red);
470 text(L
"PLAN MIN "+
Number(s.plan.clearance.minimumKm,1)+L
"km",255,266,
Red);
471 else if(s.lowAtmosphere&&s.actualCoast.known)
472 text(L
"COAST MIN "+
Number(s.actualCoast.minimumKm,1)+L
"km",255,266,
Red);
473 else if(guidance.lowAtmosphere) text(L
"EXEC PATH <100km",255,266,
Red);
475 else if(s.plan.atmosphere||s.plan.clearanceBlocked) text(L
"PLAN ATM PASS",255,266,
Amber);
476 else if(atmPass) text(s.actualCoast.known?L
"COAST ATM q>10Pa":L
"CURRENT ATM q>10Pa",255,266,
Amber);
477 auto status=guidance.status.empty()?s.status:guidance.status;
478 if(status.compare(0,4,L
"DOR ")==0) {
481 status+=L
" MECO "+(guidance.mecoSeconds>=0?L
"~"+
Clock(std::ceil(guidance.mecoSeconds)):L
"---");
483 if(dorActive&&!executionVisible) status.assign(status.size(),L
' ');
485 if(dorActive&&s.status==L
"ATMOSPHERIC TARGET") status+=L
" / ATM TARGET";
487 if(dorActive) text(L
"LEFT "+
Number(guidance.remainingDeltaV*1000,1)+L
"m/s ALL USED "+
Number(guidance.fuelUsedKg)+L
"kg",255,290,
Amber);
488 else if(s.plan.clearanceBlocked&&s.plan.clearance.known)
489 text(L
"MIN "+
Number(s.plan.clearance.minimumKm,1)+L
"km / BLOCKED",255,290,lowPass?
Red:
Amber);
490 else if(s.mode==
Mode::Rendezvous) text(s.plan.poweredTransfer.valid?L
"5km TRAIL / POWERED PROGRADE":s.plan.longBurn?L
"5km TRAIL / FINITE BURN APPROX":L
"5km TRAIL / COAST ASSUMED",255,290,
Gray);
491 else if(s.plan.longBurn) text(L
"FINITE BURN NOT CORRECTED",255,290,
Gray);
492 else if(plan&&!s.plan.fuelEnough&&s.plan.performance) text(L
"INSUFFICIENT FUEL",255,290,
Amber);
493 if(showKeys&&!rows.empty()) {
494 std::wstring action=L
"\x21e7+\x2190/\x2192 Change";
495 if(rows[uiRow]==
Row::Mode) action+=L
" objective";
497 else if(rows[uiRow]==
Row::View) action+=L
" view";
498 text(action,5,304,0xff00a0a0);
499 text(L
"\x21e7+\x2191/\x2193 Select row",315,304,0xff00a0a0);